/* Basic Reset & Globals (Partial, for context if needed by header) */
body {
    margin: 0;
    font-family: Arial, sans-serif;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    /* padding: 20px 0; Relevant for other sections, header has its own padding */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
}

/* Header Styles */
header {
    background-color: #ffffff;
    padding: 15px 0;
    /* Vertical padding for the header */
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    /* Logo left, Nav right */
    align-items: center;
    /* Removed top/bottom padding from here as header itself has padding */
}

.logo {
    max-height: 60px;
    /* Default logo height */
    flex-shrink: 0;
    /* Prevent logo from shrinking if nav items are many */
}

/* Navigation Styles */
header nav {
    /* Nav will align to the right due to justify-content: space-between on parent */
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    /* CRITICAL: Allows items to wrap to the next line */
    justify-content: flex-end;
    /* Default: align nav items to the right edge of the nav block */
    align-items: center;
    /* Vertically center items if they have different heights */
    gap: 15px;
    /* Space between navigation items */
}

header nav ul li {
    /* No specific styles needed here by default, 'a' tag handles appearance */
}

header nav ul li a {
    color: #333;
    font-weight: bold;
    padding: 8px 12px;
    /* Decent padding for clickability */
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
    /* Allows padding and margin to work as expected */
    white-space: nowrap;
    /* Prevents text within a single link from wrapping */
}

header nav ul li a:hover,
header nav ul li a.active {
    /* Assuming an 'active' class for current page */
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
}

/* Responsive Adjustments for Header and Navigation */

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {

    /* Using .98 for common breakpoint pattern */
    .logo {
        max-height: 50px;
    }

    header nav ul {
        gap: 10px;
        /* Reduce gap between items */
        justify-content: center;
        /* Center items when they start wrapping on smaller-ish screens */
    }

    header nav ul li a {
        font-size: 0.9em;
        padding: 6px 10px;
        /* Slightly reduce padding */
    }
}

/* Small devices (large phones, landscape, small tablets, less than 768px) */
@media (max-width: 767.98px) {
    header .container {
        flex-direction: column;
        /* Stack logo and nav vertically */
        align-items: center;
        /* Center them in the column */
    }

    .logo {
        margin-bottom: 15px;
        /* Space between logo and nav when stacked */
    }

    header nav {
        width: 100%;
        /* Allow nav to take full width for its content alignment */
    }

    header nav ul {
        /* justify-content: center; is inherited and appropriate here */
        /* gap: 10px; is inherited */
    }

    /* 'a' tag styles mostly inherited */
}

/* Extra small devices (phones, portrait, less than 480px) */
@media (max-width: 479.98px) {
    header nav ul {
        flex-direction: column;
        /* Stack nav items vertically */
        align-items: center;
        /* Center the stacked items */
        gap: 8px;
        /* Adjust gap for vertical stacking */
        width: 100%;
        /* Ensure UL takes full width of nav */
    }

    header nav ul li {
        width: 100%;
        /* Make list items take full width */
        max-width: 280px;
        /* Optional: constrain width of nav items for aesthetics */
    }

    header nav ul li a {
        display: block;
        /* Make link a block to take full width of li */
        width: 100%;
        /* Ensure it fills the li */
        text-align: center;
        padding: 10px 5px;
        /* Adjust padding for vertical items */
        font-size: 1em;
        /* Restore font size for readability if it was reduced */
    }
}

/* Hero Section */
#hero {
    background-color: #e9ecef;
    /* Light grey background */
    text-align: center;
    padding: 40px 20px;
}

.hero-image {
    max-width: 80%;
    /* Control banner image size */
    margin: 0 auto 20px auto;
    /* Center and add space below */
    border: 5px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#hero h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #343a40;
}

#hero p {
    font-size: 1.2em;
    color: #6c757d;
}

/* Main Content Sections */
main section {
    padding: 40px 0;
    background-color: #fff;
    margin-bottom: 20px;
    /* Space between sections */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

main .container>section:first-child {
    /* For sections directly in main .container */
    padding-top: 20px;
    /* Reduce top padding for first section */
}


#vision .image-gallery {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

#vision .image-gallery img {
    width: 48%;
    /* Two images side-by-side */
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Impact Section */
.impact-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    flex-wrap: wrap;
    /* Allow wrapping on smaller screens */
    gap: 20px;
}

.impact-stats div {
    flex-basis: 200px;
    /* Minimum width for each stat block */
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.impact-stats h4 {
    margin-top: 0;
    color: #007bff;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.news-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease-in-out;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-item img {
    width: 100%;
    height: 200px;
    /* Fixed height for consistency */
    object-fit: cover;
    /* Crop image to fit */
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 4px 4px 0 0;
}

.news-item h3 {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 10px;
}

.news-item h3 a {
    color: #333;
}

.news-item h3 a:hover {
    color: #0056b3;
}

.news-item p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
}

.read-more,
.button {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: center;
    transition: background-color 0.3s;
}

.read-more:hover,
.button:hover {
    background-color: #0056b3;
    text-decoration: none;
    color: #fff;
}


/* Footer */
footer {
    background-color: #343a40;
    color: #f8f9fa;
    padding-top: 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    /* Ensure columns don't get too squeezed */
}

.footer-column h3 {
    color: #00acc1;
    /* A brighter color for footer headings */
    margin-bottom: 15px;
    border-bottom: 1px solid #495057;
    padding-bottom: 5px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li a,
.footer-column p a {
    color: #adb5bd;
}

.footer-column ul li a:hover,
.footer-column p a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-column p {
    margin-bottom: 8px;
}

.footer-column img {
    margin-bottom: 10px;
    border-radius: 4px;
}

.footer-bottom {
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid #495057;
    font-size: 0.9em;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: #00acc1;
}


/* Responsive Adjustments */
@media (max-width: 992px) {
    .logo {
        max-height: 50px;
    }

    header nav ul {
        gap: 10px;
    }

    header nav ul li a {
        font-size: 0.9em;
        padding: 5px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: center;
    }

    .logo {
        margin-bottom: 15px;
    }

    header nav ul {
        flex-wrap: wrap;
        /* Allow nav items to wrap */
        justify-content: center;
    }

    #hero h1 {
        font-size: 2em;
    }

    #hero p {
        font-size: 1em;
    }

    #vision .image-gallery {
        flex-direction: column;
    }

    #vision .image-gallery img {
        width: 100%;
        /* Stack images */
    }

    .impact-stats div {
        flex-basis: 100%;
        /* Stack stat blocks */
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-column {
        min-width: 100%;
        margin-bottom: 20px;
    }

    .footer-column ul {
        padding-left: 0;
        /* Center list items in mobile view */
    }
}

@media (max-width: 480px) {
    header nav ul li a {
        display: block;
        /* Make nav links take full width if needed */
        text-align: center;
        margin-bottom: 5px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        /* Single column for news items */
    }
}