/* ==========================================================================
   Kizhakke Pilla Veedu Sree Bhagavathi Temple
   Premium White & Gold Theme
   ========================================================================== */

:root {
  --color-bg: #fffdf7;
  --color-bg-alt: #fff8e7;
  --color-surface: #ffffff;
  --color-text: #1a1a2e;
  --color-text-soft: #4a4a5e;
  --color-text-muted: #7a7a8c;
  --color-gold: #c9a227;
  --color-gold-deep: #a8841b;
  --color-gold-light: #f3d97a;
  --color-gold-soft: #fbeec1;
  --color-border: #ece4c8;
  --color-shadow: rgba(120, 90, 0, 0.08);
  --color-shadow-strong: rgba(120, 90, 0, 0.16);

  --font-en: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-en-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ml: 'Noto Serif Malayalam', 'Manjari', serif;
  --font-ml-body: 'Noto Sans Malayalam', 'Manjari', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px var(--color-shadow);
  --shadow-md: 0 8px 24px var(--color-shadow);
  --shadow-lg: 0 20px 60px var(--color-shadow-strong);

  --container: 1200px;
  --header-h: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
  overscroll-behavior-x: none;
}

body {
  font-family: var(--font-en-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
  overscroll-behavior-x: none;
  /* Page entry animation: fade + de-blur (no transform/filter at end — they create containing blocks that break position:fixed) */
  animation: pageEnter 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: scale(1.01);
  }
  to {
    opacity: 1;
    /* filter & transform deliberately omitted so they revert to none → fixed/sticky descendants work correctly */
  }
}

/* Scroll-reveal — sections fade + de-blur as they enter viewport */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform, filter;
}

.reveal { transform: translateY(36px); }
.reveal-left { transform: translateX(-80px); }
.reveal-right { transform: translateX(80px); }

.reveal.in-view,
.reveal-left.in-view,
.reveal-right.in-view {
  opacity: 1;
  transform: translate(0, 0);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  .reveal, .reveal-left, .reveal-right {
    opacity: 1; transform: none; filter: none; transition: none;
  }
}

body[data-lang="ml"] { font-family: var(--font-ml-body); }
body[data-lang="ml"] h1,
body[data-lang="ml"] h2,
body[data-lang="ml"] h3,
body[data-lang="ml"] h4 { font-family: var(--font-ml); }

h1, h2, h3, h4 {
  font-family: var(--font-en);
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== Header ===================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  height: var(--header-h);
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--color-border);
}

/* Transparent state over DARK hero (slide 1, video) — light text/icons */
.site-header:not(.scrolled):not(.over-light) .brand-name { color: #fff; }
.site-header:not(.scrolled):not(.over-light) .brand-sub { color: rgba(255, 255, 255, 0.65); }
.site-header:not(.scrolled):not(.over-light) .nav-link { color: rgba(255, 255, 255, 0.88); }
.site-header:not(.scrolled):not(.over-light) .nav-link:hover,
.site-header:not(.scrolled):not(.over-light) .nav-link.active {
  color: var(--color-gold-light);
  background: rgba(255, 255, 255, 0.12);
}
.site-header:not(.scrolled):not(.over-light) .lang-switch {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}
.site-header:not(.scrolled):not(.over-light) .lang-btn { color: rgba(255, 255, 255, 0.75); }
.site-header:not(.scrolled):not(.over-light) .lang-btn.active { color: #fff; }
.site-header:not(.scrolled):not(.over-light) .menu-toggle { color: #fff; }
.site-header:not(.scrolled):not(.over-light) .brand-mark {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
}
/* Login pill over dark hero — translucent white pill, white text */
.site-header:not(.scrolled):not(.over-light) .nav-cta-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.site-header:not(.scrolled):not(.over-light) .nav-cta-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

/* Over-light state — transparent header but dark text/icons (slide 2, light image) */
.site-header.over-light { background: transparent; border-bottom-color: transparent; }
.site-header.over-light .brand-name { color: var(--color-text); }
.site-header.over-light .brand-sub { color: var(--color-text-muted); }
.site-header.over-light .nav-link { color: var(--color-text-soft); }
.site-header.over-light .nav-link:hover,
.site-header.over-light .nav-link.active {
  color: var(--color-gold-deep);
  background: var(--color-gold-soft);
}
.site-header.over-light .lang-switch {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--color-border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.site-header.over-light .lang-btn { color: var(--color-text-muted); }
.site-header.over-light .lang-btn.active { color: var(--color-gold-deep); background: #fff; }
.site-header.over-light .menu-toggle { color: var(--color-text); }
.site-header.over-light .nav-cta-ghost {
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-text);
  border-color: var(--color-border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.site-header.over-light .nav-cta-ghost:hover {
  border-color: var(--color-gold);
  color: var(--color-gold-deep);
}

/* Body offset — pages without hero need padding so content isn't hidden under fixed header */
body { padding-top: var(--header-h); }
body.has-hero { padding-top: 0; }

/* Freeze page scroll when any modal is open */
body.modal-open { overflow: hidden; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-deep));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-family: var(--font-en);
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-en);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 10px 16px;
  font-size: 0.92rem;
  color: var(--color-text-soft);
  border-radius: var(--radius-pill);
  transition: color 0.2s, background 0.2s;
  font-weight: 500;
  white-space: nowrap;
}

body[data-lang="ml"] .nav-link { font-size: 0.88rem; }

.nav-link:hover { color: var(--color-gold-deep); background: var(--color-gold-soft); }
.nav-link.active { color: var(--color-gold-deep); background: var(--color-gold-soft); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 3px;
  background: var(--color-surface);
}

.lang-btn {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  transition: all 0.2s;
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-deep));
  color: #fff;
  box-shadow: 0 2px 6px rgba(201, 162, 39, 0.3);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.menu-toggle svg { width: 24px; height: 24px; }

/* ===================== Hero (Full-width 16:9 video banner, sticky scroll reveal) ===================== */
.hero {
  position: sticky;
  top: 0;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 560px;
  max-height: 92vh;
  display: block;
  overflow: hidden;
  /* Themed gradient fallback (used while video loads or if autoplay is blocked) */
  background: linear-gradient(160deg, #1a1426 0%, #2a1f3a 45%, #1d1a14 100%);
  padding: 0;
}

/* Scroll-driven scale + fade effect on hero contents */
.hero-slides {
  transform: scale(calc(1 - var(--hero-scroll, 0) * 0.06));
  transform-origin: center;
  filter: brightness(calc(1 - var(--hero-scroll, 0) * 0.4));
  transition: none;
  will-change: transform, filter;
}

/* Content below sits above the sticky hero so it covers it as user scrolls */
body.has-hero .quick-info-wrap,
body.has-hero .section,
body.has-hero .site-footer {
  position: relative;
  z-index: 2;
}

body.has-hero .section { background: var(--color-bg); }
body.has-hero .section.section-alt { background: var(--color-bg-alt); }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg video,
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 8, 16, 0.82) 0%, rgba(10, 8, 16, 0.6) 32%, rgba(10, 8, 16, 0.2) 60%, transparent 80%),
    linear-gradient(180deg, rgba(10, 8, 16, 0.45) 0%, transparent 25%, transparent 75%, rgba(10, 8, 16, 0.5) 100%);
}

.hero-content {
  max-width: 620px;
  color: #fff;
  text-align: left;
}

.hero-actions { justify-content: flex-start; }

/* ===================== Hero Slider ===================== */
.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Slide 1 — push content toward bottom */
.hero-slide[data-slide="0"] {
  display: flex;
  align-items: flex-end;
}

.hero-slide[data-slide="0"] > .container {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: 110px;
}

/* Slide 2 — Family Veedu */
.hero-slide-2 {
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
}

.hero-slide-2-text {
  display: flex;
  flex-direction: column;
  padding-left: max(48px, calc((100vw - 1200px) / 2 + 24px));
  padding-right: 40px;
  padding-top: 100px;
  padding-bottom: 60px;
}

.hero-slide-2 .eyebrow-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--color-gold-soft);
  color: var(--color-gold-deep);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 22px;
  align-self: flex-start;
}
.hero-slide-2 .eyebrow-light::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
}

.hero-slide-2 h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  color: var(--color-text);
}

.hero-slide-2 h1 .highlight {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-slide-2 .lead {
  font-size: 1.1rem;
  color: var(--color-text-soft);
  max-width: 480px;
  margin-bottom: 30px;
}

.hero-slide-2-image {
  height: 100%;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-slide-2-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
}

/* Slider dots */
.hero-dots {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}

.hero-dot:hover { background: rgba(255, 255, 255, 0.65); }
.hero-dot.active {
  background: var(--color-gold-light);
  width: 30px;
  border-radius: 5px;
}

.hero-dots.on-light .hero-dot { background: rgba(0, 0, 0, 0.18); }
.hero-dots.on-light .hero-dot:hover { background: rgba(0, 0, 0, 0.35); }
.hero-dots.on-light .hero-dot.active { background: var(--color-gold-deep); }

@media (max-width: 860px) {
  .hero-slide-2 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    background: var(--color-bg);
  }
  .hero-slide-2-image {
    order: 1;
    min-height: 50vh;
    background: var(--color-bg);
  }
  .hero-slide-2-text {
    order: 2;
    padding: 18px 24px 24px;
    text-align: center;
    align-items: center;
  }
  .hero-slide-2-image img { object-position: center; }
  .hero-slide-2 h1 { margin-bottom: 14px; font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .hero-slide-2 .lead { margin-bottom: 16px; font-size: 0.95rem; }
  .hero-slide-2 .eyebrow-light { margin-bottom: 14px; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold-light);
  box-shadow: 0 0 10px var(--color-gold);
}

.hero-title {
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
  line-height: 1.15;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--color-gold-light), #ffe9a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 28px;
  max-width: 460px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
  line-height: 1.55;
}

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

.hero .btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--color-gold-light);
  color: #fff;
}

@media (max-width: 720px) {
  .hero {
    aspect-ratio: auto;
    min-height: 92vh;
  }
  .hero-bg::after {
    background:
      linear-gradient(180deg, rgba(10, 8, 16, 0.2) 0%, rgba(10, 8, 16, 0.45) 55%, rgba(10, 8, 16, 0.9) 100%);
  }
  .hero-content { padding: 0; }
  .hero-slide[data-slide="0"] > .container { padding-bottom: 90px; }
}

/* ===================== Quick Info Card ===================== */
.quick-info-wrap {
  position: relative;
  z-index: 5;
  margin-top: -70px;
  padding: 0 24px;
}

.quick-info {
  max-width: 1320px;
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  overflow: hidden;
}

.qi-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-right: 1px solid var(--color-border);
  transition: background 0.25s;
}

.qi-cell:last-child { border-right: none; }
.qi-cell:hover { background: var(--color-bg-alt); }

.qi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-gold-soft), var(--color-gold-light));
  color: var(--color-gold-deep);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.qi-icon svg { width: 18px; height: 18px; }

.qi-text { display: flex; flex-direction: column; min-width: 0; }
.qi-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 2px;
  font-weight: 600;
}
.qi-value {
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.35;
}

@media (max-width: 860px) {
  .quick-info { grid-template-columns: 1fr; }
  .qi-cell { border-right: none; border-bottom: 1px solid var(--color-border); }
  .qi-cell:last-child { border-bottom: none; }
  .quick-info-wrap { margin-top: -40px; }
}

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.25s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-deep));
  color: #fff;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.35);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(201, 162, 39, 0.45); }

.btn-ghost {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-ghost:hover { border-color: var(--color-gold); color: var(--color-gold-deep); }

.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ===================== Section ===================== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-alt { background: var(--color-bg-alt); }

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

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-gold-deep);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 16px;
}

.section-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 auto 20px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold));
}

.section-divider::after { background: linear-gradient(90deg, var(--color-gold), transparent); }

.section-divider svg { width: 18px; height: 18px; color: var(--color-gold); }

.section-lead {
  font-size: 1.05rem;
  color: var(--color-text-soft);
  max-width: 720px;
  margin: 0 auto;
}

/* ===================== Cards ===================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-gold-light);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-gold-soft), var(--color-gold-light));
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--color-gold-deep);
}

.card-icon svg { width: 28px; height: 28px; }

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card-text {
  color: var(--color-text-soft);
  font-size: 0.95rem;
}

/* ===================== Introduction (image + text card) ===================== */
.intro-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.3fr;
  gap: 48px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
}

.intro-image {
  position: relative;
  align-self: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
  max-height: 70vh;
  background: var(--color-bg-alt);
}

.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intro-image-frame {
  position: absolute;
  inset: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  pointer-events: none;
  z-index: 2;
}

.intro-text { padding-top: 4px; }

.intro-text .section-eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  letter-spacing: -0.005em;
  text-transform: none;
  font-family: var(--font-en);
  font-weight: 600;
  color: var(--color-gold-deep);
  line-height: 1.15;
}

body[data-lang="ml"] .intro-text .section-eyebrow {
  font-family: var(--font-ml);
}

.intro-text p {
  color: var(--color-text-soft);
  line-height: 1.7;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

body[data-lang="ml"] .intro-text p {
  font-family: var(--font-ml-body);
  line-height: 1.85;
  font-size: 0.95rem;
}

.intro-closing {
  margin-top: 18px;
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: right;
}

.intro-signature {
  margin-top: 4px;
  text-align: right;
  font-size: 0.88rem;
  color: var(--color-text-soft);
  line-height: 1.55;
}

.intro-signature strong {
  display: block;
  color: var(--color-gold-deep);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 2px;
  font-style: normal;
}

#introduction.section { padding: 70px 0; }

@media (max-width: 760px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .intro-image {
    max-width: 320px;
    margin: 0 auto;
    position: static;
    top: auto;
    align-self: auto;
  }
  .intro-text { text-align: left; }
}

/* Dedication — mirror of intro (text left, image right) */
.dedication-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  gap: 48px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .dedication-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .dedication-grid .intro-image {
    max-width: 320px;
    margin: 0 auto;
    order: -1;
  }
}

#dedication.section { padding: 70px 0; }
#history.section { padding: 70px 0; }

/* ===================== Family Tree ===================== */
.family-tree-wrap {
  margin: 56px 0 0;
  padding: 50px 30px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.family-tree-title-wrap { text-align: center; }

.family-tree-title {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-gold-deep);
  margin: 0 0 50px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--color-gold-light);
  text-transform: uppercase;
}

body[data-lang="ml"] .family-tree-title {
  font-family: var(--font-ml);
  text-transform: none;
  letter-spacing: 0;
}

/* ===================== Family Tree (row-grid layout) ===================== */
.ftree {
  text-align: center;
  display: block;
  min-width: 100%;
}

.ftree-row {
  position: relative;
  padding-top: 56px;
  text-align: center;
}

.ftree-row.first { padding-top: 0; }

.ftree-row-inner {
  display: inline-flex;
  gap: 12px;
  position: relative;
  vertical-align: top;
}

/* Horizontal line above non-first rows, spanning from first card center to last card center */
.ftree-row:not(.first) .ftree-row-inner::before {
  content: '';
  position: absolute;
  top: -28px;
  left: 55px;
  right: 55px;
  height: 1.5px;
  background: var(--color-gold);
}

/* Vertical line going UP from horizontal line to the row above */
.ftree-row:not(.first) .ftree-row-inner::after {
  content: '';
  position: absolute;
  top: -56px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 28px;
  background: var(--color-gold);
}

/* Vertical line from each card going UP to the horizontal line */
.ftree-row:not(.first) .ftree-card::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 28px;
  background: var(--color-gold);
}

.ftree-card {
  width: 110px;
  background: var(--color-surface);
  border: 1.25px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.25s;
}

.ftree-card:hover {
  border-color: var(--color-gold);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.22);
  transform: translateY(-2px);
}

.ftree-card.placeholder {
  background: var(--color-bg-alt);
  border-style: dashed;
  color: var(--color-text-muted);
  opacity: 0.85;
}

.ftree-card.placeholder:hover {
  border-style: dashed;
}

/* Clickable card hint */
.ftree-card.clickable {
  cursor: pointer;
  position: relative;
}
.ftree-card.clickable::after {
  content: '+';
  position: absolute;
  top: 4px;
  right: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-gold);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.ftree-card.clickable:hover {
  border-color: var(--color-gold-deep);
  box-shadow: 0 6px 18px rgba(201, 162, 39, 0.32);
  transform: translateY(-3px);
}

/* ===================== Sub-tree (inside modal) ===================== */
.subtree {
  text-align: center;
  padding: 8px 0;
}

.subtree-head {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.subtree-couple {
  display: inline-flex;
  gap: 24px;
  align-items: center;
  position: relative;
}

.subtree-couple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(50% - 12px);
  width: 24px;
  height: 1.5px;
  background: var(--color-gold);
}

.subtree-children-label {
  display: inline-block;
  margin: 18px 0 14px;
  padding: 4px 14px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  font-weight: 700;
  border-top: 1px solid var(--color-gold-light);
  border-bottom: 1px solid var(--color-gold-light);
}

.subtree-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
  justify-items: stretch;
}

.subtree-grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.subtree-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Cards inside the sub-tree fill their grid cell instead of staying at 110px */
.subtree .ftree-card { width: auto; min-width: 0; }
.subtree-couple .ftree-card { width: 150px; }

@media (max-width: 720px) {
  .subtree-grid,
  .subtree-grid.cols-6,
  .subtree-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .subtree-couple { flex-direction: column; gap: 10px; }
  .subtree-couple::before { display: none; }
}

.ftree-photo {
  width: 42px;
  height: 42px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 1.5px solid var(--color-gold-light);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ftree-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ftree-photo.empty {
  background: repeating-linear-gradient(45deg, var(--color-bg-alt) 0 4px, var(--color-bg) 4px 8px);
  font-size: 0.45rem;
  color: var(--color-text-muted);
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-style: italic;
  padding: 3px;
  line-height: 1.05;
}

.ftree-card .dash {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 1;
}

.ftree-card .ftree-code {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--color-gold-deep);
  font-weight: 700;
  margin-bottom: 2px;
}

.ftree-card .ftree-name {
  font-size: 0.74rem;
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.3;
}

.ftree-card .ftree-sub {
  font-size: 0.58rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 3px;
  line-height: 1.25;
  font-weight: 500;
}

.ftree-note {
  margin-top: 50px;
  padding: 22px 28px;
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-gold);
  border-radius: 8px;
  text-align: left;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.ftree-note p {
  color: var(--color-text-soft);
  font-size: 0.95rem;
  line-height: 1.85;
  margin: 0;
}

body[data-lang="ml"] .ftree-note p {
  font-family: var(--font-ml-body);
  line-height: 2;
}

/* Large modal for long-form content — uses .modal.modal-lg for higher specificity than .modal alone */
.modal.modal-lg {
  max-width: 880px;
  padding: 0;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: auto;
}

.modal.modal-lg .modal-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-surface);
  margin: 0;
  padding: 22px 36px;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.modal.modal-lg .modal-close {
  background: var(--color-bg-alt);
  border-radius: 50%;
  flex-shrink: 0;
}

.modal.modal-lg .modal-close:hover {
  background: var(--color-gold-soft);
  color: var(--color-gold-deep);
}

.history-modal-content {
  padding: 28px 36px 36px;
  font-size: 0.95rem;
  color: var(--color-text-soft);
  line-height: 1.85;
}

@media (max-width: 720px) {
  .modal.modal-lg .modal-head { padding: 18px 22px; }
  .history-modal-content { padding: 22px 22px 28px; }
}

.history-modal-content h3 {
  font-family: var(--font-en);
  margin-top: 32px;
  margin-bottom: 14px;
  color: var(--color-gold-deep);
  font-size: 1.25rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-gold-light);
  letter-spacing: -0.005em;
}

body[data-lang="ml"] .history-modal-content h3 {
  font-family: var(--font-ml);
}

.history-modal-content h3:first-child { margin-top: 4px; }

.history-modal-content p {
  margin-bottom: 14px;
}

body[data-lang="ml"] .history-modal-content p {
  font-family: var(--font-ml-body);
  line-height: 2;
}

.history-modal-content .signature-block {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px dashed var(--color-border);
  text-align: right;
  font-size: 0.92rem;
  color: var(--color-text-soft);
}

.history-modal-content .signature-block strong {
  display: block;
  color: var(--color-gold-deep);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Scrollbar styling for modal */
.modal::-webkit-scrollbar { width: 8px; }
.modal::-webkit-scrollbar-track { background: var(--color-bg-alt); border-radius: 4px; }
.modal::-webkit-scrollbar-thumb { background: var(--color-gold-light); border-radius: 4px; }
.modal::-webkit-scrollbar-thumb:hover { background: var(--color-gold); }

/* ===================== Page Hero (subpages) ===================== */
.page-hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-gold-soft), var(--color-bg));
  position: relative;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.page-hero p {
  color: var(--color-text-soft);
  max-width: 640px;
  margin: 0 auto;
}

/* ===================== Booking / Vazhipadu ===================== */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.puja-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.puja-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-gold-light), var(--color-gold), var(--color-gold-deep));
}

.puja-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-gold-light);
}

.puja-name {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--color-text);
}

.puja-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 18px;
  flex: 1;
}

.puja-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 18px;
}

.puja-price .amt {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-gold-deep);
  font-family: var(--font-en);
}

.puja-price .cur { font-size: 0.9rem; color: var(--color-text-muted); }

/* ===================== Forms ===================== */
.form {
  background: var(--color-surface);
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.form-row.cols-2 { grid-template-columns: 1fr 1fr; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-soft);
  letter-spacing: 0.02em;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}

.form-field textarea { min-height: 100px; resize: vertical; }

/* ===================== Modal ===================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 10, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-backdrop.open { display: flex; animation: fadeIn 0.2s ease; }

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 540px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.modal-title { font-size: 1.4rem; }
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--color-text-muted);
  transition: background 0.2s;
}
.modal-close:hover { background: var(--color-bg-alt); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===================== Festival Cards ===================== */
.festival-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}

.festival-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.festival-banner {
  height: 160px;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  position: relative;
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
}

.festival-banner svg { width: 56px; height: 56px; opacity: 0.9; }

/* Festival card with a real image as background */
.festival-banner.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--color-bg-alt);
}
.festival-banner.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}
.festival-banner.has-image .festival-date {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.festival-date {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255,255,255,0.92);
  color: var(--color-gold-deep);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.festival-body {
  padding: 22px 24px 24px;
  flex: 1;
}

.festival-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.festival-desc {
  color: var(--color-text-soft);
  font-size: 0.92rem;
}

/* ===================== Timings Table ===================== */
.timings-wrap {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.timings-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.2s;
}

.timings-row:last-child { border-bottom: none; }
.timings-row:hover { background: var(--color-bg-alt); }

.timings-row.head {
  background: var(--color-gold-soft);
  color: var(--color-gold-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timings-row.head:hover { background: var(--color-gold-soft); }

.timings-day {
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.timings-day .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
}

.timings-time {
  color: var(--color-text-soft);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.timings-time.closed { color: #b04444; font-style: italic; }

/* ===================== Admin ===================== */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--header-h));
}

.admin-sidebar {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 32px 16px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--color-text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.admin-nav-link svg { width: 18px; height: 18px; }
.admin-nav-link:hover { background: var(--color-bg-alt); color: var(--color-text); }
.admin-nav-link.active {
  background: linear-gradient(135deg, var(--color-gold-soft), var(--color-gold-light));
  color: var(--color-gold-deep);
  font-weight: 600;
}

.admin-main {
  padding: 40px;
  background: var(--color-bg);
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-head h2 { font-size: 1.6rem; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--color-surface);
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-en);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text);
}

.stat-value.gold { color: var(--color-gold-deep); }

.data-table {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.data-table th {
  background: var(--color-bg-alt);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--color-bg-alt); }

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tag.pending { background: #fff3cd; color: #856404; }
.tag.confirmed { background: #d4edda; color: #155724; }
.tag.cancelled { background: #f8d7da; color: #721c24; }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: var(--color-text-muted);
  transition: all 0.2s;
}
.icon-btn:hover { background: var(--color-bg-alt); color: var(--color-gold-deep); }
.icon-btn.danger:hover { background: #fde2e2; color: #b91c1c; }
.icon-btn svg { width: 16px; height: 16px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
}
.empty-state svg { width: 56px; height: 56px; margin: 0 auto 16px; opacity: 0.4; }

.login-box {
  max-width: 420px;
  margin: 80px auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.login-box .lock {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-deep));
  color: #fff;
  display: grid;
  place-items: center;
}

.login-box h2 { margin-bottom: 8px; }
.login-box .hint { color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 24px; }

/* ===================== Scroll-to-top button ===================== */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-deep));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  cursor: pointer;
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, box-shadow 0.25s;
  border: none;
  padding: 0;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-top-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 32px rgba(201, 162, 39, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.scroll-top-btn:active { transform: translateY(0) scale(0.96); }

.scroll-top-btn svg { width: 22px; height: 22px; }

@media (max-width: 720px) {
  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
  .scroll-top-btn svg { width: 18px; height: 18px; }
}

/* ===================== Toast ===================== */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--color-text);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.92rem;
  font-weight: 500;
  z-index: 300;
  transform: translateY(120%);
  transition: transform 0.3s ease;
}
.toast.show { transform: translateY(0); }
.toast.success { background: #2d6a4f; }
.toast.error { background: #b91c1c; }

/* ===================== Footer ===================== */
.site-footer {
  background: linear-gradient(135deg, #1a1a2e, #2a2440);
  color: #d3cfb8;
  padding: 90px 0 30px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.site-footer h4 {
  color: var(--color-gold-light);
  margin-bottom: 16px;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; font-size: 0.92rem; }
.site-footer a { color: #d3cfb8; transition: color 0.2s; }
.site-footer a:hover { color: var(--color-gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #9b9580;
}

/* ===================== Responsive ===================== */
/* Hamburger toggle in the admin header — hidden on desktop, shown on tablet/mobile */
.admin-header .admin-menu-toggle { display: none; }

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Admin on tablet/mobile — sidebar becomes a slide-in drawer from the right */
  .admin-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    position: relative;
  }
  .admin-sidebar {
    display: block;
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: auto;
    width: 280px;
    max-width: 85vw;
    background: var(--color-surface);
    padding: 20px 14px;
    z-index: 95;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    border-left: 1px solid var(--color-border);
    border-right: none;
    border-bottom: none;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.18);
  }
  .admin-shell.drawer-open .admin-sidebar { transform: translateX(0); }
  .admin-shell.drawer-open::before {
    content: '';
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 94;
    animation: fadeIn 0.2s ease;
  }
  .admin-nav { flex-direction: column; gap: 4px; overflow: visible; }
  .admin-nav-link {
    width: 100%;
    flex-shrink: 0;
    padding: 13px 14px;
    font-size: 0.95rem;
    margin-top: 0 !important;
  }
  .admin-nav-link svg { width: 18px; height: 18px; }
  .admin-main { padding: 22px 16px; min-width: 0; }
  .admin-header .admin-menu-toggle { display: grid; }
}

.admin-mobile-nav-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.admin-tab-select-wrap {
  position: relative;
}

.admin-tab-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-gold-deep);
  border-bottom: 2px solid var(--color-gold-deep);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.admin-tab-select {
  width: 100%;
  padding: 13px 44px 13px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-alt);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-gold-deep);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-tab-select:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px var(--color-gold-soft);
}

/* Stack admin tables as label/value cards on tablet/mobile — no horizontal scroll */
@media (max-width: 720px) {
  .data-table {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    display: block;
    padding: 0;
  }
  .data-table table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
  }
  .data-table thead { display: none; }
  .data-table tbody { display: block; }
  .data-table tbody tr {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
  }
  .booking-row:hover { background: var(--color-surface); }
  /* Each TD: label on the left (absolute), value flows naturally on the right */
  .data-table tbody td {
    display: block;
    position: relative;
    padding: 8px 0 8px 110px;
    border: none;
    border-top: 1px dashed var(--color-border);
    text-align: right;
    min-height: 30px;
    font-size: 0.9rem;
    word-break: break-word;
  }
  .data-table tbody tr > td:first-child { border-top: none; }
  .data-table tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 10px;
    width: 100px;
    color: var(--color-text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
  }
  /* Cells whose data-label is empty (action buttons) — full width, right aligned */
  .data-table tbody td[data-label=""] {
    padding-left: 0;
    text-align: right;
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
    margin-top: 2px;
  }
  .data-table tbody td[data-label=""]::before { display: none; }
  /* Hide low-priority columns on mobile — full info is in the row-detail modal anyway */
  .data-table tbody td[data-label="#"],
  .data-table tbody td[data-label="Phone"],
  .data-table tbody td[data-label="Payment"] { display: none; }

  /* Bookings — collapsible card. By default show only Receipt + Devotee + chevron toggle.
     Clicking the chevron adds .expanded which reveals the rest. */
  .booking-row { position: relative; }
  .booking-row .td-toggle {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent;
    width: auto;
  }
  .booking-row .td-toggle::before { display: none; }
  .btn-expand {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    padding: 0;
    width: 32px;
    height: 32px;
    color: var(--color-gold-deep);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 0.25s ease, background 0.2s;
  }
  .btn-expand:hover { background: var(--color-gold-soft); }
  .booking-row.expanded .btn-expand { transform: rotate(180deg); }
  /* Hide every cell except Receipt, Devotee, and the toggle when collapsed */
  .booking-row:not(.expanded) > td:not([data-label="Receipt"]):not([data-label="Devotee"]):not(.td-toggle) {
    display: none;
  }
  /* Keep Receipt and Devetee tight when collapsed (no extra padding-right needed) */
  .booking-row > td[data-label="Receipt"],
  .booking-row > td[data-label="Devotee"] { padding-right: 50px; }

  /* Pujas + Festivals — 2 cards per row compact grid */
  #pujas-list .data-table tbody,
  #festivals-list .data-table tbody {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  #pujas-list .data-table tbody tr,
  #festivals-list .data-table tbody tr {
    margin-bottom: 0;
    padding: 12px;
  }
  #pujas-list .data-table tbody td,
  #festivals-list .data-table tbody td {
    display: block;
    padding: 4px 0;
    padding-left: 0;
    border: none;
    text-align: left;
    min-height: 0;
  }
  #pujas-list .data-table tbody td::before,
  #festivals-list .data-table tbody td::before { display: none; }
  /* Hide the secondary fields in the compact grid */
  #pujas-list .data-table tbody td[data-label="Name (ML)"],
  #festivals-list .data-table tbody td[data-label="Date"],
  #festivals-list .data-table tbody td[data-label="Description"] { display: none; }
  /* Festival image as a top banner inside the card */
  #festivals-list .data-table tbody td[data-label="Image"] {
    margin: -12px -12px 8px;
  }
  #festivals-list .data-table tbody td[data-label="Image"] .row-thumb {
    width: 100%;
    height: 90px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: none;
  }
  /* Action buttons centered below */
  #pujas-list .data-table tbody td.td-actions,
  #festivals-list .data-table tbody td.td-actions {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--color-border);
    text-align: center;
  }
}

/* Very narrow phones — keep stats as a compact 2x2 grid so all 4 fit on one screen */
@media (max-width: 520px) {
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }
  .stat-card { padding: 14px 16px; }
  .stat-label { font-size: 0.66rem; margin-bottom: 4px; }
  .stat-value { font-size: 1.4rem; }
  .admin-main { padding: 18px 14px; }
  .admin-head {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
  }
  .admin-head h2 { font-size: 1.4rem; }
  .admin-head h3 { font-size: 1rem; }
}

/* Auth link inside .nav — hidden on desktop, shown on tablet/mobile */
.nav-link-auth { display: none; }

@media (max-width: 980px) {
  .nav-link-auth { display: inline-flex; }
}

@media (max-width: 720px) {
  .menu-toggle { display: grid; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-surface);
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
    z-index: 90;
  }
  .nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
  /* Force dark text in mobile menu regardless of header transparent state */
  .site-header .nav .nav-link,
  .site-header:not(.scrolled) .nav .nav-link { color: var(--color-text); }
  .site-header .nav .nav-link:hover,
  .site-header .nav .nav-link.active,
  .site-header:not(.scrolled) .nav .nav-link:hover,
  .site-header:not(.scrolled) .nav .nav-link.active {
    color: var(--color-gold-deep);
    background: var(--color-gold-soft);
  }
  .nav-link { width: 100%; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  /* Festival cards stay 2-up on phones for a denser, photo-led layout */
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .festival-banner { height: 120px; }
  .festival-title { font-size: 1rem; }
  .festival-desc { font-size: 0.82rem; }
  .festival-date { font-size: 0.7rem; padding: 4px 10px; }
  .form-row.cols-2 { grid-template-columns: 1fr; }
  .timings-row { grid-template-columns: 1fr 1fr; padding: 16px 18px; }
  .timings-row > :nth-child(3) { display: none; }
  .timings-row.head > :nth-child(3) { display: none; }
  .prose { padding: 32px 22px; }
  .section { padding: 70px 0; }
  .brand-text { display: none; }
}

/* ===================== Utilities ===================== */
.text-center { text-align: center; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.hidden { display: none !important; }

/* ===================== Header CTA buttons (Login / Book Vazhipad) ===================== */
.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: all 0.22s ease;
  cursor: pointer;
}

.nav-cta-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.nav-cta-ghost:hover {
  border-color: var(--color-gold);
  color: var(--color-gold-deep);
}

.nav-cta-primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-deep));
  color: #fff;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.3);
}

.nav-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(201, 162, 39, 0.42);
}

@media (max-width: 980px) {
  .auth-actions .nav-cta-ghost { display: none; }
}

@media (max-width: 720px) {
  .auth-actions .nav-cta-primary { padding: 8px 14px; font-size: 0.8rem; }
}

/* ===================== Auth (Login / Sign Up) page ===================== */
.auth-card {
  max-width: 460px;
  margin: 60px auto 80px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-deep));
  color: #fff;
  display: grid;
  place-items: center;
}

.auth-card h2 { margin-bottom: 6px; }
.auth-card .hint { color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 24px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--color-bg-alt);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  background: transparent;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: var(--color-surface);
  color: var(--color-gold-deep);
  box-shadow: 0 2px 8px var(--color-shadow);
}

.auth-form { text-align: left; }
.auth-form .form-field { margin-bottom: 14px; }
.auth-form .btn { margin-top: 6px; }

/* Continue with Google button (rendered by Google Identity Services) */
.google-signin-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  min-height: 44px; /* reserve space so layout doesn't jump while GIS loads */
}

/* "or" divider between Google sign-in and email/password */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 18px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-error {
  display: none;
  color: #b91c1c;
  margin-top: 12px;
  font-size: 0.86rem;
  text-align: center;
}

/* ===================== Booking page (vazhipadu) — 2-column layout ===================== */
.booking-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.booking-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.booking-section-head {
  margin-bottom: 18px;
}

.booking-section-head.with-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.booking-section-head h3 {
  font-size: 1.15rem;
  color: var(--color-gold-deep);
  margin-bottom: 4px;
}

.booking-section-head .hint {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.form-row.cols-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.members-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 20px;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.member-row {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.member-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.member-row-no {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
}

.member-remove {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--color-surface);
  color: var(--color-text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.member-remove:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.booking-submit-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-lg { padding: 16px 34px; font-size: 1rem; }

/* Cart sidebar */
.booking-cart {
  position: sticky;
  top: 100px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.cart-head { margin-bottom: 16px; }
.cart-head h3 {
  font-size: 1.05rem;
  color: var(--color-gold-deep);
  margin-bottom: 4px;
}
.cart-head .hint {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}

.cart-item {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
}

.cart-item-price {
  font-weight: 700;
  color: var(--color-gold-deep);
  font-size: 0.95rem;
  white-space: nowrap;
}
.cart-item-price .cur { margin-right: 1px; }

.cart-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.cart-item-dot { opacity: 0.5; }

.cart-item .cart-item-who {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 4px;
}

.cart-item .cart-item-star {
  display: block;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.cart-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 20px 12px;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  margin-bottom: 16px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1.5px solid var(--color-border);
  font-weight: 600;
  font-size: 1rem;
}

.cart-total-amount {
  color: var(--color-gold-deep);
  font-size: 1.2rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .booking-grid { grid-template-columns: 1fr; }
  .booking-cart {
    position: static;
    max-height: none;
    order: -1;
  }
}

@media (max-width: 640px) {
  .form-row.cols-3 { grid-template-columns: 1fr; }
  .booking-section { padding: 22px; }
}

/* ===================== User Dashboard ===================== */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.dash-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
}

.dash-stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.dash-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-gold-deep);
  font-family: var(--font-en);
}

.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.dash-booking {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.dash-booking-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.dash-booking-id {
  font-weight: 700;
  color: var(--color-gold-deep);
  letter-spacing: 0.04em;
  margin-right: 12px;
}

.dash-booking-date {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.status-badge {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }

.dash-booking-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.dash-booking-member {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 12px;
  padding: 8px 12px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.dash-booking-who { font-weight: 600; }
.dash-booking-puja { color: var(--color-text-soft); }
.dash-booking-amt { font-weight: 700; color: var(--color-gold-deep); }

.dash-booking-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
}

.dash-booking-foot strong {
  color: var(--color-gold-deep);
  font-size: 1.15rem;
}

@media (max-width: 720px) {
  .dash-stats { grid-template-columns: 1fr; }
  .dash-booking-member { grid-template-columns: 1fr; gap: 4px; }
}

/* ===================== Booking — small inline hint under fields ===================== */
.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ===================== Payment Modal ===================== */
.modal.modal-md {
  max-width: 520px;
  padding: 0;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: auto;
}

.modal.modal-md .modal-head {
  padding: 22px 28px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}

.payment-body { padding: 24px 28px 28px; }
.payment-body .hint { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 14px; }

.payment-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 1rem;
}
.payment-summary strong {
  color: var(--color-gold-deep);
  font-size: 1.4rem;
}

.payment-options {
  display: grid;
  gap: 12px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.payment-option:hover {
  border-color: var(--color-gold);
  background: var(--color-gold-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201, 162, 39, 0.18);
}

.payment-option-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.payment-option-text { display: flex; flex-direction: column; gap: 2px; }
.payment-option-text strong { font-size: 1rem; color: var(--color-text); }
.payment-option-text span { font-size: 0.82rem; color: var(--color-text-muted); }

/* ===================== Receipt Modal ===================== */
.receipt-body {
  padding: 28px 28px 28px;
  text-align: center;
}

.receipt-tick {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #059669);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.25);
}

.receipt-msg {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
  line-height: 1.6;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.receipt-row strong {
  font-family: 'Inter', monospace;
  color: var(--color-gold-deep);
  letter-spacing: 0.02em;
  font-size: 1rem;
}

.receipt-counter-note {
  margin-top: 14px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #fef3c7;
  color: #92400e;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.55;
}

.receipt-actions { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

/* WhatsApp click-to-chat buttons in the receipt modal */
.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.32);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-whatsapp:hover {
  background: #1ebd5b;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
}
.btn-whatsapp svg { flex-shrink: 0; }

/* Secondary "Notify temple" variant — outlined */
.btn-whatsapp-ghost {
  background: transparent;
  color: #25D366;
  border: 1.5px solid #25D366;
  box-shadow: none;
}
.btn-whatsapp-ghost:hover {
  background: rgba(37, 211, 102, 0.08);
  color: #1ebd5b;
  border-color: #1ebd5b;
  box-shadow: none;
}

/* ===================== Dashboard — booking meta strip ===================== */
.dash-booking-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.dash-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-meta-label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.dash-meta-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.dash-meta-value.pay-paid { color: #065f46; }
.dash-meta-value.pay-pending_counter { color: #92400e; }

.dash-booking-who-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-booking-star {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

@media (max-width: 720px) {
  .dash-booking-meta { grid-template-columns: 1fr; }
}

/* ===================== Admin — Booking Detail Modal ===================== */
.booking-detail-body {
  padding: 24px 28px 28px;
}

.bd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.bd-receipt {
  font-family: 'Inter', monospace;
  font-weight: 700;
  color: var(--color-gold-deep);
  letter-spacing: 0.04em;
  margin-right: 12px;
}

.bd-created {
  color: var(--color-text-muted);
  font-size: 0.86rem;
}

.bd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.bd-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
}

.bd-cell-wide { grid-column: 1 / -1; }

.bd-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.bd-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  word-break: break-word;
}

.bd-value.pay-paid { color: #065f46; }
.bd-value.pay-pending_counter { color: #92400e; }

.bd-section-title {
  font-size: 1rem;
  color: var(--color-gold-deep);
  margin-bottom: 10px;
  margin-top: 6px;
}

.bd-notes {
  margin-top: 18px;
  padding: 14px;
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-gold);
  border-radius: var(--radius-sm);
}

.bd-notes p {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-text);
}

.bd-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 2px solid var(--color-border);
  font-weight: 600;
  font-size: 1rem;
}

.bd-total strong {
  color: var(--color-gold-deep);
  font-size: 1.4rem;
}

.booking-row:hover {
  background: var(--color-gold-soft);
}

.pay-paid { color: #065f46; }
.pay-pending_counter { color: #92400e; }

@media (max-width: 720px) {
  /* Keep the meta cells (Name / Phone / Address / Date / Payment / Status) 2-up on mobile */
  .bd-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .bd-cell { padding: 10px 12px; }
  .bd-cell-wide { grid-column: auto; } /* don't span 2 cols on mobile */
  .bd-label { font-size: 0.62rem; letter-spacing: 0.05em; }
  .bd-value { font-size: 0.84rem; word-break: break-word; }
  .booking-detail-body { padding: 18px 18px 22px; }

  /* Offerings table inside the booking-detail modal — 2 cards per row */
  #booking-detail-body .data-table {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0;
  }
  #booking-detail-body .data-table table { display: block; }
  #booking-detail-body .data-table thead { display: none; }
  #booking-detail-body .data-table tbody {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
  }
  #booking-detail-body .data-table tbody tr {
    display: block;
    margin-bottom: 0;
    padding: 10px 8px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: none;
    text-align: center;
  }
  #booking-detail-body .data-table tbody td {
    display: block;
    padding: 3px 0;
    padding-left: 0;
    border: none !important;
    border-top: none;
    text-align: center;
    min-height: 0;
    font-size: 0.85rem;
    line-height: 1.35;
  }
  #booking-detail-body .data-table tbody td::before { display: none; }
}

/* ===================== Image preview (admin modal) + row thumb ===================== */
.image-preview {
  margin-top: 10px;
  min-height: 4px;
}
.image-preview img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.row-thumb {
  display: inline-block;
  width: 56px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  vertical-align: middle;
}
.row-thumb-empty { background: repeating-linear-gradient(45deg, var(--color-bg-alt), var(--color-bg-alt) 6px, var(--color-surface) 6px, var(--color-surface) 12px); }

/* ===================== Contact Section ===================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}

.contact-form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.contact-form-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.contact-form-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.contact-form-head h3 {
  font-size: 1.25rem;
  color: var(--color-text);
}

.contact-submit {
  margin-top: 10px;
}

.contact-form-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
}

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

.contact-info-card {
  background: var(--color-gold-soft);
  border: 1px solid var(--color-gold-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.contact-info-card h3 {
  font-size: 1.15rem;
  color: var(--color-gold-deep);
  margin-bottom: 18px;
}

.info-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
}

.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-row:first-of-type { padding-top: 0; }

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-gold-deep);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.15);
}

.info-row > div:not(.info-icon) {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.info-row strong {
  display: block;
  color: var(--color-text);
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.info-row span {
  display: block;
  color: var(--color-text-soft);
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
}

.contact-map {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  background: var(--color-bg-alt);
  aspect-ratio: 16 / 11;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-link-btn {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--color-surface);
  color: var(--color-gold-deep);
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.map-link-btn:hover {
  background: var(--color-gold-deep);
  color: #fff;
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 10px 24px rgba(168, 132, 27, 0.4);
}

@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .contact-form-card { padding: 24px; }
  .contact-info-card { padding: 22px; }
}

/* File input — match the gold theme */
input[type="file"] {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}
input[type="file"]::file-selector-button {
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-gold-soft);
  color: var(--color-gold-deep);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-right: 12px;
  transition: background 0.2s, color 0.2s;
}
input[type="file"]::file-selector-button:hover {
  background: var(--color-gold-light);
  color: var(--color-text);
}
