﻿/* Section Wrapper */
.section-wrapper {
    width: 100%;
    margin-bottom: 3rem;
}

/* Header Styling */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

    .section-header h2 {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--primary-blue);
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-bottom: 0.5rem;
    }

    .section-header h1 {
        font-size: 2rem;
        font-weight: 800;
        color: var(--accent-teal);
    }

/* --- OUR IMPACT Section Styling --- */
.impact-section {
    margin-top: 50px;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #e0f2f1 0%, var(--bg-light) 100%);
    position: relative;
    overflow: hidden;
}

/* Impact Metrics Grid */
.impact-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .impact-metrics-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.metric-item {
    text-align: center;
    padding: 1rem 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    border-bottom: 3px solid var(--primary-blue);
    transition: all 0.2s;
}

    .metric-item h3 {
        font-size: 2rem;
        font-weight: 900;
        color: var(--primary-blue);
        line-height: 1;
        margin-bottom: 0.25rem;
    }

    .metric-item:nth-child(even) {
        border-bottom-color: var(--accent-teal);
    }

        .metric-item:nth-child(even) h3 {
            color: var(--accent-teal);
        }

    .metric-item p {
        font-size: 0.875rem;
        color: #4b5563;
        font-weight: 500;
        margin: 0;
        line-height: 1.3;
        padding: 0 0.2rem;
    }

/* Visual Element Placeholder (Infographic/Map substitute) */
.impact-graphic-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
    z-index: 5;
}

/* --- Image Gallery Section Styling --- */
.gallery-section {
    padding: 2.5rem 0;
    margin-top: 3rem;
}

.gallery-header h1 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    text-transform: none;
    margin-bottom: 2rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns default */
    gap: 1rem;
}

@media (min-width: 640px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on sm+ */
    }
}

@media (min-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on md+ */
    }
}

.image-container {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-base);
    position: relative;
    aspect-ratio: 16 / 9; /* Maintain aspect ratio */
    transition: transform 0.3s ease;
    cursor: pointer;
}

    .image-container:hover {
        transform: scale(1.05);
        z-index: 20;
    }

    /* Style for the image */
    .image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        filter: brightness(0.7); /* Darken image slightly for text contrast */
    }

/* Style for the overlaid text */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--bg-light); /* White text */
    padding: 0.75rem; /* Increased padding slightly */
    background-color: rgba(0, 0, 0, 0.2); /* Subtle dark overlay */
}

    .image-overlay h3 {
        font-size: 1rem;
        font-weight: 700;
        margin: 0;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        line-height: 1.2; /* Tighter line height for better fit */
        word-break: break-word; /* Ensure long words break */
    }

/* NEW: Smaller font for very narrow screens */
@media (max-width: 480px) {
    .image-overlay h3 {
        font-size: 0.85rem; /* Reduce size on narrow screens */
    }
}

.image-container:hover .image-overlay {
    background-color: rgba(0, 0, 0, 0.4); /* Darker overlay on hover */
}

/* Utility classes for responsive visibility */
@media (max-width: 639px) {
    .hidden-on-mobile {
        display: none;
    }
}

@media (max-width: 767px) {
    .hidden-on-tablet {
        display: none;
    }
}

@media (min-width: 640px) {
    .hidden-on-tablet {
        display: none;
    }
}

@media (min-width: 768px) {
    .hidden-on-tablet {
        display: flex;
    }
    /* Show on large desktop */
}
