/* =====================================================================
   Feed Nation Foundation — clean modern NGO theme (ForestGuard inspired)
   Forest-green + warm amber, cream background, big rounded cards,
   soft shadows, generous spacing, smooth continuous scroll.
   ===================================================================== */

:root {
    /* Palette — matched to the Feed Nation logo:
       flame red-orange (fn mark), deep navy (FEED NATION), blue-violet (tagline).
       NOTE: variable names kept from the old green theme so every rule retints automatically:
       --green-900/800 now hold NAVY, --green-700/600 hold FLAME RED. */
    --green-900: #12103d;   /* deep navy */
    --green-800: #1a1750;   /* navy */
    --green-700: #d63b12;   /* flame red (primary actions) */
    --green-600: #e94e1b;   /* flame lighter */
    --green:     #f26a35;   /* orange */
    --green-100: #fdece5;   /* light peach tint */
    --violet:     #4639cf;  /* blue-violet accent (from tagline) */
    --violet-600: #372bb0;
    --amber:     #ffb020;   /* warm gold highlight */
    --amber-600: #e08f00;
    --cream:     #f8f6f2;
    --card:      #ffffff;
    --ink:       #1b1930;
    --muted:     #5f5d75;
    --line:      #e8e4de;

    --r-xl: 32px;
    --r-lg: 24px;
    --r-md: 16px;
    --r-sm: 12px;
    --shadow-sm: 0 6px 18px rgba(20, 18, 70, 0.06);
    --shadow-md: 0 14px 34px rgba(20, 18, 70, 0.10);
    --shadow-lg: 0 26px 60px rgba(18, 16, 61, 0.16);
}

/* ---- Base / overflow / smooth scroll ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1 0 auto; }
img { max-width: 100%; }
a { text-decoration: none; }

h1,h2,h3,h4,h5 { font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.text-green { color: var(--green-700) !important; }
.text-amber { color: var(--amber-600) !important; }
.lead-muted { color: var(--muted); }

/* Highlighted brand mention (marker-style underline) */
.fn-highlight {
    color: var(--green-800); font-weight: 700;
    background: linear-gradient(transparent 55%, rgba(70,57,207,.25) 55%);
    padding: 0 .12em; border-radius: 2px;
}

/* ---- Heading semantics ----
   Several card titles used <h5>/<h6> purely for their size, which left gaps in
   the heading outline (h1 -> h6) that screen readers and Google both flag.
   The tags are now <h3>, and these rules pin the exact previous size/weight
   so nothing on screen changed. */
h3.fi-title       { font-size: .9rem;   font-weight: 800; line-height: 1.3;  margin-bottom: .35rem; }
h3.value-title    { font-size: 1.25rem; font-weight: 700; line-height: 1.2;  margin-bottom: .5rem;  }
h3.vision-point   { font-size: 1rem;    font-weight: 800; line-height: 1.2;  margin-bottom: .3rem;  }
h3.vision-cta     { font-size: 1.2rem;  font-weight: 800; line-height: 1.2;  margin-bottom: 1.5rem; }
h3.panel-title    { font-size: 1.25rem; font-weight: 800; line-height: 1.2;  margin-bottom: 0;      }
/* The footer sits on dark navy. A global heading colour would render these
   near-invisible (contrast 1.06:1), so the white is set explicitly. */
h2.footer-heading { font-size: 1.25rem; font-weight: 700; line-height: 1.2;  margin-bottom: 1rem;  color: #fff; }
h3.footer-subhead { font-size: 1rem;    font-weight: 700; line-height: 1.2;  margin-bottom: .5rem; color: #fff; }
/* Wizard step / success headings (were <h4>) */
h3.step-title     { font-size: 1.5rem;  font-weight: 800; line-height: 1.2;  margin-bottom: 1rem;   }
h3.result-title   { font-size: 1.5rem;  font-weight: 800; line-height: 1.2;  margin-bottom: .5rem;  }

/* ---- Accessibility: skip link + visible keyboard focus ----
   The skip link is off-screen until a keyboard user tabs to it, letting them
   jump past the navigation. :focus-visible only shows the ring for keyboard
   users, so mouse clicks look exactly as before. */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 2000;
    background: var(--green-900); color: #fff;
    padding: .75rem 1.25rem; border-radius: 0 0 12px 0;
    font-weight: 700; text-decoration: none;
}
.skip-link:focus {
    left: 0;
    outline: 3px solid var(--amber);
    outline-offset: 2px;
}
main:focus { outline: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 2px;
    border-radius: 6px;
}

/* About photo — was an inline style on the <img>; moved here so the phone
   size can override it (an inline height cannot be overridden by CSS). */
.about-photo { border-radius: 18px; height: 460px; object-fit: cover; }

/* About image sits vertically centred against the much taller text column.
   (It used to be position:sticky, which pinned it to the top of the viewport
   and fought the centring.) */
@media (min-width: 992px) {
    .about-sticky { position: static; }
}

.section { padding: 5rem 0; }
/* Offset anchored sections so they don't hide under the sticky navbar */
section[id], div[id].anchor { scroll-margin-top: 96px; }
.section-title { color: var(--green-900); font-weight: 800; }
/* Big section headings get a slowly panning logo-gradient (navy → flame → violet) */
@keyframes fn-title-pan { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
h2.section-title {
    background: linear-gradient(90deg, var(--green-900), var(--green-700) 35%, var(--violet) 70%, var(--green-900));
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: fn-title-pan 9s linear infinite;
}
.section-eyebrow {
    display: inline-block; text-transform: uppercase; letter-spacing: .16em;
    font-size: .74rem; font-weight: 700; color: var(--green-700);
    background: var(--green-100); padding: .45rem 1rem; border-radius: 999px;
    margin-bottom: 1rem;
}

/* ---- Cards (replaces old neumorphism classes) ---- */
.neu, .neu-sm {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}
.neu-inset {
    background: var(--green-100);
    border-radius: var(--r-md);
}
.glass {
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--r-lg);
}

/* Hover lift (replaces 3D tilt but keeps class name) */
.tilt { transition: transform .3s ease, box-shadow .3s ease; }
.tilt:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

/* ---- Buttons ---- */
/* Buttons carry a slowly drifting brand gradient (logo colors in motion) */
@keyframes fn-btn-pan { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.btn-fn {
    display: inline-flex; align-items: center; gap: .5rem;
    font-weight: 700; font-size: .98rem; color: #fff; border: none; cursor: pointer;
    padding: .85rem 1.7rem; border-radius: 999px;
    background: linear-gradient(120deg, #d63b12, #ff6a2b, #d63b12, #ff6a2b);
    background-size: 200% auto;
    animation: fn-btn-pan 6s linear infinite;
    box-shadow: 0 10px 22px rgba(214,59,18,.28);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-fn:hover { color:#fff; transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 14px 28px rgba(214,59,18,.34); }
.btn-fn:active { transform: translateY(0); }
.btn-amber {
    background: linear-gradient(120deg, #ffb020, #ff8f00, #ffb020, #ff8f00);
    background-size: 200% auto; color: var(--green-900);
    box-shadow: 0 10px 22px rgba(255,160,20,.35);
}
.btn-amber:hover { color: var(--green-900); }
.btn-navy {
    background: linear-gradient(120deg, #1a1750, #4639cf, #1a1750, #4639cf);
    background-size: 200% auto; animation-duration: 8s;
    box-shadow: 0 10px 22px rgba(18,16,61,.35);
}
.btn-navy:hover { color:#fff; }
.btn-outline {
    background: transparent; color: var(--green-800); border: 2px solid var(--green-700); box-shadow:none;
}
.btn-outline:hover { background: var(--green-700); color:#fff; }
.btn-white { background:#fff; color: var(--green-800); box-shadow: var(--shadow-sm); }
.btn-white:hover { background:#fff; color: var(--green-900); }

/* ---- Navbar (clean, rounded, sticky) ---- */
.fn-nav-wrap { position: sticky; top: 0; z-index: 1030; padding: .75rem 0; }
.fn-navbar {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    padding: .45rem .75rem;
}
.fn-logo { display: flex; align-items: center; gap: .6rem; }
.fn-logo-img { height: 56px; width: auto; display: block; }
@media (max-width: 575px) { .fn-logo-img { height: 46px; } }
/* Footer logo on a small white chip so the dark logo text stays visible */
.fn-footer-logo img {
    height: 62px; width: auto; display: block;
    background: #fff; border-radius: 12px; padding: 8px 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.fn-logo-mark {
    width: 44px; height: 44px; border-radius: 13px; flex: 0 0 auto;
    display: grid; place-items: center; color:#fff; font-weight:900; font-style:italic; font-size:1.3rem;
    background: linear-gradient(145deg, var(--green-600), var(--green-800));
    box-shadow: 0 6px 14px rgba(214,59,18,.3);
}
.fn-logo-text b { color: var(--green-900); font-size: 1.08rem; display:block; line-height:1.1; }
.fn-logo-text small { color: var(--green-700); font-size:.6rem; font-weight:600; letter-spacing:.03em; }
.fn-navbar .nav-link {
    color: var(--green-900); font-weight: 600; font-size: .95rem;
    padding: .5rem .95rem !important; border-radius: 999px; transition: all .2s ease;
}
.fn-navbar .nav-link:hover { color: var(--green-700); }
.fn-navbar .nav-link.active { color: var(--green-800); background: var(--green-100); }
.navbar-toggler { border:1px solid var(--line); border-radius: 12px; padding:.35rem .55rem; }
.navbar-toggler:focus { box-shadow: none; }

/* ---- Hero ---- */
.fn-hero {
    position: relative; overflow: hidden; color:#fff;
    border-radius: var(--r-xl);
    margin-top: 1rem;
    min-height: 540px;
    display: flex; align-items: center;
    padding: 3.5rem;
    background: var(--green-900);
    box-shadow: var(--shadow-lg);
}
/* Crossfading background slideshow */
.fn-hero-slides { position:absolute; inset:0; z-index:0; }
.fn-hero-slide {
    position:absolute; inset:0; background-size:cover; background-position:center;
    opacity:0; transform: scale(1.16); /* default = fully zoomed, so fade-out never reverses */
    transition: opacity 1.8s ease-in-out;
    will-change: opacity, transform;
}
.fn-hero-slide.active { opacity:1; }
/* Static navy overlay — dark on the text side, clear on the image side (no waves) */
.fn-hero::before {
    content:""; position:absolute; inset:0; z-index:1;
    background: linear-gradient(100deg,
        rgba(13,11,45,.85) 0%, rgba(13,11,45,.58) 42%,
        rgba(13,11,45,.22) 74%, rgba(13,11,45,.05) 100%);
}
.fn-hero > .row { position:relative; z-index:2; width:100%; }
.fn-hero h1 { color:#fff; font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.08; }
.hero-eyebrow {
    display:inline-block; text-transform:uppercase; letter-spacing:.16em; font-size:.74rem; font-weight:700;
    color:#fff; background: rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.3);
    padding:.45rem 1rem; border-radius:999px; margin-bottom:1.2rem;
}
.hero-quote { font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 600; opacity:.95; }
.hero-quote .by { color: var(--amber); font-weight: 700; }

/* Stats strip that overlaps hero bottom */
.stats-strip {
    background: var(--card); border:1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    margin: -3rem auto 0; position: relative; z-index: 3; padding: 1.5rem .5rem;
}
.stat-card { text-align:center; padding: .8rem .5rem; }
.stat-icon {
    width: 56px; height:56px; border-radius: 16px; margin:0 auto .7rem; display:grid; place-items:center;
    font-size:1.5rem; color: var(--green-700); background: var(--green-100);
}
.stat-number { font-size: 1.9rem; font-weight: 800; color: var(--green-900); line-height:1.1; }
.stat-label { color: var(--muted); font-size:.88rem; }

/* ---- Programme cards ---- */
.prog-card { overflow: hidden; padding: 0; }
.prog-media {
    height: 150px; display:grid; place-items:center; color:#fff; font-weight:800; font-size:1.35rem;
    letter-spacing:.02em; text-align:center;
}
.prog-media.edu  { background: linear-gradient(135deg, #2c22a8, #171253); }
.prog-media.care { background: linear-gradient(135deg, var(--violet), var(--violet-600)); }
.prog-media.food { background: linear-gradient(135deg, #f26a35, #c92f07); }
/* Programme card with a photo header (used on the All Programmes page) */
.prog-photo { height: 200px; overflow: hidden; }
.prog-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.prog-card:hover .prog-photo img { transform: scale(1.06); }
.prog-body { padding: 1.5rem; }
.prog-body h3 { color: var(--green-800); font-size: 1.25rem; margin: .1rem 0 .4rem; }
.prog-body .sub { color: var(--amber-600); font-weight:700; letter-spacing:.04em; font-size:.78rem; text-transform:uppercase; }
.prog-body p { color: var(--muted); font-size:.93rem; }
.price-pill { display:inline-block; background: var(--green-100); color: var(--green-800); font-weight:700; font-size:.85rem; padding:.35rem .9rem; border-radius:999px; }

/* ---- Gallery ---- */
.gallery-card { overflow:hidden; padding: 8px; }
.gallery-card .frame { border-radius: var(--r-md); overflow:hidden; position:relative; }
.gallery-card img { width:100%; height: 220px; object-fit:cover; display:block; transition: transform .5s ease; }
.gallery-card:hover img { transform: scale(1.07); }
.gallery-card .cap {
    position:absolute; left:0; right:0; bottom:0; padding:.75rem 1rem; color:#fff; font-weight:700; font-size:.95rem;
    background: linear-gradient(transparent, rgba(18,16,61,.88));
}
.album-badge {
    position:absolute; top:10px; right:10px; background:rgba(18,16,61,.8); color:#fff;
    font-size:.78rem; font-weight:700; padding:.25rem .6rem; border-radius:999px;
}

/* ---- Filter chips + pagination (gallery / updates / programmes) ---- */
.fn-filters { display:flex; flex-wrap:wrap; gap:.5rem; justify-content:center; margin-bottom:2rem; }
.fn-filter {
    border:2px solid var(--line); background:#fff; color:var(--green-900); font-weight:700;
    font-size:.88rem; padding:.5rem 1.15rem; border-radius:999px; cursor:pointer; transition:all .2s ease;
}
.fn-filter:hover { border-color:var(--green-700); color:var(--green-700); }
.fn-filter.active { background:var(--green-700); color:#fff; border-color:var(--green-700); }
.fn-pagination { display:flex; justify-content:center; align-items:center; gap:.5rem; margin-top:2.5rem; flex-wrap:wrap; }
.fn-pg-btn {
    min-width:46px; height:46px; padding:0 .6rem; border:1px solid var(--line); background:#fff;
    color:var(--green-900); font-weight:700; font-size:1rem; border-radius:14px; cursor:pointer; transition:all .2s ease;
}
.fn-pg-btn:hover:not(:disabled) { border-color:var(--green-700); color:var(--green-700); }
.fn-pg-btn.active { background:var(--green-700); color:#fff; border-color:var(--green-700); box-shadow:0 8px 18px rgba(214,59,18,.28); }
.fn-pg-btn:disabled { opacity:.4; cursor:default; }

/* ---- Update cards (3-per-row) ---- */
.update-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.update-card .u-img { height: 200px; overflow: hidden; }
.update-card .u-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.update-card:hover .u-img img { transform: scale(1.06); }
.update-card .u-body { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; }
.update-card .u-date { display:inline-block; background: var(--green-100); color: var(--green-800);
    font-weight:700; font-size:.75rem; padding:.25rem .7rem; border-radius:999px; margin-bottom:.6rem; align-self:flex-start; }
.update-card h3 { font-size: 1.15rem; color: var(--green-900); margin-bottom:.5rem; line-height:1.3; }
.update-card .u-desc {
    color: var(--muted); font-size:.92rem; margin-bottom: 1rem;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.update-card .u-body .btn-fn { margin-top: auto; align-self: flex-start; }

/* ---- Vision / Mission ---- */
.vm-box { padding: 2.2rem; height:100%; color:#fff; border-radius: var(--r-lg); border:none; }
.vm-vision  { background: linear-gradient(145deg, var(--green-800), var(--violet)); background-size: 200% 200%; animation: fn-gradient-shift 14s ease infinite; }
.vm-mission { background: linear-gradient(145deg, var(--green-700), var(--green)); background-size: 200% 200%; animation: fn-gradient-shift 14s ease infinite; }
.vm-box i { font-size: 2rem; }

/* ---- Forms ---- */
.form-card { padding: 2.2rem; }
.fn-input {
    width:100%; border:1px solid var(--line); outline:none; color: var(--ink);
    background:#fff; border-radius: 12px; padding:.8rem 1.05rem; margin-bottom:1rem; font-size:.97rem;
    transition: border .2s ease, box-shadow .2s ease;
}
.fn-input:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(70,57,207,.18); }
textarea.fn-input { resize: vertical; min-height: 130px; }
.form-label { font-weight:600; color: var(--green-900); font-size:.9rem; margin-bottom:.35rem; display:block; }

/* Donation detail rows */
.detail-row { display:flex; justify-content:space-between; gap:1rem; padding:.8rem 1.05rem; border-radius:12px; margin-bottom:.4rem; }
.detail-row:nth-child(odd){ background: var(--green-100); }
.detail-row .k { color: var(--muted); font-weight:600; }
.detail-row .v { color: var(--green-900); font-weight:700; text-align:right; }

/* Contact info */
.info-item { display:flex; gap:1rem; align-items:flex-start; margin-bottom:1.3rem; }
.info-ic { width:46px;height:46px;border-radius:13px;flex:0 0 auto;display:grid;place-items:center; color:var(--green-700); background: var(--green-100); }

/* ---- Donation wizard ---- */
.wiz-dots { display: flex; gap: .5rem; flex-wrap: wrap; }
.wiz-dots .wd {
    flex: 1 1 0; text-align: center; font-size: .8rem; font-weight: 600; color: var(--muted);
    background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: .45rem .6rem;
    white-space: nowrap;
}
.wiz-dots .wd b {
    display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: var(--line); color: var(--muted); margin-right: .35rem; font-size: .75rem;
}
.wiz-dots .wd.active { color: var(--green-800); border-color: var(--green-700); background: var(--green-100); }
.wiz-dots .wd.active b { background: var(--green-700); color: #fff; }
.wiz-dots .wd.done { color: var(--green-800); }
.wiz-dots .wd.done b { background: var(--green-800); color: #fff; }

.cause-card {
    display: flex; flex-direction: column; align-items: center; gap: .45rem;
    border: 2px solid var(--line); border-radius: var(--r-md); background: #fff;
    padding: 1.1rem .6rem; cursor: pointer; font-weight: 700; color: var(--green-900);
    transition: all .2s ease; font-size: .92rem;
}
.cause-card i { font-size: 1.6rem; color: var(--green-700); }
.cause-card:hover { border-color: var(--green-700); transform: translateY(-3px); }
.cause-card.selected { border-color: var(--green-700); background: var(--green-100); box-shadow: 0 8px 20px rgba(214,59,18,.15); }

.pay-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    border: 2px solid var(--line); border-radius: 999px; background: #fff;
    padding: .6rem 1.2rem; cursor: pointer; font-weight: 700; color: var(--green-900);
    font-size: .92rem; transition: all .2s ease;
}
.pay-btn:hover { border-color: var(--green-700); }
.pay-btn.selected { border-color: var(--green-700); background: var(--green-100); color: var(--green-700); }

/* ---- Floating side contact bar ---- */
.fn-fab { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 1040; display:flex; flex-direction:column; gap:12px; }
.fn-fab a { width:50px;height:50px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:1.25rem; box-shadow: var(--shadow-md); transition: transform .2s ease; }
.fn-fab a:hover { transform: scale(1.12); }
.fab-call { background: var(--green-700); }
.fab-mail { background: var(--green-900); }
.fab-wa   { background: #25d366; }

/* Back to top */
.to-top { position: fixed; right: 20px; bottom: 22px; z-index:1040; width:46px;height:46px;border-radius:14px;border:none;
    display:grid;place-items:center;color:#fff;font-size:1.15rem; background: var(--green-700); box-shadow: var(--shadow-md);
    opacity:0; pointer-events:none; transition: opacity .3s ease, transform .2s ease; }
.to-top.show { opacity:1; pointer-events:auto; }
.to-top:hover { transform: translateY(-3px); }

/* ---- Alerts ---- */
.fn-alert { border:none; border-radius: 14px; box-shadow: var(--shadow-sm); }
.fn-alert.ok  { background:#e7f4ec; color:#166534; }
.fn-alert.err { background:#fdecec; color:#9b1c1c; }

/* ---- Page banner (inner pages) ---- */
.page-banner {
    text-align:center; color:#fff; border-radius: var(--r-xl); margin-top:1rem; padding: 3rem 1.5rem;
    background: linear-gradient(130deg, var(--green-800), var(--violet-600), var(--green-900));
    background-size: 250% 250%; animation: fn-gradient-shift 14s ease infinite;
    box-shadow: var(--shadow-md);
}
.page-banner h1 { color:#fff; }

/* ---- CTA band ---- */
.cta-band {
    border-radius: var(--r-xl); color:#fff; padding: 3rem; text-align:center;
    background: linear-gradient(130deg, var(--green-700), var(--green-900));
    box-shadow: var(--shadow-md);
}
.cta-band h2 { color:#fff; }

/* ---- Footer ---- */
.fn-footer { background: var(--green-900); color:#c7d6cc; margin-top: 4rem; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 3.5rem 0 1.5rem; }
.fn-footer h5, .fn-footer h6 { color:#fff; }
.footer-link { color:#b7c7bc; transition: color .2s ease; }
.footer-link:hover { color: var(--amber); }
.footer-soc a { width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:#fff; background:rgba(255,255,255,.08); transition: all .2s ease; }
.footer-soc a:hover { background: var(--green-700); transform: translateY(-3px); }

/* ---- Smooth infinite image band (marquee) ---- */
.marquee {
    overflow: hidden; padding: .5rem 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee-track {
    display: flex; gap: 1rem; width: max-content;
    animation: fn-marquee 50s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
    flex: 0 0 auto; width: 320px; height: 210px; border-radius: 18px; overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.marquee-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.marquee-item:hover img { transform: scale(1.05); }
@keyframes fn-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 575px) { .marquee-item { width: 240px; height: 160px; } }

/* Enroll button on programme cards */
.btn-enroll {
    display: inline-flex; align-items: center; gap: .4rem; margin-top: .9rem;
    font-weight: 700; font-size: .9rem; color: #fff; border: none; cursor: pointer;
    padding: .6rem 1.2rem; border-radius: 999px; background: var(--green-700);
    transition: background .2s ease, transform .2s ease;
}
.btn-enroll:hover { background: var(--green-800); transform: translateY(-2px); color:#fff; }

/* ---- Hero slogan + intro (image copy) ---- */
.hero-slogan { color: var(--amber); font-weight: 800; font-size: clamp(1.2rem, 2.6vw, 1.8rem); margin-bottom: .6rem; }
.hero-intro  { opacity: .92; max-width: 34rem; }

/* ---- Hero feature messages (5-across) ---- */
.feature-item { text-align: center; padding: .7rem .5rem; }
.feature-item .fi-ic { width: 52px; height: 52px; border-radius: 15px; margin: 0 auto .7rem; display: grid; place-items: center; font-size: 1.3rem; color: var(--green-700); background: var(--green-100); }
.feature-item h6 { color: var(--green-900); font-weight: 800; font-size: .9rem; margin-bottom: .35rem; line-height: 1.3; }
.feature-item p  { color: var(--muted); font-size: .8rem; margin: 0; }

/* ---- Our Vision ---- */
.panel-soft { background: #efedf9; border-radius: var(--r-xl); padding: 2.5rem; }
.vision-card { display: flex; gap: 1rem; padding: 1.4rem; height: 100%; }
.vision-card .vc-ic { width: 46px; height: 46px; border-radius: 13px; flex: 0 0 auto; display: grid; place-items: center; font-size: 1.25rem; color: #fff; }
.vc-blue { background: var(--violet); } .vc-green { background: var(--green-800); } .vc-red { background: var(--green-700); }
.vision-card h5 { color: var(--green-900); font-size: 1rem; font-weight: 800; margin-bottom: .3rem; }
.vision-card p  { color: var(--muted); font-size: .85rem; margin: 0; }

/* ---- Impact card ---- */
.impact-card { padding: 1.8rem; }
.impact-card h4 { color: var(--amber-600); font-weight: 800; font-size: 1.2rem; }
.impact-item { display: flex; gap: .8rem; margin-bottom: 1.1rem; }
.impact-item .ii-ic { width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: var(--green-600); font-size: 1rem; }
.impact-item b { color: var(--green-900); display: block; font-size: .92rem; }
.impact-item span { color: var(--muted); font-size: .82rem; }

/* ---- Thanks bar (footer top) ---- */
.thanks-bar {
    background: linear-gradient(130deg, var(--green-900), var(--violet), var(--green-700), var(--green-900));
    background-size: 300% 300%; animation: fn-gradient-shift 12s ease infinite;
    color: #fff; border-radius: var(--r-xl); padding: 1.3rem 2rem; box-shadow: var(--shadow-md);
}
.thanks-bar .slogan { color: var(--amber); font-weight: 800; }

/* Header donate button subtitle */
.btn-fn small { font-weight: 500; font-size: .6rem; opacity: .9; }

/* ---- Reveal on scroll (gentle, never blocks scroll) ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =====================================================================
   Motion graphics
   ===================================================================== */

/* Scroll progress bar (top of page) */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 4px; width: 0;
    background: linear-gradient(90deg, var(--amber), var(--green-700), var(--violet));
    background-size: 200% auto;
    animation: fn-btn-pan 4s linear infinite;
    z-index: 2000; border-radius: 0 4px 4px 0;
    transition: width .1s linear;
}

/* Ken Burns slow zoom on the active hero slide — linear so it never speeds up/reverses.
   Default (non-active) state is scale(1.16), so a slide fading out holds its zoom
   instead of shrinking back. */
@keyframes fn-kenburns { from { transform: scale(1); } to { transform: scale(1.16); } }
.fn-hero-slide.active { animation: fn-kenburns 8s linear forwards; }

/* Heartbeat on Donate hearts */
@keyframes fn-heartbeat {
    0%, 28%, 100% { transform: scale(1); }
    10%           { transform: scale(1.3); }
    18%           { transform: scale(1.05); }
}
.btn-fn .bi-heart-fill, .fab-call i { display: inline-block; animation: fn-heartbeat 1.8s ease-in-out infinite; }

/* Shine sweep across buttons on hover */
.btn-fn { position: relative; overflow: hidden; }
.btn-fn::before {
    content: ""; position: absolute; top: 0; left: -80%;
    width: 50%; height: 100%; pointer-events: none;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg); transition: left .55s ease;
}
.btn-fn:hover::before { left: 130%; }

/* Pulsing ring on the floating contact buttons */
@keyframes fn-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.45); }
    70%  { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.fn-fab a { position: relative; animation: fn-pulse 2.6s ease-out infinite; }
.fn-fab a:nth-child(2) { animation-delay: .85s; }
.fn-fab a:nth-child(3) { animation-delay: 1.7s; }

/* Slow drifting gradient on the CTA band */
@keyframes fn-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.cta-band {
    background: linear-gradient(130deg, var(--green-900), var(--violet), var(--green-700), var(--green-900));
    background-size: 300% 300%;
    animation: fn-gradient-shift 12s ease infinite;
}

/* Continuously animated icon GLYPHS — the box stays still, only the icon
   inside bobs, swings and breathes. Staggered per card. */
@keyframes fn-icon-bob {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    30%      { transform: translateY(-5px) rotate(-8deg) scale(1.14); }
    60%      { transform: translateY(1px) rotate(6deg) scale(1.04); }
}
.stat-icon i, .fi-ic i, .vc-ic i, .impact-item .ii-ic i, .info-ic i {
    display: inline-block;
    animation: fn-icon-bob 3s ease-in-out infinite;
    will-change: transform;
}
/* Stagger so neighbouring icons never move in sync */
[class*="col-"]:nth-child(2) .stat-icon i, [class*="col-"]:nth-child(2) .fi-ic i,
[class*="col-"]:nth-child(2) .vc-ic i, .impact-item:nth-child(3) .ii-ic i,
.info-item:nth-child(2) .info-ic i { animation-delay: .45s; }
[class*="col-"]:nth-child(3) .stat-icon i, [class*="col-"]:nth-child(3) .fi-ic i,
[class*="col-"]:nth-child(3) .vc-ic i, .impact-item:nth-child(4) .ii-ic i,
.info-item:nth-child(3) .info-ic i { animation-delay: .9s; }
[class*="col-"]:nth-child(4) .stat-icon i, [class*="col-"]:nth-child(4) .fi-ic i,
.info-item:nth-child(4) .info-ic i { animation-delay: 1.35s; }
[class*="col-"]:nth-child(5) .stat-icon i, [class*="col-"]:nth-child(5) .fi-ic i { animation-delay: 1.8s; }

/* Stat icon wiggle on hover */
@keyframes fn-wiggle {
    0%, 100% { transform: rotate(0); }
    25%      { transform: rotate(-8deg) scale(1.08); }
    75%      { transform: rotate(8deg) scale(1.08); }
}
.stat-card:hover .stat-icon i { display:inline-block; animation: fn-wiggle .5s ease; }

/* ---- Continuously animated feature icons (hero message cards) ---- */
@keyframes fn-icon-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes fn-spin-slow  { to { transform: rotate(360deg); } }
@keyframes fn-thumb {
    0%, 40%, 100% { transform: rotate(0) translateY(0); }
    10%           { transform: rotate(-16deg) translateY(-4px) scale(1.12); }
    20%           { transform: rotate(0) translateY(0); }
    28%           { transform: rotate(-10deg) translateY(-2px) scale(1.06); }
}
@keyframes fn-sway {
    0%, 100% { transform: rotate(-9deg); }
    50%      { transform: rotate(9deg); }
}
@keyframes fn-glow {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(255,159,28,0)); }
    50%      { filter: drop-shadow(0 0 7px rgba(255,159,28,.85)); }
}
/* Each chip gently floats, one after another (staggered) */
.feature-item .fi-ic { animation: fn-icon-float 3.2s ease-in-out infinite; }
.stats-strip [class*="col-"]:nth-child(2) .fi-ic { animation-delay: .3s; }
.stats-strip [class*="col-"]:nth-child(3) .fi-ic { animation-delay: .6s; }
.stats-strip [class*="col-"]:nth-child(4) .fi-ic { animation-delay: .9s; }
.stats-strip [class*="col-"]:nth-child(5) .fi-ic { animation-delay: 1.2s; }
/* Each icon has its own personality */
.fi-ic i { display: inline-block; }
.fi-ic .bi-hand-thumbs-up-fill { animation: fn-thumb 2.6s ease-in-out infinite; transform-origin: 20% 80%; }
.fi-ic .bi-flower1             { animation: fn-spin-slow 7s linear infinite; }
.fi-ic .bi-people-fill         { animation: fn-sway 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.fi-ic .bi-heart-fill          { animation: fn-heartbeat 1.8s ease-in-out infinite; }
.fi-ic .bi-brightness-high-fill{ animation: fn-spin-slow 9s linear infinite, fn-glow 2.6s ease-in-out infinite; }

/* Gentle bob for the section eyebrows' parent headings on reveal is covered by stagger.
   Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    .fn-hero-slide.active, .fn-hero::before,
    .stat-icon i, .fi-ic i, .vc-ic i, .impact-item .ii-ic i, .info-ic i,
    .btn-fn .bi-heart-fill, .fab-call i, .fn-fab a, .cta-band,
    .btn-fn, .btn-navy, .btn-amber, h2.section-title,
    .vm-vision, .vm-mission, .thanks-bar, .page-banner, .scroll-progress,
    .marquee-track { animation: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Compact Donate button shown in the mobile navbar (always visible) */
.btn-donate-mobile { padding: .55rem .85rem; font-size: .9rem; box-shadow: 0 6px 14px rgba(214,59,18,.28); }

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .fn-navbar { border-radius: 20px; padding: .5rem .7rem; }
    .fn-navbar .navbar-collapse { margin-top: .5rem; }
    .fn-navbar .nav-link { padding: .6rem .9rem !important; }
    .fn-hero { padding: 2.5rem 1.5rem; min-height: 440px; }
    .stats-strip { margin-top: 1.5rem; }
    .panel-soft { padding: 1.75rem; }
}
@media (max-width: 767px) {
    /* Feature cards: comfortable 2-per-row with breathing room */
    .stats-strip .row > [class*="col-"] { border-bottom: 1px solid var(--line); }
    .feature-item { padding: 1rem .5rem; }
    /* Center a lone last card (e.g. 5th feature) when items wrap 2-per-row */
    .stats-strip .row > [class*="col-"]:last-child:nth-child(odd) {
        margin-left: auto;
        margin-right: auto;
        border-bottom: none;
    }
}
@media (max-width: 575px) {
    .section { padding: 3rem 0; }
    .fn-hero { min-height: 400px; padding: 2rem 1.25rem; border-radius: 22px; }
    .fn-hero h1 { font-size: 1.9rem; }
    .hero-slogan { font-size: 1.15rem; }
    .hero-quote { font-size: 1rem; }
    .fn-logo-mark { width: 40px; height: 40px; font-size: 1.15rem; }
    .fn-logo-text b { font-size: .98rem; }
    .section-title, h2.section-title { font-size: 1.5rem; }
    .stat-number { font-size: 1.55rem; }
    .feature-item h6 { font-size: .84rem; }
    .form-card, .panel-soft { padding: 1.35rem; }
    .vm-box, .impact-card { padding: 1.6rem; }
    .cta-band, .page-banner { padding: 2rem 1.2rem; }
    .prog-media { height: 130px; font-size: 1.15rem; }
    /* Donation QR row stacks neatly */
    .detail-row { font-size: .9rem; }
}

/* =====================================================================
   MOBILE-FIRST LAYER
   Everything below only applies on phones/tablets. It fixes the things
   that genuinely break on a small screen:
     1. the floating contact circles used to sit ON TOP of body text and
        form fields — on phones they become a bottom bar instead
     2. a 12px sideways scroll caused by wide Bootstrap gutters
     3. tap targets that were too small for a thumb
     4. iOS zooming in whenever a form field was tapped
   ===================================================================== */

/* --- 1. Contact shortcuts become a bottom bar on phones --------------- */
@media (max-width: 767.98px) {
    .fn-fab {
        top: auto; bottom: 0; left: 0; right: 0;
        transform: none;
        flex-direction: row;
        gap: 0;
        z-index: 1045;
        background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid var(--line);
        box-shadow: 0 -6px 20px rgba(13, 11, 51, .10);
        /* env() keeps clear of the iPhone home indicator */
        padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom, 0px));
    }
    .fn-fab a {
        flex: 1 1 0;
        width: auto; height: auto;
        min-height: 52px;                /* comfortable thumb target */
        border-radius: 14px;
        display: flex; flex-direction: column;
        align-items: center; justify-content: center; gap: 2px;
        padding: .3rem .2rem;
        font-size: 1.15rem;
        background: transparent;
        color: var(--green-900);
        box-shadow: none;
        animation: none;                 /* no pulsing inside a solid bar */
    }
    .fn-fab a::after {
        content: attr(data-label);
        font-size: .66rem;
        font-weight: 700;
        letter-spacing: .02em;
        line-height: 1;
    }
    .fn-fab a:hover, .fn-fab a:active { transform: none; background: var(--green-100); }
    .fab-call i { color: var(--green-700); }
    .fab-mail i { color: var(--green-900); }
    .fab-wa   i { color: #25d366; }

    /* Get the bar out of the way while the enroll popup is open, so it can't
       look tappable when it isn't */
    body.modal-open .fn-fab { display: none; }

    /* Stop the bar covering the end of the page */
    body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
    /* Back-to-top sits above the bar, not behind it */
    .to-top { right: 12px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
}

/* --- 2. No sideways scrolling ---------------------------------------- */
@media (max-width: 767.98px) {
    /* g-5 gutters (3rem) are wider than the container padding on a phone,
       which pushed the page 12px past the screen edge. */
    .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; }
    .row.g-5 { --bs-gutter-y: 1.5rem; }
}

/* --- 3. Thumb-friendly tap targets ----------------------------------- */
@media (max-width: 767.98px) {
    /* Footer links were 19px tall — below the 44px minimum for a thumb */
    .footer-link {
        display: inline-flex; align-items: center;
        min-height: 44px; padding: .2rem 0;
    }
    .fn-navbar .nav-link { padding: .75rem .9rem !important; }
    /* All three payment options stay on one row, like a segmented control */
    .pay-btn {
        flex: 1 1 0; min-width: 0;
        justify-content: center; text-align: center;
        min-height: 48px;
        padding: .5rem .3rem;
        font-size: .8rem;
        gap: .3rem;
        line-height: 1.15;
    }
    .pay-btn i { font-size: .95rem; }
    /* Wizard step chips stay readable when squeezed */
    .wiz-dots .wd { font-size: .78rem; padding: .5rem .6rem; }
}

/* --- 4. Form fields sized for phones ---------------------------------- */
@media (max-width: 767.98px) {
    /* iOS Safari zooms the page in whenever a focused field is under 16px.
       16px keeps the layout still when someone starts typing. */
    .fn-input, .fn-input option { font-size: 16px; }
    .fn-input { padding: .85rem 1rem; }
    textarea.fn-input { min-height: 110px; }
    /* Primary form buttons go full width — easier to hit, looks intentional */
    .form-card .btn-fn, .fn-page-items .btn-fn { width: 100%; justify-content: center; }
}

/* --- 5. Phone density ------------------------------------------------
   The layout was built at desktop scale, so on a phone every block filled
   most of the screen and the home page ran ~17 screens long — it read as
   "zoomed in". This section keeps the text readable (body stays 16px) but
   trims the oversized boxes, padding and headings so more fits per screen.
   -------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* A real margin at the screen edge — 12px made text look cramped */
    .container, .container-fluid { padding-left: 1rem; padding-right: 1rem; }

    /* Less air between sections: the biggest single source of scrolling */
    .section { padding: 2.25rem 0; }

    /* Headings sized for a 375px screen rather than a 1280px one */
    .section-title, h2.section-title { font-size: 1.35rem; }
    .section-eyebrow { font-size: .68rem; padding: .3rem .7rem; }
    .lead-muted { font-size: .95rem; }

    /* ---- Hero on a phone ----
       It was 542px tall, 67% of the screen, so the page opened on a wall of
       oversized text with no content visible. Everything below is scaled to
       the narrow column: the heading fits 2-3 lines, the intro 3, and the two
       buttons share one row instead of stacking. */
    .fn-hero {
        min-height: 0;
        padding: 1.35rem 1.1rem 1.5rem;
        border-radius: 18px;
    }
    .fn-hero h1 {
        font-size: 1.35rem;
        line-height: 1.2;
        margin-bottom: .4rem !important;
    }
    .hero-eyebrow { font-size: .64rem; padding: .28rem .65rem; margin-bottom: .6rem; }
    .hero-slogan  { font-size: .95rem; line-height: 1.35; margin-bottom: .5rem; }
    .hero-intro   { font-size: .88rem; line-height: 1.5; margin-bottom: 1rem !important; }

    /* Both calls-to-action on one row — saves ~55px and reads as a pair */
    .fn-hero .d-flex.flex-wrap { gap: .6rem !important; flex-wrap: nowrap !important; }
    .fn-hero .btn-fn {
        flex: 1 1 0; min-width: 0;
        justify-content: center;
        padding: .65rem .5rem;
        font-size: .85rem;
        white-space: nowrap;
    }

    /* Cards: smaller radius + tighter padding so they don't feel blown up */
    .neu, .form-card, .panel-soft, .prog-card, .update-card { border-radius: 18px; }
    .form-card, .panel-soft { padding: 1.1rem; }
    .neu-inset { padding: .9rem !important; }

    /* Photos: a FIXED height on a 351px-wide card crops a landscape photo into
       a sliver, which is what made everything look magnified. A ratio keeps the
       whole scene visible instead of a close-up of the middle of it. */
    .prog-photo, .prog-media { height: auto; aspect-ratio: 16 / 9; }
    .prog-photo img { height: 100%; }
    .update-card .u-img { height: auto; aspect-ratio: 16 / 9; }
    .gallery-card img { height: auto; aspect-ratio: 4 / 3; }
    /* Caption was swallowing the small 2-per-row thumbnails */
    .gallery-card .cap { font-size: .78rem; padding: .45rem .6rem; }
    .marquee-item { width: 210px; height: 132px; }

    .prog-body { padding: .95rem 1rem 1.1rem; }
    .prog-body h3 { font-size: 1.05rem; }
    .prog-body p { font-size: .88rem; }
    .price-pill { font-size: .8rem; }

    /* About photo: 460px is 57% of a phone screen. A 4:3 ratio (~250px)
       shows the same picture without dominating the page. */
    .about-photo { height: auto; aspect-ratio: 4 / 3; }

    /* Feature / stat tiles — icons were 52px, larger than the text they label */
    .feature-item { padding: .8rem .45rem; }
    .feature-item .fi-ic { width: 42px; height: 42px; font-size: 1.1rem; }
    .feature-item p { font-size: .82rem; line-height: 1.45; }
    .stats-strip { margin-top: 1rem; }

    /* Vision / value card icons, same reasoning */
    .vc-ic, .stat-icon, .info-ic { transform: scale(.88); }

    .page-banner { padding: 1.6rem 1.1rem; }
    .page-banner h1 { font-size: 1.45rem; }
    .cta-band { padding: 1.6rem 1.1rem; }

    /* Wizard summary + QR blocks */
    .wiz-dots { gap: .4rem; }
    .detail-row { padding: .45rem 0; }

    /* Long words (emails, UPI IDs) wrap instead of stretching the layout */
    .detail-row .v, .footer-link { overflow-wrap: anywhere; }
}

/* --- 6. Hero photo: much less magnification on a phone ----------------
   The Ken Burns effect zooms to 116%. On a wide screen that's a gentle
   drift; inside a narrow portrait-shaped hero it turns every photo into a
   big close-up. On phones it drifts to 104% instead — still alive, but you
   can see the whole scene.
   -------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* Resting state must match the animation's end, so a slide fading out
       holds its zoom rather than snapping back */
    .fn-hero-slide { transform: scale(1.04); }
    @keyframes fn-kenburns-mobile { from { transform: scale(1); } to { transform: scale(1.04); } }
    .fn-hero-slide.active { animation: fn-kenburns-mobile 8s linear forwards; }
    /* Favour the upper part of the photo, where faces usually are */
    .fn-hero-slide { background-position: center 35%; }
}

/* Narrowest phones (<=360px) — one more small step down */
@media (max-width: 360px) {
    .fn-hero h1 { font-size: 1.45rem; }
    .section-title, h2.section-title { font-size: 1.25rem; }
    .pay-btn { font-size: .74rem; }
}
