/* about.css - About Page Specific Styles */

/* About Page Hero */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 80px; /* Account for fixed header */
    background: linear-gradient(to right, #1a3a6b, #2c5aa0);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* History Section */
.history-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.history-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.history-text p {
    margin-bottom: 1.5rem;
}

.history-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
}

.history-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.history-image .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 2rem 1rem 1rem;
    text-align: center;
    font-style: italic;
}

.stat-highlight {
    display: inline-block;
    background: #2c5aa0;
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin-top: 2rem;
}

.stat-highlight .number {
    font-size: 3rem;
    font-weight: bold;
    display: block;
}

.stat-highlight .label {
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Mission Section */
.mission-section {
    background: #f8f9fa;
    padding: 6rem 2rem;
}

.mission-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Mission Statement - Fixed Progressive Sizing */
.mission-statement {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.8;
    width: 100%;
    max-width: 650px; /* Desktop max width */
    margin: 0 auto 4rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
    box-sizing: border-box;
}

.mission-statement::before {
    content: '"';
    font-size: 4rem;
    color: #2c5aa0;
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: serif;
}

.mission-statement::after {
    content: '"';
    font-size: 4rem;
    color: #2c5aa0;
    position: absolute;
    bottom: -40px;
    right: 20px;
    font-family: serif;
}

/* What We Do Section - Fixed Progressive Sizing */
.what-we-do {
    display: grid;
    grid-template-columns: minmax(0, 425px) minmax(0, 450px); /* Second column twice as wide (was 225px) */
    gap: 2rem;
    width: 100%;
    max-width: 907px; /* Adjusted for 425px + 450px + 32px gap */
    margin: 4rem auto 0;
    padding: 0;
    box-sizing: border-box;
    justify-content: center; /* Center the grid items */
}

.what-we-do ul {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: left;
}

.what-we-do-section {
    background: white;
    border-radius: 10px;
    padding: 1.75rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.what-we-do-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.what-we-do h3 {
    color: #2c5aa0;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1.6rem;
    display: inline-flex;
}

.what-we-do li {
    margin-bottom: 0.6rem;
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: all 0.3s;
}

.what-we-do li:last-child {
    margin-bottom: 0;
}

.what-we-do li:hover {
    color: #2c5aa0;
    background: #f8f9fa;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 6px;
}

.activity-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    transform: translateX(-10px);    
}

.activity-content {
    flex: 1;
    padding-top: 0.1rem;
    padding-left: 0;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.activity-description {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    line-height: 1.3;
}

/* Alternative approach for tighter spacing */
.what-we-do li .activity-icon {
    margin-right: -0.2rem;
}

.what-we-do li .activity-content {
    margin-left: -0.2rem;
}

/* ============================================
   PROGRESSIVE RESPONSIVE DESIGN
   All elements shrink proportionally from desktop max
   ============================================ */

/* Large screens - elements at maximum width */
@media (min-width: 1201px) {
    .mission-container {
        padding: 0 2rem;
    }
}

/* Medium-large screens - start proportional shrinking */
@media (max-width: 1200px) {
    .mission-statement,
    .what-we-do {
        max-width: calc(100% - 4rem); /* Start using percentage with padding */
    }
}

/* Tablet screens - Keep stat-highlight and image on same row */
@media (max-width: 968px) and (min-width: 769px) {
    /* Create a wrapper for the stat-highlight to control layout */
    .history-text {
        position: relative;
    }
    
    /* Create a flex container for stat and image */
    .history-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    /* Create a new row for stat and image */
    .stat-image-row {
        display: grid;
        grid-template-columns: 40% 60%;
        gap: 2rem;
        align-items: center;
        margin-top: 2rem;
    }
    
    /* Adjust stat-highlight for side-by-side layout */
    .history-text .stat-highlight {
        margin-top: 0;
        width: 100%;
        height: fit-content;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    /* Ensure image maintains good proportions */
    .history-image {
        width: 100%;
        height: auto;
    }
    
    .history-image img {
        height: 300px; /* Slightly smaller than desktop */
        width: 100%;
        object-fit: cover;
    }
}

/* For JavaScript to restructure DOM on tablets */
@media (max-width: 968px) and (min-width: 769px) {
    /* This will be applied via JavaScript */
    .history-content.tablet-layout .history-text {
        grid-column: 1 / -1; /* Full width for text */
    }
}

/* Tablet screens */
@media (max-width: 968px) {
    /* History section to single column */
    .history-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .history-image img {
        height: 350px;
    }
    
    /* What We Do to single column */
    .what-we-do {
        grid-template-columns: 1fr !important; /* Force single column */
        gap: 1.5rem;
        max-width: calc(100% - 3rem);
        margin: 3rem auto 0; /* Center the container */
        width: 100%; /* Ensure full width within constraints */
    }
    
    /* Make white panels full width within their container */
    .what-we-do-section {
        width: 100%;
        max-width: 100%;
        min-width: 0; /* Allow shrinking */
        box-sizing: border-box;
    }
    
    /* Center "Who We Serve" content */
    .what-we-do-section:nth-child(2) {
        display: flex;
        flex-direction: column;
        align-items: center; /* Center all content */
    }
    
    .what-we-do-section:nth-child(2) ul {
        padding-left: 1rem; /* Normal padding like "What We Do" */
        padding-right: 1rem;
        box-sizing: border-box;
        width: auto; /* Let width be determined by content */
        max-width: 90%; /* Prevent it from getting too wide */
        margin: 0 auto; /* Center the ul */
        display: inline-block; /* Shrink to fit content */
    }
    
    /* Mission statement adjustments */
    .mission-statement {
        max-width: calc(100% - 3rem);
        padding: 2.5rem 2rem;
        font-size: 1.2rem;
    }
    
    .mission-statement::before,
    .mission-statement::after {
        font-size: 3rem;
    }
    
    .mission-statement::before {
        top: -5px;
        left: 15px;
    }
    
    .mission-statement::after {
        bottom: -30px;
        right: 15px;
    }
}

/* Mobile screens */
@media (max-width: 768px) {
    /* Hero adjustments */
    .hero {
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    /* Mission section */
    .mission-section {
        padding: 4rem 1rem;
    }
    
    .mission-container {
        padding: 0;
    }
    
    .mission-statement {
        max-width: 100%;
        padding: 2rem 1.5rem;
        font-size: 1.1rem;
        line-height: 1.7;
        margin-bottom: 3rem;
    }
    
    .mission-statement::before,
    .mission-statement::after {
        font-size: 2.5rem;
    }
    
    .mission-statement::before {
        top: 0;
        left: 10px;
    }
    
    .mission-statement::after {
        bottom: -25px;
        right: 10px;
    }
    
    /* What We Do section */
    .what-we-do {
        max-width: 100%;
        margin-top: 2rem;
    }
    
    .what-we-do-section {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Disable hover effects on mobile */
    .what-we-do-section:hover {
        transform: none;
    }
    
    .what-we-do h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .section-icon {
        font-size: 1.4rem;
    }
    
    .what-we-do ul {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Maintain "Who We Serve" centering on mobile */
    .what-we-do-section:nth-child(2) {
        display: flex;
        flex-direction: column;
        align-items: center; /* Keep centering */
        text-align: center; /* Center text alignment */
    }
    
    /* Reset the "Who We Serve" padding on mobile */
    .what-we-do-section:nth-child(2) ul {
        width: auto !important; /* Let width fit content */
        max-width: 90%; /* Slightly less than full width */
        padding-left: 0.75rem !important; /* Match other section */
        padding-right: 0.75rem !important;
        margin: 0 auto !important; /* Ensure centering */
        text-align: left !important; /* Keep list items left-aligned */
        display: inline-block !important; /* Shrink to fit content */
    }

    .what-we-do li {
        padding: 0.4rem 0;
        margin-bottom: 0.5rem;
        gap: 0.5rem;
    }
    
    /* Disable expanding hover on mobile */
    .what-we-do li:hover {
        background: transparent;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        color: #2c5aa0;
    }
    
    .activity-icon {
        font-size: 1.2rem;
        transform: none;
        margin-right: 0;
    }
    
    .activity-title {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .activity-description {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    /* History section */
    .history-content {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Stack in order: text, stat, image */
    .history-text {
        order: 1;
    }
    
    .stat-highlight {
        order: 2;
        margin: 1.5rem auto;
        width: 100%; /* Full width to match image */
        max-width: none; /* Remove max-width constraint */
        box-sizing: border-box; /* Include padding in width */
    }
    
    .history-image {
        order: 3;
        width: 100%;
    }
    
    .history-image img {
        height: 250px;
    }
    
    .history-image .caption {
        padding: 1.5rem 0.75rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .stat-highlight {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .stat-highlight .number {
        font-size: 2.5rem;
    }
    
    .stat-highlight .label {
        font-size: 1rem;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    /* Hero */
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    /* Sections */
    .section-header h2 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* Mission */
    .mission-section {
        padding: 3rem 0.5rem;
    }
    
    .mission-statement {
        padding: 1.75rem 1.25rem;
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* What We Do */
    .what-we-do-section {
        padding: 1.25rem 1rem;
    }
    
    .what-we-do h3 {
        font-size: 1.15rem;
        gap: 0.35rem;
    }
    
    .section-icon {
        font-size: 1.25rem;
    }
    
    .what-we-do ul {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .what-we-do li {
        padding: 0.35rem 0;
        margin-bottom: 0.4rem;
        font-size: 0.9rem;
    }
    
    .activity-icon {
        font-size: 1.1rem;
    }
    
    .activity-title {
        font-size: 0.9rem;
    }
    
    .activity-description {
        font-size: 0.7rem;
    }
    
    /* History */
    .history-text {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .history-text p {
        margin-bottom: 1.25rem;
    }
    
    /* Stat highlight */
    .stat-highlight .number {
        font-size: 2rem;
    }
}

/* Ensure smooth transitions */
.mission-statement,
.what-we-do,
.what-we-do-section {
    transition: all 0.3s ease;
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

.mission-section,
.content-section,
section {
    overflow-x: hidden;
}

/* Text overflow handling */
.what-we-do li {
    word-break: break-word;
}

.activity-content {
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
}