/* =========================================
   1. UNIVERSAL RESET (Fixes width scrolling!)
========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

/* =========================================
   2. VARIABLES & GLOBALS
========================================= */
:root {
  /* Main Theme Colors */
  --primary-blue: #02397c;
  --secondary-blue: #00296B;
  --accent-yellow: #FDC500;
  --ice-blue: #F2F6FA;

  /* Backgrounds & Structure */
  --bg-light: #FFFFFF;
  --bg-dark: #001D3D;
  
  /* Text Colors */
  --text-main: #001D3D;
  --text-light: #FDD85D;
  --text-white: #FFFFFF;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    border-top: 6px solid var(--accent-yellow);
}

/* =========================================
   3. CUSTOM HEADER (Vanilla CSS)
========================================= */
/* Mobile Toggle Button (Hidden on Desktop) */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}


.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
    background-color: var(--bg-light);
}


.mobile-toggle:hover {
    transform: scale(1.1);
}

/* Brand & Logo */
.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
}

.header-image {
    width: 100px; 
    height: auto;
    margin-right: 15px;
}


.brand-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-main);
}

/* Navigation List */
.custom-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
    font-size: 1.25rem;
}

/* Navigation Links */
.custom-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}

/* Hover State */
.custom-nav-link:hover {
    color: var(--secondary-blue);
    background-color: #FDC50033; 
}

/* Active State */
.custom-nav-link.active {
    background-color: var(--primary-blue);
    color: var(--text-white);
}

/* =========================================
   4. CUSTOM HERO SECTION
========================================= */
.hero-wrapper {
    width: 100%;
    background-color: var(--ice-blue);
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    max-width: 1500px; 
    margin: 0 auto;    
    padding: 20px 40px; 
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
    margin-top: 0;
    color: var(--primary-blue);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: #555;
}

.hero-buttons {
    display: flex;
    gap: 15px; 
}

.custom-btn {
    padding: 12px 24px;
    font-size: 1.1rem;
    border-radius: 5px;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s ease;
    text-decoration: none; 
    display: inline-block;
}

.custom-btn-primary {
    background-color: var(--primary-blue);
    color: var(--text-white);
}

.custom-btn-primary:hover {
    background-color: var(--secondary-blue);
    color: var(--text-white);
}

.custom-btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.custom-btn-outline:hover {
    background-color: var(--primary-blue);
    color: var(--text-white);
}

.hero-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 8px; 
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15); 
    border: 1px solid #e2e8f0; /* Soft slate gray */
    display: block;
}

/* =========================================
   5. MISSION SECTION (Features Grid)
========================================= */
.mission-section {
    width: 100%;
    background-color: var(--bg-light); 
    padding: 80px 20px;
}

.mission-container {
    max-width: 1450px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-top: 0;
    margin-bottom: 50px;
    padding-bottom: 10px;

    border-bottom: 4px solid var(--accent-yellow); 
    display: inline-block;
}

/* 2x2 Grid setup */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 40px; 
}

.mission-card {
    display: flex;
    align-items: flex-start; 
    gap: 20px; 
    
    /* THE UPGRADE: Card styling */
    background-color: var(--text-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-bottom: 4px solid transparent; /* Invisible border for spacing */
    transition: all 0.3s ease; /* Smooth animation */
}

/* The Hover Effect */
.mission-card:hover {
    transform: translateY(-5px); /* Lifts the card up slightly */
    border-bottom: 4px solid var(--accent-yellow); /* Reveals the yellow border */
    box-shadow: 0 10px 25px rgba(2, 57, 124, 0.08); /* Deepens the shadow with a hint of blue */
}

.icon-box {
    width: 60px;
    height: 60px;
    background-color: var(--accent-yellow); 
    color: var(--primary-blue);
    
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; 
}

.icon-box svg {
    width: 32px;
    height: 32px;
}

.mission-content h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--secondary-blue);
}

.mission-content p {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* =========================================
   8. SPONSORS SECTION
========================================= */
.sponsors-section {
    width: 100%;
    background-color: var(--ice-blue);
    padding: 80px 20px;
    text-align: center;
}

.sponsors-container {
    max-width: 1200px;
    margin: 0 auto;
}

.sponsors-title {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-top: 0;
    margin-bottom: 15px;
}

.sponsors-subtitle {
    font-size: 1.2rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto 50px auto;
    line-height: 1.6;
}

/* Flexbox keeps the logos centered no matter how many there are */
.sponsors-grid {
    display: flex;
    flex-wrap: wrap; /* Allows them to stack on multiple rows if needed */
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* The uniform white "frame" for every logo */
.sponsor-card {
    width: 180px; 
    height: 120px; 
    background-color: var(--text-white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Soft drop shadow */
    transition: transform 0.2s ease; /* Smooth hover animation */
}

/* Makes the card pop up slightly when a user hovers over it */
.sponsor-card:hover {
    transform: translateY(-5px); 
}

/* Ensures the logo fits perfectly inside the frame */
.sponsor-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

/* =========================================
   6. SUPPORT CTA SECTION
========================================= */
.support-section {
    width: 100%;
    background-color: var(--primary-blue);
    padding: 80px 20px;
    text-align: center; /* Centers all the text and the button */
}

.support-container {
    max-width: 800px; /* Keeps the paragraph narrow so it's easy to read */
    margin: 0 auto;
}

.support-container h2 {
    font-size: 2.5rem;
    color: var(--text-white);
    margin-top: 0;
    margin-bottom: 20px;
}

.support-container p {
    font-size: 1.2rem;
    color: #EAF3FA; /* A very soft icy-white so it isn't blindingly bright */
    margin-bottom: 35px;
    line-height: 1.6;
}

/* Accent Button (Yellow) for Dark Backgrounds */
.custom-btn-accent {
    background-color: var(--accent-yellow);
    color: var(--text-main);
}

.custom-btn-accent:hover {
    background-color: var(--text-white);
    color: var(--primary-blue);
}

/* =========================================
   7. CONTACT PAGE
========================================= */
.contact-section {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.contact-header h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-top: 0;
    margin-bottom: 10px;
}

.contact-header p {
    font-size: 1.2rem;
    color: #555;
}

/* Split into 2 columns */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Make the form side a bit wider */
    gap: 60px;
}

/* Left Side Info Blocks */
.info-block {
    margin-bottom: 30px;
}

.info-block h3 {
    color: var(--secondary-blue);
    margin-bottom: 5px;
    font-size: 1.25rem;
}

.info-block p, .info-block a {
    color: #555;
    text-decoration: none;
    line-height: 1.6;
}

.info-block a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Right Side Form */
.custom-form {
    background-color: #F8F9FA;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-main);
}



/* Styles inputs and textareas together */
.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit; /* Inherits your nice system font */
    transition: border-color 0.2s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(2, 57, 124, 0.1); /* Soft blue glow when typing */
}

/* Make the submit button stretch across the bottom */
.full-width-btn {
    width: 100%;
    margin-top: 10px;
}

.alert {
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* Styles specifically for the 'success' tag we added in flash() */
.alert-success {
  background-color: #f0fdf4; /* Soft, warm light green background */
  border: 1px solid #bbf7d0; /* Soft green stroke */
  color: #166534;            /* Rich dark green text */
}

/* Styles if the Resend email fails */
.alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}


/* =========================================
   10. ABOUT PAGE
========================================= */
/* Reusable container for standard page widths */
.container-standard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* About Header */
.about-header {
    background-color: var(--primary-blue);
    color: var(--text-white);
    text-align: center;
    padding: 80px 20px;
}

.about-header h1 {
    font-size: 3rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.lead-text {
    font-size: 1.25rem;
    color: #EAF3FA;
    max-width: 700px;
    margin: 0 auto;
}

/* Our Story Section */
.about-story {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.story-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15); 
    border: 1px solid #e2e8f0; /* Soft slate gray */
}

.story-content h2 {
    color: var(--primary-blue);
    font-size: 2.25rem;
    margin-top: 0;
    margin-bottom: 20px;
}

.story-content p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Team Section */
.team-section {
    padding: 80px 0;
    background-color: #F8F9FA;
}

.team-header {
    text-align: center;
    margin-bottom: 50px;
}

.team-header h2 {
    color: var(--primary-blue);
    font-size: 2.25rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.team-header p {
    color: #555;
    font-size: 1.1rem;
}

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

.team-card {
    background: var(--bg-light);
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Makes the photos perfectly round */
.team-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid var(--accent-yellow);
}

.team-card h3 {
    color: var(--secondary-blue);
    margin: 0 0 5px 0;
    font-size: 1.3rem;
}

.team-title {
    display: block;
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =========================================
   11. CUSTOM FOOTER
========================================= */
.site-footer {
    background-color: var(--primary-blue);
    border-top: 4px solid var(--accent-yellow);
    padding: 40px 20px;
    color: var(--text-white);
}

.footer-content {
    /* max-width: 1500px; */
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Left/Right take up equal space, Logo sizes to fit */
    align-items: center;
    gap: 30px;
}

.footer-info {
    justify-self: start;
}

.footer-info p {
    color: #EAF3FA; /* Soft ice white */
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.footer-logo img {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2)); /* Gives the logo a soft glow */
}

.footer-nav {
    justify-self: end;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: #EAF3FA;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--accent-yellow);
}

/* =========================================
   12. NEXT STEPS SECTION
========================================= */
.next-steps-section {
    background-color: var(--text-white);
    padding: 80px 20px;
    border-bottom: 1px solid #EAEAEA; /* A clean line separating this from the footer */
}

.next-steps-container {
    max-width: 1000px; /* Kept slightly narrower so the text stays readable */
    margin: 0 auto;
}

.next-steps-header {
    text-align: center;
    margin-bottom: 60px;
}

.next-steps-header h2 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.next-steps-header p {
    color: #555;
    font-size: 1.2rem;
}

/* The Grid Container */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

/* The magic connecting line behind the circles */
.steps-grid::before {
    content: '';
    position: absolute;
    top: 30px; /* Aligns with the center of the 60px circles */
    left: 15%;
    right: 15%;
    height: 3px;
    background-color: #EAEAEA;
    z-index: 0; /* Pushes the line behind the circles */
}

/* Individual Steps */
.step-card {
    background: var(--text-white);
    text-align: center;
    position: relative;
    z-index: 1; /* Keeps the card above the connecting line */
    padding: 0 15px;
}

/* The Number Circles */
.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary-blue);
    color: var(--accent-yellow); /* Yellow text on blue background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px auto;
    
    /* A thick white border cuts a gap through the background line */
    border: 5px solid var(--text-white); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.step-card h3 {
    color: var(--secondary-blue);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.step-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Minimal text links at the bottom of the steps */
.step-link {
    color: var(--primary-blue);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 1.05rem;
}

.step-link:hover {
    color: var(--accent-yellow);
}


/* =========================================
   7. UNIFIED MOBILE RESPONSIVENESS
========================================= */
@media (max-width: 768px) {
    
    /* Header Stack */
    .site-header {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
    }
    
    /* Shrink the brand area so the hamburger button fits next to it */
    .brand-link {
        flex-direction: row;
        text-align: left;
        max-width: 80%; 
        gap: 10px;
    }

    .header-image {
        width: 50px; /* Shrinks the logo slightly on mobile */
        margin-right: 0;
    }

    .brand-title {
        font-size: 1.1rem; /* Shrinks the text so it doesn't overflow */
    }

    /* 1. Show the hamburger button */
    .mobile-toggle {
        display: block;
    }

    /* 2. Hide the navigation by default */
    .main-nav {
        display: none;
        width: 100%;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #EAEAEA;
    }

    /* 3. The class activated by our JavaScript */
    .main-nav.is-active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    /* 4. Stack the buttons vertically and stretch them full-width */
    .custom-nav {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .custom-nav li {
        width: 100%;
    }

    .custom-nav .custom-btn {
        width: 100%;
        text-align: center;
    }
    
    /* Add a quick fade-in animation for the menu dropping down */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Hero Stack */
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px 20px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2.25rem;
    }

    /* Mission Stack */
    .mission-grid {
        grid-template-columns: 1fr; 
        gap: 50px; 
    }

    .support-section {
        padding: 60px 20px;
    }
    
    .support-container h2 {
        font-size: 2rem;
    }

    .sponsors-section {
        padding: 60px 20px;
    }
    
    .sponsors-title {
        font-size: 2rem;
    }

    /* Make the cards slightly smaller on phones so two can fit side-by-side */
    .sponsor-card {
        width: 140px;
        height: 100px;
    }

    .contact-grid {
        grid-template-columns: 1fr; /* Stacks the info on top of the form */
        gap: 40px;
    }
    
    .custom-form {
        padding: 25px; /* Slightly less padding inside the form on phones */
    }

    .story-grid {
        grid-template-columns: 1fr; /* Stacks image and text */
        text-align: center;
    }
    
    .team-grid {
        grid-template-columns: 1fr; /* Stacks the team cards */
        gap: 40px;
    }

    @media (max-width: 768px) {
    .footer-content {
        /* Stacks the 3 columns into 1 single vertical column */
        grid-template-columns: 1fr; 
        text-align: center;
    }
    
    /* Centers the items inside the new single column */
    .footer-info, .footer-nav {
        justify-self: center;
    }
    
    .footer-nav ul {
        justify-content: center;
    }
}

    .steps-grid {
        grid-template-columns: 1fr; /* Stacks the steps vertically */
        gap: 50px;
    }
    
    .steps-grid::before {
        display: none; /* Hides the connecting line so it doesn't look weird on phones! */
    }
}