/* ===========================================================
   LegMed Foundation & Research — Design System
   Warm, formal NGO / healthcare aesthetic
   Palette harmonized to the logo (green · blue · saffron)
   Type: Source Serif 4 (headings) + Source Sans 3 (body)
   =========================================================== */

:root {
  /* Brand — green and blue */
  --green-900: #0d3a2e;
  --green-800: #12483a;
  --green-700: #145a45;
  --green-600: #0f6e54;   /* primary */
  --green-500: #1d8466;
  --green-300: #8fa968;   /* logo sage */
  --green-100: #e4ede3;
  --green-50:  #eef4ee;

  --blue-900: #113f67;
  --blue-800: #15577f;
  --blue-700: #1b6f9f;
  --blue-600: #2187c4;
  --blue-500: #35a6dc;
  --blue-100: #dceff8;
  --blue-50:  #eef8fc;

  --brand-gradient: linear-gradient(135deg, var(--green-700), var(--blue-700));
  --brand-deep-gradient: linear-gradient(135deg, var(--green-900), var(--blue-900));
  --brand-soft-gradient: linear-gradient(180deg, var(--blue-50), var(--green-50));

  /* Brand — saffron / accent (CTA, Donate) */
  --saffron-700: #c4760f;
  --saffron-600: #e2890f;
  --saffron-500: #ee9b1e;  /* accent */
  --saffron-300: #f6c878;
  --saffron-100: #fdf1da;

  /* Brand — red triangle (used very sparingly) */
  --red-600: #cf3a2c;

  /* Neutrals — warm */
  --ink-900: #122832;
  --ink-700: #263c42;
  --ink-600: #44595d;
  --ink-500: #64777a;
  --ink-400: #89999a;
  --line:    #dfe9e9;
  --line-soft:#eaf1f1;
  --paper:   #f5f8f7;   /* off-white bg */
  --paper-2: #fbfcfb;
  --white:   #ffffff;

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 30px;

  /* Shadows — soft, low spread */
  --sh-1: 0 1px 2px rgba(17,63,103,.05), 0 2px 8px rgba(13,58,46,.04);
  --sh-2: 0 4px 14px rgba(17,63,103,.08), 0 2px 6px rgba(13,58,46,.05);
  --sh-3: 0 18px 48px rgba(17,63,103,.14), 0 6px 16px rgba(13,58,46,.08);

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink-700);
  background: var(--paper);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--ink-900);
  line-height: 1.12;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
p { margin: 0 0 1.1em; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--saffron-500); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: 1320px; }
.wrap-narrow { max-width: 820px; }
.section { padding-block: clamp(64px, 8vw, 116px); }
.section-sm { padding-block: clamp(44px, 5vw, 72px); }
.center { text-align: center; }
.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green-600);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--saffron-500);
  display: inline-block;
}
.eyebrow.is-centered { justify-content: center; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4rem); }
h2.display { font-size: clamp(2rem, 3.8vw, 3rem); }
h3.title { font-size: clamp(1.4rem, 2.2vw, 1.85rem); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--ink-600); line-height: 1.6; }
.muted { color: var(--ink-500); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  min-height: 48px; transition: transform .18s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand-gradient); color: #fff; box-shadow: var(--sh-1); }
.btn-primary:hover { background: linear-gradient(135deg, var(--green-800), var(--blue-800)); transform: translateY(-2px); box-shadow: var(--sh-2); }
.btn-donate { background: var(--saffron-500); color: var(--green-900); box-shadow: 0 6px 18px rgba(226,137,15,.28); }
.btn-donate:hover { background: var(--saffron-600); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(226,137,15,.36); }
.btn-ghost { background: transparent; color: var(--green-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-600); color: var(--blue-700); background: var(--blue-50); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--blue-700); box-shadow: var(--sh-1); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.btn-on-dark { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.32); backdrop-filter: blur(4px); }
.btn-on-dark:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.btn-lg { padding: 17px 32px; font-size: 1.06rem; min-height: 54px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--blue-700);
}
.link-arrow svg { width: 17px; height: 17px; transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(251,252,250,.86);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .3s ease, background .3s ease;
}
.nav.scrolled { box-shadow: 0 6px 24px rgba(13,58,46,.07); background: rgba(251,252,250,.95); }
.nav-inner { display: flex; align-items: center; gap: clamp(12px, 1.4vw, 22px); height: var(--nav-h); max-width: 1440px; margin-inline: auto; padding-inline: clamp(18px, 3.2vw, 44px); }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-family: var(--serif); font-size: 1.06rem; color: var(--green-800); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.brand-text span { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--saffron-600); font-weight: 700; white-space: nowrap; }

.nav-menu { display: flex; align-items: center; gap: 0; margin-left: auto; flex: 1 1 auto; justify-content: flex-end; min-width: 0; white-space: nowrap; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 10px; border-radius: 999px; font-weight: 600; font-size: .91rem; color: var(--ink-700);
  transition: color .18s ease, background .18s ease;
  white-space: nowrap;
}
.nav-link:hover, .nav-item:hover > .nav-link, .nav-link.active { color: var(--blue-700); background: var(--blue-50); }
.nav-link .caret { width: 14px; height: 14px; transition: transform .2s ease; color: var(--ink-400); }
.nav-item:hover .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 264px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-3); padding: 8px; opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown::before { content:""; position:absolute; top:-8px; left:0; right:0; height:8px; }
.dropdown a {
  display: flex; flex-direction: column; gap: 1px; padding: 10px 13px; border-radius: 9px; font-size: .93rem; font-weight: 600; color: var(--ink-700);
  transition: background .15s ease, color .15s ease;
}
.dropdown a small { font-weight: 500; font-size: .78rem; color: var(--ink-400); }
.dropdown a:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-toggle { display: none; background: none; border: none; padding: 8px; color: var(--green-800); }
.nav-toggle svg { width: 28px; height: 28px; }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(13,58,46,.4); opacity: 0; visibility: hidden; transition: opacity .3s ease; z-index: 250; }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(380px, 86vw); background: var(--paper-2); z-index: 260;
  transform: translateX(100%); transition: transform .34s cubic-bezier(.4,0,.1,1); overflow-y: auto; box-shadow: var(--sh-3); padding: 22px;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-close { background: none; border: none; padding: 8px; color: var(--ink-700); }
.drawer-close svg { width: 26px; height: 26px; }
.drawer-group { border-top: 1px solid var(--line); padding: 6px 0; }
.drawer-group > a, .drawer-acc-btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 13px 6px; font-weight: 600; font-size: 1.05rem; color: var(--ink-800, var(--ink-900)); background: none; border: none; text-align: left;
}
.drawer-acc-btn svg { width: 18px; height: 18px; transition: transform .2s ease; color: var(--ink-400); }
.drawer-acc-btn.open svg { transform: rotate(180deg); }
.drawer-sub { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.drawer-sub a { display: block; padding: 10px 16px; font-size: .96rem; color: var(--ink-600); font-weight: 500; }
.drawer-sub a:hover { color: var(--green-700); }
.drawer .btn-donate { width: 100%; margin-top: 16px; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: linear-gradient(135deg, var(--green-900), var(--blue-900)); color: rgba(255,255,255,.72); padding-block: clamp(56px, 6vw, 84px) 0; }
.footer a { color: rgba(255,255,255,.72); transition: color .15s ease; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 48px; }
.footer-logo { display: inline-block; background: #fff; padding: 16px 22px; border-radius: 16px; margin-bottom: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.footer-logo img { display: block; height: 110px; width: auto; }
.footer-brand p { margin-top: 14px; font-size: .96rem; max-width: 32ch; }
.footer h5 { color: #fff; font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; font-weight: 700; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: .96rem; }
.footer-mini-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.footer-mini-gallery img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); transition: background .2s ease, transform .2s ease; }
.socials a:hover { background: var(--saffron-500); color: var(--green-900); transform: translateY(-3px); }
.socials svg { width: 19px; height: 19px; }
.footer-bottom { margin-top: 56px; border-top: 1px solid rgba(255,255,255,.12); padding-block: 24px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-size: .86rem; color: rgba(255,255,255,.55); }
.footer-bottom .helpline { color: var(--saffron-300); font-weight: 600; }

/* =========================================================
   REUSABLE CONTENT COMPONENTS
   ========================================================= */
/* image placeholder w/ live fallback */
.ph { position: relative; background: var(--blue-100); overflow: hidden; }
.ph::after {
  content: attr(data-ph);
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  font-family: var(--sans); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green-700);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 9px, rgba(27,111,159,.07) 9px, rgba(27,111,159,.07) 18px);
}
.ph img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.ph img.failed { opacity: 0; }

/* Cards */
.card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(13,58,46,.05), 0 16px 36px rgba(13,58,46,.06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: rgba(27,111,159,.24); }

/* Stat band */
.stat-band {
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(135deg, var(--green-800), var(--blue-900));
  background-size: 72px 72px, 72px 72px, auto;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stat-band::after { content:""; position:absolute; inset:auto 0 0; height:1px; background:linear-gradient(90deg, transparent, rgba(246,200,120,.5), transparent); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; position: relative; z-index: 2; }
.stat { min-height: 170px; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-end; text-align: left; padding: 24px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(255,255,255,.07); }
.stat .num { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 600; color: #fff; line-height: 1; }
.stat .num .unit { color: var(--saffron-300); }
.stat .lbl { margin-top: 12px; font-size: .96rem; color: rgba(255,255,255,.72); letter-spacing: .02em; }
.stat.placeholder .num { color: var(--saffron-300); }
.stat .tag { display:inline-block; margin-top:14px; font-size:.66rem; letter-spacing:.1em; text-transform:uppercase; color:rgba(255,255,255,.62); border:1px dashed rgba(255,255,255,.3); padding:3px 9px; border-radius:999px; }

/* Quote block */
.quote { position: relative; }
.quote .mark { font-family: var(--serif); font-size: 6rem; line-height: .6; color: var(--saffron-300); height: 44px; display: block; }
.quote blockquote { font-family: var(--serif); font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.32; color: var(--ink-900); margin: 0; font-weight: 500; letter-spacing: -.01em; }
.quote cite { display: block; margin-top: 22px; font-style: normal; font-weight: 700; color: var(--green-600); font-size: 1rem; letter-spacing: .02em; }

/* Pill / chip */
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; background: var(--brand-soft-gradient); color: var(--blue-800); font-weight: 700; font-size: .82rem; border: 1px solid var(--blue-100); }

/* Icon tile */
.icon-tile { width: 56px; height: 56px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft-gradient); color: var(--blue-700); border: 1px solid var(--blue-100); flex-shrink: 0; }
.icon-tile svg { width: 27px; height: 27px; }
.icon-tile.saffron { background: var(--saffron-100); color: var(--saffron-700); border-color: #f6e3c0; }

/* Section heading cluster */
.sec-head { max-width: 660px; display: flex; flex-direction: column; align-items: flex-start; }
.sec-head.center { margin-inline: auto; align-items: center; }
.sec-head p { margin-top: 14px; }
.txt-col { display: flex; flex-direction: column; align-items: flex-start; }
.txt-col.center { align-items: center; }

/* Page hero (inner pages) */
.page-hero { position: relative; background: linear-gradient(150deg, var(--green-800), var(--blue-900)); color: #fff; overflow: hidden; }
.page-hero .wrap { position: relative; z-index: 2; padding-block: clamp(72px, 9vw, 124px); }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255,255,255,.82); }
.breadcrumb { display: flex; gap: 9px; align-items: center; font-size: .86rem; color: rgba(255,255,255,.6); margin-bottom: 22px; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb svg { width: 14px; height: 14px; opacity: .6; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; }

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}

/* Prose (long-form article) */
.prose p { font-size: 1.16rem; line-height: 1.78; color: var(--ink-700); margin-bottom: 1.3em; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 1.6em 0 .5em; }
.prose h3 { font-size: 1.3rem; margin: 1.4em 0 .4em; color: var(--green-700); }
.prose strong { color: var(--ink-900); font-weight: 700; }
.pullquote { font-family: var(--serif); font-size: clamp(1.4rem,2.4vw,1.9rem); line-height: 1.36; color: var(--green-700); border-left: 4px solid var(--saffron-500); padding: 6px 0 6px 28px; margin: 1.6em 0; font-weight: 500; }
.pullquote cite { display:block; margin-top:14px; font-size:1rem; font-style:normal; color:var(--ink-500); font-weight:600; }

/* Responsive */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 1240px) {
  .nav-inner { padding-inline: 18px; gap: 10px; }
  .brand { gap: 9px; }
  .brand img { height: 40px; }
  .brand-text b { font-size: .98rem; }
  .brand-text span { font-size: .58rem; letter-spacing: .08em; }
  .nav-link { padding-inline: 8px; font-size: .86rem; }
  .nav-cta .btn { padding-inline: 18px; font-size: .94rem; }
}
@media (max-width: 1120px) {
  .nav-menu, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav-cta .btn-donate { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
}

/* ---- Home-specific ---- */
  .hero {
    position: relative;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(251,252,250,.04) 1px, transparent 1px),
      linear-gradient(180deg, rgba(251,252,250,.04) 1px, transparent 1px),
      linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 44%, var(--blue-800) 100%);
    background-size: 72px 72px, 72px 72px, auto;
    color: #fff;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(90deg, rgba(13,58,46,.9), rgba(17,63,103,.64) 52%, rgba(17,63,103,.18)),
      linear-gradient(180deg, transparent 76%, rgba(246,248,245,.96));
    pointer-events: none;
  }
  .hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, .96fr) minmax(460px, 1.04fr);
    gap: clamp(34px, 5vw, 78px);
    align-items: center;
    min-height: clamp(680px, calc(100vh - var(--nav-h)), 860px);
    padding-block: clamp(64px, 7vw, 104px) clamp(34px, 5vw, 72px);
  }
  .hero-copy { display: flex; flex-direction: column; align-items: flex-start; max-width: 680px; }
  .hero-copy .eyebrow {
    color: var(--saffron-300);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    padding: 9px 14px;
    margin-bottom: 22px;
  }
  .hero-copy .eyebrow::before { background: var(--saffron-300); }
  .hero-copy h1 {
    color: #fff;
    max-width: 11ch;
    margin-bottom: 24px;
    line-height: .98;
    font-size: clamp(3rem, 6.4vw, 6.3rem);
    letter-spacing: 0;
  }
  .hero-copy h1 .accent { color: var(--saffron-300); position: relative; white-space: nowrap; }
  .hero-copy h1 .accent::after {
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:.03em;
    height:.08em;
    background: rgba(255,255,255,.24);
    border-radius:3px;
    z-index:-1;
  }
  .hero-copy .lead { max-width: 58ch; color: rgba(255,255,255,.82); font-size: clamp(1.04rem, 1.25vw, 1.2rem); line-height: 1.72; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
  .hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.08); }
  .hero .btn-ghost:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.58); color: #fff; }
  .hero-trust {
    width: min(100%, 610px);
    margin-top: 36px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
    color: rgba(255,255,255,.72);
    font-size: .98rem;
  }
  .hero-trust .est {
    display:flex;
    align-items:center;
    gap:10px;
    min-height: 58px;
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff;
    font-weight:700;
  }
  .hero-trust .est b { font-family: var(--serif); font-size: 1.6rem; color: var(--saffron-300); }
  .hero-trust .divider { display: none; }

  .hero-collage {
    position: relative;
    min-height: clamp(520px, 56vw, 680px);
    display: grid;
    align-items: end;
  }
  .hero-media-shell {
    position: relative;
    min-height: inherit;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    box-shadow: 0 26px 70px rgba(0,0,0,.26);
    overflow: hidden;
  }
  .hero-media-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17,63,103,0) 40%, rgba(13,58,46,.48), rgba(17,63,103,.86));
    pointer-events: none;
  }
  .hero-collage .ph {
    position: absolute;
    border-radius: 8px;
    box-shadow: none;
    border: 0;
  }
  .hc-1 { inset: 0; z-index: 1; }
  .hc-2 { width: 33%; aspect-ratio: 4 / 5; right: 22px; top: 22px; z-index: 3; border: 4px solid rgba(255,255,255,.92) !important; }
  .hc-3 { width: 28%; aspect-ratio: 1; left: 22px; bottom: 118px; z-index: 3; border: 4px solid rgba(255,255,255,.92) !important; }
  .hero-impact-row {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .hero-impact {
    min-height: 92px;
    padding: 16px;
    border-radius: 8px;
    background: rgba(255,255,255,.94);
    color: var(--ink-700);
    box-shadow: var(--sh-2);
  }
  .hero-impact b {
    display: block;
    font-family: var(--serif);
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1;
    color: var(--green-700);
  }
  .hero-impact span { display: block; margin-top: 8px; color: var(--ink-500); font-size: .82rem; line-height: 1.25; font-weight: 600; }
  .hero-status {
    position: absolute;
    left: -12px;
    top: 44px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 240px;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--paper-2);
    color: var(--ink-700);
    box-shadow: var(--sh-3);
  }
  .hero-status .ring {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--saffron-100);
    color: var(--saffron-700);
    flex-shrink: 0;
  }
  .hero-status .ring svg { width: 21px; height: 21px; }
  .hero-status b { display: block; color: var(--ink-900); line-height: 1.05; }
  .hero-status small { color: var(--ink-500); font-size: .78rem; line-height: 1.25; }

  /* Sacred strip */
  .sacred { background: var(--paper); color:#fff; padding-block: 34px; }
  .sacred-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
    padding: clamp(24px, 3vw, 34px);
    border-radius: 8px;
    background:
      linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
      linear-gradient(135deg, var(--green-800), var(--blue-900));
    background-size: 54px 54px, auto;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: var(--sh-2);
  }
  .sacred .badge { width: 70px; height: 70px; border-radius: 8px; display:grid; place-items:center; background: rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.18); flex-shrink:0; }
  .sacred .badge svg { width: 38px; height: 38px; color: var(--saffron-300); }
  .sacred h2 { color:#fff; font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 8px; }
  .sacred p { color: rgba(255,255,255,.82); margin: 0; font-size: 1.12rem; max-width: 70ch; }

  /* Everyone gallery */
  .everyone-section { background: linear-gradient(180deg, var(--paper), var(--paper-2)); }
  .mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 176px; gap: 14px; }
  .mosaic .ph { border-radius: 8px; box-shadow: var(--sh-1); border: 1px solid #fff; }
  .mosaic .ph::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, transparent 55%, rgba(17,63,103,.42));
    pointer-events: none;
  }
  .mosaic .m-tall { grid-row: span 2; }
  .mosaic .m-wide { grid-column: span 2; }

  /* Initiatives */
  .initiatives-section { background: var(--paper-2); border-block:1px solid var(--line-soft); }
  .init-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .init-card { position: relative; display: flex; flex-direction: column; padding: 30px; overflow: hidden; }
  .init-card::before { content:""; position:absolute; inset:0 0 auto; height:4px; background: var(--brand-gradient); opacity:.75; }
  .init-card .icon-tile { margin-bottom: 20px; }
  .init-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
  .init-card p { font-size: 1rem; color: var(--ink-600); margin-bottom: 20px; }
  .init-card .link-arrow { margin-top: auto; }
  .init-feature { grid-column: span 1; background: linear-gradient(150deg, var(--green-700), var(--blue-900)); color:#fff; border:none; }
  .init-feature::before { background: var(--saffron-500); opacity:1; }
  .init-feature h3, .init-feature p { color:#fff; }
  .init-feature p { color: rgba(255,255,255,.82); }
  .init-feature .icon-tile { background: rgba(255,255,255,.14); color:#fff; border-color: rgba(255,255,255,.2); }
  .init-feature .link-arrow { color: var(--saffron-300); }

  /* Quote feature */
  .quote-section { background: var(--paper); }
  .quote-feature { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(28px,4vw,64px); align-items: center; padding: clamp(18px, 2.5vw, 28px); border-radius: 8px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); }
  .quote-portrait { position: relative; padding-bottom: 2px; }
  .quote-portrait .ph { aspect-ratio: 4/5; border-radius: 8px; box-shadow: var(--sh-2); }
  .quote-portrait .tag { display: inline-flex; margin: 14px 0 0 18px; background:#fff; padding:8px 16px; border-radius:999px; box-shadow:var(--sh-2); font-weight:700; color:var(--green-700); font-size:.9rem; }
  .quote p { font-size: 1.04rem; line-height: 1.75; }

  /* Eye screening */
  .eye { background: linear-gradient(180deg, var(--blue-50), var(--paper)); }
  .eye-grid { display:grid; grid-template-columns: .88fr 1.12fr; gap: clamp(28px,4vw,56px); align-items:center; }
  .eye .txt-col { padding: clamp(24px, 3vw, 38px); border-radius: 8px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); }
  .eye-shots { display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
  .eye-shots .ph { aspect-ratio: 3/4; border-radius: 8px; box-shadow: var(--sh-2); border: 4px solid #fff; }
  .eye-shots .ph:first-child { grid-row: span 2; aspect-ratio: auto; }
  .callout { display:inline-flex; align-items:center; gap:14px; background:var(--brand-soft-gradient); border:1px solid var(--blue-100); border-radius:8px; padding:16px 18px; box-shadow:none; margin-top:8px; }
  .callout .ring { width:48px;height:48px;border-radius:50%;background:var(--saffron-100);color:var(--saffron-700);display:grid;place-items:center;flex-shrink:0; }
  .callout .ring svg{width:24px;height:24px;}
  .callout b { font-family:var(--serif); font-size:1.3rem; color:var(--ink-900); display:block; line-height:1.1; }
  .callout small { color: var(--ink-500); font-size:.86rem; }

  /* Food stories */
  .food-section { background: var(--paper); }
  .story-grid { display:grid; grid-template-columns: 1fr 1fr; gap:18px; }
  .story-card { display:grid; grid-template-rows: 280px 1fr; overflow:hidden; }
  .story-card .ph { height:100%; min-height: 0; }
  .story-body { padding: 26px 28px 30px; }
  .story-body .chip { margin-bottom:14px; }
  .story-body p { font-size:.98rem; color:var(--ink-600); margin-bottom: .8em; }
  .story-body .meta { font-size:.86rem; color:var(--ink-500); border-top:1px solid var(--line-soft); padding-top:12px; margin-top:6px; }

  .canteen { display:grid; grid-template-columns: 1fr 1.05fr; gap: 0; align-items:stretch; background:#fff; border:1px solid var(--line); border-radius: 8px; overflow:hidden; box-shadow: var(--sh-2); margin-top: 36px; }
  .canteen .ph { min-height: 320px; height:100%; }
  .canteen-body { padding: clamp(28px,4vw,52px); }

  /* Leadership preview */
  .people-section { background:var(--paper-2); border-top:1px solid var(--line-soft); }
  .people-row { display:grid; grid-template-columns: repeat(4,1fr); gap:18px; }
  .person { text-align:left; padding: 14px; border-radius: 8px; background:#fff; border:1px solid var(--line); box-shadow: var(--sh-1); }
  .person .ph { aspect-ratio: 1; border-radius: 8px; margin: 0 0 16px; width: 100%; box-shadow: none; border:0; }
  .person h4 { font-size: 1.08rem; margin-bottom: 4px; }
  .person p { font-size:.86rem; color:var(--ink-500); margin:0; line-height: 1.45; }

  /* CTA band */
  .cta-band { background:
      linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
      linear-gradient(180deg, rgba(255,255,255,.04) 1px, transparent 1px),
      radial-gradient(90% 140% at 100% 0, rgba(238,155,30,.2), transparent 55%),
      linear-gradient(135deg, var(--green-800), var(--blue-900)); background-size: 58px 58px, 58px 58px, auto, auto; color:#fff; border-radius: 8px; padding: clamp(40px,5vw,72px); text-align:center; position:relative; overflow:hidden; box-shadow: var(--sh-2); }
  .cta-band h2 { color:#fff; font-size: clamp(1.8rem,3.4vw,2.8rem); margin-bottom:14px; }
  .cta-band p { color: rgba(255,255,255,.82); max-width: 56ch; margin: 0 auto 28px; font-size:1.12rem; }
  .cta-actions { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

  @media (max-width: 1120px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr); gap: 34px; }
    .hero-copy h1 { font-size: clamp(3rem, 6vw, 4.8rem); }
    .hero-collage { min-height: 540px; }
    .hero-status { left: 14px; top: 18px; }
  }
  @media (max-width: 900px) {
    .hero::before {
      background:
        linear-gradient(180deg, rgba(13,58,46,.9), rgba(17,63,103,.68) 58%, rgba(17,63,103,.2)),
        linear-gradient(180deg, transparent 82%, rgba(246,248,245,.96));
    }
    .hero-grid { grid-template-columns: 1fr; min-height: auto; padding-block: 58px 46px; }
    .hero-copy { max-width: 720px; }
    .hero-copy h1 { max-width: 10ch; font-size: clamp(3rem, 13vw, 5rem); }
    .hero-trust { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
    .hero-trust .est { width: fit-content; }
    .hero-collage { min-height: 520px; max-width: 620px; margin: 10px auto 0; width: 100%; }
    .hero-status { left: 16px; right: 16px; top: 16px; max-width: none; }
    .quote-feature { grid-template-columns: 1fr; }
    .quote-portrait { max-width: 320px; }
    .sacred-inner { grid-template-columns: 1fr; }
    .eye-grid, .canteen { grid-template-columns: 1fr; }
    .canteen .ph { order: -1; }
    .story-grid { grid-template-columns: 1fr; }
    .init-grid { grid-template-columns: 1fr 1fr; }
    .people-row { grid-template-columns: 1fr 1fr; }
    .canteen .ph { min-height: 240px; }
  }
  @media (max-width: 560px) {
    .hero-copy .eyebrow { font-size: 11px; gap: 8px; padding: 8px 11px; }
    .hero-copy h1 { font-size: clamp(2.65rem, 15vw, 4rem); }
    .hero-copy .lead { font-size: 1rem; line-height: 1.62; }
    .hero-grid { padding-block: 44px 42px; }
    .hero-trust { margin-top: 22px; }
    .hero-actions { width: 100%; }
    .hero-actions .btn { width: 100%; }
    .hero-collage { min-height: 540px; }
    .hc-2 { width: 40%; right: 14px; top: 94px; }
    .hc-3 { width: 34%; left: 14px; bottom: 180px; }
    .hero-impact-row { left: 14px; right: 14px; bottom: 14px; grid-template-columns: 1fr; }
    .hero-impact { min-height: 0; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .hero-impact span { margin-top: 0; text-align: right; }
    .stat { min-height: 140px; padding: 18px; }
    .quote-feature { padding: 14px; }
    .eye .txt-col { padding: 22px; }
    .story-card { grid-template-rows: 220px 1fr; }
    .person { padding: 10px; }
    .init-grid { grid-template-columns: 1fr; }
    .story-card { grid-template-columns: 1fr; }
    .story-card .ph { min-height: 180px; }
    .mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; }
    .eye-shots .ph:first-child { grid-row: auto; }
  }

/* ---------- Generated content pages ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: calc(var(--nav-h) + 74px) 0 clamp(58px, 8vw, 104px);
  color: rgba(255,255,255,.84);
  background:
    radial-gradient(circle at 82% 16%, rgba(238,155,30,.22), transparent 24%),
    linear-gradient(135deg, rgba(13,58,46,.98), rgba(18,72,58,.94) 44%, rgba(17,63,103,.94));
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13,58,46,.9), rgba(17,63,103,.58)), url("uploads/Media_11zon.jpeg") center/cover;
  opacity: .28;
  z-index: -2;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -9vw;
  bottom: -12vw;
  width: 44vw;
  aspect-ratio: 1;
  border: 1px solid rgba(246,200,120,.24);
  border-radius: 50%;
  z-index: -1;
}
.page-hero .eyebrow { color: var(--saffron-300); }
.page-hero h1 { color: var(--white); max-width: 880px; }
.page-hero .lead { color: rgba(255,255,255,.82); max-width: 760px; margin-top: 20px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 28px; font-size: 14px; color: rgba(255,255,255,.72); }
.breadcrumb a { color: rgba(255,255,255,.86); font-weight: 700; }
.breadcrumb span:not(:last-child)::after { content: "/"; margin-left: 10px; color: rgba(255,255,255,.4); }
.content-shell {
  position: relative;
  margin-top: clamp(-42px, -4vw, -24px);
  padding: clamp(28px, 4vw, 56px);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(226,232,227,.88);
  box-shadow: var(--sh-3);
  border-radius: var(--r-lg);
}
.live-content { display: grid; gap: 20px; color: var(--ink-700); }
.live-content > * { margin: 0; }
.live-content h1,
.live-content h2,
.live-content h3,
.live-content h4,
.live-content h5 { margin-top: 12px; color: var(--green-900); }
.live-content h2 { font-size: clamp(1.9rem, 3vw, 2.65rem); }
.live-content h3, .live-content h4 { font-size: clamp(1.45rem, 2vw, 1.9rem); }
.live-content h5 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); }
.live-content p, .live-content li { font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.78; }
.live-content strong { color: var(--ink-900); }
.live-content ul, .live-content ol { padding-left: 1.25rem; display: grid; gap: 10px; }
.live-content a { color: var(--green-700); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(15,110,84,.24); text-underline-offset: 4px; }
.live-content img, .live-content video { width: 100%; height: auto; border-radius: var(--r-md); box-shadow: var(--sh-2); object-fit: cover; }
.live-content figure { margin: 8px 0; }
.live-content .wp-block-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(18px, 3vw, 34px); align-items: start; }
.live-content .wp-block-column { display: grid; gap: 16px; }
.live-content .legmed-donation-box-sm,
.live-content form,
.info-panel {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--paper-2), var(--blue-50));
  box-shadow: var(--sh-1);
}

/* ---- Donation form ---- */
/* Inner form sits inside the donation box — drop its own card so they don't nest */
.live-content .legmed-donation-box-sm .legmed-donation-form-sm {
  padding: 0; border: 0; background: none; box-shadow: none;
}
.live-content .form-header-sm { text-align: center; }
.live-content .form-header-sm h3 { margin-top: 0; color: var(--green-900); }

.live-content .progress-bar-sm { height: 6px; margin: 14px 0 18px; background: var(--blue-100); border-radius: 999px; overflow: hidden; }
.live-content .progress-fill-sm { height: 100%; width: 33%; background: var(--brand-gradient); border-radius: 999px; transition: width .3s ease; }

.live-content .step-indicators-sm { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; }
.live-content .step-indicator-sm { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .95rem; color: var(--ink-500); background: var(--white); border: 1px solid var(--line); flex-shrink: 0; }
.live-content .step-indicator-sm.active { color: #fff; background: var(--brand-gradient); border-color: transparent; box-shadow: var(--sh-1); }

/* Wizard: show only the active step */
.live-content .step-sm { display: none; }
.live-content .step-sm.active { display: block; }
/* Full-width form → lay fields in two columns to reduce height */
.live-content .step-1-sm.active,
.live-content .step-2-sm.active { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.live-content .step-1-sm .button-group-sm,
.live-content .step-2-sm .button-group-sm,
.live-content .step-2-sm .form-group-sm:nth-last-child(2) { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .live-content .step-1-sm.active,
  .live-content .step-2-sm.active { grid-template-columns: 1fr; }
}

.live-content .form-group-sm { display: grid; gap: 7px; margin-bottom: 16px; }
.live-content .form-group-sm > label { font-weight: 600; color: var(--ink-700); font-size: .95rem; }
.live-content .form-group-sm > label span { color: var(--red-600); }

.live-content .form-control-sm,
.live-content .amount-field-sm {
  width: 100%; padding: 11px 14px; font: inherit; color: var(--ink-900);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.live-content .form-control-sm:focus,
.live-content .amount-field-sm:focus {
  outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(33,135,196,.16);
}
.live-content textarea.form-control-sm { resize: vertical; min-height: 92px; }

.live-content .amount-input-wrapper-sm { display: flex; align-items: center; gap: 10px; }
.live-content .amount-input-wrapper-sm > span { font-weight: 700; color: var(--green-700); font-size: 1.15rem; }
.live-content .amount-field-sm { flex: 1; font-size: 1.15rem; font-weight: 600; }
.live-content .help-text-sm { margin-top: 6px; font-size: .85rem; color: var(--ink-500); }

.live-content .button-group-sm { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.live-content .btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; font: inherit; font-weight: 700; line-height: 1; cursor: pointer;
  border-radius: 999px; border: 1px solid transparent; transition: background .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.live-content .btn-primary-sm { background: var(--green-600); color: #fff; box-shadow: var(--sh-1); }
.live-content .btn-primary-sm:hover { background: linear-gradient(135deg, var(--green-800), var(--blue-800)); transform: translateY(-2px); box-shadow: var(--sh-2); }
.live-content .btn-secondary-sm { background: var(--white); color: var(--blue-700); border-color: var(--line); }
.live-content .btn-secondary-sm:hover { border-color: var(--blue-600); color: var(--blue-700); background: var(--blue-50); }

.live-content .radio-group-sm { display: grid; gap: 12px; }
.live-content .radio-option-sm { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--blue-50); cursor: pointer; transition: border-color .15s ease; }
.live-content .radio-option-sm:hover { border-color: var(--blue-600); }
.live-content .radio-option-sm strong { display: block; margin-bottom: 4px; color: var(--green-900); }

/* Post-submit message stays hidden until activated */
.live-content .step-4-sm { display: none; }
.live-content .thank-you-sm { text-align: center; padding: 20px 0; }
.live-content .thank-you-icon-sm { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; color: #fff; background: var(--brand-gradient); }

.page-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.page-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); box-shadow: var(--sh-1); }
.page-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
@media (max-width: 860px) {
  .content-shell { border-radius: var(--r-md); padding: 24px; }
  .live-content .wp-block-columns, .page-card-grid { grid-template-columns: 1fr; }
}
