/* =====================================================================
   SHUDDHI DESIGN SYSTEM
   Brand colours from the logo swirl (sky blue #00AEEF + leaf green
   #00A651), laid out in the spirit of GoFundMe: warm cream sections,
   generous white space, pill buttons, heavy sans headings, a golden
   "Donate" button with dark text and green primary actions.
   Loaded by includes/header.php on every page. Mobile-first.
   Legacy class names (.btn-red, .card, .section …) are kept so existing
   pages restyle automatically.
   ===================================================================== */

:root {
  /* Brand (logo) */
  --sky: #00AEEF;   --sky-700: #0077A8;  --sky-50: #EAF8FE;  --sky-100: #CDEFFC;
  --leaf: #00A651;  --leaf-700: #007A3D; --leaf-800: #00592C; --leaf-50: #E9F7EF; --leaf-100: #C9EED8;
  /* Giving: golden gradient with dark text (GoFundMe-style donate button) */
  --gold-1: #FFD966; --gold-2: #F6B419; --gold-ink: #2B1D00;
  --saffron: #C2410C; --saffron-700: #9A3412; --marigold: #F4A62A; --marigold-50: #FFF6E5;
  /* Neutrals: GoFundMe-like warm cream + near-black ink */
  --ink: #1B2A2F; --ink-2: #3A4A50; --muted: #64737A; --line: #E7E2DC;
  --cream: #FBF8F6; --mist: #FBF8F6; --white: #FFFFFF;
  --brand-gradient: linear-gradient(120deg, var(--sky) 0%, var(--leaf) 100%);
  --brand-soft: var(--cream);

  /* Legacy tokens used by existing pages — mapped onto the new palette */
  --green: var(--leaf-700); --green-dark: var(--leaf-800); --green-soft: var(--leaf-50);
  --blue: var(--sky-700); --blue-soft: var(--sky-50);
  --red: var(--saffron); --red-dark: var(--saffron-700);
  --gold: #B7791F; --paper: var(--cream);

  /* Shape, depth, rhythm */
  --radius: 20px; --radius-sm: 12px; --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(27,42,47,.05), 0 2px 10px rgba(27,42,47,.04);
  --shadow: 0 8px 28px rgba(27,42,47,.08);
  --shadow-lg: 0 22px 56px rgba(27,42,47,.12);
  --header-h: 76px; --tabbar-h: 66px;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.65;
  color: var(--ink); background: var(--mist); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; color: inherit; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container, .wrap { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.tint { background: var(--brand-soft); }
.section-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { margin: 10px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: clamp(18px, 3vw, 32px); grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); align-items: center; } .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Type helpers ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--leaf-700); }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--brand-gradient); }
.eyebrow.blue { color: var(--sky-700); } .eyebrow.green { color: var(--leaf-700); } .eyebrow.gold { color: var(--gold); } .eyebrow.red { color: #FFE2D6; }
.text-gradient { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px;
  border: 1px solid transparent; border-radius: 999px; padding: 12px 24px; font-weight: 700; font-size: .98rem;
  cursor: pointer; text-align: center; line-height: 1.2; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-red, .btn-donate { background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 100%); color: var(--gold-ink); border-color: rgba(43,29,0,.08); box-shadow: 0 6px 16px rgba(246,180,25,.35); font-weight: 800; }
.btn-red:hover, .btn-donate:hover { background: linear-gradient(180deg, #FFE08A 0%, #EFA80C 100%); color: var(--gold-ink); }
.btn-green, .btn-primary { background: var(--leaf-700); color: #fff; box-shadow: 0 10px 24px rgba(0,122,61,.18); }
.btn-green:hover, .btn-primary:hover { background: var(--green-dark); }
.btn-sky { background: var(--sky-700); color: #fff; }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--sky); color: var(--sky-700); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .9rem; }
.btn-lg { min-height: 56px; padding: 16px 30px; font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card img { width: 100%; height: 220px; object-fit: cover; border-radius: 0; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin: 0 0 8px; }
.card-body p { color: var(--muted); font-size: .95rem; margin: 0 0 18px; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--leaf-50); color: var(--leaf-700); }
.chip.sky { background: var(--sky-50); color: var(--sky-700); }
.chip.gold { background: var(--marigold-50); color: #8A5A00; }

/* ---------- Page header (inner pages) ---------- */
.page-header { position: relative; overflow: hidden; background: var(--brand-soft); color: var(--ink); padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 70px); text-align: center; }
.page-header::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(0,174,239,.14), transparent 65%); pointer-events: none; }
.page-header h1 { margin: 10px 0 14px; }
.page-header p { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0 auto; }

/* ---------- Forms ---------- */
.form-card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.fields > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
.field select { text-overflow: ellipsis; }
.field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none; font-size: 16px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(0,174,239,.12); }

/* =====================================================================
   HEADER
   ===================================================================== */
.topbar { background: var(--leaf-800); color: #D4F1E1; font-size: .8rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.topbar a { color: #fff; font-weight: 600; }
.topbar .trust { display: flex; gap: 18px; align-items: center; }
.topbar .trust span { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 899px) { .topbar { display: none; } }

/* Header: mobile = logo left + actions right; desktop (>=1100px) = GoFundMe-style
   three columns: left nav · centred logo · right nav + CTAs */
.site-header { position: sticky; top: 0; z-index: 90; background: rgba(255,255,255,.94); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 6px 22px rgba(27,42,47,.07); }
.site-header .bar { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; line-height: 0; }
.brand img { height: 40px; width: auto; aspect-ratio: 320 / 132; object-fit: contain; border-radius: 0; }
@media (min-width: 380px) { .brand img { height: 44px; } }
@media (min-width: 1100px) { .brand img { height: 54px; } }

.nav { display: none; align-items: center; gap: 2px; }
.nav > a, .nav .dd > button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px; font-weight: 700; font-size: .95rem; color: var(--ink); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.nav > a:hover, .nav .dd > button:hover, .nav > a[aria-current="page"] { background: var(--cream); color: var(--leaf-700); }
.nav .dd { position: relative; }
.nav .dd-menu { position: absolute; top: calc(100% + 10px); left: 0; transform: translateY(6px); min-width: 270px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transition: .18s ease; z-index: 5; }
.nav.right .dd-menu { left: auto; right: 0; }
.nav .dd:hover .dd-menu, .nav .dd:focus-within .dd-menu { opacity: 1; visibility: visible; transform: none; }
.nav .dd-menu a { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 12px; }
.nav .dd-menu a:hover { background: var(--cream); }
.nav .dd-menu i { color: var(--leaf-700); width: 18px; margin-top: 4px; }
.nav .dd-menu b { display: block; font-size: .93rem; }
.nav .dd-menu span { display: block; font-size: .78rem; color: var(--muted); }
.header-cta { display: none; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: #fff; display: inline-grid; place-items: center; color: var(--ink); cursor: pointer; position: relative; }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 2px #fff; }
.mobile-actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 1100px) {
  .site-header .bar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav { display: flex; }
  .nav.left { justify-self: start; }
  .site-header .brand { justify-self: center; }
  .site-header .right-side { justify-self: end; display: flex; align-items: center; gap: 4px; }
  .header-cta { display: flex; }
  .mobile-actions { display: none; }
}
@media (max-width: 1099px) { .site-header .right-side .nav { display: none; } }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(14,42,51,.42); opacity: 0; visibility: hidden; transition: .2s; z-index: 98; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: #fff; z-index: 99; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
body.drawer-open { overflow: hidden; }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer nav { padding: 10px 12px; overflow-y: auto; flex: 1; }
.drawer nav a { display: flex; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 14px; font-weight: 600; }
.drawer nav a:hover { background: var(--mist); }
.drawer nav a i { width: 20px; color: var(--sky-700); text-align: center; }
.drawer nav .group-label { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; }
.drawer-foot { padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; }

/* Mobile app-style bottom tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .68rem; font-weight: 700; color: var(--muted); background: none; border: 0; min-height: 50px; border-radius: 14px; cursor: pointer; }
.tabbar a i, .tabbar button i { font-size: 1.15rem; }
.tabbar a[aria-current="page"] { color: var(--leaf-700); }
.tabbar .give { position: relative; top: -16px; }
.tabbar .give span.fab { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); color: var(--gold-ink); font-size: 1.3rem; box-shadow: 0 10px 22px rgba(246,180,25,.45), 0 0 0 5px #fff; }
.tabbar .give em { font-style: normal; color: var(--ink); margin-top: 2px; }
body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
@media (min-width: 1100px) { .tabbar { display: none; } body.has-tabbar { padding-bottom: 0; } }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: var(--cream); color: var(--ink-2); font-size: .93rem; border-top: 1px solid var(--line); }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--leaf-700); text-decoration: underline; text-underline-offset: 3px; }
.footer-cta { background: #fff; border-bottom: 1px solid var(--line); }
.footer-cta .container { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; padding: 36px 0; }
.footer-cta h2 { margin: 0 0 4px; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--ink); }
.footer-cta p { margin: 0; color: var(--muted); }
.footer-grid { display: grid; gap: 32px; padding: 52px 0 30px; grid-template-columns: 1fr 1fr; }
.footer-grid > :first-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1.3fr; } .footer-grid > :first-child { grid-column: auto; } }
.footer-grid h3 { font-size: .95rem; letter-spacing: 0; color: var(--ink); margin: 0 0 14px; font-weight: 800; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-brand img { height: 56px; width: auto; aspect-ratio: 320 / 132; object-fit: contain; border-radius: 0; }
.footer-brand p { margin: 14px 0 0; max-width: 380px; color: var(--muted); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact i { color: var(--leaf-700); margin-top: 5px; width: 16px; }
.socials { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.socials a:hover { background: var(--leaf-700); border-color: var(--leaf-700); color: #fff; text-decoration: none; }
.footer-legal { border-top: 1px solid var(--line); padding: 20px 0 28px; font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.footer-legal .regs { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.trust-row span { font-size: .72rem; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: #fff; color: var(--leaf-700); border: 1px solid var(--line); }

/* WhatsApp button (sits above the mobile tab bar) */
.floating-wa { position: fixed; right: 18px; bottom: 24px; width: 54px; height: 54px; background: #25D366; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(37,211,102,.32); z-index: 84; transition: transform .2s; }
.floating-wa:hover { transform: scale(1.07); }
.floating-wa svg { width: 30px; height: 30px; fill: #fff; }
@media (max-width: 1099px) { .floating-wa { bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); width: 50px; height: 50px; } }

/* Cookie / consent banner */
.consent { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 120; max-width: 560px; margin-inline: auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 18px; display: none; }
.consent.show { display: block; }
.consent p { font-size: .88rem; color: var(--ink-2); margin: 0 0 12px; }
.consent .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1099px) { .consent { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); } }

/* Prose (policies, articles) */
.prose { max-width: 780px; margin-inline: auto; }
.prose h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2.2rem 0 .8rem; }
.prose h3 { margin: 1.6rem 0 .6rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2rem; }
.prose .note { background: var(--sky-50); border: 1px solid var(--sky-100); border-radius: 16px; padding: 16px 18px; }
.prose a { color: var(--sky-700); text-decoration: underline; text-decoration-color: rgba(0,119,168,.35); text-underline-offset: 3px; font-weight: 600; }
.prose a:hover { text-decoration-color: currentColor; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* Tables become stacked cards on phones */
@media (max-width: 640px) {
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .prose tr { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 6px 4px; margin-bottom: 12px; }
  .prose td { border: 0; padding: 6px 12px; }
  .prose td:first-child { font-weight: 800; color: var(--ink); }
  .prose td + td::before { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .prose td:nth-child(2)::before { content: "To the cause"; }
  .prose td:nth-child(3)::before { content: "Fundraising & administration"; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .topbar, .tabbar, .floating-wa, .consent, .footer-cta, .drawer { display: none !important; } body { background: #fff; padding: 0 !important; } }
/* Partner logo wall (plain images, not links) */
.logo-wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 600px) { .logo-wall { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .logo-wall { grid-template-columns: repeat(5, 1fr); } }
.logo-wall figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; height: 96px; display: grid; place-items: center; padding: 14px; cursor: default; }
.logo-wall img { max-height: 60px; max-width: 100%; width: auto; object-fit: contain; border-radius: 0; filter: grayscale(.15); }
