/* ============================================================
   Kali Mandir, Belabagan — Design Tokens
   Four selectable themes (html[data-theme="..."]): dark (default),
   dusk, marigold, sandstone. Every color used in the page is a
   token below — never hardcode a hex/rgba color elsewhere in this
   file, or it won't adapt when the theme switches.
   Type: Cormorant Garamond / Tiro Devanagari Hindi (display)
         Mukta (body, bilingual)
   Signature: diya (lamp) trail scroll-spy + toran arch dividers
   ============================================================ */

:root,
html[data-theme="dark"] {
  --bg: #0f0508;
  --bg-alt: #170a0d;
  --surface: #1f0c11;
  --surface-2: #2a0f16;
  --sindoor: #c8203f;
  --sindoor-deep: #7a0c1e;
  --gold: #c9a24b;
  --gold-bright: #eccd80;
  --ivory: #f3e9e1;
  --muted: #b79a94;
  --line: rgba(201, 162, 75, 0.22);
  --on-accent: #f3e9e1;

  /* RGB triplets (no rgba() wrapper) so overlays/scrims can use rgba(var(--x-rgb), alpha) */
  --bg-rgb: 15, 5, 8;
  --gold-rgb: 201, 162, 75;
  --gold-bright-rgb: 236, 205, 128;

  /* Decorative background embers (body::before) */
  --texture-1: rgba(200, 32, 63, 0.14);
  --texture-2: rgba(201, 162, 75, 0.10);

  --map-filter: grayscale(0.25) sepia(0.15) contrast(1.05);
}

html[data-theme="dusk"] {
  --bg: #2b1626;
  --bg-alt: #35192c;
  --surface: #3d1f34;
  --surface-2: #4a2540;
  --sindoor: #c22c52;
  --sindoor-deep: #96203e;
  --gold: #d4a955;
  --gold-bright: #f0cd7e;
  --ivory: #f7ece8;
  --muted: #c9a8bc;
  --line: rgba(212, 169, 85, 0.24);
  --on-accent: #f7ece8;

  --bg-rgb: 43, 22, 38;
  --gold-rgb: 212, 169, 85;
  --gold-bright-rgb: 240, 205, 126;

  --texture-1: rgba(194, 44, 82, 0.16);
  --texture-2: rgba(212, 169, 85, 0.12);

  --map-filter: grayscale(0.2) sepia(0.1) contrast(1.05);
}

html[data-theme="marigold"] {
  --bg: #fbf3e6;
  --bg-alt: #f5e7d2;
  --surface: #ffffff;
  --surface-2: #fbf0de;
  --sindoor: #b3122a;
  --sindoor-deep: #8a0e20;
  --gold: #8a5c18;
  --gold-bright: #9c6b1a;
  --ivory: #2a1410;
  --muted: #6b5647;
  --line: rgba(179, 18, 42, 0.18);
  --on-accent: #fbf3e6;

  --bg-rgb: 251, 243, 230;
  --gold-rgb: 138, 92, 24;
  --gold-bright-rgb: 156, 107, 26;

  --texture-1: rgba(179, 18, 42, 0.06);
  --texture-2: rgba(138, 92, 24, 0.07);

  --map-filter: none;
}

html[data-theme="sandstone"] {
  --bg: #f3e4c8;
  --bg-alt: #ead7b0;
  --surface: #fbf1de;
  --surface-2: #f5e5c4;
  --sindoor: #a8351e;
  --sindoor-deep: #7d2515;
  --gold: #71460e;
  --gold-bright: #7d5313;
  --ivory: #2e1b0e;
  --muted: #6b5638;
  --line: rgba(113, 70, 14, 0.28);
  --on-accent: #fbf1de;

  --bg-rgb: 243, 228, 200;
  --gold-rgb: 113, 70, 14;
  --gold-bright-rgb: 125, 83, 19;

  --texture-1: rgba(168, 53, 30, 0.07);
  --texture-2: rgba(113, 70, 14, 0.09);

  --map-filter: sepia(0.1) contrast(1.03);
}

html[data-theme="royal-purple"] {
  --bg: #180a2e;
  --bg-alt: #200f38;
  --surface: #291442;
  --surface-2: #331a52;
  --sindoor: #b82a4e;
  --sindoor-deep: #8f2039;
  --gold: #c9a24b;
  --gold-bright: #eccd80;
  --ivory: #f2e9f5;
  --muted: #b6a0c4;
  --line: rgba(201, 162, 75, 0.22);
  --on-accent: #f2e9f5;

  --bg-rgb: 24, 10, 46;
  --gold-rgb: 201, 162, 75;
  --gold-bright-rgb: 236, 205, 128;

  --texture-1: rgba(184, 42, 78, 0.16);
  --texture-2: rgba(201, 162, 75, 0.10);

  --map-filter: grayscale(0.15) sepia(0.05) contrast(1.05);
}

html[data-theme="lotus"] {
  --bg: #fdf1f3;
  --bg-alt: #f8e3e7;
  --surface: #ffffff;
  --surface-2: #fceef0;
  --sindoor: #c31e4a;
  --sindoor-deep: #96173a;
  --gold: #7a5814;
  --gold-bright: #8a6417;
  --ivory: #341520;
  --muted: #6b4d57;
  --line: rgba(195, 30, 74, 0.16);
  --on-accent: #fdf1f3;

  --bg-rgb: 253, 241, 243;
  --gold-rgb: 122, 88, 20;
  --gold-bright-rgb: 138, 100, 23;

  --texture-1: rgba(195, 30, 74, 0.06);
  --texture-2: rgba(122, 88, 20, 0.06);

  --map-filter: none;
}

:root {
  --font-display-en: "Cormorant Garamond", "Noto Serif Devanagari", serif;
  --font-display-hi: "Tiro Devanagari Hindi", "Cormorant Garamond", serif;
  --font-body: "Mukta", "Noto Sans", sans-serif;

  --nav-w: 88px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}

/* Background texture: faint radial embers (color/opacity per theme) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 700px 500px at 12% 8%, var(--texture-1), transparent 60%),
    radial-gradient(ellipse 600px 500px at 90% 85%, var(--texture-2), transparent 60%);
}

[lang-el] { display: none; }
html[data-lang="en"] [lang-el="en"] { display: revert; }
html[data-lang="hi"] [lang-el="hi"] { display: revert; }
html[data-lang="hi"] [lang-el="en"] { display: none; }
html[data-lang="en"] [lang-el="hi"] { display: none; }
html[data-lang="hi"] { --font-display-active: var(--font-display-hi); }
html[data-lang="en"] { --font-display-active: var(--font-display-en); }
html[data-lang="hi"] .display { font-family: var(--font-display-hi); }
html[data-lang="en"] .display { font-family: var(--font-display-en); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

h1, h2, h3 { font-family: var(--font-display-en); margin: 0; color: var(--ivory); }
html[data-lang="hi"] h1, html[data-lang="hi"] h2, html[data-lang="hi"] h3 { font-family: var(--font-display-hi); }

a { color: inherit; text-decoration: none; }

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

/* ---------- Layout shell ---------- */
.page { position: relative; z-index: 1; padding-right: var(--nav-w); }
@media (max-width: 860px) { .page { padding-right: 0; padding-bottom: 74px; } }

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 96px 32px;
  scroll-margin-top: 24px;
  position: relative;
}
@media (max-width: 640px) { .section { padding: 64px 20px; } }

/* Toran (temple-arch) divider used between sections */
.toran {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 56px;
  max-width: 1080px;
  padding: 0 32px;
  opacity: 0.85;
}
.toran svg { flex-shrink: 0; }
.toran svg path, .toran svg circle { stroke: var(--gold); }
.toran svg circle { fill: var(--sindoor); }
.toran .rule { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }

/* ---------- Header / Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  gap: 16px;
  background: linear-gradient(180deg, rgba(var(--bg-rgb),0.96), rgba(var(--bg-rgb),0.78));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar .brand svg path { fill: var(--gold); }
.topbar .brand svg path[stroke] { stroke: var(--gold); fill: none; }
.topbar .brand-text .title-hi { font-family: var(--font-display-hi); font-size: 1.15rem; color: var(--gold-bright); display: block; line-height: 1.1; }
.topbar .brand-text .title-en { font-family: var(--font-display-en); font-size: 0.92rem; color: var(--muted); letter-spacing: 0.03em; }
.topbar .controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

@media (max-width: 480px) {
  .topbar { padding: 14px 16px; gap: 8px; }
  .topbar .brand { gap: 8px; }
  .topbar .brand svg { width: 27px; height: 27px; flex-shrink: 0; }
  .topbar .brand-text .title-hi { font-size: 0.94rem; }
  .topbar .brand-text .title-en { font-size: 0.72rem; }
  .topbar .controls { gap: 6px; }
  .lang-toggle button { padding: 6px 11px; }
  .theme-switch .theme-btn { width: 29px; height: 29px; }
}

.lang-toggle {
  display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
  font-size: 0.78rem; letter-spacing: 0.04em;
}
.lang-toggle button {
  background: transparent; color: var(--muted); border: none; padding: 7px 16px; cursor: pointer;
  font-family: var(--font-body); transition: all .2s ease;
}
.lang-toggle button.active { background: var(--sindoor); color: var(--on-accent); }

/* Theme switcher: small swatch dots in a popover */
.theme-switch { position: relative; }
.theme-switch .theme-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: conic-gradient(from 45deg, var(--sindoor), var(--gold), var(--bg), var(--sindoor));
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.theme-switch .theme-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; display: none; gap: 8px; z-index: 60;
  box-shadow: 0 12px 30px rgba(var(--bg-rgb), 0.35);
  min-width: 176px;
}
.theme-switch.open .theme-menu { display: flex; flex-direction: column; }
.theme-switch .theme-option {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; padding: 7px 8px; border-radius: 6px;
  cursor: pointer; color: var(--ivory); font-family: var(--font-body); font-size: 0.82rem;
  text-align: left; white-space: nowrap;
}
.theme-switch .theme-option:hover { background: rgba(var(--gold-rgb), 0.12); }
.theme-switch .theme-option.active { color: var(--gold-bright); }
.theme-switch .swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); flex-shrink: 0; }

/* ---------- Right-side scroll-spy nav (signature diya trail) ---------- */
.diya-nav {
  position: fixed; top: 50%; right: 22px; transform: translateY(-50%);
  z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.diya-nav a {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
}
.diya-nav .flame {
  width: 9px; height: 9px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--muted); opacity: 0.55; transform: rotate(45deg);
  transition: all .3s ease;
}
.diya-nav a.active .flame {
  background: var(--gold-bright);
  box-shadow: 0 0 10px 2px rgba(var(--gold-bright-rgb), 0.7);
  opacity: 1;
}
.diya-nav .label {
  position: absolute; right: 26px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--gold-bright);
  background: var(--surface); border: 1px solid var(--line); padding: 5px 10px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.diya-nav a:hover .label { opacity: 1; }

@media (max-width: 860px) {
  .diya-nav {
    position: fixed; top: auto; bottom: 0; right: 0; left: 0; transform: none;
    flex-direction: row; justify-content: space-evenly; gap: 0;
    background: rgba(var(--bg-rgb), 0.97); border-top: 1px solid var(--line);
    padding: 12px 6px; backdrop-filter: blur(10px);
  }
  .diya-nav .label { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px 32px 60px;
  max-width: 1080px; margin: 0 auto;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -60px -32px;
  z-index: -1;
  /* Desktop: dark on the left (behind the text column), fading clear toward
     the right so the actual photo stays vivid rather than washed out — plus
     a light top clue of the photo before the title starts, darkening toward
     the text band, then fading to page bg at the bottom for a clean handoff
     into the slider strip below. */
  background-image:
    linear-gradient(100deg, rgba(var(--bg-rgb),0.93) 0%, rgba(var(--bg-rgb),0.72) 30%, rgba(var(--bg-rgb),0.28) 55%, rgba(var(--bg-rgb),0.06) 75%),
    linear-gradient(180deg, rgba(var(--bg-rgb),0.10) 0%, rgba(var(--bg-rgb),0.10) 60%, var(--bg) 100%),
    var(--hero-image, none);
  background-size: cover;
  background-position: center 30%;
}
@media (max-width: 760px) {
  /* Mobile: text spans the full width, so there's no "clear side" to leave
     the photo showing — use a top-to-bottom fade instead, still lighter at
     the very top (a glimpse of the photo above the eyebrow) than in the
     original all-over wash. */
  .hero::before {
    background-image:
      linear-gradient(180deg, rgba(var(--bg-rgb),0.18) 0%, rgba(var(--bg-rgb),0.80) 24%, rgba(var(--bg-rgb),0.88) 68%, var(--bg) 100%),
      var(--hero-image, none);
  }
}
.hero .eyebrow { margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.05;
  color: var(--ivory);
  max-width: 14ch;
}
.hero h1 .accent { color: var(--sindoor); font-style: italic; }
.hero p.sub { margin-top: 22px; max-width: 46ch; color: var(--muted); font-size: 1.05rem; }
.hero .cta-row { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 3px;
  font-family: var(--font-body); font-size: 0.92rem; letter-spacing: 0.03em; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: all .2s ease;
}
.btn-primary { background: var(--sindoor); color: var(--on-accent); }
.btn-primary:hover { background: var(--sindoor-deep); }
.btn-ghost { border-color: var(--line); color: var(--gold-bright); }
.btn-ghost:hover { border-color: var(--gold); background: rgba(var(--gold-rgb), 0.08); }

/* Auto slider strip, right to left */
.slider-strip {
  margin-top: 56px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.slider-track {
  display: flex; gap: 22px; width: max-content;
  animation: slide-rtl 28s linear infinite;
}
.slider-track .tile {
  width: 190px; height: 130px; border-radius: 4px; flex-shrink: 0;
  display: flex; align-items: flex-end; padding: 10px 12px;
  font-size: 0.72rem; color: var(--gold-bright); letter-spacing: 0.04em;
  border: 1px solid var(--line);
  background-size: cover; background-position: center;
}
.slider-track .tile span {
  background: rgba(var(--bg-rgb), 0.72);
  padding: 3px 8px;
  border-radius: 3px;
  backdrop-filter: blur(2px);
}
@keyframes slide-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .slider-track { animation: none; }
}

/* ---------- Section heading pattern ---------- */
.sec-head { margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-top: 8px; }
.sec-head p { color: var(--muted); margin-top: 10px; max-width: 60ch; }

/* ---------- Location ---------- */
.map-frame {
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  filter: var(--map-filter);
}
.map-frame iframe { width: 100%; height: 380px; border: 0; display: block; }
.addr-card {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  color: var(--muted); font-size: 0.95rem;
}
.addr-card .btn { padding: 10px 20px; font-size: 0.82rem; }
@media (max-width: 560px) { .addr-card .btn { margin-left: 0 !important; width: 100%; justify-content: center; } }

/* ---------- Visiting hours ---------- */
.hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 18px; }
.hours-card {
  border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 26px;
}
.hours-card .time { font-family: var(--font-display-en); font-size: 2.1rem; color: var(--gold-bright); margin-top: 6px; }
html[data-lang="hi"] .hours-card .time { font-family: var(--font-display-hi); }
.hours-card .note { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.hours-card.special { border-color: var(--sindoor); background: linear-gradient(135deg, var(--surface), var(--surface-2)); position: relative; }
.hours-card .badge {
  display: inline-block; background: var(--sindoor); color: var(--on-accent);
  font-size: 0.66rem; padding: 3px 10px; border-radius: 20px; letter-spacing: 0.05em;
  margin-top: 10px; text-transform: uppercase; font-weight: 600;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px;
}
.gallery-grid .g-item {
  aspect-ratio: 1/1; border-radius: 4px; border: 1px solid var(--line);
  display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  color: var(--muted); font-size: 0.75rem; text-align: center; padding: 10px;
  overflow: hidden;
  position: relative; cursor: pointer;
  transition: transform .2s ease;
}
.gallery-grid .g-item img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0; transition: opacity .35s ease;
}
.gallery-grid .g-item img.loaded { opacity: 1; }
.gallery-grid .g-item:hover { transform: scale(1.02); }
.gallery-grid .g-item .cap {
  position: relative; z-index: 1;
  background: rgba(var(--bg-rgb), 0.72);
  color: var(--gold-bright);
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  backdrop-filter: blur(2px);
  max-width: calc(100% - 12px);
}

/* ---------- Puja schedule timeline ---------- */
.timeline { border-left: 1px solid var(--line); margin-left: 8px; }
.timeline .t-item { position: relative; padding: 4px 0 34px 28px; }
.timeline .t-item::before {
  content: ""; position: absolute; left: -5.5px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--sindoor); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line);
}
.timeline .t-date { font-size: 0.78rem; letter-spacing: 0.06em; color: var(--gold); text-transform: uppercase; }
.timeline .t-title { font-family: var(--font-display-en); font-size: 1.3rem; margin-top: 4px; }
html[data-lang="hi"] .timeline .t-title { font-family: var(--font-display-hi); }
.timeline .t-desc { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }

/* ---------- Samagri lists (collapsible, tabular) ---------- */
.samagri-lists { display: flex; flex-direction: column; gap: 16px; }
.samagri-card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.samagri-card summary {
  cursor: pointer; padding: 20px 24px; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-family: var(--font-display-en); font-size: 1.25rem; color: var(--ivory);
}
html[data-lang="hi"] .samagri-card summary { font-family: var(--font-display-hi); }
.samagri-card summary::-webkit-details-marker { display: none; }
.samagri-card summary::marker { content: ""; }
.samagri-card summary .s-left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.samagri-card summary .count { font-family: var(--font-body); font-size: 0.78rem; color: var(--muted); font-weight: 400; }
.samagri-card summary .chev { transition: transform .2s ease; color: var(--gold); flex-shrink: 0; font-size: 0.85rem; }
.samagri-card[open] summary .chev { transform: rotate(90deg); }
.samagri-card .toolbar { display: flex; gap: 10px; padding: 0 24px 16px; flex-wrap: wrap; }
.samagri-card .toolbar button {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); color: var(--gold-bright);
  padding: 7px 14px; border-radius: 4px; font-size: 0.8rem; cursor: pointer; font-family: var(--font-body);
}
.samagri-card .toolbar button:hover { border-color: var(--gold); background: rgba(var(--gold-rgb), 0.08); }
.samagri-table-wrap { padding: 0 24px 24px; overflow-x: auto; }
table.samagri-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.samagri-table th { text-align: left; color: var(--gold); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.samagri-table td { padding: 10px; border-bottom: 1px dashed var(--line); color: var(--ivory); vertical-align: middle; }
table.samagri-table td.qty-col { color: var(--muted); white-space: nowrap; }
table.samagri-table td.check-col { width: 30px; }
table.samagri-table input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--sindoor); }
table.samagri-table tr.checked td { color: var(--muted); text-decoration: line-through; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 30px;
}
.contact-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: none; }
.contact-row .k { color: var(--gold); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.contact-row .v { margin-top: 3px; }

/* ---------- Donations ---------- */
.donate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 760px) { .donate-grid { grid-template-columns: 1fr; } }
.qr-box {
  border: 1px dashed var(--line); border-radius: 6px; padding: 26px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: var(--surface);
}
.qr-box svg { width: 150px; height: 150px; }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--line); padding: 40px 32px; text-align: center;
  color: var(--muted); font-size: 0.85rem;
}
footer.site-footer a.admin-link { color: var(--gold); }

/* ---------- Utility ---------- */
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.fade-in { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Lightbox (gallery photo popup) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center;
  background: rgba(var(--bg-rgb), 0.94); backdrop-filter: blur(4px);
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(90vw, 1000px); max-height: 80vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(var(--bg-rgb), 0.6); }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; background: none; border: none;
  color: var(--ivory); font-size: 2.2rem; line-height: 1; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(var(--bg-rgb), 0.5); border: 1px solid var(--line); color: var(--ivory);
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { border-color: var(--gold); color: var(--gold-bright); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-cap {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--gold-bright); background: rgba(var(--bg-rgb), 0.6); padding: 6px 18px;
  border-radius: 20px; font-size: 0.85rem; white-space: nowrap;
}
@media (max-width: 640px) {
  .lightbox { padding: 14px; }
  .lightbox-nav { width: 38px; height: 38px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ---------- Custodians (temple committee, in Contact Us) ---------- */
.custodians-head { margin-top: 40px; margin-bottom: 16px; }
.custodians-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; }
.custodian-card {
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  padding: 22px; display: flex; align-items: center; gap: 16px;
}
.custodian-card .photo, .custodian-card .photo-placeholder {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; background: var(--bg-alt);
}
.custodian-card .photo { object-fit: cover; border: 2px solid var(--gold); }
.custodian-card .photo-placeholder {
  border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.6rem;
}
.custodian-card .name { font-family: var(--font-display-en); font-size: 1.15rem; color: var(--ivory); }
html[data-lang="hi"] .custodian-card .name { font-family: var(--font-display-hi); }
.custodian-card .role { font-size: 0.82rem; color: var(--gold); margin-top: 3px; letter-spacing: 0.03em; }

/* ============================================================
   Admin panel (admin.html / admin.js only)
   ============================================================ */
body.admin-body { overflow-x: hidden; }

.admin-shell { max-width: 1180px; margin: 0 auto; padding: 0 28px 80px; }

.admin-login-screen {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 32px; gap: 22px;
}
.admin-login-screen .mark { opacity: 0.9; }
.admin-login-screen h1 { font-size: 1.9rem; }
.admin-login-screen p { color: var(--muted); max-width: 42ch; }
#googleSignInBtn { min-height: 42px; }
.back-to-site { font-size: 0.8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 6px 14px; transition: all .2s ease; }
.back-to-site:hover { color: var(--gold-bright); border-color: var(--gold); }
.admin-topbar .brand { display: flex; align-items: center; gap: 14px; }

.admin-topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(var(--bg-rgb),0.97), rgba(var(--bg-rgb),0.85)); backdrop-filter: blur(10px);
}
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--muted); }
.admin-user img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); }
.btn-signout { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 4px; padding: 7px 14px; font-size: 0.8rem; cursor: pointer; }
.btn-signout:hover { color: var(--ivory); border-color: var(--gold); }

.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 28px 0 30px; border-bottom: 1px solid var(--line); }
.admin-tab {
  background: none; border: none; color: var(--muted); padding: 12px 18px; font-family: var(--font-body);
  font-size: 0.88rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.admin-tab.active { color: var(--gold-bright); border-bottom-color: var(--sindoor); }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-card { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 24px; margin-bottom: 20px; }
.admin-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.admin-card .hint { color: var(--muted); font-size: 0.82rem; margin-bottom: 18px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); }
.field input[type="text"], .field input[type="time"], .field textarea, .field input[type="url"] {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 4px; color: var(--ivory);
  padding: 9px 12px; font-family: var(--font-body); font-size: 0.92rem;
}
.field textarea { resize: vertical; min-height: 60px; }

.repeat-item { border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin-bottom: 12px; position: relative; }
.repeat-item .remove-btn {
  position: absolute; top: 10px; right: 10px; background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.repeat-item .remove-btn:hover { color: var(--sindoor); }

.btn-add { border: 1px dashed var(--line); background: none; color: var(--gold-bright); border-radius: 4px; padding: 10px 16px; cursor: pointer; font-family: var(--font-body); font-size: 0.86rem; width: 100%; }
.btn-add:hover { border-color: var(--gold); background: rgba(var(--gold-rgb), 0.06); }

.btn-save { background: var(--sindoor); color: var(--on-accent); border: none; border-radius: 4px; padding: 12px 24px; font-family: var(--font-body); font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.btn-save:hover { background: var(--sindoor-deep); }
.save-bar { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.save-status { font-size: 0.82rem; color: var(--muted); opacity: 0; transition: opacity .3s ease; }
.save-status.show { opacity: 1; }

.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; margin-bottom: 16px; }
.upload-item { position: relative; aspect-ratio: 1/1; border-radius: 4px; border: 1px solid var(--line); overflow: hidden; background: var(--bg-alt); }
.upload-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-item .remove-btn { position: absolute; top: 6px; right: 6px; background: rgba(var(--bg-rgb), 0.75); border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--ivory); border: none; cursor: pointer; }
.upload-drop {
  border: 1px dashed var(--line); border-radius: 6px; padding: 26px; text-align: center; color: var(--muted);
  cursor: pointer; font-size: 0.88rem;
}
.upload-drop:hover { border-color: var(--gold); color: var(--gold-bright); }

.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { border: 1px solid var(--line); background: var(--bg-alt); border-radius: 6px; padding: 18px; }
.stat-card .num { font-family: var(--font-display-en); font-size: 2.2rem; color: var(--gold-bright); }
.stat-card .lbl { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.82rem; }
.bar-row .day { width: 90px; color: var(--muted); flex-shrink: 0; }
.bar-row .bar-track { flex: 1; background: var(--bg-alt); border-radius: 3px; overflow: hidden; height: 10px; }
.bar-row .bar-fill { height: 100%; background: linear-gradient(90deg, var(--sindoor), var(--gold)); }
.bar-row .count { width: 32px; text-align: right; color: var(--gold-bright); }

/* Analytics: location breakdown lists */
.geo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 20px; }
.geo-head { font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.geo-list { display: flex; flex-direction: column; gap: 2px; }
.geo-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.86rem; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.geo-row .name { color: var(--ivory); }
.geo-row .count { color: var(--gold-bright); font-weight: 600; flex-shrink: 0; }

/* Nested samagri-list editor: a list-of-lists, each with its own item rows */
.list-editor-card { border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin-bottom: 18px; background: var(--bg-alt); }
.list-editor-card .list-editor-head { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.list-editor-card .list-editor-head .field { flex: 1; }
.list-editor-card .remove-list-btn {
  background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 4px;
  padding: 9px 14px; cursor: pointer; font-size: 0.8rem; flex-shrink: 0; height: fit-content;
}
.list-editor-card .remove-list-btn:hover { color: var(--sindoor); border-color: var(--sindoor); }
.item-row { display: grid; grid-template-columns: 1fr 1fr 110px 32px; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 720px) { .item-row { grid-template-columns: 1fr; } }
.item-row input { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; color: var(--ivory); padding: 8px 10px; font-family: var(--font-body); font-size: 0.86rem; width: 100%; }
.item-row .remove-item-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; }
.item-row .remove-item-btn:hover { color: var(--sindoor); }
.item-row.header-row { color: var(--gold); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 4px; }
.btn-add-item { border: 1px dashed var(--line); background: none; color: var(--gold-bright); border-radius: 4px; padding: 8px 14px; cursor: pointer; font-family: var(--font-body); font-size: 0.82rem; margin-top: 4px; }
.btn-add-item:hover { border-color: var(--gold); }

/* Custodian (temple committee) editor: two fixed person cards */
.custodian-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .custodian-editor-grid { grid-template-columns: 1fr; } }
.custodian-editor-card { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: var(--bg-alt); }
.custodian-editor-card .upload-grid { grid-template-columns: 90px; margin-bottom: 12px; }
