/* --- General Styling --- */
/* --- Version 1.0 --- */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #F5F5F5;
    color: #333333;
    line-height: 1.6;
}

.container {
    width: 90%;
    margin: 0 auto;
    max-width: 1200px;
}

/* --- Top Bar & Navigation --- */
.top-bar {
    background-color: #ffffff;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar .container {
	width: 96%; /* Increase from default 90% to use more of the screen */
}
.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo {
    height: 50px;
    margin-right: 8px; /* was 15 px */
}

.site-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #2E7D32; /* Primary Green */
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav ul li {
    display: inline-block;
    margin-left: 8px; /* Decrease from 20px */
    position: relative; /* Needed for dropdown positioning */
}

.main-nav ul li a {
    text-decoration: none;
    /* CHANGE 3: Changed color to green */
    color: #2E7D32;
    padding: 10px;
    font-weight: bold;
    transition: color 0.3s ease;
}

/* Make links slightly darker on hover */
.main-nav ul li a:hover {
    color: #1b5e20;
}

.main-nav ul li:has(.dropdown) > a::after {
    content: ' \25BC'; /* This is the Unicode for a down-pointing triangle */
    font-size: 0.7em;  /* Makes the triangle a bit smaller than the text */
    display: inline-block;
    margin-left: 5px;  /* Adds a little space next to the text */
}

/* Dropdown Menu */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    /* CHANGE 4: Changed from left: 0 to right: 0 */
    right: 0;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    border-top: 3px solid #2E7D32; /* Added a green top border */
}

.main-nav ul li:hover .dropdown {
    display: block; /* Show dropdown on hover */
}

.dropdown li {
    display: block;
    margin: 0;
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    white-space: nowrap;
}

/* --- Main Section --- */
/* CHANGE 5: Main section background is now green */
main {
    background-color: #2E7D32;
    color: #ffffff; /* Set default text color to white for better contrast */
}

/* --- Hero Section --- */
.hero {
    padding: 60px 0;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

/*
========================================
  Slideshow Styling (FINAL VERSION)
========================================
*/

.slideshow {
    flex: 1;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #1a1a1a;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; /* All slides start invisible */

    /* FIX 1: Return to a single, long-running, infinite animation */
    /* Total duration: 14 slides * 5 seconds/slide = 70 seconds */
    animation: crossfadeSlides 70s infinite;
}

/* --- (.slide-caption rule is unchanged) --- */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    text-align: center;
    font-size: 1em;
    box-sizing: border-box;
}

/* These stagger the start time of each slide's animation within the 70s loop */
.slide:nth-child(1) { background-image: url('images/gallery1.jpg'); animation-delay: 0s; }
.slide:nth-child(2) { background-image: url('images/gallery2.jpg'); animation-delay: 5s; }
.slide:nth-child(3) { background-image: url('images/gallery3.jpg'); animation-delay: 10s; }
.slide:nth-child(4) { background-image: url('images/gallery4.jpg'); animation-delay: 15s; }
.slide:nth-child(5) { background-image: url('images/gallery5.jpg'); animation-delay: 20s; }
.slide:nth-child(6) { background-image: url('images/gallery6.jpg'); animation-delay: 25s; }
.slide:nth-child(7) { background-image: url('images/gallery7.png'); animation-delay: 30s; }
.slide:nth-child(8) { background-image: url('images/gallery8.jpg'); animation-delay: 35s; }
.slide:nth-child(9) { background-image: url('images/gallery9.jpg'); animation-delay: 40s; }
.slide:nth-child(10) { background-image: url('images/gallery10.jpg'); animation-delay: 45s; }
.slide:nth-child(11) { background-image: url('images/gallery11.png'); animation-delay: 50s; }
.slide:nth-child(12) { background-image: url('images/gallery12.jpg'); animation-delay: 55s; }
.slide:nth-child(13) { background-image: url('images/gallery13.jpg'); animation-delay: 60s; }
.slide:nth-child(14) { background-image: url('images/gallery14.jpg'); animation-delay: 65s; }


/* FIX 2: Corrected keyframes that define a fade-in, hold, and fade-out for each slide */
@keyframes crossfadeSlides {
    /* Each slide gets a 7.14% timeslice (5s out of 70s) */
    0%   { opacity: 0; }
    1%   { opacity: 1; }  /* Fade in (lasts 0.7s) */
    6%   { opacity: 1; }  /* Hold visible */
    7%   { opacity: 0; }  /* Fade out (lasts 0.7s) and become invisible */
    100% { opacity: 0; }  /* Remain invisible for the rest of the 70s loop */
}

/* --- Slideshow Section Ends Here --- */
.blurb {
    flex: 1;
    padding: 30px;
    /* CHANGE: Increased alpha from 0.8 to 0.9 to make the white overlay stronger, thus fading the image more */
    background-color: rgba(255, 255, 255, 0.9);
    background-image: url('images/pcb-background.png');
    background-blend-mode: screen;
    border-radius: 8px;
    z-index: 10;
    color: #333;

    /* These 3 lines control the background image */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.blurb h2 {
    color: #2E7D32;
    font-size: 2.2em;
    margin-top: 0;
}

/* --- Highlights Section --- */
.highlights {
    background-color: #e8f5e9;
    /* --- CHANGE: Reduced top padding again --- */
    padding: 15px 0 60px 0;
    text-align: center;
    color: #333;
}

.highlights h2 {
    font-size: 2em;
    color: #2E7D32; /* Keep highlights H2 green */
    margin-bottom: 40px;
}

.highlights-grid {
    display: grid;
    /* CHANGE: Switched to a responsive auto-fit layout */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
}

.highlight-box {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.highlight-box h3 {
    font-size: 2.5em;
    color: #F9A825; /* Accent Gold */
    margin: 0 0 10px 0;
}

.highlight-box h4 {
    font-size: 1.66em;
    color: #F9A825; /* Accent Gold */
    margin: 0 0 10px 0;
}

.highlight-box p {
    margin: 0;
    font-size: 1.1em;
    color: #555;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px 0;
    background-color: #333;
    color: #fff;
}

/* --- Responsive Design --- */

/* For Tablets (e.g., iPads) */
@media (max-width: 1024px) {
    /* The new grid layout handles this automatically, so no specific rule is needed here. */
}

/* For Mobile Phones */
@media (max-width: 768px) {

    /* --- TOP BAR FIXES (Unchanged) --- */
    .logo-container img:nth-child(2) {
        display: none;
    }
    .main-nav > ul {
        white-space: nowrap;
    }
    .site-name {
        font-size: 1.3em;
    }
    .partner-logos img {
        max-height: 40px;
    }
    
    /* ======================================================= */
    /* ==== DEFINITIVE VERTICAL DROPDOWN FIX (REVISED) ======= */
    /* ======================================================= */

    /* Step 1: Reposition the main dropdown container */
    .dropdown {
        position: absolute; /* Keep it as an overlay */
        left: 0; /* Align to the far left of the screen */
        top: 100%; /* Position it right below the navigation bar */
        width: 100%; /* Make it full width */
        transform: none; /* Reset the centering transform */
        min-width: 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        border-top: 3px solid #2E7D32;
    }

    /* Step 2: Force list items to stack vertically */
    .dropdown li {
        display: block !important; /* Force vertical stacking */
        width: 100% !important;   /* Force full width */
        margin: 0 !important;     /* Reset all margins */
    }

    /* Step 3: Force the links to behave and wrap text correctly */
    .dropdown li a {
        display: block !important;      /* Make the link fill the list item */
        white-space: normal !important; /* THIS IS THE KEY: Explicitly allow text wrapping */
        text-align: center;
        padding: 15px 20px;
    }


    /* --- EXISTING MOBILE STYLES (Unchanged) --- */
    .hero-container {
        flex-direction: column;
    }
    .slideshow {
        width: 100%;
        min-height: 250px;
    }
}

/* --- Footer --- */
footer {
    padding: 20px 0;
    background-color: #333;
    color: #ccc; /* Slightly softer than pure white */
    font-size: 0.9em;
}

.footer-container {
    display: flex;
    justify-content: space-between; /* Pushes items to opposite ends */
    align-items: center;
    flex-wrap: wrap; /* Allows items to wrap on small screens */
    gap: 15px; /* Adds space between items if they wrap */
}

/* --- (The responsive section is below) --- */
/*
========================================
  INTERIOR PAGE STYLES
========================================
*/

/* --- Simplified Navigation for Interior Pages --- */
.simple-nav a {
    text-decoration: none;
    color: #2E7D32;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.simple-nav a:hover {
    color: #1b5e20;
}

/* --- General Content Styling for Interior Pages --- */
.page-content {
    background-color: #ffffff; /* White background for readability */
    padding: 40px 0 60px 0;
	color: #333333; 
}

.page-content h1 {
    color: #2E7D32;
    font-size: 2.8em;
    text-align: center;
    margin-bottom: 10px;
}

.page-intro {
    text-align: center;
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 50px auto;
    color: #555;
}

/* --- Board of Directors Page Specifics --- */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.member-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.member-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%; /* Makes the image circular */
    object-fit: cover; /* Prevents image from stretching */
    margin-bottom: 20px;
    border: 4px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.member-card h3 {
    margin: 0 0 5px 0;
    font-size: 1.5em;
    color: #333;
}

.member-card .member-title {
    margin: 0 0 15px 0;
    font-weight: bold;
    color: #2E7D32; /* Green to match the theme */
}

.member-card .member-bio {
    font-size: 0.95em;
    color: #666;
    line-height: 1.5;
}

/*
========================================
  CONTACT PAGE STYLES
========================================
*/

.contact-container {
    display: flex;
    align-items: center; /* Vertically aligns the text and image */
    gap: 40px; /* Space between the image and text */
    margin-top: 50px;
    background-color: #f9f9f9;
    padding: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.contact-image {
    flex: 1; /* Takes up half the space */
}

.contact-image img {
    width: 100%;
    border-radius: 8px;
    display: block; /* Removes any extra space below the image */
}

.contact-info {
    flex: 1.5; /* Takes up the other half of the space */
    font-size: 1.1em;
    color: #333;
}

.email-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background-color: #2E7D32; /* Primary Green */
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.email-link:hover {
    background-color: #1b5e20; /* Darker green on hover */
}


/* --- Make the Contact Page Responsive --- */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column; /* Stacks the image and text vertically */
        padding: 25px;
    }
}

/*
========================================
  PROBLEM PAGE STYLES (REVISED)
========================================
*/

/* This class constrains the width of the text for easier reading on wide screens */
.text-container {
    max-width: 800px;
    margin: 0 auto; /* Centers the container */
}

.page-content p {
    color: #333;
    line-height: 1.7; /* Increases space between lines for readability */
    margin-bottom: 20px;
}

.interspersed-image {
    width: 100%;
    /* CHANGE: Reduced max-width from 600px to 480px (80% of original) */
    max-width: 480px;
    margin: 40px auto; /* Centers the image block and adds vertical space */
}

.interspersed-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.image-caption {
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}


/* --- Make the Problem Page Responsive --- */
@media (max-width: 768px) {
    /* No specific rules needed now, the centered layout works perfectly on mobile */
}

/*
========================================
  SOLUTIONS PAGE STYLES (REVISED)
========================================
*/

/* Styling for the numbered list */
.solutions-list {
    list-style: none; /* Removes default numbers */
    counter-reset: solutions-counter;
    padding-left: 0;
    margin: 30px 0 50px 0;
}

/* FIX: Changed to Flexbox for reliable alignment */
.solutions-list li {
    counter-increment: solutions-counter;
    margin-bottom: 25px; /* Added a bit more space */
    display: flex; /* Use Flexbox */
    align-items: flex-start; /* Aligns number to the top of the text */
    font-size: 1.05em;
    line-height: 1.6;
	color: #333333; /* Safety: Force list items to be dark gray */
}

/* FIX: Updated pseudo-element to be a flex item */
.solutions-list li::before {
    content: counter(solutions-counter);
    width: 35px;
    height: 35px;
    background-color: #2E7D32; /* Primary Green */
    color: #ffffff;
    border-radius: 50%;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    margin-right: 15px; /* Creates space between number and text */
    flex-shrink: 0; /* Prevents the circle from shrinking */
}

/* General heading for sections within a page */
.section-heading {
    text-align: center;
    color: #2E7D32;
    margin: 60px 0 30px 0;
    font-size: 2.2em;
    border-top: 1px solid #ddd;
    padding-top: 40px;
}

/* Styling for the "How to Help" cards */
.action-card {
    background-color: #f9f9f9;
    border-left: 5px solid #F9A825; /* Accent Gold */
    padding: 20px 25px;
    margin-bottom: 20px;
    border-radius: 0 5px 5px 0;
	border-top: 1px solid #2E7D32;
    border-right: 1px solid #2E7D32;
    border-bottom: 1px solid #2E7D32;
}

.action-card h3 {
    margin-top: 0;
    color: #333;
}

.action-card a {
    color: #2E7D32;
    font-weight: bold;
}

/*
========================================
  MISSION PAGE STYLES
========================================
*/

/*
========================================
  MISSION PAGE STYLES (REVISED)
========================================
*/

/* Class for the green content section */
.content-green-bg {
    background-color: #2E7D32; /* Primary Green */
    color: #ffffff;
}

/* Ensure the h1 on this page is white and centered */
.content-green-bg h1 {
    color: #ffffff;
    text-align: center;
}

/* The new flex container for the side-by-side layout */
.mission-layout-container {
    display: flex;
    align-items: flex-start; /* Vertically aligns image and text */
    gap: 40px; /* Space between image and text */
    margin-top: 40px;
}

/* Container for the image and its caption */
.mission-image-container {
    flex: 1; /* Assigns space */
    max-width: 400px;
    margin: 0;
}

.mission-image-container img {
    width: 100%;
    border-radius: 8px;
}

/* Style the main mission statement paragraph */
.content-green-bg .mission-statement-text {
    flex: 1.5; /* Assigns more space to the text */
    font-size: 1.75em;
    font-style: italic;
    line-height: 1.6;
    /* CHANGE: Text is now white and left-aligned */
    color: #ffffff; 
    text-align: left;
}

/* Make sure the image caption is visible */
.content-green-bg .image-caption {
    color: #e0e0e0; /* A slightly off-white for the caption */
    font-size: 0.9em;
    margin-top: 10px;
    text-align: center;
}

/* --- Make the Mission Page Responsive --- */
@media (max-width: 768px) {
    .mission-layout-container {
        flex-direction: column; /* Stacks image on top of text */
        text-align: center; /* Center-aligns content on mobile */
    }

    .mission-statement-text {
        text-align: center; /* Center-aligns the mission text on mobile */
        font-size: 1.3em; /* Slightly smaller text on mobile */
    }
}

/*
========================================
  ORIGIN PAGE STYLES
========================================
*/

/* The main flex container for the side-by-side layout */
.origin-layout-container {
    display: flex;
    align-items: flex-start; /* Aligns items to the top */
    gap: 40px;
    margin-top: 40px;
}

/* The text container on the left with the border */
.origin-text-container {
    flex: 1.5; /* Takes more space */
    border: 4px solid #2E7D32; /* Thick green border */
    padding: 30px;
    border-radius: 8px;
}

/* Styling for the paragraph text inside the bordered box */
.origin-text-container p {
    color: #2E7D32; /* Green text */
    font-size: 1.2em;
    line-height: 1.7;
    margin: 0; /* The container's padding provides the space */
}

/* The image container on the right */
.origin-image-container {
    flex: 1; /* Takes less space */
    max-width: 400px;
    margin: 0;
}

.origin-image-container img {
    width: 100%;
    border-radius: 8px;
}

/* Ensure the caption text is dark and readable on the white background */
.origin-layout-container .image-caption {
    color: #555;
}

/* --- Make the Origin Page Responsive --- */
@media (max-width: 768px) {
    .origin-layout-container {
        flex-direction: column-reverse; /* Stacks text ON TOP of the image */
    }
}

.founder-photo {
    float: right; /* Positions the image to the right */
    width: 125px; /* Adjust the size as needed */
    height: 150px;
    object-fit: cover; /* Prevents the image from distorting */
    border-radius: 5%; /* Makes the photo circular */
    margin-left: 20px; /* Creates space between the image and the text to its left */
    margin-bottom: 10px; /* Creates space between the image and the text below it */
    border: 3px solid #2E7D32; /* Adds a green border */
}

/*
========================================
  PARTNERS BANNER STYLES (REVISED)
========================================
*/

.partners-banner {
    background-color: #f5f5f5;
    padding: 20px 0;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.partners-banner h2 {
	font-size: 2em;
    color: #2E7D32;
    margin-bottom: 40px;
}

.partner-logos {
    display: flex;
    justify-content: center; 
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.partner-logos img {
    max-height: 60px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    
    /* This is the reliable way to create space */
    margin: 0 50px; /* 0 top/bottom, 50px left/right */
}

.partner-logos img:hover {
    opacity: 1;
}

