/* ===== Design tokens ===== */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --tint: #f2f5f1;
  --text: #1d2420;
  --muted: #637068;
  --border: #e3e7e2;
  --primary: #2f6b4f;
  --primary-dark: #24543e;
  --primary-soft: #e3efe8;
  --accent: #e8a33d;
  --gold: #a8956b;
  --danger: #c0392b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .04), 0 8px 24px rgba(20, 30, 25, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --surface: #1a201d;
    --tint: #161b18;
    --text: #e8ece9;
    --muted: #97a39c;
    --border: #2a322e;
    --primary: #5fb388;
    --primary-dark: #7cc7a0;
    --primary-soft: #1f3329;
    --gold: #c9b88f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, iframe { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-display); letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.section { padding: 88px 0; }
.section-tint { background: var(--tint); }
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.section-intro { color: var(--muted); max-width: 44em; margin: 0; font-size: 1.05rem; }
.history h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history h3 .tag { font-size: .7rem; }
.section-head-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .75rem;
  font-weight: 600; color: var(--primary); margin-bottom: .6em;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff; border: 0; border-radius: 999px;
  padding: 14px 26px; font: 600 1rem var(--font); text-decoration: none;
  cursor: pointer; transition: background .2s, transform .1s;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn-ghost:hover { background: var(--surface); }
@media (prefers-color-scheme: dark) { .btn { color: #0f1a14; } .btn-ghost { color: var(--text); } }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 1.3rem; cursor: pointer;
}
.icon-btn:hover { background: var(--primary-soft); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.logo-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #fff; }
.logo-text { display: grid; line-height: 1.15; }
.logo-text small { font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nav-links a:not(.btn):hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

@media (max-width: 1000px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .nav-links .btn { margin-top: 8px; }
}

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  /* Same shape as the entrance photo, so it shows in full without bands */
  width: 100%; aspect-ratio: 1400 / 786; max-height: min(82vh, 740px);
  color: #fff; background: #13241b;
}
.slide {
  position: absolute; inset: 0; display: flex; align-items: center;
  padding: 40px 0 90px;
  opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 0s linear 1.2s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.2s ease; }
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center 45%;
  transform: scale(1.08); transition: transform 8s ease-out;
}
.slide.is-active .hero-bg { transform: scale(1); }
.slide::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at center, rgba(10, 28, 19, .45) 0%, rgba(10, 28, 19, .72) 100%),
    linear-gradient(0deg, rgba(10, 28, 19, .6), transparent 45%);
}
.hero-copy { text-align: center; max-width: 860px; }

/* Logo slide: the logo on white, with the welcome text beside it */
.slide-logo { background: #fff; padding: 24px 0 110px; }
.slide-logo::after { display: none; }
.slide-logo-inner { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 6vw, 80px); height: 100%; }
.slide-logo-img {
  height: 100%; max-height: 460px; width: auto; max-width: 48%; object-fit: contain;
  transform: scale(.94); transition: transform 1.4s ease;
}
.slide-logo.is-active .slide-logo-img { transform: scale(1); }
.slide-logo .hero-copy { max-width: 520px; margin: 0; }
.hero .slide-logo .eyebrow { color: var(--primary); }
@media (prefers-color-scheme: dark) { .hero .slide-logo .eyebrow { color: #2f6b4f; } }
.hero .slide-logo-title {
  font-size: clamp(2.8rem, 7vw, 5rem); color: #154f8d; text-shadow: none; margin-bottom: .35em;
}
.slide-logo .hero-actions { margin-top: 30px; }
@media (prefers-color-scheme: dark) { .slide-logo .btn { background: #2f6b4f; color: #fff; } }

/* Combined slide: the entrance sign across the top, fading into the logo slide below.
   The photo is never wider than 1280px; the sign ends at about 25% of its height. */
.combo-photo {
  position: absolute; top: 0; left: 50%; z-index: -2;
  width: min(100%, 1280px); height: auto; transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(to bottom, #000 27%, transparent 37%);
          mask-image: linear-gradient(to bottom, #000 27%, transparent 37%);
}
@media (min-width: 1281px) {
  /* Wider than the photo: soften its left and right edges into the white too */
  .combo-photo {
    -webkit-mask-image: linear-gradient(to bottom, #000 27%, transparent 37%), linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-composite: source-in;
            mask-image: linear-gradient(to bottom, #000 27%, transparent 37%), linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
            mask-composite: intersect;
  }
}
.slide-combo { padding-top: calc(min(100vw, 1280px) * .22); background: none; }
.slide-combo::before { content: ""; position: absolute; inset: 0; z-index: -3; background: #fff; }
.slide-combo .slide-logo-img { max-height: 100%; mix-blend-mode: multiply; } /* hide the logo's white box over the fade */

/* Dark arrows and dots while a white slide is showing */
.hero.on-light .hero-arrow { background: rgba(21, 79, 141, .1); color: #154f8d; }
.hero.on-light .hero-arrow:hover { background: rgba(21, 79, 141, .2); }
.hero.on-light .hero-dots button { background: rgba(21, 79, 141, .3); }
.hero.on-light .hero-dots button[aria-current="true"] { background: #154f8d; }
.hero-copy > * { opacity: 0; transform: translateY(14px); transition: opacity .8s ease .5s, transform .8s ease .5s; }
.slide.is-active .hero-copy > * { opacity: 1; transform: none; }
.hero .eyebrow { color: #a9dcc0; letter-spacing: .16em; }
.hero h1, .hero h2 {
  font-size: clamp(2.2rem, 5.2vw, 3.7rem); color: #fff; margin-bottom: .35em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.lead { font-size: 1.15rem; max-width: 36em; }
.hero .lead { color: rgba(255, 255, 255, .88); margin-inline: auto; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.9rem; line-height: 1;
  backdrop-filter: blur(6px); transition: background .2s;
}
.hero-arrow:hover { background: rgba(255, 255, 255, .28); }
.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }
.hero-controls {
  position: absolute; left: 0; right: 0; bottom: 100px; z-index: 2;
  display: flex; justify-content: center; align-items: center; gap: 14px;
}
.hero-dots { display: flex; gap: 8px; }
.hero-dots button {
  width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .45); transition: width .3s, background .3s;
}
.hero-dots button[aria-current="true"] { width: 28px; background: #fff; }
.hero-pause {
  border: 0; background: none; color: rgba(255, 255, 255, .75); cursor: pointer;
  font-size: .7rem; letter-spacing: -.1em; padding: 4px;
}
.hero-pause:hover { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .slide, .hero-bg, .hero-copy > * { transition: none !important; }
  .hero-bg { transform: none; }
}
.btn-light { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255, 255, 255, .24); }
@media (prefers-color-scheme: dark) { .btn-light { color: #fff; } }

.hero-stats {
  position: relative; z-index: 1; margin-top: -72px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow);
}
.stat strong { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--primary); }
.stat span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) {
  .slide { padding: 8px 0 34px; }
  .hero-arrow { display: none; }
  .hero-controls { bottom: 10px; }
  .hero .eyebrow { font-size: .62rem; margin-bottom: .4em; }
  .hero h1, .hero h2 { font-size: clamp(1.35rem, 6vw, 2rem); }
  .hero-actions { margin-top: 8px; }
  .hero .btn { padding: 8px 18px; font-size: .88rem; }
  .slide-logo { padding: 12px 0 34px; }
  .slide-combo { padding-top: calc(100vw * .22); }
  .slide-logo-inner { gap: 16px; }
  .slide-logo-img { max-width: 44%; }
  .hero .slide-logo-title { font-size: clamp(1.8rem, 9vw, 2.6rem); margin-bottom: .1em; }
  .slide-logo .hero-actions { margin-top: 14px; }
  .hero-stats { grid-template-columns: 1fr; margin-top: 16px; gap: 12px; }
  .stat { padding: 16px 20px; }
  .stat strong { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  .hero .slide-logo-title { font-size: 1.6rem; }
  .slide-logo .hero-actions { margin-top: 8px; }
}

/* ===== Gallery ===== */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; grid-auto-flow: dense; gap: 16px; }
.g-item { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--tint); cursor: zoom-in; }
.g-wide { grid-column: span 2; }
.g-tall { grid-row: span 2; }
.g-wide img { object-position: center 30%; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(8, 14, 11, .94); color: #fff;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; max-width: min(1400px, 92vw); text-align: center; }
.lightbox img { max-width: 100%; max-height: 82vh; margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { margin-top: 12px; font-weight: 500; opacity: .9; }
.lightbox button {
  position: absolute; border: 0; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, .12); border-radius: 50%;
  width: 48px; height: 48px; font-size: 1.8rem; line-height: 1;
}
.lightbox button:hover { background: rgba(255, 255, 255, .24); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-nav.prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) { .lightbox-nav { top: auto !important; bottom: 20px; transform: none !important; } }

/* Imam biography & book */
.imam-layout { display: grid; grid-template-columns: minmax(260px, 400px) 1fr; gap: 56px; align-items: start; }
.imam-photo { margin: 0; }
.imam-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.imam-photo figcaption { display: grid; margin-top: 14px; text-align: center; }
.imam-photo figcaption span { color: var(--muted); font-size: .9rem; }
.imam-bio h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.imam-bio > p { color: var(--muted); font-size: 1.04rem; }
.imam-quote {
  margin: 28px 0 0; padding: 20px 24px; border-left: 4px solid var(--gold);
  background: var(--tint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.imam-quote p { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.4; }
.imam-quote footer { color: var(--muted); font-size: .9rem; }

.book { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 40px; align-items: center; margin-top: 56px; padding: 32px; }
.book-cover { width: 100%; border-radius: var(--radius-sm); box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
.book-info h3 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 4px; }
.book-info h3 em { font-style: normal; }
.book-sub { color: var(--gold); font-weight: 600; font-size: .95rem; }
.book-info > p:not(.eyebrow):not(.book-sub) { color: var(--muted); }
.book-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 24px; }
.book-facts div { background: var(--tint); border-radius: var(--radius-sm); padding: 12px 14px; }
.book-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.book-facts dd { margin: 2px 0 0; font-weight: 600; font-size: .92rem; }
@media (max-width: 860px) {
  .imam-layout, .book { grid-template-columns: 1fr; gap: 28px; }
  .imam-photo { max-width: 360px; margin-inline: auto; }
  .book { padding: 22px; }
  .book-cover { max-width: 340px; margin-inline: auto; }
  .book-facts { grid-template-columns: 1fr; }
}

/* About intro with photo */
.about-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; margin-bottom: 40px; }
.about-intro .section-head { margin: 0; display: grid; gap: 14px; }
.about-intro .section-head h2 { margin: 0; }
.about-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .about-intro { grid-template-columns: 1fr; gap: 28px; } }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.g-item:hover img { transform: scale(1.04); }
.g-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 12px;
  color: #fff; font-weight: 600; font-size: .9rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; } }
@media (max-width: 900px) { .g-wide-sm { grid-column: span 2; } }
@media (max-width: 560px) { .g-tall { grid-row: span 1; } }
@media (max-width: 480px) { .gallery { grid-auto-rows: 160px; gap: 10px; } }

/* ===== Prayer times ===== */
.card.prayer-card { max-width: 640px; margin-inline: auto; padding: 40px 0 16px; }
.prayer-head { text-align: center; margin-bottom: 28px; padding-inline: 24px; }
.prayer-city {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 6px;
  font-family: var(--font); font-size: 1.9rem; font-weight: 700;
}
.prayer-date { color: var(--muted); margin: 0; }
.prayer-list { list-style: none; margin: 0; padding: 0; }
.prayer {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px;
  padding: 18px 40px 18px 12px;
}
.prayer-arrow { visibility: hidden; color: var(--muted); font-size: 1.4rem; text-align: center; }
.prayer-name { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.prayer-rel { font-style: italic; color: var(--muted); font-size: 1rem; }
.prayer-time {
  font-size: 2.4rem; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap;
}
.prayer-time small { font-size: .42em; font-weight: 600; letter-spacing: .04em; margin-left: .1em; }
.prayer-download {
  display: flex; align-items: center; gap: 16px;
  max-width: 640px; margin: 20px auto 0; padding: 18px 20px;
  background: var(--primary); color: #fff; text-decoration: none;
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: background .2s, transform .15s;
}
.prayer-download:hover { background: var(--primary-dark); transform: translateY(-2px); }
.prayer-download:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.prayer-download-icon {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: 14px; background: rgba(255, 255, 255, .16);
}
.prayer-download-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.prayer-download-text strong { font-size: 1.1rem; line-height: 1.3; }
.prayer-download-text small { font-size: .875rem; opacity: .85; }
.prayer-download-cta {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: #fff; color: var(--primary);
}
@media (prefers-color-scheme: dark) {
  .prayer-download { color: #0f1a14; }
  .prayer-download-icon { background: rgba(0, 0, 0, .12); }
  .prayer-download-cta { background: #0f1a14; }
}
@media (max-width: 480px) {
  .prayer-download { gap: 12px; padding: 16px; }
  .prayer-download-icon { width: 44px; height: 44px; }
  .prayer-download-text strong { font-size: 1rem; }
}
.prayer.next { background: var(--tint); }
.prayer.next .prayer-arrow { visibility: visible; }
.prayer.next .prayer-name { color: var(--gold); padding-left: 24px; }
.prayer.next .prayer-rel {
  font-style: normal; font-weight: 700; color: var(--text); font-size: 1.3rem;
  font-variant-numeric: tabular-nums; padding-left: 24px;
}
.prayer.next .prayer-time { color: var(--text); }
@media (max-width: 480px) {
  .prayer { padding-right: 20px; gap: 8px; }
  .prayer-name { font-size: 1.3rem; }
  .prayer-time { font-size: 1.9rem; }
  .prayer.next .prayer-name, .prayer.next .prayer-rel { padding-left: 8px; }
  .prayer.next .prayer-rel { font-size: 1.1rem; }
}

/* ===== Cards & grids ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px;
}
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.program-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--primary-soft);
  display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 18px;
}
.program p { color: var(--muted); margin: 0; }

/* ===== Forms ===== */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span, legend { font-size: .875rem; font-weight: 600; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.error { color: var(--danger); font-size: .8rem; min-height: 0; }
.error:empty { display: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

.check { display: flex; align-items: center; gap: 10px; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

.form-status { margin: 0; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.success { color: var(--primary); }
.form-status.fail { color: var(--danger); }
.fine-print { font-size: .8rem; color: var(--muted); margin: 0; text-align: center; }

/* Amount picker */
fieldset.amounts { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
legend { margin-bottom: 10px; padding: 0; }
.amount-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.amount-options label { cursor: pointer; position: relative; }
.amount-options input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.amount-options span {
  display: block; text-align: center; padding: 12px 0; font-weight: 600;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); transition: all .15s;
}
.amount-options input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.amount-options input:focus-visible + span { box-shadow: 0 0 0 4px var(--primary-soft); }

.input-icon { position: relative; }
.input-icon input { padding-right: 76px; }
.card-brand {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-soft); padding: 3px 8px; border-radius: 6px;
}
.card-brand:empty { display: none; }

/* ===== Donate layout ===== */
.donate-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.donate-side { display: grid; gap: 24px; }
@media (max-width: 900px) { .donate-layout { grid-template-columns: 1fr; } }

.goal-head { display: flex; justify-content: space-between; align-items: baseline; }
.goal-amount { font-size: 1.05rem; color: var(--muted); }
.goal-amount strong { font-family: var(--font-display); font-size: 2rem; color: var(--text); margin-right: 4px; }
.progress { height: 12px; background: var(--primary-soft); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--accent)));
  transition: width .8s cubic-bezier(.2, .8, .2, 1);
}
.goal-meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: .9rem; font-weight: 600; }

.donation-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.donation-list li {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.donation-list li:last-child { border-bottom: 0; }
.donation-list li.new { animation: flash 1.5s ease; }
@keyframes flash { from { background: var(--primary-soft); } to { background: transparent; } }
.avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem;
}
.donor { flex: 1; min-width: 0; }
.donor strong { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donor small { color: var(--muted); }
.donation-amt { font-weight: 700; color: var(--primary); }

/* ===== News ===== */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  padding: 7px 16px; border-radius: 999px; font: 500 .875rem var(--font); cursor: pointer;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.active { color: #0f1a14; } }

.news-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.news-thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; font-size: 3rem; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.news-meta { display: flex; gap: 10px; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.tag { background: var(--primary-soft); color: var(--primary); padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.news-body p { color: var(--muted); font-size: .95rem; }
.news-body .more { margin-top: auto; font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; font: 600 .95rem var(--font); color: var(--primary); cursor: pointer; text-align: left; }
.news-body .full { display: none; }
.news-card.expanded .full { display: block; }

/* ===== Calendar ===== */
.calendar-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .calendar-layout { grid-template-columns: 1fr; } }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.cal-head h3 { margin: 0; font-size: 1.2rem; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-weekdays span { text-align: center; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; padding-bottom: 6px; }
.cal-day {
  aspect-ratio: 1; border: 0; border-radius: var(--radius-sm); background: transparent;
  font: 500 .95rem var(--font); color: var(--text); cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.cal-day:hover { background: var(--primary-soft); }
.cal-day.other { color: var(--muted); opacity: .45; }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--primary); font-weight: 700; }
.cal-day.selected { background: var(--primary); color: #fff; }
@media (prefers-color-scheme: dark) { .cal-day.selected { color: #0f1a14; } }
.dots { display: flex; gap: 3px; height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal-day.selected .dot { background: currentColor; }

.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.event-item { display: flex; gap: 14px; padding: 14px; border-radius: var(--radius-sm); background: var(--tint); }
.event-date {
  flex: none; width: 52px; text-align: center; border-radius: 10px; background: var(--surface);
  padding: 6px 0; border: 1px solid var(--border);
}
.event-date small { display: block; font-size: .7rem; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.event-date strong { font-size: 1.3rem; line-height: 1; }
.event-item h4 { margin: 0 0 2px; font-size: .98rem; }
.event-item p { margin: 0; font-size: .85rem; color: var(--muted); }
.empty { color: var(--muted); font-size: .95rem; }

/* ===== Contact ===== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }
.map-wrap { padding: 0; overflow: hidden; }
.map-wrap iframe { width: 100%; height: 340px; border: 0; }
.contact-info { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.contact-info li { display: flex; gap: 12px; align-items: center; }
.contact-info a { color: var(--text); text-decoration: none; }
.contact-info a:hover { color: var(--primary); }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
