/* SACEP Kenya — main stylesheet
   Palette: Leaf Green #436818 (brand/structure), Golden Ochre #B87D15 (action),
   white surfaces, dark green ink for text. No gradients, no shadows. */

:root {
  --green: #436818;
  --green-deep: #2d4a0e;
  --green-tint: #eef3e5;
  --ochre: #b87d15;
  --ochre-deep: #96650f;
  --ochre-tint: #f8efdc;
  --ink: #1f2a0d;
  --muted: #4d5638;
  --line: #d9dfc9;
  --white: #ffffff;

  --font: "Open Sans", system-ui, -apple-system, sans-serif;
  --wrap: 72rem;
  --wrap-wide: 80rem;
  --gutter: 1.375rem;

  /* image slot aspect ratios — one variable each, easy to adjust */
  --ar-hero: 4 / 3;
  --ar-card: 16 / 9;
  --ar-tile: 4 / 3;
  --ar-square: 1 / 1;
  --ar-photo: 4 / 3;
  --ar-logo: 1 / 1;

  --radius: 6px;
  --tap: 2.75rem; /* 44px */
}

* { box-sizing: border-box; }

html { font-size: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; color: var(--green-deep); letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.5vw + 1rem, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 2.5vw + 0.6rem, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; max-width: 70ch; }
p:last-child { margin-bottom: 0; }

code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; background: var(--green-tint); padding: 0.1em 0.35em; border-radius: 4px; }

[hidden] { display: none !important; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--green-deep); }

ul, ol { padding-left: 1.3em; }

:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 60;
  background: var(--green-deep); color: #fff;
  padding: 0.7rem 1rem; border-radius: var(--radius);
  font-weight: 600; transition: top 0.15s;
}
.skip-link:focus { top: 0.75rem; color: #fff; }

.fine { font-size: 0.85rem; color: var(--muted); }
.eyebrow {
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--green); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.02em; text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.subhead { font-size: 1.1rem; margin-top: 2rem; }

/* ---------- header ---------- */

.alert-bar { background: var(--ochre-tint); border-bottom: 2px solid var(--ochre); }
.alert-bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; padding-block: 0.55rem; }
.alert-bar-in .ic { color: var(--ochre-deep); }
.alert-bar p { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.alert-bar-link { font-weight: 700; font-size: 0.9rem; min-height: var(--tap); display: inline-flex; align-items: center; color: var(--ochre-deep); }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; min-height: var(--tap); flex-shrink: 0; }
.brand-logo { height: 44px; width: auto; display: block; object-fit: contain; }
.footer-logo { background: var(--white); border-radius: var(--radius); padding: 0.4rem 0.7rem; margin-bottom: 0.7rem; min-height: 0; }
.footer-logo .brand-logo { height: 40px; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap);
  background: none; border: 1.5px solid var(--green); border-radius: var(--radius);
  color: var(--green-deep); cursor: pointer;
}
.nav-toggle .ic { width: 1.4rem; height: 1.4rem; }
.nav-toggle .ic-shut { display: none; }
.nav-toggle[aria-expanded="true"] .ic-open { display: none; }
.nav-toggle[aria-expanded="true"] .ic-shut { display: block; }

.site-nav {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  padding: 0.5rem 1rem 1rem;
}
.site-nav.open { display: flex; }
.site-nav a {
  display: flex; align-items: center;
  min-height: var(--tap);
  padding: 0.4rem 0.5rem;
  color: var(--ink); text-decoration: none; font-weight: 600;
  border-bottom: 1px solid var(--green-tint);
}
.site-nav a:last-child { border-bottom: 0; }
.site-nav a[aria-current="page"] { color: var(--green-deep); background: var(--green-tint); border-radius: var(--radius); }

/* ---------- buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-action { background: var(--ochre); color: #fff; border-color: var(--ochre); }
.btn-action:hover { background: var(--ochre-deep); border-color: var(--ochre-deep); color: #fff; }
.btn-outline { background: var(--white); color: var(--green-deep); border-color: var(--green); }
.btn-outline:hover { background: var(--green-tint); color: var(--green-deep); }
.btn-ghost { background: var(--green-tint); color: var(--green-deep); border-color: transparent; }
.btn-ghost:hover { background: var(--line); color: var(--green-deep); }
.btn-wa { background: #25d366; color: #fff; border-color: #25d366; } /* official WhatsApp green */
.btn-wa:hover { background: #1fb859; border-color: #1fb859; color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 2.4rem; padding: 0.35rem 0.8rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.65; cursor: wait; }

.text-link { font-weight: 700; color: var(--green); }
.text-link:hover { color: var(--ochre-deep); }
.prog-body .text-link::after, .res-body .text-link::after,
.section-foot .text-link::after, .split-head .text-link::after { content: " →"; }
.as-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  background: var(--green-deep) center / cover no-repeat;
  color: #e6ecd2;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(31, 42, 13, 0.78);
}
.hero-grid { position: relative; display: grid; gap: 1.75rem; align-items: center; padding-block: 3rem 4.4rem; }
.hero-copy { max-width: 42rem; }
.hero h1 { color: #fff; margin-bottom: 0.5em; max-width: 16ch; }
.hero .lede { color: #dce8c8; }
.hero .eyebrow { color: #cfe0ae; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.hero .btn-outline { background: transparent; color: #fff; border-color: #cfe0ae; }
.hero .btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.hero-note { margin-top: 1rem; font-size: 0.92rem; color: #dce8c8; }
.hero-note a { color: #fff; white-space: nowrap; }
.hero-badge {
  position: absolute; left: var(--gutter); bottom: 1.1rem; z-index: 1;
  background: var(--ochre); color: #fff;
  padding: 0.28rem 0.85rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ---------- sections ---------- */

.section { padding: 2.75rem 0; }
.section-tint { background: var(--green-tint); }
.section-ochre { background: var(--ochre-tint); }
.section-head { margin-bottom: 1.75rem; }
.section-head p { color: var(--muted); }
.section-foot { margin-top: 1.5rem; }
.split-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.5rem 1.5rem; }

/* photo page hero — image sits under a flat deep-green overlay so
   low-resolution art reads as a branded texture and text stays legible */
.page-hero {
  position: relative;
  background: var(--green-deep) center / cover no-repeat;
  color: #e6ecd2;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(31, 42, 13, 0.8);
}
.page-hero > .wrap { position: relative; padding-block: 2.5rem; }
.page-hero h1 { color: #fff; max-width: 24ch; }
.page-hero .lede { color: #dce8c8; margin-bottom: 0; }
.page-hero .eyebrow { color: #cfe0ae; }
.page-hero .crumbs { color: #b9c99c; }
.page-hero .crumbs a { color: #fff; }
.page-hero .news-meta { color: #b9c99c; }
.page-hero .tag { border-color: transparent; }

.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.9rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); }

/* what-we-do list */
.work-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.work-row a {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
  min-height: var(--tap);
  transition: background-color 0.15s ease;
}
.work-row a:hover { background: var(--green-tint); }
.work-ic { color: var(--green); width: 1.6rem; height: 1.6rem; }
.work-thumb {
  width: 3.5rem; height: 3.5rem; flex: none;
  object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--green-tint);
}
.work-body { display: flex; flex-direction: column; gap: 0.15rem; }
.work-body strong { color: var(--green-deep); font-size: 1.05rem; }
.work-body span { color: var(--muted); font-size: 0.95rem; }
.work-arrow { margin-left: auto; color: var(--ochre); width: 1.3rem; height: 1.3rem; }

/* approach band */
.band { background: var(--green-deep); color: #fff; }
.band-in { padding-block: 3rem; text-align: center; }
.band-sprout { width: 2.5rem; height: 2.5rem; color: #cfe0ae; margin-bottom: 0.75rem; }
.band-text {
  font-size: clamp(1.5rem, 3.5vw + 0.5rem, 2.4rem);
  font-weight: 700; line-height: 1.25; margin: 0 auto 0.6rem; max-width: 22ch;
}
.band-sub { margin: 0 auto; color: #cfe0ae; }

/* theory of change pillars */
.pillar-grid { display: grid; gap: 0.9rem; }
.pillar {
  display: block; padding: 1.25rem 1.25rem 1.4rem;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink);
  transition: border-color 0.15s ease;
}
.pillar:hover { border-color: var(--green); }
.pillar:hover h3 { color: var(--green); }
.pillar h3 { margin-bottom: 0.35rem; }
.pillar p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* impact */
.impact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.impact { padding: 1.25rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.impact strong { display: block; font-size: 1.9rem; color: var(--green-deep); }
.impact span { color: var(--muted); }

/* news */
.news-lead-grid { display: grid; gap: 1.25rem; }
.news-item {
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
}
.news-item h3 { margin: 0.3rem 0; }
.news-item h3 a { color: var(--ink); text-decoration: none; }
.news-item h3 a:hover { color: var(--green); }
.news-item p { margin: 0; color: var(--muted); }
.news-first { border-top: 0; padding-top: 0; }
.news-first h3 { font-size: 1.4rem; }
.news-meta { font-size: 0.85rem; color: var(--muted); margin: 0; }

.tag {
  display: inline-block; padding: 0.1rem 0.55rem;
  font-size: 0.75rem; font-weight: 700; border-radius: 999px;
  background: var(--green-tint); color: var(--green-deep);
  border: 1px solid var(--line);
}
.tag-alert { background: var(--ochre-tint); color: var(--ochre-deep); border-color: var(--ochre); }
.tag-note { background: var(--ochre-tint); color: var(--ochre-deep); border-color: var(--ochre); }

.home-events { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.event-mini { list-style: none; padding: 0; margin: 0; }
.event-mini li {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line);
}
.event-when { font-weight: 700; color: var(--ochre-deep); font-size: 0.9rem; }
.event-what { color: var(--ink); }

/* gallery */
.gallery-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem;
}
.gallery-grid img {
  width: 100%; aspect-ratio: var(--ar-square); object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--green-tint);
}
.gallery-grid figcaption { font-size: 0.78rem; color: var(--muted); padding-top: 0.3rem; }
.gallery-grid figure { margin: 0; }

/* partners */
.partner-row { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; }

/* action list (get involved) */
.action-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.action-list a {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 0.25rem; min-height: var(--tap);
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
  transition: background-color 0.15s ease;
}
.action-list a:hover { background: var(--green-tint); }
.action-list strong { display: block; font-size: 1.08rem; color: var(--green-deep); }
.action-list small { color: var(--muted); font-size: 0.9rem; }
.action-list .ic { margin-left: auto; color: var(--ochre); width: 1.4rem; height: 1.4rem; }

/* alert signup */
.alert-signup { display: grid; gap: 1.5rem; }
.alert-form {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem;
  display: grid; gap: 0.9rem;
}

/* ---------- forms ---------- */

.field { display: grid; gap: 0.3rem; margin-bottom: 0.9rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; /* >=16px for iOS/Android no-zoom */
  min-height: var(--tap);
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--muted); border-radius: var(--radius);
  background: var(--white); color: var(--ink); width: 100%;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23436818' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 1.1rem;
  padding-right: 2.4rem;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--green); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--ochre-deep); border-width: 2px;
}
.err { color: var(--ochre-deep); font-weight: 600; font-size: 0.88rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.check {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: 0.92rem; margin-bottom: 0.9rem; cursor: pointer;
}
.check input { width: 1.35rem; height: 1.35rem; margin-top: 0.1rem; flex: none; accent-color: var(--green); }

.form-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem;
}
.error-summary {
  background: var(--ochre-tint); border: 1px solid var(--ochre);
  border-radius: var(--radius); padding: 0.9rem 1rem; margin-bottom: 1.1rem;
}
.error-summary ul { margin: 0.4rem 0 0; }
.confirm { text-align: center; padding: 1.5rem 0.5rem; }
.confirm .ic { width: 3rem; height: 3rem; color: var(--green); }
.flash {
  background: var(--green-tint); border: 1px solid var(--green);
  border-radius: var(--radius); padding: 0.7rem 1rem; font-weight: 600;
  margin-bottom: 1.25rem;
}

/* ---------- detail pages ---------- */

.detail-grid { display: grid; gap: 2.25rem; }
.detail-media img {
  width: 100%; aspect-ratio: var(--ar-card); object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--green-tint);
  margin-bottom: 1.5rem;
}
.detail-media figcaption { font-size: 0.82rem; color: var(--muted); }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; }
.guide-sec { margin-bottom: 1.5rem; }

.tick-list { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.tick-list li {
  padding: 0.55rem 0 0.55rem 1.9rem; position: relative;
  border-bottom: 1px solid var(--green-tint);
}
.tick-list li::before {
  content: ""; position: absolute; left: 0.15rem; top: 0.9rem;
  width: 0.55rem; height: 0.55rem; border-radius: 50% 0 50% 50%;
  background: var(--green);
}

.side-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1.25rem; background: var(--white);
}
.side-card h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.side-card .btn { margin-top: 0.5rem; }
.side-card-action {
  background: var(--green-deep); border-color: var(--green-deep); color: #dce8c8;
}
.side-card-action h2 { color: #fff; }
.side-card-action .btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff; }
.side-card-action .btn-ghost:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }
.side-card-action .btn-outline { background: transparent; color: #fff; border-color: #cfe0ae; }
.side-card-action .btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { border-bottom: 1px solid var(--green-tint); }
.side-list a { display: block; padding: 0.55rem 0; text-decoration: none; font-weight: 600; }
.side-list a:hover { color: var(--ochre-deep); }

/* ---------- programmes index ---------- */

.prog-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.prog-card a {
  display: grid; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--white); height: 100%;
  transition: border-color 0.15s ease;
}
.prog-card a:hover { border-color: var(--green); }
.prog-card a:hover h2 { color: var(--green); }
.prog-media img { width: 100%; aspect-ratio: var(--ar-tile); object-fit: cover; background: var(--green-tint); }
.prog-body { padding: 1.1rem 1.2rem 1.3rem; }
.prog-body h2 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.prog-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.7rem; }

/* ---------- resources ---------- */

.res-tools { margin-bottom: 1.75rem; }
.res-search { position: relative; margin-bottom: 1rem; }
.res-search .ic { position: absolute; left: 0.8rem; top: 50%; translate: 0 -50%; color: var(--muted); width: 1.15rem; height: 1.15rem; }
.res-search input {
  width: 100%; font: inherit; font-size: 1rem; min-height: var(--tap);
  padding: 0.55rem 0.9rem 0.55rem 2.6rem;
  border: 1.5px solid var(--muted); border-radius: var(--radius);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.chip {
  font: inherit; font-size: 0.9rem; font-weight: 600;
  min-height: var(--tap); padding: 0.3rem 1rem;
  border-radius: 999px; border: 1.5px solid var(--green);
  background: var(--white); color: var(--green-deep); cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip.is-on { background: var(--green); color: #fff; }
.chip:hover { border-color: var(--ochre-deep); }
.chip.is-on:hover { border-color: var(--green); }

.res-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.3rem; }
.res-card a {
  display: flex; flex-direction: column; height: 100%;
  text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.15s ease;
}
.res-card a:hover { border-color: var(--green); }
.res-card img { width: 100%; aspect-ratio: var(--ar-tile); object-fit: cover; background: var(--green-tint); }
.res-body { padding: 1rem 1.1rem 1.2rem; }
.res-body h2 { font-size: 1.15rem; margin: 0.4rem 0; }
.res-body p { font-size: 0.92rem; color: var(--muted); margin-bottom: 0.7rem; }

.empty-state {
  padding: 1.5rem; border: 1px dashed var(--muted); border-radius: var(--radius);
  background: var(--green-tint); color: var(--muted); text-align: center;
}

/* infographics media wall */
.media-wall {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem;
}
.media-card {
  display: block; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--white);
  transition: border-color 0.15s ease;
}
.media-card:hover { border-color: var(--green); }
.media-card img {
  width: 100%; aspect-ratio: var(--ar-square); object-fit: cover;
  background: var(--green-tint);
}
.media-card span { display: block; padding: 0.55rem 0.8rem; font-size: 0.85rem; font-weight: 600; }

/* standalone infographic figure inside content */
.info-fig { margin: 0 0 1.5rem; }
.info-fig img {
  width: 100%; max-width: 26rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white);
}
.info-fig figcaption { font-size: 0.82rem; color: var(--muted); padding-top: 0.4rem; }

/* two-up product photos */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.duo img { aspect-ratio: var(--ar-square); object-fit: cover; margin-bottom: 0; }

/* event card media */
.event-media { margin: 0; }
.event-media img {
  width: 100%; aspect-ratio: var(--ar-square); object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--green-tint);
}
.event-media { grid-column: 1 / -1; }

/* ---------- news index ---------- */

.post-list { list-style: none; padding: 0; margin: 0; }
.post-row a {
  display: grid; gap: 1rem;
  padding: 1.25rem 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
}
.post-row:first-child a { padding-top: 0.25rem; }
.post-row a:hover h2 { color: var(--green); }
.post-media img {
  width: 100%; aspect-ratio: var(--ar-photo); object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--green-tint);
}
.post-body h2 { font-size: 1.25rem; margin: 0.3rem 0 0.4rem; }
.post-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.alert-note {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: var(--ochre-tint); border: 1px solid var(--ochre);
  border-radius: var(--radius); padding: 0.9rem 1rem; margin-bottom: 1.4rem;
}
.alert-note .ic { color: var(--ochre-deep); margin-top: 0.2rem; }
.alert-note p { margin: 0; font-size: 0.92rem; font-weight: 600; }

.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.share-row span { font-weight: 600; font-size: 0.9rem; color: var(--muted); }

/* ---------- events ---------- */

.event-list { list-style: none; padding: 0; margin: 0; }
.event-card {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.1rem;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line);
}
.event-card:first-child { padding-top: 0.5rem; }
.event-date {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 1.5px solid var(--green); border-radius: var(--radius);
  padding: 0.55rem 0.3rem; height: max-content;
}
.event-date strong { font-size: 1.35rem; color: var(--green-deep); line-height: 1.1; }
.event-date span { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.event-body h3 { margin-bottom: 0.25rem; }
.event-theme { color: var(--ochre-deep); font-weight: 600; font-style: italic; margin-bottom: 0.3rem; }
.event-loc { color: var(--muted); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }
.event-loc .ic { width: 1rem; height: 1rem; vertical-align: -0.15em; color: var(--ochre-deep); margin-right: 0.2rem; }
.past { opacity: 0.8; }

/* ---------- about ---------- */

.prose-split { display: grid; gap: 1.75rem; }
.side-media img {
  width: 100%; aspect-ratio: var(--ar-photo); object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--green-tint);
}
.side-media figcaption, .map-media figcaption { font-size: 0.82rem; color: var(--muted); padding-top: 0.4rem; }
.vm-grid { display: grid; gap: 1.25rem; }
.vm-grid .info-fig { grid-column: 1 / -1; justify-self: center; margin: 0; }
.vm-block { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.vm-block h2 { margin-bottom: 0.4rem; }
.value-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.value-list li { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }
.value-list strong { display: block; color: var(--green-deep); margin-bottom: 0.2rem; }
.value-list span { color: var(--muted); font-size: 0.95rem; }
.map-media img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--green-tint); }
.team-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.team-card {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.1rem;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem;
}
.team-card img {
  width: 5.5rem; height: 5.5rem; aspect-ratio: var(--ar-square); object-fit: cover;
  border-radius: 50%; border: 2px solid var(--green); background: var(--green-tint);
}
.team-card h3 { margin-bottom: 0.15rem; }
.team-role { color: var(--ochre-deep); font-weight: 600; margin-bottom: 0.4rem; }
.team-mail { font-size: 0.88rem; margin-bottom: 0.4rem; }
.team-mail .ic { width: 1rem; height: 1rem; vertical-align: -0.15em; color: var(--muted); }
.team-mail a { color: var(--green); font-weight: 600; }
.team-card p { margin-bottom: 0.4rem; font-size: 0.95rem; }
.team-avatar {
  width: 5.5rem; height: 5.5rem; border-radius: 50%;
  border: 2px solid var(--green); background: var(--green-tint);
  display: flex; align-items: center; justify-content: center; color: var(--green);
}
.team-avatar .ic { width: 2rem; height: 2rem; }
/* leadership messages */

.msg-grid { display: grid; gap: 1.25rem; }
.msg-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; background: #fff;
  display: flex; flex-direction: column;
}
.msg-from {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ochre-deep); margin-bottom: 0.9rem;
}
.msg-card p { margin-bottom: 0.8rem; font-size: 0.98rem; }
.msg-card footer { margin-top: auto; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.msg-card footer strong { display: block; }
.msg-card footer span { color: var(--muted); font-size: 0.9rem; }

.note-block {
  margin-top: 1.5rem; padding: 1rem 1.15rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--green-tint);
}
.note-block p { margin: 0; font-size: 0.92rem; }

/* ---------- theory of change ---------- */

.toc-flow { max-width: 46rem; }
.toc-stage {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.5rem;
}
.toc-stage h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.toc-out { margin: 0.8rem 0 0; font-size: 0.95rem; color: var(--muted); }
.toc-join { text-align: center; padding: 0.4rem 0; color: var(--green); }
.toc-result {
  margin-top: 0.4rem; background: var(--green-deep); color: #fff;
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.toc-result .ic { width: 2rem; height: 2rem; color: #cfe0ae; }
.toc-result p { margin: 0; font-size: 1.1rem; max-width: 46ch; }
.center-cta { text-align: center; }
.center-cta p { margin-inline: auto; }

/* ---------- alerts / get involved ---------- */

.alert-grid { display: grid; gap: 2rem; }
.alert-info h2 { margin-bottom: 0.6rem; }
.faq-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--green-deep);
  padding: 0.9rem 2.2rem 0.9rem 0; min-height: var(--tap);
  display: flex; align-items: center; list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.2rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--ochre-deep);
}
.faq[open] summary::after { content: "\2212"; }
.faq p { padding: 0 2.2rem 1rem 0; margin: 0; }
.faq-sm { margin-bottom: 0.5rem; }
.faq-sm summary { padding: 0.55rem 1.8rem 0.55rem 0; min-height: 0; font-size: 0.92rem; }
.faq-sm summary::after { font-size: 1.2rem; }
.faq-sm p { padding: 0 1.8rem 0.7rem 0; font-size: 0.9rem; }
.side-card .faq:last-child { border-bottom: 0; }

.enquiry-grid { display: grid; gap: 2rem; }
.support-block { display: grid; gap: 1.25rem; align-items: center; }
.support-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.contact-item {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.8rem 1rem; min-height: 3.5rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
  transition: border-color 0.15s ease;
}
a.contact-item:hover { border-color: var(--green); }
.contact-item .ic { width: 1.5rem; height: 1.5rem; color: var(--green); flex: none; }
.contact-item .ic-whatsapp { color: #25d366; }
.contact-item strong { display: block; color: var(--green-deep); font-size: 0.95rem; }
.contact-item small { color: var(--muted); font-size: 0.85rem; }
.contact-list strong { color: var(--green-deep); }

/* ---------- footer ---------- */

.site-footer { background: var(--green-deep); color: #dce8c8; margin-top: 2rem; }
.footer-grid {
  display: grid; gap: 2rem;
  padding-block: 2.75rem 2rem;
}
.footer-brand p { margin-bottom: 0.35rem; }
.footer-name { font-weight: 700; color: #fff; font-size: 1.05rem; }
.footer-area { font-size: 0.9rem; }
.footer-col h2 { color: #cfe0ae; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.6rem; }
.footer-col a, .footer-col span {
  display: block; color: #dce8c8; text-decoration: none;
  padding: 0.35rem 0; font-size: 0.95rem;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col a { min-height: 1.9rem; }
.footer-reg { font-size: 0.82rem; opacity: 0.85; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center;
  border-top: 1px solid #4c6b26; padding-block: 1rem;
  font-size: 0.85rem;
}
.footer-bottom a { color: #dce8c8; }

/* ---------- floating contact & sticky cta ---------- */

.float-contact {
  position: fixed; right: 0.9rem; bottom: var(--float-bottom, 1rem); z-index: 50;
  display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-end;
}
.float-btn {
  display: flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; padding: 0;
  border-radius: 50%; text-decoration: none;
  border: 2px solid var(--white);
}
.float-wa { background: #25d366; color: #fff; } /* official WhatsApp green */
.float-wa:hover { background: #1fb859; }
.float-call { background: var(--green-deep); color: #fff; }
.float-call:hover { background: var(--green); }
.float-btn { transition: background-color 0.15s ease; }
.float-btn .ic { width: 1.45rem; height: 1.45rem; }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: var(--white); border-top: 1px solid var(--line);
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0));
}

/* ---------- admin ---------- */

.admin-wrap { max-width: 60rem; }
.admin-title { font-size: 1.6rem; }
.admin-head { margin-bottom: 1.5rem; }
.admin-head h1 { margin-bottom: 0.2rem; }
.admin-grid { display: grid; gap: 1.25rem; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table, .data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-table { min-width: 34rem; }
.admin-table th, .admin-table td,
.data-table th, .data-table td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th, .data-table th { background: var(--green-tint); color: var(--green-deep); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.admin-table tr:last-child td, .data-table tr:last-child td { border-bottom: 0; }
.status { font-size: 0.78rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); }
.status-new { background: var(--ochre-tint); border-color: var(--ochre); color: var(--ochre-deep); }
.status-in-progress { background: var(--green-tint); border-color: var(--green); color: var(--green-deep); }
.status-done { background: var(--green-tint); color: var(--muted); }
.enq-detail { margin: 0; }
.enq-detail dt { font-weight: 700; color: var(--green-deep); font-size: 0.85rem; margin-top: 0.7rem; }
.enq-detail dd { margin: 0; }

/* ---------- responsive ---------- */

/* Mobile overrides (<42rem): paired buttons on one line, cards two-per-line.
   Gutters, gaps and card padding are 6px for maximum content space.
   Kept single-column: sequential steps, forms, long-form blocks. */
@media (max-width: 41.98rem) {
  /* paired actions — equal halves, shorter height, label never wraps */
  .hero-actions,
  .support-actions,
  .btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .hero-actions .btn,
  .support-actions .btn,
  .btn-pair .btn {
    width: 100%; min-height: 2.5rem;
    padding: 0.4rem 0.45rem; font-size: min(0.85rem, 3.9vw);
    white-space: nowrap;
  }

  /* two-per-line card grids */
  .prog-list, .res-grid, .pillar-grid, .value-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .prog-list, .res-grid, .pillar-grid, .value-list,
  .media-wall, .gallery-grid, .impact-grid, .duo { gap: 6px; }
  .prog-body, .res-body, .pillar, .value-list li, .impact { padding: 6px; }
  .media-card span { padding: 6px; }

  /* compact type so half-width cards stay readable */
  .prog-body h2 { font-size: 0.95rem; margin-bottom: 0.3rem; }
  .prog-body p { font-size: 0.8rem; margin-bottom: 0.4rem; }
  .prog-body .tag, .res-body .tag { font-size: 0.68rem; }
  .prog-body .text-link, .res-body .text-link { font-size: 0.8rem; }
  .res-body h2 { font-size: 0.92rem; margin: 0.3rem 0; }
  .res-body p { font-size: 0.78rem; margin-bottom: 0.4rem; }
  .pillar h3 { font-size: 0.9rem; }
  .pillar p { font-size: 0.8rem; }
  .value-list strong { font-size: 0.9rem; }
  .value-list span { font-size: 0.8rem; }
  .impact strong { font-size: 1.4rem; }
  .impact span { font-size: 0.8rem; }
  .media-card span { font-size: 0.75rem; }
  .gallery-grid figcaption { font-size: 0.72rem; }
}

@media (min-width: 42rem) {
  .hero { padding: 3rem 0; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 2.5rem; }
  .pillar-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .prog-list { grid-template-columns: 1fr 1fr; }
  .res-grid { grid-template-columns: 1fr 1fr; }
  .news-lead-grid { grid-template-columns: 1fr 1fr; }
  .news-first { grid-column: 1 / -1; }
  .post-row a { grid-template-columns: 11rem 1fr; align-items: start; }
  .media-wall { grid-template-columns: repeat(3, 1fr); }
  .event-card { grid-template-columns: 4.5rem 1fr 10rem; align-items: start; }
  .event-media { grid-column: auto; }
  .vm-grid { grid-template-columns: 1fr 1fr; }
  .value-list { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
  .msg-grid { grid-template-columns: 1fr 1fr; }
  .support-block { grid-template-columns: 1fr auto; }
  .alert-signup { grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (min-width: 56rem) {
  :root { --gutter: 1.5rem; }
  body { font-size: 1.0625rem; }
  .nav-toggle { display: none; }
  .brand-logo { height: 52px; }
  .site-nav {
    display: flex; position: static; flex-direction: row;
    border: 0; padding: 0; gap: 0.25rem;
  }
  .site-nav a { border-bottom: 0; padding: 0.45rem 0.75rem; border-radius: var(--radius); }
  .site-nav a[aria-current="page"] { border-left: 0; padding-left: 0.75rem; background: var(--green-tint); color: var(--green-deep); }
  .site-nav a:hover { background: var(--green-tint); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .pillar-grid { grid-template-columns: repeat(4, 1fr); }
  .res-grid { grid-template-columns: repeat(3, 1fr); }
  .media-wall { grid-template-columns: repeat(4, 1fr); }
  .event-card { grid-template-columns: 6rem 1fr 12rem; }
  .page-hero > .wrap { padding-block: 3.5rem; }
  .hero-grid { padding-block: 4rem; }
  .detail-grid { grid-template-columns: 1fr 19rem; gap: 3rem; }
  .detail-side { position: sticky; top: 5.5rem; align-self: start; }
  .enquiry-grid { grid-template-columns: 1fr 1fr; }
  .alert-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .prose-split { grid-template-columns: 1.2fr 0.8fr; align-items: start; gap: 2.5rem; }
  .section { padding: 3.5rem 0; }
  .event-date { padding: 0.8rem 0.5rem; }
  .team-list { grid-template-columns: 1fr 1fr; }
  .sticky-cta { display: none; }
  .float-contact { right: 1.5rem; bottom: 1.5rem !important; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; }
}

@media (min-width: 80rem) {
  :root { --gutter: 2rem; }
  .hero-grid { gap: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
