/* ==========================================================================
   1. CORE THEME & VARIABLES
   ========================================================================== */
:root {
    --primary: #0a7d8c;      /* Deep Teal */
    --secondary: #32c6a6;    /* Mint Seafoam */
    --navy: #002147;         /* Navy Blue for VGI Branding */
    --dark: #222;
    --light: #f4f7f8;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Montserrat', sans-serif; 
    line-height: 1.6; 
    color: var(--dark); 
    background: var(--white); 
    overflow-x: hidden; 
}

img { max-width: 100%; height: auto; display: block; }

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.vgi-header {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: var(--primary);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: padding 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

/* Scrolled state — injected via JS */
.vgi-header.scrolled {
    background: rgba(10, 60, 70, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.22);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    transition: height 0.35s ease;
}

.vgi-header.scrolled .header-inner { height: 60px; }

/* --- Brand --- */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.35);
    object-fit: contain;
    transition: border-color 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}
.nav-brand:hover .nav-logo {
    border-color: var(--secondary);
    transform: scale(1.06);
}

.vgi-header.scrolled .nav-logo { width: 44px; height: 44px; }

.nav-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
}

.nav-letter {
    color: var(--secondary);
    font-weight: 900;
}

.nav-brand-tagline {
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255,255,255,0.90);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.3s;
}
.nav-brand:hover .nav-brand-tagline { color: #fff; }

/* --- Nav menu --- */
.nav-menu { display: flex; align-items: center; }

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 6px;
    margin: 0;
}

/* Base nav link */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 8px 12px;
    border-radius: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: color 0.22s ease, background 0.22s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--secondary);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active-link {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.nav-link:hover::after,
.nav-link.active-link::after { transform: scaleX(1); }

.nav-chevron {
    font-size: 0.65rem;
    opacity: 0.7;
    transition: transform 0.25s ease;
    margin-left: 2px;
}

/* --- Dropdown --- */
.nav-has-dropdown { position: relative; }

.nav-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #fff;
    min-width: 230px;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    border-top: 3px solid var(--secondary);
    list-style: none;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

/* Small arrow pointer */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--secondary);
    border-top: none;
}

.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown,
.nav-has-dropdown.open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-has-dropdown:hover .nav-chevron,
.nav-has-dropdown.open .nav-chevron { transform: rotate(180deg); }

.nav-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 11px 20px;
    transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}
.nav-dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
    padding-left: 26px;
}

.nav-tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    background: var(--light);
    color: var(--primary);
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* --- Donate button --- */
.nav-donate-wrap { margin-left: 8px; }

.nav-donate-btn {
    display: inline-block;
    padding: 9px 22px;
    background: var(--secondary);
    color: var(--navy);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    white-space: nowrap;
}
.nav-donate-btn:hover {
    background: #fff;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* --- Mobile toggle --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.nav-toggle:hover { background: rgba(255,255,255,0.18); }

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Hamburger → X animation */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   3. UNIVERSAL GRID & PAGE HEADERS
   ========================================================================== */
.section-padding { padding: 80px 20px; max-width: 1200px; margin: auto; }

.page-intro, .news-header, .legal-page-header { background: var(--light); text-align: center; padding: 72px 24px; border-bottom: 1px solid #e5e7eb; }
.subtitle { display: block; text-transform: uppercase; color: #086b79; font-weight: 700; letter-spacing: 2px; margin-bottom: 10px; font-size: 0.72rem; }
.section--dark .subtitle, .cta-banner .subtitle, .hero .subtitle { color: var(--secondary); }
.lead-text { font-size: 1.05rem; max-width: 760px; margin: 16px auto 0; color: #555; line-height: 1.8; }

.grid, .news-grid, .board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; width: 100%; }

/* ==========================================================================
   3b. DESIGN SYSTEM — Shared utility classes
   ========================================================================== */

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--sm  { max-width: 860px;  margin: 0 auto; }
.container--md  { max-width: 1020px; margin: 0 auto; }

/* Section modifiers */
.section--light { background: var(--light); }
.section--dark  { background: var(--primary); color: #fff; }

/* Page header for inner pages */
.page-header {
    background: var(--light);
    text-align: center;
    padding: 72px 24px;
    border-bottom: 1px solid #e5e7eb;
}
.page-header h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 900;
    color: var(--dark);
    margin: 8px 0 0;
    line-height: 1.2;
}
.page-header .lead { max-width: 740px; margin: 16px auto 0; }

/* Section title block */
.section-header { text-align: center; margin-bottom: 52px; }
.section-header h2 {
    margin-top: 10px;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 800;
    color: var(--dark);
    line-height: 1.25;
}
.section-header p {
    max-width: 720px;
    margin: 14px auto 0;
    color: #666;
    font-size: 0.97rem;
    line-height: 1.75;
}

/* Lead text */
.lead { font-size: 1.05rem; line-height: 1.8; color: #555; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 32px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    line-height: 1;
}
.btn--lg { padding: 16px 44px; font-size: 1rem; }

.btn--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: #086e7c; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(10,125,140,0.3); }

.btn--secondary { background: var(--secondary); color: var(--navy); border-color: var(--secondary); }
.btn--secondary:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(50,198,166,0.35); }

.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn--ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

.btn--outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

/* Button group */
.btn-group { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn-group--center { justify-content: center; }

/* Cards */
.card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 36px; }
.card--top-accent  { border-top: 5px solid var(--secondary); }
.card--primary-top { border-top: 5px solid var(--primary); }
.card--left-accent { border-left: 4px solid var(--secondary); padding-left: 24px; }

/* CTA banner */
.cta-banner { background: var(--primary); color: #fff; text-align: center; padding: 80px 24px; }
.cta-banner h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: 12px; }
.cta-banner .lead { color: rgba(255,255,255,0.85); max-width: 620px; margin: 0 auto 32px; }

/* Text utilities */
.text-primary   { color: var(--primary)   !important; }
.text-secondary { color: var(--secondary) !important; }
.text-muted     { color: #666; }
.text-center    { text-align: center; }

/* Heading sizes */
h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 900; line-height: 1.15; color: var(--dark); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem);  font-weight: 800; line-height: 1.25; color: var(--dark); }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
h4 { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* Legal page styles */
.legal-body { max-width: 860px; margin: 0 auto; color: #444; line-height: 1.85; }
.legal-body h2 { color: var(--primary); font-size: 1rem; font-weight: 700; margin: 44px 0 0; padding-bottom: 10px; border-bottom: 1px solid #e5e7eb; }
.legal-body p  { font-size: 0.94rem; margin: 12px 0 0; }
.legal-body ul { margin: 12px 0 0 24px; }
.legal-body li { font-size: 0.94rem; margin-bottom: 8px; line-height: 1.7; }
.legal-intro   { font-size: 1rem; border-left: 4px solid var(--secondary); padding: 4px 0 4px 20px; margin-bottom: 8px; }
.legal-contact-card { background: var(--light); padding: 28px 32px; border-radius: 12px; border-top: 5px solid var(--primary); margin-top: 36px; }
.legal-contact-card h4 { color: var(--primary); margin-bottom: 12px; }
.legal-contact-card p  { font-size: 0.9rem; margin-bottom: 6px; }
.effective-date { font-weight: 600; color: var(--primary); font-size: 0.85rem; margin-top: 8px; display: block; }

/* ==========================================================================
   4. INTERACTIVE FLIP ENGINE (UNIFIED - HOVER FIX APPLIED)
   ========================================================================== */
.flip-card, .initiative-card { height: 420px; perspective: 1000px; cursor: pointer; width: 100%; }

.flip-card-inner, .card-inner {
    position: relative;
    height: 100%;
    width: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* FIX: Rely on CSS hover for card flipping across all pages */
.flip-card:hover .flip-card-inner,
.initiative-card:hover .card-inner { 
    transform: rotateY(180deg); 
}

.flip-card-front, .flip-card-back, .card-front, .card-back { 
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 15px; 
    display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 30px; box-shadow: var(--shadow); 
}

.flip-card-front, .card-front { background-color: var(--light); border-bottom: 5px solid var(--primary); }
.flip-card-back, .card-back { background-color: var(--primary); color: white; transform: rotateY(180deg); text-align: center; overflow-y: auto; }

.flip-card-back h3, .card-back h3 { margin-bottom: 15px; border-bottom: 1px solid var(--secondary); padding-bottom: 10px; width: 100%; }
.card-back p { font-size: 0.95rem; line-height: 1.6; }
.counter { font-size: 3rem; color: var(--primary); font-weight: 700; margin-bottom: 5px; }

/* Scholarship Badge */
.active-cycle { transform: scale(1.05); z-index: 10; }

/* ==========================================================================
   5. PAGE-SPECIFIC COMPONENTS
   ========================================================================== */
/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/impact.jpg') center/cover;
    height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); padding: 0 20px;
}
.hero-content { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero-title { font-size: 3.5rem; margin-bottom: 15px; line-height: 1.2; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); }
.hero-btn { background: var(--secondary); color: var(--white); padding: 15px 40px; border-radius: 50px; text-decoration: none; font-weight: 700; display: inline-block; margin-top: 15px; transition: 0.3s ease; box-shadow: var(--shadow); }
.hero-btn:hover { background: var(--primary); transform: translateY(-3px); }

/* --- Mission Tracker --- */
.goal-tracker { width: 90%; margin-top: 20px; background: rgba(255, 255, 255, 0.5); padding: 15px; border-radius: 10px; }
.goal-bar { background: #e0e0e0; height: 10px; border-radius: 10px; overflow: hidden; margin-bottom: 10px; border: 1px solid #ddd; }
.goal-progress { background: var(--secondary); height: 100%; transition: width 2s ease-in-out; }
.goal-stats { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--dark); font-weight: 700; text-transform: uppercase; }

/* --- Age-Specific Components & Board Profiles --- */
.flex-row { display: flex; align-items: flex-start; gap: 60px; margin-top: 40px; }
.founder-img { width: 100%; max-width: 450px; border-radius: 15px; box-shadow: 20px 20px 0 var(--secondary); margin: 0 auto; }
.leader-img { width: 160px; height: 160px; border-radius: 50%; border: 4px solid var(--secondary); object-fit: cover; margin: 0 auto 20px; box-shadow: var(--shadow); }
.profile-img { width: 140px; height: 140px; border-radius: 50%; border: 3px solid var(--secondary); object-fit: cover; margin: 0 auto 20px; }
.flip-card-front .leader-img { max-width: 180px; max-height: 180px; }

.medal-list { list-style: none; margin-top: 20px; width: 100%; }
.medal-list li { padding: 12px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; font-weight: 500; }
.tier-label { text-align: center; color: var(--secondary); text-transform: uppercase; font-weight: 700; letter-spacing: 2px; margin: 60px 0 30px; display: block; }
.role { color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 10px; }
.bio-text { font-size: 0.9rem; line-height: 1.5; text-align: left; }

/* --- Contact & News --- */
.contact-button { background: var(--primary); color: white; padding: 20px 45px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 1.1rem; display: inline-block; transition: 0.3s; box-shadow: 0 5px 15px rgba(10, 125, 140, 0.2); }
.contact-button:hover { background: var(--secondary); transform: translateY(-3px); box-shadow: var(--shadow); }
.news-card { background: var(--white); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: 0.3s; }
.news-image { width: 100%; height: 220px; object-fit: cover; }
.news-content { padding: 30px; }

/* ==========================================================================
   6. IMPACT GALLERY SYSTEM
   ========================================================================== */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 40px auto 0; max-width: 1200px; }
.gallery-item { overflow: hidden; border-radius: 12px; box-shadow: var(--shadow); height: 250px; background: #ddd; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; display: block; }
.gallery-item:hover img { transform: scale(1.1); }

/* ==========================================================================
   7. FOOTER STYLING
   ========================================================================== */
.vgi-footer {
    background: #0d1117;
    color: #c9d1d9;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
}

.footer-rule {
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 60%, transparent 100%);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ---- Main grid ---- */
.footer-body {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.3fr;
    gap: 48px;
    padding: 36px 0 28px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    align-items: start;
}

/* Brand column */
.footer-col--brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    width: fit-content;
    transition: opacity 0.2s;
}
.footer-brand-link:hover { opacity: 0.85; }

.footer-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    object-fit: contain;
    flex-shrink: 0;
}

.footer-brand-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.4px;
    line-height: 1.3;
    margin: 0;
}

.footer-brand-tagline {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--secondary);
    letter-spacing: 0.5px;
    margin: 0;
}

.footer-mission {
    font-size: 0.78rem;
    color: #8b949e;
    line-height: 1.75;
    max-width: 300px;
}

.footer-ein {
    font-size: 0.68rem;
    color: #484f58;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
}

.candid-seal {
    opacity: 0.85;
    transition: opacity 0.2s ease;
    display: block;
}
.candid-seal:hover { opacity: 1; }

/* Column headings */
.footer-heading {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--secondary);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* Nav links */
.footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8b949e;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 3px 0;
    margin-bottom: 1px;
    transition: color 0.2s ease, padding-left 0.2s ease;
    line-height: 1.4;
}
.footer-link::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 1px;
    background: var(--secondary);
    transition: width 0.2s ease;
    flex-shrink: 0;
}
.footer-link:hover {
    color: #fff;
    padding-left: 4px;
}
.footer-link:hover::before { width: 10px; }

.footer-link--highlight {
    color: var(--secondary);
    font-weight: 700;
}
.footer-link--highlight:hover { color: #fff; }

/* Address */
.footer-address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.footer-address-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.78rem;
    color: #8b949e;
    line-height: 1.55;
}

.footer-address-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 1px;
    opacity: 0.7;
}

.footer-contact-link {
    color: #8b949e;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-contact-link:hover { color: #fff; }

/* CTA button */
.footer-cta-btn {
    display: inline-block;
    padding: 11px 22px;
    background: transparent;
    color: var(--secondary);
    border: 1px solid var(--secondary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.footer-cta-btn:hover {
    background: var(--secondary);
    color: #0d1117;
    transform: translateY(-2px);
}

/* ---- Bottom bar ---- */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    flex-wrap: wrap;
}

.footer-bottom-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-copyright {
    font-size: 0.75rem;
    color: #484f58;
    font-weight: 600;
    margin: 0;
}

.footer-fl-reg {
    font-size: 0.68rem;
    color: #30363d;
    margin: 0;
}

.footer-reg-link {
    color: #484f58;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-reg-link:hover { color: #8b949e; }

.footer-back-top {
    font-size: 0.72rem;
    font-weight: 700;
    color: #484f58;
    text-decoration: none;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: 1px solid #21262d;
    padding: 7px 14px;
    border-radius: 6px;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.footer-back-top:hover {
    color: #8b949e;
    border-color: #484f58;
}

.footer-disclaimer {
    font-size: 0.62rem;
    color: #21262d;
    text-align: center;
    padding-bottom: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   8. MOBILE-SPECIFIC REFINEMENTS & OPTIMIZATION
   ========================================================================== */
@media (max-width: 1024px) {
    /* VICTOR Core Values Grid (Tablet Stack) */
    .grid[style*="repeat(6, 1fr)"] { grid-template-columns: repeat(3, 1fr) !important; gap: 10px; }

    /* Footer: 2 columns */
    .footer-body { grid-template-columns: 1fr 1fr; gap: 28px; padding: 32px 0 24px; }
}

@media (max-width: 900px) {
    /* Mobile nav */
    .nav-toggle { display: flex; }

    .nav-menu {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 50, 60, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255,255,255,0.08);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.open { max-height: 480px; }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px 20px;
    }

    .nav-link {
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 0.88rem;
        justify-content: space-between;
        width: 100%;
    }
    .nav-link::after { display: none; }

    /* Mobile dropdown: inline reveal */
    .nav-has-dropdown { position: static; }
    .nav-dropdown {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        border-top: none;
        border-radius: 8px;
        background: rgba(255,255,255,0.07);
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 4px 0 0;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    .nav-dropdown::before { display: none; }
    .nav-has-dropdown.open .nav-dropdown { max-height: 200px; padding: 6px 0; }
    .nav-dropdown-item { color: rgba(255,255,255,0.75); padding: 10px 24px; font-size: 0.8rem; }
    .nav-dropdown-item:hover { background: rgba(255,255,255,0.06); color: #fff; padding-left: 30px; }
    .nav-tag { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.5); }

    .nav-donate-wrap { margin: 8px 0 4px; }
    .nav-donate-btn { display: block; text-align: center; padding: 12px; }

    /* Layouts */
    .flex-row { flex-direction: column; text-align: center; }
    .founder-img { width: 100%; box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
    .grid { grid-template-columns: 1fr !important; }
    .flip-card, .initiative-card { height: 350px; }
    .section-padding { padding: 40px 15px !important; }

    /* Hero */
    .hero { height: 45vh !important; min-height: 350px !important; padding: 40px 20px; }
    .hero-title { font-size: 2rem !important; margin-bottom: 10px; }
    .hero-btns { display: flex; flex-direction: column; gap: 15px; width: 100%; max-width: 280px; }
    .hero-btn { margin-left: 0 !important; width: 100%; padding: 12px 20px; }
}

@media (max-width: 768px) {
    /* Footer: single column */
    .footer-body { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 32px; text-align: center; }
    .footer-brand-link { justify-content: center; }
    .footer-link::before { display: none; }
    .footer-link:hover { padding-left: 0; }
    .footer-address-row { justify-content: center; }
    .footer-cta-btn { display: block; text-align: center; }
    .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
}

@media (max-width: 600px) {
    /* VICTOR Core Values Grid (Mobile Stack) */
    .grid[style*="repeat(6, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .value-card { height: 180px !important; }
    .value-card .flip-card-front h1 { font-size: 2.2rem !important; }

    /* CTA Stack */
    section[style*="background: var(--primary)"] { padding: 35px 15px !important; }
    section[style*="background: var(--primary)"] h2 { font-size: 1.5rem; }

    /* Header brand resize */
    .nav-brand-name { font-size: 0.78rem; }
    .nav-brand-tagline { display: none; }
    .nav-logo { width: 40px; height: 40px; }
}

/* Hero Button Accessibility */
.hero-btn {
    background-color: var(--primary);
    color: var(--white) !important;
    border: 2px solid var(--primary);
}

/* Prevent text breaking */
.no-stack { white-space: nowrap !important; }

/* ==========================================================================
   9. DONATION MODAL
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[style*="display: block"] { display: flex !important; }

.modal-content {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border-top: 6px solid var(--secondary);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    transition: var(--transition);
}
.modal-close:hover { color: var(--dark); }

.modal-content h2 { color: var(--primary); margin-bottom: 8px; }
.modal-content .modal-sub { color: #777; font-size: 0.95rem; margin-bottom: 25px; }

.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.amount-btn {
    padding: 12px 8px;
    border: 2px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}
.amount-btn:hover,
.amount-btn.selected {
    background: var(--primary);
    color: var(--white);
}

.custom-amount-wrap {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
    transition: var(--transition);
}
.custom-amount-wrap:focus-within { border-color: var(--primary); }
.custom-amount-wrap span {
    padding: 12px 15px;
    background: var(--light);
    font-weight: 700;
    color: var(--primary);
}
.custom-amount-wrap input {
    border: none;
    outline: none;
    padding: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    width: 100%;
}

.stripe-cta {
    display: block;
    text-align: center;
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.stripe-cta:hover { background: var(--secondary); transform: translateY(-2px); }

.stripe-badge {
    text-align: center;
    margin-top: 15px;
    font-size: 0.78rem;
    color: #aaa;
}

/* ==========================================================================
   10. FLIP CARD CLICK SUPPORT (JS-toggled .flipped class)
   ========================================================================== */
.flip-card-inner.flipped,
.card-inner.flipped {
    transform: rotateY(180deg);
}

.flip-card:focus,
.initiative-card:focus {
    outline: 3px solid var(--secondary);
    outline-offset: 4px;
    border-radius: 15px;
}

/* ==========================================================================
   11. REDUCED MOTION ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .flip-card-inner,
    .card-inner {
        transition: none !important;
    }

    /* Disable AOS animations */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}