/* ==========================================================================
   ToCAWI Impact/Projects Component-Specific Stylesheet
   ========================================================================== */

/* Layout Foundations */
.projects-page-body {
    background-color: #ffffff;
    color: #4a4a4a;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.standard-reading-width {
    max-width: 850px;
}

.text-center {
    text-align: center;
}

/* Color Map Constants */
.text-blue { color: #3b5cbd; }
.text-green { color: #5da447; }
.text-white { color: #ffffff; }
.text-dark { color: #4e4e4e; }

/* Global Grid Layout Block Types */
.page-section-blue {
    background-color: #3b5cbd;
    padding: 100px 0;
}

.page-section-white {
    background-color: #ffffff;
    padding: 90px 0;
}

.page-section-beige {
    background-color: #f6f4f0;
    padding: 100px 0;
}

/* Responsive Typography Engine */
.georgia-title, .georgia-subtitle {
    font-family: 'Georgia', serif;
    font-weight: 700;
    margin: 0;
}

.huge-title {
    font-size: 4.8rem;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 35px;
}

.large-title {
    font-size: 3.5rem;
    line-height: 1.2;
}

.card-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 15px;
}

.body-text {
    font-size: 1.2rem;
    line-height: 1.65;
    margin: 0 0 25px 0;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   SECTION 1: Impact Hero Layout
   ========================================================================== */
.projects-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
}

.project-hero-img {
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: cover;
}

/* ==========================================================================
   SECTION 2: Success Stories Segment
   ========================================================================== */
.stories-main-title {
    margin-bottom: 60px;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.story-card {
    background-color: #dd7945; /* Brand Accent Orange */
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.story-img-wrapper {
    width: 100%;
    height: 230px;
    overflow: hidden;
}

.story-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-content {
    padding: 35px 25px;
    flex-grow: 1;
}

.story-body-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #2b3a66; /* Higher contrast deep tint for text over orange background */
    margin: 0;
}

/* ==========================================================================
   SECTION 3: Green Metrics Board
   ========================================================================== */
.stats-section {
    padding-top: 40px;
    padding-bottom: 90px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.stat-card {
    background-color: #5da447; /* Brand Organic Green */
    border-radius: 24px;
    padding: 70px 30px;
    text-align: center;
}

.stat-number {
    font-family: 'Georgia', serif;
    font-weight: 700;
    font-size: 4.5rem;
    color: #dd7945; /* Brand Accent Orange */
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #3b5cbd; /* Brand Blue */
}

/* ==========================================================================
   SECTIONS 4 & 5: Case Study Flex Rows
   ========================================================================== */
.case-study-section {
    padding: 60px 0;
}

.case-study-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.case-title {
    margin-bottom: 25px;
}

.case-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ==========================================================================
   SECTION 6: Testimonials Layout Blocks
   ========================================================================== */
.testimonials-main-title {
    margin-bottom: 70px;
}

.testimonial-block {
    text-align: center;
    margin-bottom: 60px;
}

.testimonial-block.no-margin-bottom {
    margin-bottom: 0;
}

.testimonial-quote {
    font-size: 1.35rem;
    line-height: 1.65;
    color: #3b5cbd;
    font-weight: 400;
    font-style: italic;
    margin: 0 auto 20px auto;
    max-width: 720px;
}

.testimonial-divider {
    width: 50px;
    height: 2px;
    background-color: #5da447;
    margin: 0 auto 20px auto;
}

.testimonial-author {
    font-size: 1.15rem;
    color: #3b5cbd;
    display: block;
}

/* ==========================================================================
   Mobile & Tablet Adaptive Media System
   ========================================================================== */

@media (max-width: 1024px) {
    .huge-title {
        font-size: 3.8rem;
    }

    .stories-grid, 
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .stat-card {
        padding: 50px 30px;
    }

    .case-study-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Standard Responsive Ordering Reversal rules for staggered images */
    .img-right-layout .case-study-text {
        order: 1;
    }
    .img-right-layout .case-study-image {
        order: 2;
    }
}

@media (max-width: 768px) {
    .projects-hero-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .projects-hero-text {
        order: 1;
    }

    .projects-hero-image {
        order: 2;
    }

    .huge-title {
        font-size: 3rem;
    }

    .large-title {
        font-size: 2.3rem;
    }

    .testimonial-quote {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .page-section-blue,
    .page-section-white,
    .page-section-beige {
        padding: 55px 0;
    }

    .huge-title {
        font-size: 2.5rem;
    }

    .stat-number {
        font-size: 3.5rem;
    }
}
