/* ==========================================================================
   NSSS — shared stylesheet
   Colours are taken from the NSSS logo: leaf green + deep purple.
   ========================================================================== */

:root {
  --purple-900: #26102f;
  --purple-800: #3a1a48;
  --purple-700: #542460;   /* logo title colour */
  --purple-600: #6c2f8a;
  --purple-500: #8a4cbf;
  --purple-100: #ece2f4;
  --purple-50:  #f7f2fb;

  --green-800: #1f5a12;
  --green-700: #2c7a19;
  --green-600: #3a9420;
  --green-500: #4caf2a;    /* logo leaf colour */
  --green-100: #dcefd2;
  --green-50:  #f1f8ec;

  --ink: #1f1a24;
  --muted: #5f5868;
  --line: #e7e1ec;
  --surface: #ffffff;
  --soft: #faf8fc;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(38, 16, 47, .06), 0 6px 20px rgba(38, 16, 47, .07);
  --shadow-lg: 0 12px 40px rgba(38, 16, 47, .14);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Poppins", "Inter", system-ui, sans-serif;

  --header-h: 76px;
  --container: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-700); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--purple-800); margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--green-500); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--purple-700); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 200; }
.skip-link:focus { left: 8px; color: #fff; }

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand img { height: 62px; width: auto; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 46px; height: 46px; padding: 0; cursor: pointer; color: var(--purple-700);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; background: currentColor; margin: 0 auto;
  position: relative; transition: transform .25s, background .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; }
.main-nav a, .main-nav .sub-toggle {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: 500; font-size: .95rem;
  color: var(--purple-800); text-decoration: none;
  padding: 10px 14px; border-radius: 10px;
  background: none; border: 0; cursor: pointer; width: 100%; text-align: left;
}
.main-nav a:hover, .main-nav .sub-toggle:hover { background: var(--purple-50); color: var(--purple-600); }
.main-nav a[aria-current="page"], .main-nav .has-sub.active > .sub-toggle { color: var(--green-700); }
.main-nav .caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; flex: none; }
.main-nav .has-sub { position: relative; }
.main-nav .submenu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease;
}
.main-nav .submenu .group-label {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  color: var(--green-700); padding: 10px 14px 4px;
}
.main-nav .submenu a { font-size: .92rem; padding: 8px 14px; }
.main-nav .has-sub.open > .submenu { opacity: 1; visibility: visible; transform: none; }
.main-nav .has-sub.open > .sub-toggle .caret { transform: rotate(-135deg) translateY(-2px); }
.main-nav a, .main-nav .sub-toggle { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1199px) {
  .main-nav a, .main-nav .sub-toggle { padding: 10px 9px; font-size: .9rem; }
  .brand img { height: 54px; }
}
@media (hover: hover) and (min-width: 992px) {
  .main-nav .has-sub:hover > .submenu { opacity: 1; visibility: visible; transform: none; }
}
.main-nav .nav-cta a { background: var(--green-600); color: #fff; margin-left: 6px; }
.main-nav .nav-cta a:hover { background: var(--green-700); color: #fff; }

@media (max-width: 991px) {
  .nav-toggle { display: inline-block; }
  .brand img { height: 54px; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: #fff;
    overflow-y: auto; padding: 12px 16px 40px;
    transform: translateX(100%); transition: transform .28s ease; visibility: hidden;
  }
  .nav-open .main-nav { transform: none; visibility: visible; }
  .nav-open { overflow: hidden; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--line); }
  .main-nav a, .main-nav .sub-toggle { padding: 14px 8px; font-size: 1.02rem; justify-content: space-between; }
  .main-nav .submenu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
    padding: 0 0 8px 12px; display: none; min-width: 0;
  }
  .main-nav .has-sub.open > .submenu { display: block; }
  .main-nav .nav-cta { border-bottom: 0; padding-top: 14px; }
  .main-nav .nav-cta a { margin: 0; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: 12px 22px; border-radius: 999px; text-decoration: none; border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-600); color: #fff; }
.btn-primary:hover { background: var(--green-700); color: #fff; }
.btn-light { background: #fff; color: var(--purple-700); }
.btn-light:hover { background: var(--purple-50); color: var(--purple-700); }
.btn-outline { border-color: var(--purple-600); color: var(--purple-700); background: transparent; }
.btn-outline:hover { background: var(--purple-600); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }
.arrow-link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.arrow-link::after { content: "→"; transition: transform .2s; }
.arrow-link:hover::after { transform: translateX(3px); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-soft { background: var(--soft); }
.section-green { background: var(--green-50); }
.section-purple { background: var(--purple-50); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--green-700);
  margin-bottom: 10px;
}
.eyebrow::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--green-500); vertical-align: middle; margin-right: 10px; }
.lead { font-size: 1.12rem; color: var(--muted); }

/* ---------- Hero slider ---------- */
/* The slide photos are wide panoramas (about 2.2 : 1). The hero's height follows the
   screen width so the photo is never zoomed in; below 900px the photo sits on top at
   full width and the text moves onto a panel underneath it. */
.hero { position: relative; height: clamp(460px, 46vw, 700px); overflow: hidden; background: var(--purple-900); color: #fff; }
.hero-media { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; }
.hero .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.hero .slide.is-active { opacity: 1; }
.hero .slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.04); transition: transform 7s ease; }
.hero .slide.is-active img { transform: scale(1); }
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, rgba(38,16,47,.88) 0%, rgba(58,26,72,.62) 45%, rgba(38,16,47,.15) 100%);
}
.hero-content { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; pointer-events: none; }
.hero-content a, .hero-content button { pointer-events: auto; }
.hero-content .container { max-width: var(--container); }
.hero-text { max-width: 640px; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 5vw, 3.3rem); margin-bottom: .4em; }
.hero h1 em { font-style: normal; color: #9be07a; }
.hero p { font-size: clamp(1rem, 2vw, 1.15rem); color: rgba(255,255,255,.88); max-width: 560px; }
.hero .eyebrow { color: #b6ec9c; }
.hero .eyebrow::before { background: #9be07a; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.slider-dots { position: absolute; z-index: 3; bottom: 24px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.slider-dots button { width: 10px; height: 10px; border-radius: 99px; border: 0; padding: 0; background: rgba(255,255,255,.5); cursor: pointer; transition: width .3s, background .3s; }
.slider-dots button.is-active { width: 28px; background: #9be07a; }
.slider-arrow {
  position: absolute; z-index: 3; bottom: 16px;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4);
  background: rgba(38,16,47,.35); color: #fff; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center;
}
.slider-arrow:hover { background: rgba(38,16,47,.65); }
.slider-arrow.prev { right: 76px; }
.slider-arrow.next { right: 20px; }
@media (max-width: 899px) {
  .hero { height: auto; background: linear-gradient(160deg, var(--purple-800), var(--purple-900)); }
  .hero-media { position: relative; aspect-ratio: 16 / 9; }
  .hero-media::after { background: linear-gradient(180deg, rgba(38,16,47,0) 55%, rgba(38,16,47,.75) 100%); }
  .hero-content { position: static; display: block; padding: 28px 0 40px; pointer-events: auto; }
  .slider-dots { bottom: 14px; }
  .slider-arrow { width: 38px; height: 38px; font-size: 1.1rem; bottom: 8px; }
  .slider-arrow.prev { right: 58px; }
  .slider-arrow.next { right: 12px; }
}
@media (max-width: 560px) {
  .slider-arrow { display: none; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Page banner (inner pages) ---------- */
.page-banner {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(76,175,42,.45), transparent 45%),
    linear-gradient(120deg, var(--purple-900), var(--purple-700) 60%, var(--purple-600));
  padding: clamp(48px, 8vw, 84px) 0 clamp(40px, 6vw, 64px);
}
.page-banner::after {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 280px; height: 280px; border-radius: 50%;
  border: 40px solid rgba(255,255,255,.05);
}
.page-banner h1 { color: #fff; max-width: 900px; margin-bottom: .3em; }
.page-banner p { color: rgba(255,255,255,.85); max-width: 720px; margin: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; margin-bottom: 14px; color: rgba(255,255,255,.7); list-style: none; padding: 0; }
.breadcrumb a { color: #b6ec9c; text-decoration: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: rgba(255,255,255,.45); }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 991px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; position: relative;
}
.card h3 { display: flex; align-items: center; gap: 10px; }
.card-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--green-50); color: var(--green-700);
}
.card-icon svg { width: 22px; height: 22px; }
.card-icon.purple { background: var(--purple-50); color: var(--purple-600); }

/* ---------- About split ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split-media::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green-500), var(--purple-500)); z-index: -1; opacity: .9;
}
.split-media .badge {
  position: absolute; left: -14px; bottom: 24px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 12px 18px; font-family: var(--font-head); font-size: .9rem; color: var(--purple-700);
}
.split-media .badge strong { display: block; font-size: 1.5rem; color: var(--green-700); line-height: 1.1; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-media { margin-right: 18px; }
}

/* ---------- Document lists ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { border-bottom: 1px solid var(--line); }
.doc-list li:last-child { border-bottom: 0; }
.doc-list a {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; text-decoration: none; color: var(--ink);
  transition: color .15s, background .15s; border-radius: 8px;
}
.doc-list a:hover { color: var(--purple-600); background: var(--purple-50); }
.doc-list a::before {
  content: "PDF"; flex: none; font-family: var(--font-head); font-size: .62rem; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: var(--purple-600); border-radius: 4px; padding: 3px 5px; margin-top: 3px;
}
.doc-list .date { display: block; font-size: .8rem; font-weight: 600; color: var(--green-700); }
.doc-list.compact a { padding: 9px 4px; }
.doc-columns { columns: 2; column-gap: 28px; }
.doc-columns li { break-inside: avoid; }
@media (max-width: 640px) { .doc-columns { columns: 1; } }
.card-foot { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* ---------- Project cards ---------- */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.project-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow); transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.project-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--green-50); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project-card:hover .project-media img { transform: scale(1.06); }
.project-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(38,16,47,0) 55%, rgba(38,16,47,.45) 100%); }
.project-tag {
  position: absolute; z-index: 1; left: 16px; top: 16px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green-800); background: rgba(255,255,255,.94); padding: 6px 12px; border-radius: 99px; box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.project-body { display: flex; flex-direction: column; flex: 1; padding: 24px 28px 28px; }
.project-kicker { font-size: .82rem; font-weight: 600; color: var(--green-700); margin-bottom: 6px; line-height: 1.4; }
.project-body h3 { font-size: 1.4rem; margin-bottom: 10px; }
.project-body h3 a { color: var(--purple-800); text-decoration: none; }
.project-body h3 a:hover { color: var(--purple-600); }
.project-body p { color: var(--muted); margin-bottom: 22px; }
.project-actions { margin-top: auto; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
@media (max-width: 760px) { .projects { grid-template-columns: 1fr; gap: 22px; } .project-body { padding: 20px 20px 24px; } }

/* ---------- Stats band ---------- */
.stats-band {
  background:
    radial-gradient(circle at 10% 0%, rgba(76,175,42,.25), transparent 40%),
    linear-gradient(135deg, var(--purple-900), var(--purple-700));
  color: #fff;
}
.stats-band h2, .stats-band .section-head p { color: #fff; }
.stats-band .eyebrow { color: #b6ec9c; }
.stats-band .eyebrow::before { background: #9be07a; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; }
.stat { background: rgba(38,16,47,.55); padding: 22px 18px; }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; color: #9be07a; line-height: 1.1; }
.stat span { display: block; margin-top: 6px; font-size: .88rem; color: rgba(255,255,255,.82); line-height: 1.35; }
@media (max-width: 991px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Map ---------- */
.map-frame { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(12px, 3vw, 28px); border: 1px solid var(--line); }
.map-frame img { margin: 0 auto; }

/* ---------- Stories ---------- */
.story { display: flex; flex-direction: column; }
.story-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.story-head img { width: 72px; height: 72px; object-fit: contain; flex: none; border-radius: 12px; background: var(--soft); padding: 6px; border: 1px solid var(--line); }
.story-head h3 { margin: 0; }
.story .program { display: block; font-size: .78rem; font-weight: 700; color: var(--green-700); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.story p { color: var(--muted); font-size: .97rem; }
.story blockquote { margin: 0; }

/* ---------- Partners ---------- */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
.partners a, .partners span {
  display: grid; place-items: center; height: 96px; padding: 14px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); transition: box-shadow .2s, transform .2s;
}
.partners a:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.partners img { max-height: 64px; width: auto; object-fit: contain; filter: grayscale(.2); }

/* ---------- Prose (inner content) ---------- */
.prose { font-size: 1.04rem; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 0; list-style: none; margin: 0 0 1.2em; }
.prose ul li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%232c7a19' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.prose .pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.prose .pill-list li { padding: 8px 16px; margin: 0; background: var(--purple-50); border: 1px solid var(--purple-100); border-radius: 99px; color: var(--purple-700); font-weight: 500; }
.prose .pill-list li::before { display: none; }
.callout {
  border-left: 4px solid var(--green-500); background: var(--green-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px; margin: 0 0 1.5em; font-size: 1.05rem;
}
.callout.purple { border-color: var(--purple-500); background: var(--purple-50); }
.callout strong { color: var(--purple-800); }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.sidebar { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
.sidebar .card { padding: 22px; }
.sidebar h3 { font-size: 1rem; }
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .94rem; }
.side-links a:hover { background: var(--purple-50); color: var(--purple-600); }
.side-links a[aria-current="page"] { background: var(--green-50); color: var(--green-800); font-weight: 600; }
.side-links .label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
@media (max-width: 991px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* ---------- Gallery ---------- */
.gallery-block + .gallery-block { margin-top: 56px; }
.gallery-block h2 { font-size: 1.35rem; display: flex; align-items: center; gap: 12px; }
.gallery-block h2::before { content: ""; width: 6px; height: 26px; border-radius: 4px; background: linear-gradient(var(--green-500), var(--purple-500)); }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .photo-grid { grid-template-columns: 1fr; } }
.photo { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.photo button { display: block; width: 100%; padding: 0; border: 0; background: var(--soft); cursor: zoom-in; overflow: hidden; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.photo button:hover img { transform: scale(1.05); }
.photo figcaption { padding: 14px 16px; font-size: .93rem; color: var(--ink); font-weight: 500; }

.album-card { display: block; text-decoration: none; color: inherit; overflow: hidden; padding: 0; transition: transform .2s, box-shadow .2s; }
.album-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: inherit; }
.album-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.album-card .body { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.album-card h3 { margin: 0; font-size: 1.05rem; }
.album-card .count { font-size: .82rem; color: var(--muted); white-space: nowrap; }

.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(20, 8, 26, .92);
  display: flex; align-items: center; justify-content: center; padding: 60px 16px 24px;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { transform: scale(.96); transition: transform .45s var(--ease); }
.lightbox.open figure { transform: none; }
.lightbox figure { margin: 0; max-width: 1100px; width: 100%; text-align: center; }
.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { color: #fff; margin-top: 14px; font-size: 1rem; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lightbox .lb-close { top: 14px; right: 14px; }
.lightbox .lb-prev { left: 14px; top: 50%; }
.lightbox .lb-next { right: 14px; top: 50%; }

/* ---------- People ---------- */
/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: stretch; }
.contact-list { display: grid; gap: 16px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item .card-icon { width: 48px; height: 48px; }
.contact-item h3 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 2px; }
.contact-item p { margin: 0; font-size: 1.02rem; }
.contact-item a { color: var(--purple-700); text-decoration: none; font-weight: 500; }
.contact-item a:hover { color: var(--green-700); text-decoration: underline; }
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); min-height: 380px; position: relative; background: var(--soft); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--purple-900); color: rgba(255,255,255,.78); padding: 64px 0 0; font-size: .95rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: #9be07a; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-brand img { height: 64px; width: auto; background: #fff; border-radius: 10px; padding: 6px 10px; margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-contact li { display: flex; gap: 10px; }
.footer-contact svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: #9be07a; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 48px; padding: 20px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .85rem; color: rgba(255,255,255,.6); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Misc ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-lg { margin-top: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { padding: 8px 16px; border-radius: 99px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--purple-700); font-size: .92rem; font-weight: 500; }
.chips a:hover { border-color: var(--purple-500); }
.notice-empty { color: var(--muted); font-style: italic; }
.grid-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .grid-wide { grid-template-columns: 1fr; } }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ==========================================================================
   Profiles — management & staff
   ========================================================================== */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 64px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.fact strong { display: block; font-family: var(--font-head); font-size: 2rem; line-height: 1.1; color: var(--purple-700); }
.fact span { color: var(--muted); font-size: .92rem; }
@media (max-width: 700px) { .facts { grid-template-columns: 1fr; gap: 12px; margin-bottom: 48px; } .fact { padding: 16px 20px; } .fact strong { font-size: 1.6rem; } }

.group-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.group-head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.group-head .count { font-size: .85rem; font-weight: 600; color: var(--green-800); background: var(--green-100); padding: 5px 12px; border-radius: 99px; white-space: nowrap; }
.people-group + .people-group { margin-top: 72px; }

/* Office bearers — featured cards */
.leaders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.leader-card {
  position: relative; overflow: hidden; text-align: center; color: #fff; border-radius: 20px; padding: 36px 24px 32px;
  background:
    radial-gradient(circle at 50% 0%, rgba(76,175,42,.35), transparent 60%),
    linear-gradient(160deg, var(--purple-800), var(--purple-900));
  box-shadow: var(--shadow-lg);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.leader-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(38, 16, 47, .28); }
.leader-photo {
  width: 152px; height: 152px; margin: 0 auto 20px; border-radius: 50%; padding: 4px;
  background: conic-gradient(from 200deg, var(--green-500), #9be07a, var(--purple-500), var(--green-500));
}
.leader-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: top; border: 4px solid var(--purple-800); }
.leader-role { display: inline-block; font-family: var(--font-head); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #9be07a; margin-bottom: 8px; }
.leader-card h3 { color: #fff; font-size: 1.12rem; margin: 0; }
@media (max-width: 860px) { .leaders { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

/* Member / staff cards */
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 230px)); gap: 24px; }
.profile-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.profile-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--green-500), var(--purple-500));
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.profile-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.profile-card:hover::after { transform: scaleX(1); }
.profile-photo { padding: 16px 16px 0; background: linear-gradient(160deg, var(--green-50), var(--purple-50)); }
.profile-photo .frame { border-radius: 14px; overflow: hidden; background: #fff; }
.profile-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: top; transition: transform .7s var(--ease); }
.profile-card:hover .profile-photo img { transform: scale(1.05); }
.profile-body { padding: 16px 16px 22px; text-align: center; }
.profile-body h3 { font-size: 1rem; margin: 0 0 8px; }
.role { display: inline-block; font-size: .8rem; color: var(--purple-600); font-weight: 600; background: var(--purple-50); padding: 4px 12px; border-radius: 99px; line-height: 1.35; }
@media (max-width: 560px) {
  .profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .profile-photo { padding: 10px 10px 0; }
  .profile-body { padding: 12px 8px 16px; }
  .profile-body h3 { font-size: .9rem; }
  .role { font-size: .72rem; padding: 3px 8px; }
}

/* Directors — tenure timeline */
.tenure { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.tenure li { display: grid; grid-template-columns: 150px 1fr; gap: 28px; position: relative; padding-bottom: 22px; }
.tenure li::before { content: ""; position: absolute; left: 164px; top: 12px; bottom: -12px; width: 2px; background: linear-gradient(var(--purple-100), var(--green-100)); }
.tenure li:last-child::before { display: none; }
.tenure li::after { content: ""; position: absolute; left: 158px; top: 30px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--purple-500); box-sizing: border-box; }
.tenure li.current::after { border-color: var(--green-500); box-shadow: 0 0 0 5px rgba(76,175,42,.18); }
.tenure-years { text-align: right; padding-top: 24px; font-family: var(--font-head); font-weight: 700; color: var(--purple-700); font-size: 1.05rem; }
.tenure-card {
  display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow); margin-left: 20px; transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tenure-card:hover { transform: translateX(4px); box-shadow: var(--shadow-lg); }
.tenure-card img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--purple-100); }
.tenure-card h3 { font-size: 1rem; margin: 0 0 3px; }
.tenure-card .when { font-size: .88rem; color: var(--muted); }
.tenure li.current .tenure-card { border-color: var(--green-100); background: linear-gradient(120deg, var(--green-50), #fff 60%); }
.tenure li.current .tenure-years { color: var(--green-700); }
.badge-current { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--green-600); padding: 2px 8px; border-radius: 99px; vertical-align: 2px; }
@media (max-width: 640px) {
  .tenure li { grid-template-columns: 1fr; gap: 6px; padding-left: 28px; }
  .tenure li::before { left: 6px; top: 8px; }
  .tenure li::after { left: 0; top: 4px; }
  .tenure-years { text-align: left; padding-top: 0; }
  .tenure-card { margin-left: 0; padding: 14px; }
  .tenure-card img { width: 58px; height: 58px; }
}

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* Gentle page enter / leave */
main { animation: fadeIn .5s var(--ease) both; }
html.is-leaving main, html.is-leaving .site-footer { opacity: 0; transition: opacity .2s ease; }

/* Hero & banner text rise in, one line after another */
.hero-text > *, .page-banner .container > * { animation: fadeUp .9s var(--ease) both; }
.hero-text > :nth-child(2), .page-banner .container > :nth-child(2) { animation-delay: .1s; }
.hero-text > :nth-child(3), .page-banner .container > :nth-child(3) { animation-delay: .2s; }
.hero-text > :nth-child(4) { animation-delay: .3s; }

/* Scroll reveal — only hidden while JS is running, so content can never get stuck invisible */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal="zoom"] { transform: scale(.94); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* Header gains a soft shadow once the page scrolls */
.site-header { transition: box-shadow .3s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(38, 16, 47, .08); }

/* Cards and buttons move smoothly */
.card { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.btn { transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
.btn:hover { box-shadow: 0 8px 20px rgba(38, 16, 47, .15); }

/* Mobile menu slides in and its items cascade */
@media (max-width: 991px) {
  .main-nav { transition: transform .45s var(--ease), visibility .45s; }
  .nav-open .main-nav > ul > li { animation: slideIn .5s var(--ease) both; }
  .nav-open .main-nav > ul > li:nth-child(2) { animation-delay: .04s; }
  .nav-open .main-nav > ul > li:nth-child(3) { animation-delay: .08s; }
  .nav-open .main-nav > ul > li:nth-child(4) { animation-delay: .12s; }
  .nav-open .main-nav > ul > li:nth-child(5) { animation-delay: .16s; }
  .nav-open .main-nav > ul > li:nth-child(6) { animation-delay: .2s; }
  .nav-open .main-nav > ul > li:nth-child(7) { animation-delay: .24s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
