/* Theme */
:root {
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --black: #0a0a0a;
    --white: #ffffff;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-900: #111827;
    --container: 1200px;
    --radius: 14px;
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.25);
    --shadow-md: 0 12px 24px rgba(0,0,0,0.18);
    --shadow-sm: 0 6px 12px rgba(0,0,0,0.12);
    --transition: 300ms cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }
body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--white);
    background: var(--black);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    padding-top: 68px;
}

img { max-width: 100%; display: block; border-radius: var(--radius); }
a { color: inherit; text-decoration: none; }

.container { width: 90%; max-width: var(--container); margin: 0 auto; }
.section { padding: 96px 0; position: relative; scroll-margin-top: 84px; }
.section-title { font-size: 2.4rem; margin: 0 0 32px; text-align: center; }
.lead { font-size: 1.125rem; color: #e6ffe6; max-width: 700px; }
/* Center hero subtitle */
.hero .lead { margin-left: auto; margin-right: auto; text-align: center; }

/* Background utilities */
.bg-black { background: var(--black) !important; color: var(--white); }
.bg-green { background: var(--green-800) !important; }
.bg-white { background: var(--white) !important; color: var(--gray-900); }
.bg-white a { color: var(--green-700); }
.bg-white .section-title, .bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4 { color: var(--gray-900); }
.bg-white .lead { color: #1f2937; }
.bg-white .checks li::before { color: var(--green-700); }
.bg-white .btn-outline { color: var(--gray-900); border-color: var(--gray-900); }
.bg-white .btn-outline:hover { background: var(--gray-900); color: var(--white); }

/* Light card variants inside white sections */
.bg-white .card,
.bg-white .feature-card,
.bg-white .testimonial,
.bg-white .tall-card,
.bg-white .contact-form,
.bg-white .stat {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    color: var(--gray-900);
}
.bg-white .stat .count { color: var(--green-700); }
.bg-white .stat .label { color: #374151; }
.bg-white .testimonial blockquote { color: #111827; }
.bg-white .testimonial .name { color: var(--green-700); }

/* Header */
.site-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 50; background: rgba(10,10,10,.7); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-container { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.logo img { border-radius: 8px; box-shadow: var(--shadow-sm); }
.site-nav ul { display: flex; list-style: none; gap: 20px; margin: 0; padding: 0; }
.site-nav a { padding: 8px 12px; border-radius: 999px; transition: background var(--transition), color var(--transition); }
.site-nav a:hover, .site-nav a.active { background: var(--green-700); color: var(--white); }

.nav-toggle { display: none; background: transparent; border: 0; width: 44px; height: 44px; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--white); transition: transform var(--transition), opacity var(--transition), top var(--transition); }
.nav-toggle span:nth-child(1){ top: 14px; }
.nav-toggle span:nth-child(2){ top: 21px; }
.nav-toggle span:nth-child(3){ top: 28px; }
.nav-open .nav-toggle span:nth-child(1){ transform: rotate(45deg); top: 21px; }
.nav-open .nav-toggle span:nth-child(2){ opacity: 0; }
.nav-open .nav-toggle span:nth-child(3){ transform: rotate(-45deg); top: 21px; }

/* Hero */
.hero { padding: 0; min-height: calc(100svh - 68px); display: grid; place-items: center; position: relative; }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); filter: brightness(.75) saturate(1.2); }
.hero-overlay { position: absolute; inset: 0; background: radial-gradient(80% 80% at 50% 40%, rgba(22,163,74,.15), transparent 60%), linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.5)); }
.hero-inner { position: relative; z-index: 1; padding: 140px 0 80px; text-align: center; }
.org-name { 
    font-size: clamp(1.6rem, 4.5vw, 2.2rem); 
    font-weight: 700; 
    color: #b8ffcc; 
    margin-bottom: 20px; 
    letter-spacing: 0.8px; 
    text-transform: uppercase;
    opacity: 0.95;
}
.hero h1 { font-size: clamp(1.2rem, 3vw, 1.8rem); margin: 0 0 12px; letter-spacing: .5px; }
.cta-group { display: inline-flex; gap: 14px; margin-top: 18px; }

.btn { display: inline-block; padding: 12px 20px; border-radius: 12px; font-weight: 600; border: 2px solid transparent; transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition); }
.btn-primary { background: var(--green-600); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); background: var(--green-700); }
.btn-outline { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--black); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.stat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 16px; border-radius: 16px; box-shadow: var(--shadow-sm); }
.stat .count { font-size: 1.8rem; font-weight: 700; color: #b8ffcc; display: block; }
.stat .label { font-size: .95rem; color: #e6ffe6; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.checks { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: '✔'; color: var(--green-600); position: absolute; left: 0; top: 0; }
.stacked-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stacked-photos img:nth-child(1){ grid-column: 1 / -1; height: 260px; object-fit: cover; }
.stacked-photos img:nth-child(2), .stacked-photos img:nth-child(3){ height: 180px; object-fit: cover; }

/* Initiatives */
.initiatives { background: linear-gradient(180deg, rgba(22,163,74,.07), transparent 30%); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); transform: translateY(0); transition: transform var(--transition), box-shadow var(--transition); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card img { width: 100%; height: 220px; object-fit: cover; border-radius: 0; }
.card-body { padding: 16px; }
.card-body h3 { margin: 0 0 8px; }

/* Strategies */
.strategies .split-panel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; margin-bottom: 46px; }
.strategies .split-panel.alt { grid-template-columns: 1fr 1.1fr; }
.split-text .eyebrow { letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: #b8ffcc; margin: 0 0 6px; }
.split-text h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.split-media img { width: 100%; height: 340px; object-fit: cover; border-radius: 16px; box-shadow: var(--shadow-md); }

/* Impact features */
.eyebrow.center { text-align: center; display: block; margin: 0 0 6px; }
.impact .lead.center { text-align: center; margin-bottom: 22px; }
.feature-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 16px; text-align: left; }
.feature-card img { width: 100%; height: 220px; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }

/* Global initiatives */
.global { background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%); }
.tall-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.tall-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 16px; }
.tall-card img { width: 100%; height: 260px; object-fit: cover; border-radius: 12px; margin-top: 10px; }

/* CTA wide */
.cta-wide { background: linear-gradient(180deg, transparent, rgba(22,163,74,.06)); }
.cta-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
.cta-text h2 { margin: 6px 0 10px; font-size: clamp(1.6rem, 3.8vw, 2.4rem); }
.cta-media img { width: 100%; height: 320px; object-fit: cover; border-radius: 16px; box-shadow: var(--shadow-md); }

/* Gallery */
.gallery { background: linear-gradient(180deg, transparent, rgba(255,255,255,.03)); }
/* Slider */
.slider { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); }
.gallery-collage-mobile { display: none; }
.gallery-collage-mobile img { width: 100%; height: 200px; object-fit: contain; border-radius: 12px; display: block; background: transparent; }
.slider-track { display: flex; transition: transform 600ms cubic-bezier(.2,.8,.2,1); will-change: transform; }
/* Show exactly 3 slides at once, with gaps */
.slide { flex: 0 0 calc((100% - 24px) / 3); min-width: calc((100% - 24px) / 3); user-select: none; margin-right: 12px; }
.slide:last-child { margin-right: 0; }
.slide img { width: 100%; height: 280px; object-fit: cover; display: block; background: #f8f9fa; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.4); color: var(--white); cursor: pointer; display: grid; place-items: center; transition: background var(--transition), transform var(--transition); z-index: 2; }
.slider-btn:hover { background: rgba(22,163,74,.6); transform: translateY(-50%) scale(1.05); }
.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }
.slider-dots { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.slider-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; background: rgba(255,255,255,.5); cursor: pointer; }
.slider-dots button[aria-selected="true"] { background: var(--green-600); }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.member { background: #ffffff; border: 2px solid var(--gray-200); border-radius: 16px; padding: 14px; text-align: center; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); color: var(--gray-900); }
.member:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.member img { width: 100%; height: 220px; object-fit: cover; background: #f1f5f9; border-radius: 12px; }
.member h3 { margin: 10px 0 2px; font-size: 1.05rem; color: #0f172a; }
.member p { margin: 0; color: #065f46; font-size: .95rem; font-weight: 600; }
.member span { display: block; margin-top: 6px; color: #334155; font-size: .9rem; }

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Testimonials */
.testimonials { background: linear-gradient(180deg, rgba(22,163,74,.07), transparent 40%); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.testimonial { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 16px; }
.testimonial img { width: 64px; height: 64px; object-fit: cover; border-radius: 999px; margin-bottom: 10px; }
.testimonial blockquote { margin: 0 0 10px; color: #eafff1; }
.testimonial .name { margin: 0; color: #b8ffcc; font-weight: 600; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.contact-form { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 16px; border-radius: 16px; box-shadow: var(--shadow-sm); }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form label { display: grid; gap: 6px; font-size: .95rem; }
.contact-form input, .contact-form textarea { background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 12px; color: var(--white); transition: border-color var(--transition), box-shadow var(--transition); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(22,163,74,.25); }
.form-status { margin-top: 8px; min-height: 20px; font-size: .95rem; color: #b8ffcc; }

/* Footer */
.site-footer { border-top: 1px solid rgba(255,255,255,.08); padding: 26px 0; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; }
.back-to-top { width: 40px; height: 40px; display: grid; place-items: center; background: rgba(255,255,255,.08); border-radius: 10px; transition: background var(--transition), transform var(--transition); }
.back-to-top:hover { background: var(--green-700); transform: translateY(-2px); }

/* Reveal animations */
.reveal-up { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }
.delay-4 { transition-delay: .48s; }
.delay-5 { transition-delay: .6s; }
.delay-6 { transition-delay: .72s; }
.delay-7 { transition-delay: .84s; }

/* Responsive */
@media (max-width: 1024px) {
    .container { width: 95%; }
    .section { padding: 64px 0; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .strategies .split-panel, .cta-inner { grid-template-columns: 1fr; }
    .slide img { height: 220px; }
}

@media (max-width: 840px) {
    .cards { grid-template-columns: 1fr 1fr; }
    /* team slider has its own layout */
    .testimonials-grid { grid-template-columns: 1fr 1fr; }
    .feature-cards, .tall-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
    /* Ensure slider is visible on phones (override reveal animation) */
    .slider.reveal-up { opacity: 1; transform: none; }
    .slider { min-height: 240px; }
    .container { width: 95%; padding: 0 16px; }
    .section { padding: 48px 0; }
    .section-title { font-size: 2rem; margin: 0 0 24px; }
    .hero { min-height: calc(100svh - 68px); }
    .hero-inner { padding: 100px 0 60px; }
    .org-name { font-size: clamp(1.4rem, 4vw, 1.8rem); }
    .hero h1 { font-size: clamp(1.2rem, 6vw, 2rem); }
    .lead { font-size: 1rem; }
    .cta-group { flex-direction: row; gap: 10px; flex-wrap: nowrap; justify-content: center; }
    .btn { padding: 14px 20px; font-size: 0.95rem; }
    
    .site-nav ul { position: fixed; inset: 64px 12px auto 12px; background: rgba(10,10,10,.95); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 12px; display: grid; gap: 8px; transform-origin: top right; transform: scale(.98); opacity: 0; pointer-events: none; transition: opacity var(--transition), transform var(--transition); }
    .nav-toggle { display: inline-block; }
    .nav-open #nav-list { opacity: 1; pointer-events: auto; transform: scale(1); }
    .stats { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
    .stat { padding: 12px; }
    .stat .count { font-size: 1.5rem; }
    .stat .label { font-size: 0.85rem; }
    
    .cards { grid-template-columns: 1fr; gap: 16px; }
    .card-body { padding: 14px; }
    .masonry { columns: 2 160px; }
    /* Gallery: hide slider, show collage on phones */
    .slider { display: none; }
    .gallery-collage-mobile { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
    .tall-cards { grid-template-columns: 1fr; gap: 16px; }
    .tall-card { padding: 14px; }
    .tall-card img { height: 200px; }
    
    .impact .section-title { font-size: 1.8rem; }
    .impact .feature-cards { gap: 14px; }
    .impact .feature-card { padding: 12px; }
    .impact .feature-card img { height: 180px; }
    
    .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .member { padding: 12px; }
    .member img { width: 100%; height: auto; max-height: 260px; object-fit: contain; background: #f1f5f9; }
    .member h3 { font-size: 1rem; }
    .member p { font-size: 0.9rem; }
    .member span { font-size: 0.85rem; }
    
    .testimonials-grid { grid-template-columns: 1fr; gap: 16px; }
    .testimonial { padding: 14px; }
    
    .contact-form { padding: 14px; }
    .contact-form .row { grid-template-columns: 1fr; gap: 16px; }
    .contact-form input, .contact-form textarea { padding: 14px; }
    
    .floating-back-to-top { right: 16px; bottom: 20px; width: 44px; height: 44px; }

    /* Make strategies images larger on phones */
    .strategies .split-media img { width: 100%; height: 240px; object-fit: cover; border-radius: 16px; }
}

@media (max-width: 420px) {
    .container { width: 98%; padding: 0 12px; }
    .section { padding: 40px 0; }
    .section-title { font-size: 1.8rem; }
    .hero { min-height: calc(100svh - 68px); }
    .hero-inner { padding: 80px 0 50px; }
    .org-name { font-size: clamp(1.2rem, 3.5vw, 1.6rem); }
    .hero h1 { font-size: clamp(1.1rem, 8vw, 1.8rem); }
    .lead { font-size: 0.95rem; }
    .btn { padding: 12px 18px; font-size: 0.9rem; }
    
    .stats { grid-template-columns: 1fr; gap: 10px; }
    .stat { padding: 10px; }
    .stat .count { font-size: 1.3rem; }
    .stat .label { font-size: 0.8rem; }
    
    /* team slider remains horizontally scrollable */
    .testimonials-grid { grid-template-columns: 1fr; }
    .feature-cards, .tall-cards { grid-template-columns: 1fr; gap: 12px; }
    .feature-card, .tall-card { padding: 10px; }
    .feature-card img, .tall-card img { height: 160px; }
    
    .team-grid { grid-template-columns: 1fr; gap: 12px; }
    .member { max-width: 100%; padding: 10px; }
    .member img { width: 100%; height: auto; max-height: 220px; object-fit: contain; background: #f1f5f9; }
    .member h3 { font-size: 0.95rem; }
    .member p { font-size: 0.85rem; }
    .member span { font-size: 0.8rem; }
    
    /* Gallery: collage single column on very small phones */
    .gallery-collage-mobile { grid-template-columns: 1fr; }
    .floating-back-to-top { right: 12px; bottom: 16px; width: 40px; height: 40px; }

    /* Slightly smaller but still prominent strategies images on very small phones */
    .strategies .split-media img { height: 220px; }
    .slide img { height: 140px; }
}

/* Mobile tuning for Community impact */
@media (max-width: 520px) {
    .impact .section-title { font-size: 1.7rem; }
    .impact .lead.center { font-size: 0.95rem; }
    .impact .feature-cards { gap: 12px; }
    .impact .feature-card { padding: 10px; }
    .impact .feature-card img { height: 180px; }
    .global .section-title { font-size: 1.7rem; }
    .global .tall-cards { gap: 12px; }
    .global .tall-card { padding: 10px; }
    .global .tall-card img { height: 180px; }
}

/* Additional mobile overflow prevention */
@media (max-width: 768px) {
    .container { max-width: 100%; }
    .hero-media { overflow: hidden; }
    .hero-img { max-width: 100%; height: auto; min-height: 100%; }
    .split-media img, .cta-media img { max-width: 100%; height: auto; }
    .slider { overflow: hidden; }
    .slider-track { overflow: hidden; }
}

/* Ensure no horizontal scroll on any screen size */
@media (max-width: 320px) {
    .container { width: 100%; padding: 0 8px; }
    .section { padding: 32px 0; }
    .hero-inner { padding: 60px 0 40px; }
    .hero h1 { font-size: 1.4rem; }
    .lead { font-size: 0.9rem; }
    .btn { padding: 10px 16px; font-size: 0.85rem; }
    .section-title { font-size: 1.6rem; }
}

/* Slider responsive steps for wider mid-breakpoints */
/* Remove other responsive overrides so it's always 3-up */

.floating-back-to-top {
    position: fixed;
    right: 28px;
    bottom: 32px;
    z-index: 100;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22,163,74,0.92);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, background 0.2s, transform 0.2s;
    font-size: 1.6rem;
}
.floating-back-to-top svg {
    display: block;
}
.floating-back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.floating-back-to-top:hover {
    background: var(--green-700);
    color: #fff;
    transform: translateY(-4px) scale(1.08);
}

/* Ensure hero image is visible but not overly wide on phones */
@media (max-width: 680px) {
    .hero-media { background: #000; }
    .hero-img { object-fit: cover; width: 100%; height: 100%; transform: scale(0.92); object-position: 60% 20%; }
    .hero-overlay { background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.4)); }
}

/* Modal */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal[aria-hidden="false"] { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.modal-dialog { position: relative; z-index: 1; width: min(92%, 640px); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; z-index: 2; }
.poster { background: linear-gradient(180deg, rgba(22,163,74,.12), rgba(22,163,74,.06)); color: var(--gray-900); padding: 24px; }
.poster h3 { margin: 0 0 8px; color: var(--gray-900); font-size: 1.6rem; }
.poster p { margin: 0 0 12px; color: #111827; }
.donate-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.donate-list li { background: #ffffff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 10px 12px; }
.poster .note { color: #065f46; font-weight: 600; }

/* M-Pesa Poster styling */
.mpesa-poster { background: #fff; border: 1px solid var(--gray-200); border-radius: 16px; overflow: hidden; }
.mpesa-header { background: #22c55e; color: #fff; padding: 12px 16px; text-align: center; }
.mpesa-title { font-weight: 800; letter-spacing: .5px; }
.mpesa-title span { background: #fff; color: #22c55e; padding: 2px 6px; border-radius: 6px; margin-left: 6px; }
.mpesa-body { padding: 16px; }
.mpesa-field { margin: 12px 0 16px; }
.mpesa-field label { display: block; font-size: .9rem; color: #065f46; margin-bottom: 6px; font-weight: 700; text-transform: uppercase; }
.digits { display: grid; grid-auto-flow: column; gap: 8px; }
.digits span { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 44px; border: 2px solid #ef4444; border-radius: 6px; font-weight: 700; font-size: 1.2rem; color: #0f172a; background: #fff; }
.digits.long { grid-auto-flow: column; gap: 8px; }
.account-name-box { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 100%; 
    height: 44px; 
    border: 2px solid #ef4444; 
    border-radius: 6px; 
    font-weight: 700; 
    font-size: 1rem; 
    color: #0f172a; 
    background: #fff; 
    text-align: center;
    padding: 0 8px;
}
.or-sep { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 14px; color: #334155; }
.or-sep::before, .or-sep::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--gray-200); }
.or-sep span { background: #fff; border: 1px solid var(--gray-200); color: #0f172a; font-weight: 800; padding: 2px 10px; border-radius: 999px; font-size: .8rem; letter-spacing: .08em; }
.mpesa-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mpesa-extra .kv:last-child { grid-column: 1 / -1; }
.kv { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; border: 1px solid var(--gray-200); border-radius: 10px; padding: 8px 10px; }
.kv strong { color: #334155; }
.account-name { 
    margin-top: 8px; 
    font-size: 0.9rem; 
    color: #065f46; 
    font-weight: 600; 
    text-align: center; 
    background: #f0fdf4; 
    padding: 6px 8px; 
    border-radius: 6px; 
    border: 1px solid #bbf7d0;
}
.kcb-cheque { 
    margin-top: 12px; 
    padding: 10px 12px; 
    background: #fef3c7; 
    border: 1px solid #f59e0b; 
    border-radius: 8px; 
    text-align: center;
}
.kcb-cheque strong { 
    color: #92400e; 
    font-size: 0.95rem; 
    font-weight: 700;
}

/* Donation modal: mobile fit and readability */
@media (max-width: 680px) {
    .modal-dialog { width: min(96%, 520px); max-height: calc(100svh - 40px); }
    .poster { padding: 16px; max-height: calc(100svh - 40px); overflow: auto; }
    .poster h3 { font-size: 1.1rem; }
    .poster p { font-size: .85rem; }
    .mpesa-poster { border-radius: 14px; }
    .mpesa-header { padding: 8px 10px; }
    .mpesa-title { font-size: .9rem; }
    .mpesa-body { padding: 0; }
    .mpesa-field { margin: 8px 0 10px; }
    .mpesa-field label { font-size: .8rem; margin-bottom: 4px; }
    .digits { gap: 4px; }
    .digits span { width: 28px; height: 32px; font-size: .9rem; }
    .digits.long { gap: 4px; }
    .account-name-box { height: 36px; font-size: .85rem; padding: 0 6px; }
    .mpesa-extra { grid-template-columns: 1fr; gap: 6px; }
    .kv { padding: 6px 8px; font-size: .85rem; }
    .kcb-cheque { margin-top: 8px; padding: 8px 10px; }
    .kcb-cheque strong { font-size: .8rem; }
    .or-sep { margin: 6px 0 8px; }
    .or-sep span { font-size: .7rem; padding: 1px 8px; }
    .note { font-size: .8rem; }
}

@media (max-width: 420px) {
    .modal-dialog { width: 96%; max-height: calc(100svh - 24px); }
    .poster { padding: 10px; max-height: calc(100svh - 24px); }
    .poster h3 { font-size: 1rem; }
    .poster p { font-size: .8rem; }
    .mpesa-header { padding: 6px 8px; }
    .mpesa-title { font-size: .85rem; }
    .mpesa-field { margin: 6px 0 8px; }
    .mpesa-field label { font-size: .75rem; }
    .digits { gap: 3px; }
    .digits span { width: 24px; height: 28px; font-size: .8rem; }
    .account-name-box { height: 32px; font-size: .75rem; }
    .mpesa-extra { gap: 4px; }
    .kv { padding: 4px 6px; font-size: .8rem; }
    .kcb-cheque { padding: 6px 8px; }
    .kcb-cheque strong { font-size: .75rem; }
    .or-sep { margin: 4px 0 6px; }
    .or-sep span { font-size: .65rem; padding: 1px 6px; }
    .note { font-size: .75rem; }
}

/* Loading Spinner Overlay */
#loadingOverlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248,249,250,0.95);
  transition: opacity 0.4s;
}
#loadingOverlay .spinner {
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#loadingOverlay[hidden] {
  opacity: 0;
  pointer-events: none;
}
#loadingOverlay img {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0.12;
  z-index: 0;
  pointer-events: none;
}

/* Ensure floating back-to-top is always above content */
.floating-back-to-top {
  z-index: 1500;
}

@media (max-width: 1200px) {
  .site-nav ul {
    position: fixed;
    inset: 64px 12px auto 12px;
    background: rgba(10,10,10,.95);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 8px;
    transform-origin: top right;
    transform: scale(.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }
  .nav-toggle {
    display: inline-block;
  }
  .nav-open #nav-list {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }
}
@media (min-width: 1201px) {
  .site-nav ul {
    display: flex !important;
    position: static;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    gap: 20px;
    opacity: 1 !important;
    pointer-events: auto;
    transform: none;
  }
  .nav-toggle {
    display: none !important;
  }
}

/* Custom tweaks for specific team member images */
.member.member--charles img {
  height: 200px;
  object-fit: contain;
  object-position: center;
}
@media (max-width: 680px) {
  .member.member--charles img {
    height: auto;
    max-height: 200px;
    object-fit: contain;
  }
}
