/* =========================================================
   Dream Builders Mission — Design System
   Plain CSS, no build step. Edit variables below to retheme.
   ========================================================= */

:root {
  /* Brand palette (pulled from the original site, refined) */
  --teal:        #0f9d8f;
  --teal-dark:   #0b7d72;
  --teal-darker: #095e56;
  --coral:       #ef6b53;
  --coral-dark:  #d8543d;
  --navy:        #14323f;
  --gold:        #e0a526;
  --gold-dark:   #c08c14;

  --cream:       #fbf7ef;
  --cream-2:     #f4ecdf;
  --ink:         #1c2b30;
  --ink-soft:    #44565c;
  --line:        #e7ddcd;
  --white:       #ffffff;

  /* Typography */
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body:    "Nunito Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 16px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 10px rgba(20, 50, 63, .06);
  --shadow:    0 14px 40px rgba(20, 50, 63, .12);
  --shadow-lg: 0 26px 70px rgba(20, 50, 63, .18);
  --ring: 0 0 0 4px rgba(15, 157, 143, .25);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Visible keyboard focus on every interactive element. The white halo keeps the
   teal ring legible on light, teal, navy, coral, and gold backgrounds alike. */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .7);
}
:focus:not(:focus-visible) { outline: none; }
#main { scroll-margin-top: 90px; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.12; color: var(--navy); font-weight: 700; }
ul { list-style: none; padding: 0; }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--teal-dark); margin-bottom: .9rem; display: inline-block;
}
.eyebrow.on-dark { color: #8fe0d4; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.lead { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--ink-soft); max-width: 60ch; }
.text-center { text-align: center; }
.ic { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -.18em; flex: none; }
.mx-auto { margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  padding: .85rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 10px 24px rgba(239,107,83,.32); }
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-2px); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 10px 24px rgba(15,157,143,.3); }
.btn-teal:hover { background: var(--teal-dark); transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 10px 24px rgba(224,165,38,.3); }
.btn-gold:hover { background: var(--gold-dark); color:#fff; transform: translateY(-2px); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,.6); color:#fff; }
.btn-ghost-light:hover { background:#fff; color: var(--navy); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy); color: #dff3ef; font-size: .85rem;
  display: flex; justify-content: center; align-items: center; gap: 1.5rem;
  padding: .5rem var(--gutter); text-align: center;
}
.topbar a { color: #fff; }
.topbar .donate-pill {
  background: var(--gold); color: var(--navy); font-weight: 700;
  padding: .25rem .9rem; border-radius: 999px; font-family: var(--font-display);
}
.topbar .donate-pill:hover { background: #fff; }
.topbar .donate-pill svg { color: #e11900; } /* red heart */
.topbar .tb-contact { opacity: .9; display: inline-flex; align-items: center; gap: .4rem; }
.topbar a.donate-pill { display: inline-flex; align-items: center; gap: .4rem; }
@media (max-width: 680px){ .topbar .tb-contact { display:none; } }

/* Language toggle (EN | ES) — injected into the top bar by js/i18n.js */
.lang-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  overflow: hidden; line-height: 1;
}
.lang-toggle button {
  background: transparent; border: 0; color: #dff3ef;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  letter-spacing: .03em; padding: .28rem .7rem;
}
.lang-toggle button:hover { color: #fff; }
.lang-toggle button.active { background: var(--gold); color: var(--navy); }
.lang-toggle button + button { border-left: 1px solid rgba(255,255,255,.25); }
.lang-toggle button.active + button,
.lang-toggle button.active { border-left-color: transparent; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,247,239,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand .logo-mark { width: 54px; height: 54px; flex: none; object-fit: contain; display: block; image-rendering: -webkit-optimize-contrast; }
.logo-mark-transparent { mix-blend-mode: normal; filter: none; }
/* larger, clearer logo in the top header (footer keeps the smaller mark) */
.site-header .brand .logo-mark { filter: drop-shadow(0 1px 0 rgba(255,255,255,.25)); }
.brand .logo-text { display: flex; flex-direction: column; line-height: 1; }
.brand .logo-text b { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: 1.05rem; letter-spacing: .01em; }
.brand .logo-text span { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--teal-dark); margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: .35rem; }
.nav-links a {
  font-family: var(--font-display); font-weight: 500; font-size: .95rem; color: var(--ink);
  padding: .5rem .75rem; border-radius: 10px; transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--cream-2); color: var(--teal-dark); }
.nav-links a.active { color: var(--teal-dark); font-weight: 600; }
.nav-cta { margin-left: .4rem; }

.nav-toggle { display: none; background: none; border: 0; padding: .4rem; color: var(--navy); }
.nav-toggle svg { width: 30px; height: 30px; }

/* Drawer header is only used inside the mobile slide-out menu */
.drawer-head { display: none; }

@media (max-width: 940px){
  .nav-toggle { display: inline-flex; }
  /* backdrop-filter makes the header a containing block for position:fixed,
     which traps the slide-out menu inside the header (only the first link shows).
     Disable it on mobile so the panel sizes to the full viewport. */
  .site-header { background: var(--cream); backdrop-filter: none; -webkit-backdrop-filter: none; }

  .nav-links {
    list-style: none;
    position: fixed; inset: 0 0 0 auto; height: 100dvh; width: min(86vw, 360px);
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: linear-gradient(180deg, var(--white) 0%, var(--cream) 42%);
    padding: .8rem .8rem calc(1.3rem + env(safe-area-inset-bottom));
    border-radius: 22px 0 0 22px;
    box-shadow: var(--shadow-lg);
    transform: translateX(106%); transition: transform .32s cubic-bezier(.22,.61,.36,1);
    overflow-y: auto; overscroll-behavior: contain; z-index: 60;
  }
  .nav-links.open { transform: translateX(0); }

  /* Header row inside the drawer: brand + close button */
  .drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .4rem .35rem 1rem; margin-bottom: .55rem;
    border-bottom: 1px solid var(--line);
  }
  .drawer-brand { display: inline-flex; align-items: center; gap: .55rem; }
  .drawer-brand img { width: 34px; height: 34px; object-fit: contain; }
  .drawer-brand b { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: 1.05rem; letter-spacing: .01em; }
  .drawer-close {
    display: grid; place-items: center; width: 42px; height: 42px; flex: none;
    border: 0; border-radius: 12px; background: var(--cream-2); color: var(--navy);
    transition: background .15s ease, transform .12s ease;
  }
  .drawer-close:hover { background: var(--line); }
  .drawer-close:active { transform: scale(.9); }
  .drawer-close svg { width: 22px; height: 22px; }

  /* Menu rows */
  .nav-links a {
    display: flex; align-items: center;
    padding: .95rem 1rem; font-size: 1.07rem; font-weight: 600;
    color: var(--ink); border: 0; border-radius: 14px; position: relative;
    transition: background .15s ease, color .15s ease;
  }
  .nav-links a:hover { background: var(--cream-2); color: var(--teal-dark); }
  .nav-links a:active { background: var(--line); }
  .nav-links a.active { color: var(--teal-dark); background: rgba(15,157,143,.10); }
  .nav-links a.active::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 1.5rem; border-radius: 0 4px 4px 0; background: var(--teal);
  }

  /* Donate pinned to the bottom of the drawer */
  .nav-cta { margin-top: auto; padding-top: 1.1rem; }
  .nav-cta .btn {
    width: 100%; justify-content: center; gap: .5rem;
    padding: 1rem; border-radius: 14px; font-size: 1.07rem; font-weight: 800;
    color: #fff; background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
    box-shadow: 0 12px 26px rgba(239,107,83,.34);
  }
  .nav-cta .btn:hover { color: #fff; }

  body.nav-open { overflow: hidden; }
  /* z-index 49 keeps the backdrop BELOW the header's stacking level (50) so the
     drawer panel (inside the header) stays on top and clickable. No blur — just a
     light dim so the page recedes behind the menu. */
  .nav-backdrop { position: fixed; inset: 0; background: rgba(20,50,63,.45); z-index: 49; opacity: 0; visibility: hidden; transition: .25s; }
  .nav-backdrop.show { opacity: 1; visibility: visible; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(105deg, rgba(11,125,114,.92) 0%, rgba(20,50,63,.78) 55%, rgba(20,50,63,.35) 100%);
}
/* fallback gradient when no photo present */
.hero-bg.no-photo { background: linear-gradient(115deg, var(--teal-dark), var(--navy)); }
.hero-bg.no-photo::after { background: radial-gradient(900px 500px at 80% -10%, rgba(224,165,38,.28), transparent 60%); }
.hero-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-particles canvas { width: 100% !important; height: 100% !important; }
.hero-inner { position: relative; z-index: 2; padding-block: clamp(4.5rem, 12vw, 8.5rem); max-width: 720px; }
.hero h1 {
  color: #fff; font-size: clamp(2.4rem, 6.5vw, 4.4rem); font-weight: 800; letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.hero h1 .accent { color: var(--gold); }
.hero p { font-size: clamp(1.05rem, 2.4vw, 1.35rem); margin-top: 1.2rem; max-width: 52ch; color: #eaf6f3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; z-index: 2; line-height: 0; }
.hero-wave svg { width: 100%; height: auto; }

/* ---------- Impact stats ---------- */
.impact { background: var(--white); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem; }
.stat {
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2rem 1.4rem; text-align: center; box-shadow: var(--shadow-sm);
}
.stat .stat-icon {
  width: 58px; height: 58px; margin: 0 auto 1rem; border-radius: 16px;
  display: grid; place-items: center; background: rgba(15,157,143,.12); color: var(--teal-dark);
}
.stat .stat-icon svg { width: 30px; height: 30px; }
.stat b { font-family: var(--font-display); display: block; font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--coral); font-weight: 800; line-height: 1; }
.stat span { display: block; margin-top: .5rem; color: var(--ink-soft); font-weight: 500; }
@media (max-width: 760px){ .stats-grid { grid-template-columns: 1fr; } }

/* ---------- Generic grid helpers ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 880px){ .grid-2 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr; } }
/* Founders: photo left + heading/text right on desktop; on mobile the heading
   sits on top of the photo (head -> photo -> text in source order) */
@media (min-width: 881px){
  .founders-grid { align-items: stretch; }
  .founders-grid .media-frame { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .founders-grid .founders-head { grid-column: 2; grid-row: 1; align-self: end; }
  .founders-grid .founders-body { grid-column: 2; grid-row: 2; align-self: start; margin-top: 1.2rem; }
}

/* ---------- Action cards (Get involved / Need help / Services) ---------- */
.action-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.4rem; }
@media (max-width: 880px){ .action-cards { grid-template-columns: 1fr; } }
.action-card {
  border-radius: var(--radius-lg); padding: 2.1rem 1.8rem; color: #fff;
  display: flex; flex-direction: column; min-height: 280px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.action-card.teal  { background: linear-gradient(160deg, var(--teal), var(--teal-darker)); }
.action-card.navy  { background: linear-gradient(160deg, #1d4250, var(--navy)); }
.action-card.coral { background: linear-gradient(160deg, var(--coral), var(--coral-dark)); }
.action-card .ac-icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.16); display:grid; place-items:center; margin-bottom: 1.1rem; }
.action-card .ac-icon svg { width: 28px; height: 28px; }
.action-card h3 { color: #fff; font-size: 1.45rem; }
.action-card p { margin-top: .7rem; color: rgba(255,255,255,.9); flex: 1; }
.action-card .btn { margin-top: 1.4rem; align-self: flex-start; }

/* ---------- Flyers / programs imagery ---------- */
.flyer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
@media (max-width: 700px){ .flyer-grid { grid-template-columns: 1fr; } }
.flyer {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: var(--white); border: 1px solid var(--line);
}
.flyer img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.flyer .placeholder {
  aspect-ratio: 4/5; display: grid; place-items: center; text-align: center; padding: 2rem;
  background: repeating-linear-gradient(45deg, var(--cream) 0 18px, var(--cream-2) 18px 36px);
  color: var(--ink-soft); font-family: var(--font-display); font-weight: 600;
}

/* ---------- Flip flyer (EN front / ES back) ---------- */
.flip-wrap { max-width: 420px; margin: 0 auto; }
/* Two event flyers side by side on desktop, stacked on smaller screens */
.flyer-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 2.6rem 2rem; }
.flyer-row .flip-wrap { margin: 0; }
/* On desktop, match both flyers to the same height (widths follow each flyer's
   own proportions, so neither gets cropped) */
@media (min-width: 721px){
  .flyer-row .flip-wrap { width: auto; max-width: none; }
  .flyer-row .flip-card { height: 460px; width: auto; }
}
.flip-card {
  display: block; width: 100%; aspect-ratio: 2 / 3;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  perspective: 1600px; -webkit-tap-highlight-color: transparent;
}
/* Thursday + Back-to-School flyer art is a different shape (896x1200) — match its ratio so nothing is cropped */
#flyerFlipThu, #flyerFlipBts { aspect-ratio: 896 / 1200; }
.flip-card:focus-visible { outline: 3px solid var(--teal); outline-offset: 6px; border-radius: var(--radius); }
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .85s cubic-bezier(.22,.61,.36,1);
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--white);
}
.flip-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip-back { transform: rotateY(180deg); }
.flip-card:hover .flip-inner { box-shadow: none; }
.flip-card:not(.flipped):hover .flip-front,
.flip-card.flipped:hover .flip-back { box-shadow: 0 26px 60px rgba(9,94,86,.32); }
.flip-hint {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin-top: 1.1rem; color: var(--teal-dark); font-weight: 600; font-size: .95rem;
}
.flip-hint svg { width: 20px; height: 20px; flex: none; }
@media (prefers-reduced-motion: reduce){
  .flip-inner { transition: none; }
}
/* Tall 896x1200 flyer art — class form so the Events page doesn't rely on ids */
.flip-card.flip-tall { aspect-ratio: 896 / 1200; }

/* ---------- Events page: flyer + description cards ---------- */
.events-list { display: grid; grid-template-columns: 1fr; gap: 2.8rem; max-width: 1120px; margin: 0 auto; }
@media (min-width: 760px){ .events-list { grid-template-columns: repeat(2, 1fr); gap: 3.2rem 2.6rem; } }
.event-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.event-media { padding: 1.6rem 1.6rem 0; }
.event-media .flip-wrap { max-width: 360px; }
.event-media .flip-hint { margin-top: .9rem; font-size: .9rem; }
.event-body { padding: 1.3rem 1.7rem 1.9rem; display: flex; flex-direction: column; flex: 1; }
.event-badge {
  align-self: flex-start; font-family: var(--font-display); font-weight: 700;
  font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--teal-dark); background: var(--cream-2); border: 1px solid var(--line);
  padding: .3rem .7rem; border-radius: 999px; margin-bottom: .7rem;
}
.event-badge.upcoming { color: #b45309; background: #fff4e0; border-color: #f6d9a8; }
.event-body h3 { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; color: var(--ink); }
.event-meta { list-style: none; padding: 0; margin: .9rem 0 0; display: grid; gap: .45rem; }
.event-meta li { display: flex; align-items: flex-start; gap: .55rem; color: var(--teal-dark); font-weight: 600; font-size: .95rem; }
.event-meta svg { width: 18px; height: 18px; flex: none; margin-top: .1rem; stroke: var(--teal); }
.event-body > p { margin-top: 1rem; color: var(--ink-soft); flex: 1; }
/* Grand-opening single-image (very tall portrait) sits neatly inside its card */
.event-media .flyer-single { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.event-media .flyer-single img { width: 100%; height: auto; display: block; }
.events-featured { max-width: 380px; margin: 0 auto 2.2rem; }

/* ---------- Homepage events carousel (swipe / arrows, flyers still flip) ---------- */
.events-carousel { position: relative; max-width: 1080px; margin: 0 auto; }
.carousel-track {
  display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: .4rem .4rem 1rem; scrollbar-width: thin;
  scrollbar-color: var(--teal) transparent; -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 999px; }
.carousel-track::-webkit-scrollbar-track { background: var(--cream-2); border-radius: 999px; }
.carousel-slide { flex: 0 0 auto; width: min(300px, 74vw); scroll-snap-align: start; }
.carousel-slide .flip-wrap { max-width: none; width: 100%; margin: 0; }
.carousel-slide .flip-card { width: 100%; height: auto; }
.carousel-slide .flyer-single { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.carousel-slide .flyer-single img { width: 100%; height: auto; display: block; }
.carousel-slide .flip-hint { margin-top: .8rem; font-size: .88rem; }
.carousel-cap { text-align: center; margin-top: .3rem; color: var(--ink-soft); font-size: .9rem; line-height: 1.35; }
.carousel-cap b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.02rem; }
.carousel-btn {
  position: absolute; top: 44%; transform: translateY(-50%); z-index: 4;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--white); color: var(--teal-dark); box-shadow: var(--shadow);
  cursor: pointer; display: grid; place-items: center; transition: background .15s, opacity .15s;
}
.carousel-btn:hover { background: var(--cream); }
.carousel-btn svg { width: 22px; height: 22px; }
.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }
.carousel-btn[disabled] { opacity: .3; cursor: default; }
@media (max-width: 640px){
  .carousel-btn { width: 42px; height: 42px; }
  .carousel-btn.prev { left: 2px; }
  .carousel-btn.next { right: 2px; }
}
@media (prefers-reduced-motion: reduce){ .carousel-track { scroll-behavior: auto; } }

/* ---------- Split feature (story / donate) ---------- */
.media-frame {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3; background: linear-gradient(135deg, var(--teal), var(--navy));
}
.media-frame img { width:100%; height:100%; object-fit: cover; }
.media-frame.placeholder { display:grid; place-items:center; color:#cfeee8; font-family:var(--font-display); font-weight:600; }

/* ---------- Events ---------- */
.event-list { display: grid; gap: 1.1rem; margin-top: 2.2rem; }
.event-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.4rem; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.6rem; box-shadow: var(--shadow-sm);
}
.event-date {
  text-align: center; background: var(--teal); color: #fff; border-radius: 14px;
  padding: .7rem 1.1rem; min-width: 78px; font-family: var(--font-display); line-height: 1;
}
.event-date .m { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.event-date .d { font-size: 1.9rem; font-weight: 800; display:block; margin-top:.2rem; }
.event-body h3 { font-size: 1.25rem; }
.event-body p { color: var(--ink-soft); margin-top: .25rem; font-size: .96rem; }
.event-meta { font-size: .9rem; color: var(--teal-dark); font-weight: 600; margin-top:.4rem; display:flex; gap:1rem; flex-wrap:wrap; }
.event-meta span { display:inline-flex; align-items:center; gap:.35rem; }
@media (max-width: 680px){
  .event-card { grid-template-columns: auto 1fr; }
  .event-card .btn { grid-column: 1 / -1; justify-content:center; }
}

/* ---------- Newsletter ---------- */
.newsletter { background: linear-gradient(120deg, var(--gold), #f0c14b); color: var(--navy); }
.newsletter .section-title { color: var(--navy); }
.signup-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: .8rem; margin-top: 1.8rem; }
.signup-form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .35rem; text-align: left; }
.field label { font-size: .82rem; font-weight: 700; font-family: var(--font-display); color: #0b2b2b; }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 1rem; padding: .9rem 1rem; border-radius: 12px;
  border: 2px solid #1c2b30; background: #eef3f3; color: #1c2b30;
}
.field input::placeholder, .field textarea::placeholder { color: #5a6f75; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; box-shadow: 0 0 0 4px rgba(15,157,143,.25); border-color: #0f9d8f; }
@media (max-width: 720px){ .signup-form { grid-template-columns: 1fr; } }
.form-note { font-size: .85rem; margin-top: .8rem; opacity: .85; }
.form-success { display:none; background: rgba(255,255,255,.85); border-radius: 12px; padding: 1rem 1.2rem; margin-top: 1rem; font-weight: 600; color: var(--teal-darker); }
.form-success.show { display:block; }

/* Volunteer sign-up: two-column layout, sub-sections, and checkbox chips */
.signup-form.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 720px){ .signup-form.cols-2 { grid-template-columns: 1fr; } }
.form-section { text-align: left; }
.form-section .eyebrow { display: block; margin-bottom: .7rem; }
.check-group { display: flex; flex-wrap: wrap; gap: .6rem; }
.check {
  display: inline-flex; align-items: center; gap: .5rem; padding: .6rem .95rem;
  border: 1px solid rgba(20,50,63,.22); border-radius: 999px; background: rgba(255,255,255,.9);
  font-size: .94rem; color: var(--ink); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.check:hover { border-color: var(--teal); }
.check input { accent-color: var(--teal); width: 1.05rem; height: 1.05rem; cursor: pointer; }
.check:has(input:checked) { border-color: var(--teal); background: rgba(15,157,143,.10); color: var(--teal-darker); font-weight: 600; }
.consent { display: flex; gap: .6rem; align-items: flex-start; text-align: left; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.consent input { accent-color: var(--teal); width: 1.05rem; height: 1.05rem; margin-top: .15rem; flex: none; cursor: pointer; }

/* ---------- Generic page hero (interior pages) ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(120deg, var(--teal-dark), var(--navy)); color:#fff; }
/* themed background photo behind the header */
.page-hero-bg { position: absolute; inset: 0; z-index: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
/* teal/navy overlay keeps the white title readable over any photo */
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(120deg, rgba(11,125,114,.86), rgba(20,50,63,.80)); }
.page-hero .hero-particles { z-index: 2; }
.page-hero .container { position: relative; z-index: 3; padding-block: clamp(3rem, 8vw, 5rem); }
.page-hero h1 { color:#fff; font-size: clamp(2rem, 5vw, 3.2rem); }
.page-hero p { color:#dff3ef; margin-top:.8rem; max-width: 58ch; font-size: 1.1rem; }
.breadcrumbs { font-size:.85rem; color:#9fd8cf; margin-bottom:.9rem; }
.breadcrumbs a:hover { color:#fff; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow-sm); height: 100%;
}
.card .card-icon { width: 54px; height: 54px; border-radius: 14px; background: rgba(15,157,143,.12); color: var(--teal-dark); display:grid; place-items:center; margin-bottom: 1.1rem; }
.card .card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.25rem; }
.card p { color: var(--ink-soft); margin-top: .5rem; }

/* ---------- Donation widget ---------- */
.donate-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.4rem); box-shadow: var(--shadow); }
.freq-toggle { display: inline-flex; background: var(--cream-2); border-radius: 999px; padding: 4px; gap:4px; }
.freq-toggle button { border:0; background:transparent; padding:.55rem 1.4rem; border-radius:999px; font-family:var(--font-display); font-weight:600; color:var(--ink-soft); }
.freq-toggle button.active { background: var(--teal); color:#fff; }
.amount-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:.7rem; margin-top:1.3rem; }
@media (max-width:560px){ .amount-grid { grid-template-columns: repeat(2,1fr); } }
.amount-grid button {
  border:2px solid var(--line); background:var(--white); padding:1rem; border-radius:14px;
  font-family:var(--font-display); font-weight:700; font-size:1.15rem; color:var(--navy); transition:.15s;
}
.amount-grid button:hover { border-color: var(--teal); }
.amount-grid button.active { border-color: var(--teal); background: rgba(15,157,143,.1); color: var(--teal-darker); }

/* ---------- Contact ---------- */
.info-list { display:grid; gap:1.1rem; }
.info-item { display:flex; gap:1rem; align-items:flex-start; }
.info-item .ii-icon { width:46px; height:46px; flex:none; border-radius:12px; background:rgba(15,157,143,.12); color:var(--teal-dark); display:grid; place-items:center; }
.info-item .ii-icon svg{ width:24px; height:24px; }
.info-item b { font-family:var(--font-display); display:block; color:var(--navy); }
.info-item span, .info-item a { color: var(--ink-soft); }
.info-item a:hover { color: var(--teal-dark); }

/* ---------- Gallery ---------- */
.gallery { display:grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 880px){ .gallery { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px){ .gallery { grid-template-columns: 1fr; } }
.gallery .tile { border-radius: var(--radius); overflow:hidden; aspect-ratio: 1; box-shadow: var(--shadow-sm); }
.gallery .tile img { width:100%; height:100%; object-fit:cover; transition: transform .4s ease; }
.gallery .tile:hover img { transform: scale(1.06); }
.gallery .tile.placeholder { background: repeating-linear-gradient(45deg, var(--cream) 0 16px, var(--cream-2) 16px 32px); display:grid; place-items:center; color:var(--ink-soft); font-family:var(--font-display); font-weight:600; }

/* ---------- Partner logos ---------- */
.partner-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap:1.2rem; margin-top:2rem; max-width:1040px; margin-left:auto; margin-right:auto; }
@media (max-width:760px){ .partner-grid { grid-template-columns: repeat(2,1fr); } }
.partner-grid .p {
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius);
  display:grid; place-items:center; min-height:110px; padding:1.4rem; color:var(--ink-soft);
  font-family:var(--font-display); font-weight:600; box-shadow:var(--shadow-sm);
}
.partner-grid .p img { max-width:100%; max-height:64px; width:auto; object-fit:contain; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--coral), var(--coral-dark)); color:#fff; text-align:center; }
.cta-band h2 { color:#fff; font-size: clamp(1.8rem,4vw,2.6rem); }
.cta-band p { color: rgba(255,255,255,.92); max-width: 56ch; margin: .8rem auto 0; }
.cta-band .hero-actions { justify-content:center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cfe0e4; padding-block: 3.2rem 2rem; }
.footer-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.4rem; }
@media (max-width: 820px){ .footer-grid { grid-template-columns: 1fr; gap:2rem; } }
.site-footer h4 { color:#fff; font-size: 1.05rem; margin-bottom: 1rem; }
.site-footer a { color:#cfe0e4; }
.site-footer a:hover { color:#fff; }
.footer-brand .brand .logo-text b { color:#fff; }
.footer-brand p { margin-top: 1rem; color:#9fb6bc; max-width: 42ch; font-size:.95rem; }
.footer-links li { margin-bottom:.6rem; }
.footer-contact li { margin-bottom:.8rem; display:flex; gap:.6rem; align-items:flex-start; color:#cfe0e4; }
.footer-contact svg { width:18px; height:18px; flex:none; margin-top:3px; color: var(--teal); }
.social-row { display:flex; gap:.7rem; margin-top:1.2rem; }
.social-row a { width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,.1); display:grid; place-items:center; transition:.2s; }
.social-row a:hover { background: var(--teal); }
.social-row svg { width:20px; height:20px; color:#fff; }
.footer-disclaimer { border-top:1px solid rgba(255,255,255,.14); margin-top:2.6rem; padding-top:1.6rem; font-size:.8rem; color:#b3c6cb; line-height:1.6; }
.footer-bottom { display:flex; justify-content:space-between; flex-wrap:wrap; gap:.6rem; margin-top:1.2rem; font-size:.82rem; color:#b3c6cb; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity:0; transform: translateY(30px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity:1; transform:none; }
/* Modal content opens hidden from the viewport, so the scroll-reveal observer never
   fires for it. Force any reveal element inside a modal to stay visible. */
.modal .reveal { opacity:1 !important; transform:none !important; }
/* partner name fallback shown until a partner logo image is added */
.p-name { font-family: var(--font-display); font-weight: 700; color: var(--ink-soft); text-align: center; padding: 1rem; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity:1 !important; transform:none !important; transition:none !important; } html{scroll-behavior:auto;} }

/* ---------- Skip link ---------- */
.skip-link { position:absolute; left:-999px; top:.5rem; background:#fff; color:var(--navy); padding:.6rem 1rem; border-radius:8px; z-index:100; }
.skip-link:focus { left:.5rem; }

/* ---------- Modal (sponsor / partner form) ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 1.2rem; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,50,63,.55); }
.modal-card {
  position: relative; z-index: 1; width: min(560px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: clamp(1.5rem, 4vw, 2.4rem); text-align: left; animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity:0; transform: translateY(16px) scale(.98); } to { opacity:1; transform:none; } }
.modal-close { position: absolute; top: .9rem; right: .9rem; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--cream-2); color: var(--navy); transition: background .15s ease; }
.modal-close:hover { background: var(--line); }
.modal-close svg { width: 22px; height: 22px; }
.modal-card h2 { font-size: clamp(1.4rem, 4vw, 1.7rem); }
/* clear, visible fields on the white modal card (avoid a white-on-white look) */
.modal-card { color: #1c2b30; }
.modal-card h2 { color: #0b2b2b; }
.modal-card h3, .modal-card h4 { color: #14323f; }
.modal-card p { color: #1c2b30; }
.modal-card .field label { color: #0b2b2b; font-weight: 700; }
.modal-card .field input, .modal-card .field textarea, .modal-card .field select {
  background: #eef3f3;
  border: 2px solid #1c2b30;
  color: #1c2b30;
}
.modal-card .field input::placeholder, .modal-card .field textarea::placeholder { color: #5a6f75; }
.modal-card .eyebrow { color: #095e56; }
.modal-card .btn { color: #fff; }
body.modal-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce){ .modal-card { animation: none; } }

/* ---------- Centered text treatment (site-wide, web + mobile) ---------- */
body { text-align: center; }
/* center constrained-width text blocks instead of leaving them left-pinned */
h1, h2, h3, h4, h5, h6, p { margin-left: auto; margin-right: auto; }
.hero-inner { margin-left: auto; margin-right: auto; }
/* center button rows beneath the centered copy */
.hero-actions, .check-group { justify-content: center; }
/* center buttons inside cards (they were pinned left) + their icons */
.action-card .btn { align-self: center; }
.action-card .ac-icon, .card .card-icon { margin-left: auto; margin-right: auto; }
.signup-form button { justify-self: center; }
/* keep icon+text rows and form fields left-aligned so they stay readable */
.info-item, .event-row { text-align: left; }
/* fully center the footer (logo row, social icons, contact rows, bottom bar) */
.site-footer .brand,
.site-footer .social-row,
.site-footer .footer-contact li,
.site-footer .footer-bottom { justify-content: center; }
.site-footer .footer-contact li { text-align: center; }
/* mobile drawer links read better left-aligned with their accent bar */
@media (max-width: 940px){ .nav-links a { justify-content: flex-start; text-align: left; } }

/* ---- Staff Admin button (bottom-right, every public page) ---- */
.admin-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem .95rem; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  box-shadow: var(--shadow); opacity: .82;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.admin-fab:hover { opacity: 1; transform: translateY(-2px); background: var(--teal-dark); color: #fff; }
.admin-fab svg { width: 18px; height: 18px; }
@media (max-width: 600px){
  .admin-fab { right: 12px; bottom: 12px; padding: .55rem .7rem; }
  .admin-fab span { display: none; } /* icon-only on small screens to avoid covering content */
}
