/* ═══════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
  --navy:        #009845;
  --navy-2:      #007835;
  --green:       #8CC63F;
  --gold:        #F4B942;
  --mint:        #8CC63F;
  --aqua:        #162F4A;
  --cream:       #102A43;
  --paper:       #081B29;
  --ink:         #FFFFFF;
  --ink-2:       #D9E2EC;
  --muted:       #8BA3B8;
  --border:      rgba(36, 59, 83, 0.4);
  --border-mid:  rgba(36, 59, 83, 0.65);

  --shadow-xs:   0 1px 4px rgba(0,0,0,0.18);
  --shadow-sm:   0 4px 14px rgba(0,0,0,0.24);
  --shadow-md:   0 12px 32px rgba(0,0,0,0.32);
  --shadow-lg:   0 24px 60px rgba(0,0,0,0.4);
  --shadow-xl:   0 40px 90px rgba(0,0,0,0.5);

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

  --section-v: 100px;
  color-scheme: dark;
}

/* ═══════════════════════════════════════════════
   BASE RESET
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { padding: 0; list-style: none; }

/* overflow:clip clips visually like hidden but does NOT create a scroll container,
   so position:sticky on children is never broken */
.page-shell { overflow: clip; }

.container {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════
   SCROLL PROGRESS
═══════════════════════════════════════════════ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  z-index: 200;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   TYPOGRAPHY SYSTEM
═══════════════════════════════════════════════ */
.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.section-title.light { color: #FFFFFF; }

.section-body {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 560px;
  margin-top: 16px;
}

.section-body.centered { margin: 16px auto 0; text-align: center; }

.kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 152, 69, 0.14);
  border: 1px solid rgba(0, 152, 69, 0.3);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 18px;
}

.kicker-pill::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--gold);
  flex-shrink: 0;
}

.kicker-pill.kicker-light {
  background: rgba(0, 152, 69, 0.18);
  border-color: rgba(0, 152, 69, 0.4);
  color: #8CC63F;
}

.kicker-pill.kicker-light::before { background: var(--gold); }

.kicker-pill.kicker-sm { font-size: 0.7rem; padding: 5px 11px; }

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  overflow: hidden;
  transition: transform 220ms var(--ease-spring), box-shadow 220ms ease, background 220ms ease;
  white-space: nowrap;
}

.btn::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: translateX(-120%);
  transition: transform 560ms ease;
}

.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  box-shadow: 0 8px 24px rgba(0,152,69,0.28);
}

.btn-primary:hover {
  box-shadow: 0 16px 36px rgba(0,152,69,0.34);
}

.btn-outline {
  color: var(--navy);
  background: transparent;
  border: 1.5px solid var(--border-mid);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(22, 47, 74, 0.7);
  border-color: rgba(0,152,69,0.28);
  box-shadow: none;
  transform: translateY(-2px);
}

.btn-ghost-hero {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(12px);
}

.btn-ghost-hero:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.36);
  box-shadow: none;
}

.btn-ghost-light {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
}

.btn-ghost-light:hover {
  background: rgba(255,255,255,0.14);
  box-shadow: none;
}

.btn-nav {
  gap: 7px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.88rem;
  border-radius: 999px;
}

.btn-lg { min-height: 54px; padding: 0 30px; font-size: 1rem; }

/* ═══════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════ */
.section {
  position: relative;
  padding: var(--section-v) 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 48px;
}

.section-head-centered {
  text-align: center;
  margin-bottom: 52px;
}

/* ═══════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════ */
/* ── Sticky nav — the containing block for mobile dropdown ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Separate layer so GPU compositing doesn't cause flicker */
  will-change: box-shadow, background;
  background: rgba(8, 27, 41, 0.85);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition:
    background  280ms ease,
    box-shadow  280ms ease,
    border-color 280ms ease;
}

.topbar.scrolled {
  background: rgba(8, 27, 41, 0.97);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.32), 0 1px 0 rgba(36,59,83,0.35);
}

.nav {
  position: relative; /* makes .nav the containing block for absolute children */
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-copy strong {
  display: block;
  max-width: 220px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.brand-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease;
}

.nav-link:hover {
  color: var(--navy);
  background: rgba(22, 47, 74, 0.7);
}

.nav-toggle {
  /* Hidden on desktop; shown via media query */
  display: none;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  transition: background 180ms ease, border-color 180ms ease;
  /* Do NOT use position:fixed — that detaches it from the sticky header */
}

.nav-toggle:hover { background: rgba(22, 47, 74, 0.7); border-color: var(--border-mid); }

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 999px;
  transition: transform 240ms ease, opacity 240ms ease, width 240ms ease;
}

.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 620px;
  height: 76vh;
  max-height: 780px;
  display: grid;
  align-items: center;
  color: #FFFFFF;
  background:
    url("../images/hero-community.png") center/cover no-repeat;
  isolation: isolate;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8,27,41,0.96) 0%, rgba(8,27,41,0.72) 44%, rgba(8,27,41,0.18) 100%);
  z-index: 0;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 220px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(8,27,41,0.97));
  z-index: 0;
  pointer-events: none;
}

#three-stage {
  position: absolute;
  top: 6%;
  right: 0;
  bottom: 8%;
  width: min(56vw, 740px);
  pointer-events: none;
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 620px);
  padding: 36px 0 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  margin-bottom: 24px;
  background: rgba(0, 152, 69, 0.15);
  border: 1px solid rgba(0, 152, 69, 0.3);
  border-radius: 999px;
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 2.2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

.hero-h1-line { display: block; }
.accent-word { color: #8CC63F; }

.hero-subtitle {
  max-width: 520px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
  line-height: 1.65;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 500px;
}

.stat {
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  transition: background 240ms ease, border-color 240ms ease;
}

.stat:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(0,152,69,0.3);
}

.stat strong {
  display: block;
  color: #8CC63F;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
  font-weight: 500;
}

.hero-scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 34px;
  height: 54px;
  border: 2px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 10px;
  transition: border-color 220ms ease;
}

.hero-scroll-cue:hover { border-color: rgba(255,255,255,0.5); }

.hero-scroll-cue span {
  display: block;
  width: 5px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  animation: scroll-bob 2s ease-in-out infinite;
}

@keyframes scroll-bob {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ═══════════════════════════════════════════════
   TRUST BAR
═══════════════════════════════════════════════ */
.trust-bar {
  position: relative;  /* creates stacking context above hero::after gradient */
  z-index: 1;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.trust-items {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.trust-item {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  opacity: 0.7;
}

.trust-divider {
  width: 1px;
  height: 14px;
  background: var(--border-mid);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════ */
.about-section {
  background: var(--paper);
  overflow: hidden;
}

.section-bg-accent {
  position: absolute;
  top: -160px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 152, 69, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.about-copy .section-title { margin-bottom: 18px; }
.about-copy .section-body  { margin-top: 0; }

.about-list {
  display: grid;
  gap: 16px;
  margin: 28px 0 36px;
}

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--ink-2);
}

.about-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--aqua), #1A3D5C);
  color: var(--navy);
  margin-top: 1px;
}

.media-stack {
  position: relative;
  min-height: 500px;
  perspective: 1200px;
}

.photo-panel {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform-style: preserve-3d;
  transition: transform 420ms var(--ease-out), box-shadow 420ms ease;
}

.photo-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.photo-panel.large {
  inset: 0 64px 80px 0;
  transform: rotateY(-10deg) rotateX(4deg) translateZ(-10px);
}

.photo-panel.large::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 55%, rgba(8,30,14,0.32) 100%);
  pointer-events: none;
}

.photo-panel.small {
  right: 0;
  bottom: 0;
  width: 44%;
  height: 46%;
  border: 8px solid var(--paper);
  transform: translateZ(90px) rotateY(14deg) rotateX(-3deg);
}

.photo-panel:hover {
  transform: translateY(-8px) rotateY(0) rotateX(0) translateZ(0);
  box-shadow: var(--shadow-xl);
}

.photo-panel:hover img { transform: scale(1.04); }

.floating-note {
  position: absolute;
  left: -20px;
  bottom: 44px;
  width: min(252px, 58%);
  padding: 22px;
  color: var(--paper);
  background: linear-gradient(135deg, #041120 0%, #007a38 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,152,69,0.3);
  box-shadow: var(--shadow-xl);
}

.floating-note::before {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0,152,69,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.floating-note-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  background: rgba(245,158,11,0.2);
  border-radius: 12px;
  color: var(--gold);
}

.floating-note strong {
  display: block;
  margin-bottom: 6px;
  color: #F4B942;
  font-size: 1.05rem;
  font-weight: 800;
}

.floating-note span {
  color: rgba(255,255,255,0.72);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════
   SERVICES
═══════════════════════════════════════════════ */
.services-section {
  background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: default;
  transition: transform 320ms var(--ease-spring), box-shadow 320ms ease, border-color 320ms ease;
}

.service-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, transparent 0%, rgba(0,152,69,0.04) 100%);
  opacity: 0;
  transition: opacity 320ms ease;
}

.service-card::after {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--navy), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 360ms var(--ease-out);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-mid);
}

.service-card:hover::before { opacity: 1; }
.service-card:hover::after  { transform: scaleX(1); }

.service-card-inner {
  position: relative;
  padding: 36px 32px 30px;
}

.service-num {
  position: absolute;
  top: 18px; right: 24px;
  font-size: 3.8rem;
  font-weight: 900;
  color: rgba(36,59,83,0.65);
  line-height: 1;
  user-select: none;
  letter-spacing: -0.04em;
}

.service-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--aqua), #1A3D5C);
  color: var(--navy);
  margin-bottom: 22px;
  transition: background 300ms ease, transform 300ms var(--ease-spring), color 300ms ease;
}

.service-icon-wrap svg { width: 26px; height: 26px; }

.service-card:hover .service-icon-wrap {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #FFFFFF;
  transform: scale(1.1) rotate(-5deg);
}

.service-card h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.service-card p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.7;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
  font-size: 0.87rem;
  font-weight: 700;
  transition: gap 200ms ease, color 200ms ease;
}

.service-link:hover { color: var(--green); gap: 10px; }

/* ═══════════════════════════════════════════════
   PROGRAMS
═══════════════════════════════════════════════ */
.programs-section {
  background: var(--cream);
}

.program-grid {
  display: grid;
  gap: 24px;
}

.program {
  display: grid;
  grid-template-columns: 42% 1fr;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  min-height: 380px;
  transition: box-shadow 320ms ease, transform 320ms var(--ease-spring);
}

.program:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.program-media {
  position: relative;
  overflow: hidden;
}

.program-media img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

.program:hover .program-media img { transform: scale(1.06); }

.program-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(8,30,14,0.5) 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.program-tag {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.program-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 38px;
}

.program-content h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.program-content p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.7;
}

.program-list {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.program-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 600;
}

.program-list li svg {
  color: var(--green);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   GALLERY
═══════════════════════════════════════════════ */
.gallery-section {
  background: linear-gradient(175deg, #0D2137 0%, #060F1A 80%, #060f08 100%);
  position: relative;
  overflow: hidden;
}

.gallery-section::before {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(0, 152, 69, 0.55), transparent);
}

.gallery-section .section-head { margin-bottom: 40px; }

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 80px;
  gap: 12px;
}

.gallery-item:nth-child(1) { grid-column: span 5; grid-row: span 4; }
.gallery-item:nth-child(2) { grid-column: span 4; grid-row: span 3; }
.gallery-item:nth-child(3) { grid-column: span 3; grid-row: span 3; }
.gallery-item:nth-child(4) { grid-column: span 4; grid-row: span 3; }
.gallery-item:nth-child(5) { grid-column: span 3; grid-row: span 4; }
.gallery-item:nth-child(6) { grid-column: span 5; grid-row: span 3; }

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #0A1E30;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0,0,0,0.36);
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 680ms var(--ease-out);
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,27,41,0.88) 0%, rgba(8,27,41,0.35) 45%, transparent 100%);
  opacity: 0;
  transition: opacity 380ms ease;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}

.gallery-overlay-content {
  transform: translateY(10px);
  transition: transform 380ms var(--ease-out);
}

.gallery-overlay-label {
  display: block;
  color: rgba(255,255,255,0.92);
  font-size: 0.88rem;
  font-weight: 700;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-overlay-content { transform: translateY(0); }

.play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: transform 280ms var(--ease-spring), background 280ms ease;
}

.gallery-item:hover .play {
  transform: translate(-50%, -50%) scale(1.14);
  background: var(--gold);
}

.play::before {
  display: block;
  width: 0;
  height: 0;
  margin-left: 5px;
  content: "";
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid var(--navy);
  transition: border-left-color 280ms ease;
}

.gallery-item:hover .play::before { border-left-color: #FFFFFF; }

/* ═══════════════════════════════════════════════
   EVENTS
═══════════════════════════════════════════════ */
.events-section {
  background: var(--cream);
}

.event-grid-new {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.event-side-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.event-side-stack .event-card-new { flex: 1; }

.event-card-new {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 320ms var(--ease-spring), box-shadow 320ms ease;
}

.event-card-new:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.event-featured { height: 100%; }
.event-featured .event-img-wrap { flex: 1; min-height: 240px; }

.event-img-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;
  flex-shrink: 0;
}

.event-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

.event-card-new:hover .event-img-wrap img { transform: scale(1.06); }

.event-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,27,41,0.06) 0%, rgba(8,27,41,0.52) 100%);
}

.event-chip {
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.event-body-new {
  padding: 22px 26px 26px;
  flex-shrink: 0;
}

.event-meta { margin-bottom: 10px; }

.event-date-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.event-body-new h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.event-featured .event-body-new h3 { font-size: 1.3rem; }

.event-body-new p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.event-read-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  font-size: 0.87rem;
  font-weight: 700;
  transition: gap 200ms ease, color 200ms ease;
}

.event-read-more:hover { gap: 12px; color: var(--green); }

/* ═══════════════════════════════════════════════
   CTA BAND
═══════════════════════════════════════════════ */
.cta-band-new {
  position: relative;
  padding: 110px 0;
  background: #060F1A;
  color: #FFFFFF;
  overflow: hidden;
}

.cta-band-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.cta-orb-1 {
  width: 500px; height: 500px;
  top: -140px; left: -100px;
  background: radial-gradient(circle, rgba(0,80,160,0.28) 0%, transparent 70%);
}

.cta-orb-2 {
  width: 360px; height: 360px;
  bottom: -90px; right: -60px;
  background: radial-gradient(circle, rgba(0,152,69,0.18) 0%, transparent 70%);
}

.cta-orb-3 {
  width: 250px; height: 250px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0,80,160,0.12) 0%, transparent 70%);
}

.cta-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,152,69,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,152,69,0.055) 1px, transparent 1px);
  background-size: 52px 52px;
}

.cta-band-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 64px;
}

.cta-band-copy .kicker-pill { margin-bottom: 20px; }
.cta-band-copy .section-title { max-width: 560px; }

.cta-band-copy p {
  max-width: 500px;
  margin: 18px 0 30px;
  color: rgba(255,255,255,0.68);
  font-size: 1rem;
  line-height: 1.7;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.cta-band-stats {
  display: flex;
  flex-direction: column;
  min-width: 230px;
  padding: 34px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(0,152,69,0.16);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
}

.cta-stat {
  padding: 22px 0;
  text-align: center;
}

.cta-stat-num {
  display: block;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #F4B942, #8CC63F);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.cta-stat span {
  display: block;
  color: rgba(255,255,255,0.58);
  font-size: 0.82rem;
  font-weight: 600;
}

.cta-stat-divider {
  height: 1px;
  background: rgba(0,152,69,0.14);
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.footer {
  position: relative;
  color: rgba(255,255,255,0.65);
  background: #040C15;
  overflow: hidden;
}

.footer-accent-line {
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,152,69,0.65) 25%,
    rgba(140,198,63,0.9) 50%,
    rgba(0,152,69,0.65) 75%,
    transparent 100%);
}

.footer-dot-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0,152,69,0.065) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.footer-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1fr 1.2fr;
  gap: 44px;
  padding: 68px 0 52px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.footer-tagline {
  color: rgba(255,255,255,0.52);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 0;
  max-width: 280px;
}

.footer-col-heading {
  margin-bottom: 20px;
  color: rgba(255,255,255,0.9);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.footer-nav-col ul {
  display: grid;
  gap: 10px;
  margin: 0;
}

.footer-nav-col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.56);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 180ms ease, gap 180ms ease;
}

.footer-nav-col a::before {
  display: inline-block;
  width: 12px;
  height: 1px;
  content: "";
  background: rgba(0,152,69,0.45);
  flex-shrink: 0;
  transition: width 200ms ease, background 200ms ease;
}

.footer-nav-col a:hover { color: #8CC63F; gap: 12px; }
.footer-nav-col a:hover::before { width: 18px; background: var(--gold); }

.footer-contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.56);
  font-size: 0.9rem;
  line-height: 1.55;
}

.footer-contact-list svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--gold);
}

.footer-contact-list a {
  color: rgba(255,255,255,0.56);
  transition: color 180ms ease;
}

.footer-contact-list a:hover { color: #8CC63F; }

.footer h3, .footer strong { color: #FFFFFF; }
.footer p, .footer a { color: rgba(255,255,255,0.65); font-size: 0.92rem; }
.footer a:hover { color: #8CC63F; }

.socials {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.social-link {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.65);
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease, transform 220ms var(--ease-spring);
}

.social-link:hover {
  background: rgba(0,152,69,0.18);
  border-color: rgba(0,152,69,0.36);
  color: #8CC63F;
  transform: translateY(-3px);
}

.footer-bottom-bar {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  color: rgba(255,255,255,0.38);
  font-size: 0.82rem;
  gap: 16px;
}

.footer-bottom-right { color: rgba(255,255,255,0.28); }

/* ═══════════════════════════════════════════════
   SCROLL ANIMATIONS
═══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 680ms var(--ease-out), transform 680ms var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-44px);
  transition: opacity 720ms var(--ease-out), transform 720ms var(--ease-out);
}

.reveal-right {
  opacity: 0;
  transform: translateX(44px);
  transition: opacity 720ms var(--ease-out), transform 720ms var(--ease-out);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 680ms var(--ease-out), transform 680ms var(--ease-spring);
}

.reveal-left.in-view,
.reveal-right.in-view,
.reveal-scale.in-view {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.stagger-1 { transition-delay: 80ms; }
.stagger-2 { transition-delay: 155ms; }
.stagger-3 { transition-delay: 230ms; }
.stagger-4 { transition-delay: 305ms; }
.stagger-5 { transition-delay: 380ms; }
.stagger-6 { transition-delay: 455ms; }

/* ═══════════════════════════════════════════════
   RESPONSIVE — 1080px
═══════════════════════════════════════════════ */
@media (max-width: 1080px) {
  :root { --section-v: 82px; }

  h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }

  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .about-grid,
  .program-grid { grid-template-columns: 1fr; }

  .about-grid { gap: 48px; }

  .program { grid-template-columns: 40% 1fr; }

  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .cta-band-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cta-band-stats {
    flex-direction: row;
    min-width: 0;
    width: 100%;
    justify-content: space-around;
  }

  .cta-stat-divider {
    width: 1px;
    height: auto;
  }

  .event-grid-new { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — 860px
═══════════════════════════════════════════════ */
@media (max-width: 860px) {
  :root { --section-v: 68px; }

  .container { width: min(100% - 32px, 720px); }

  /* Nav mobile */
  .nav { min-height: 74px; }

  /* Toggle sits in normal flow at the end of the flex row */
  .nav-toggle {
    display: flex;
    flex-shrink: 0;
    background: var(--navy);
    border-color: var(--navy);
    box-shadow: 0 6px 18px rgba(0,152,69,0.25);
  }

  .nav-toggle span { background: #FFFFFF; }

  /* Hide desktop links */
  .nav-links {
    /* Positioned relative to .topbar (the sticky containing block) */
    position: absolute;
    top: calc(100% + 4px);   /* just below the bottom of the topbar */
    left: 12px;
    right: 12px;
    /* Hidden state */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    background: rgba(8, 27, 41, 0.98);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow: var(--shadow-lg);
    /* Animate: collapsed */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0ms 220ms;
    z-index: 90; /* below topbar's z-index:100 is fine since topbar creates the stacking context */
  }

  .menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0ms 0ms;
  }

  .nav-links .nav-link {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .nav-links .btn-nav {
    margin-top: 6px;
    border-radius: var(--radius-sm);
    justify-content: center;
  }

  /* Hero */
  .hero { min-height: 640px; height: auto; padding: 70px 0 52px; }
  .hero-container { grid-template-columns: 1fr; padding-bottom: 52px; }
  .hero-scroll-cue { display: none; }
  #three-stage { top: auto; bottom: 6%; right: -15%; width: 100%; height: 280px; opacity: 0.42; }

  /* Trust bar */
  .trust-bar-inner { justify-content: center; gap: 16px; }

  /* About */
  .media-stack { min-height: 420px; }

  /* Programs */
  .program, .program-grid { grid-template-columns: 1fr; }
  .program { min-height: 0; }
  .program-content { padding: 28px; }
  .program-media img { min-height: 280px; }

  /* Section heads */
  .section-head { display: block; }
  .section-head .btn { margin-top: 20px; }

  /* Gallery */
  .gallery-masonry {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 70px;
  }
  .gallery-item:nth-child(1) { grid-column: span 3; grid-row: span 4; }
  .gallery-item:nth-child(2) { grid-column: span 3; grid-row: span 3; }
  .gallery-item:nth-child(3) { grid-column: span 3; grid-row: span 3; }
  .gallery-item:nth-child(4) { grid-column: span 3; grid-row: span 3; }
  .gallery-item:nth-child(5) { grid-column: span 3; grid-row: span 4; }
  .gallery-item:nth-child(6) { grid-column: span 3; grid-row: span 3; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — 640px
═══════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root { --section-v: 56px; }

  .container { width: calc(100% - 28px); }

  .brand-copy strong { max-width: 170px; font-size: 0.84rem; }
  .brand-copy small  { display: none; }

  .services-grid,
  .footer-top { grid-template-columns: 1fr; }

  h1 { font-size: 2.15rem; }
  .section-title { font-size: 1.8rem; }

  .hero-actions { gap: 12px; }
  .btn-lg { min-height: 48px; padding: 0 22px; font-size: 0.95rem; }

  /* ── Hero stats: keep 3 columns but compact ── */
  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
    gap: 8px;
  }

  .stat { padding: 12px 10px; }
  .stat strong { font-size: 1.2rem; }
  .stat span   { font-size: 0.7rem; margin-top: 3px; }

  /* ── Reduce hero bottom gradient so it doesn't bleed into trust bar ── */
  .hero::after { height: 100px; }

  /* ── Media stack: flat layout on small screens ── */
  .media-stack {
    min-height: 0;
    perspective: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  /* Large panel: static block, full width */
  .photo-panel.large {
    position: static;
    inset: auto;
    width: 100%;
    height: 240px;
    transform: none;
    border-radius: var(--radius-lg);
  }

  /* Small panel: hidden — redundant on narrow screens */
  .photo-panel.small { display: none; }

  /* Floating note: static block below the photo */
  .floating-note {
    position: static;
    width: 100%;
    left: auto;
    bottom: auto;
    border-radius: var(--radius-md);
    padding: 18px;
  }

  .gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
  }

  .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .gallery-item:nth-child(2) { grid-column: span 1; grid-row: span 2; }
  .gallery-item:nth-child(3) { grid-column: span 1; grid-row: span 2; }
  .gallery-item:nth-child(4) { grid-column: span 1; grid-row: span 2; }
  .gallery-item:nth-child(5) { grid-column: span 1; grid-row: span 2; }
  .gallery-item:nth-child(6) { grid-column: span 2; grid-row: span 2; }

  .cta-band-stats {
    flex-direction: column;
  }

  .cta-stat-divider { width: auto; height: 1px; }
  .cta-band-copy h2 { font-size: 1.75rem; }

  .footer-bottom-inner { flex-direction: column; text-align: center; gap: 6px; }
  .footer-bottom-right { display: none; }

  .trust-items { gap: 12px; }
  .trust-divider { display: none; }
}

/* ── Desktop reset: undo mobile nav overrides when viewport widens ── */
@media (min-width: 861px) {
  .nav-toggle { display: none !important; }

  .nav-links {
    /* Override all the absolute/hidden mobile overrides */
    position: static !important;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
  }
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #three-stage { display: none; }
  html { scroll-behavior: auto; }

  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
  }
}
