/* ==========================================================================
   Shri Nagneshwari Mata Temple, Lolada Dham — stylesheet
   ========================================================================== */

:root {
  --maroon-900: #4a0d1f;
  --maroon-700: #7a1230;
  --maroon-600: #92173c;
  --gold-500: #d99c2b;
  --gold-400: #e7b757;
  --gold-100: #fbeccb;
  --cream-50: #fffaf2;
  --cream-100: #fff3e0;
  --ink-900: #2b1a12;
  --ink-700: #4a3527;
  --ink-500: #7a6a5c;
  --line: #ecdcc4;
  --shadow: 0 10px 30px rgba(74, 13, 31, 0.12);
  --radius: 14px;
  --max-width: 1180px;

  --font-gu: "Noto Serif Gujarati", "Noto Sans Gujarati", sans-serif;
  --font-gu-body: "Noto Sans Gujarati", sans-serif;
  --font-hi: "Noto Serif Devanagari", "Noto Sans Devanagari", sans-serif;
  --font-hi-body: "Noto Sans Devanagari", sans-serif;
  --font-en: "Noto Serif", Georgia, serif;
  --font-en-body: "Poppins", "Segoe UI", sans-serif;

  --font-heading: var(--font-gu);
  --font-body: var(--font-gu-body);
}

body.lang-hi { --font-heading: var(--font-hi); --font-body: var(--font-hi-body); }
body.lang-en { --font-heading: var(--font-en); --font-body: var(--font-en-body); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.no-scroll { overflow: hidden; }

body {
  margin: 0;
  background: var(--cream-50);
  color: var(--ink-900);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--maroon-900); margin: 0 0 0.5em; line-height: 1.3; }
p { margin: 0 0 1em; color: var(--ink-700); }
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { padding-left: 1.2em; }

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

.section { padding: 72px 0; }
.section-alt { background: var(--cream-100); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon-600);
  background: var(--gold-100);
  border: 1px solid var(--gold-400);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-note {
  font-size: 0.86rem;
  color: var(--ink-500);
  background: var(--gold-100);
  border: 1px dashed var(--gold-400);
  border-radius: 10px;
  padding: 10px 16px;
  margin-top: 18px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow); border-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-emblem {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-400), var(--maroon-600));
  display: flex; align-items: center; justify-content: center;
  color: var(--cream-50); font-size: 1.2rem; flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}
.brand-text { line-height: 1.15; }
.brand-title { display: block; font-family: var(--font-heading); font-weight: 700; color: var(--maroon-900); font-size: 1.02rem; }
.brand-sub { display: block; font-size: 0.72rem; color: var(--ink-500); letter-spacing: 0.04em; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-700);
  transition: background 0.2s, color 0.2s;
}
.nav-menu a:hover { background: var(--gold-100); color: var(--maroon-700); }

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

.lang-switch {
  display: flex;
  gap: 2px;
  background: var(--cream-100);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-500);
}
.lang-btn.active { background: var(--maroon-700); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--maroon-800, var(--maroon-700)); display: block; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: 120px 0 90px;
  background: linear-gradient(180deg, rgba(30,7,15,0.55), rgba(30,7,15,0.78)), url("../images/hero-temple-dome.jpg") center 30% / cover no-repeat;
  text-align: center;
}
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero-kicker {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-100);
  border: 1px solid rgba(231,183,87,0.6);
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 6px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.hero .hero-subtitle {
  font-family: var(--font-heading);
  color: var(--gold-400);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  margin-bottom: 20px;
}
.hero p { color: #f4e9da; max-width: 620px; margin: 0 auto 30px; font-size: 1.05rem; }

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold-500); color: var(--maroon-900); box-shadow: 0 8px 20px rgba(217,156,43,0.35); }
.btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.5); }

/* ---------- Stats ---------- */
.stats {
  max-width: var(--max-width);
  margin: -46px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 5;
}
.stats-grid {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}
.stat {
  text-align: center;
  padding: 26px 12px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat-num { display: block; font-family: var(--font-heading); font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--maroon-700); font-weight: 700; }
.stat-label { font-size: 0.82rem; color: var(--ink-500); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-media { position: relative; }
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.about-media .frame-tag {
  position: absolute;
  bottom: -16px;
  left: -16px;
  background: var(--maroon-700);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.about-text .kicker { margin-bottom: 12px; }

/* ---------- Legend ---------- */
.legend-section { background: var(--maroon-900); color: var(--cream-100); position: relative; }
.legend-section::before {
  content: "";
  position: absolute; inset: 0;
  background: url("../images/deity-decorated.jpg") center/cover;
  opacity: 0.14;
}
.legend-inner { position: relative; max-width: 780px; margin: 0 auto; text-align: center; }
.legend-section h2 { color: var(--gold-400); }
.legend-section p { color: #f0e2d0; }
.legend-section .section-note { background: rgba(217,156,43,0.12); border-color: rgba(217,156,43,0.5); color: var(--gold-100); }

/* ---------- Cards grid (seva / festivals) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.festivals .cards-grid { grid-template-columns: repeat(3, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: 0 6px 18px rgba(74,13,31,0.06);
}
.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--gold-100);
  color: var(--maroon-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.card p { font-size: 0.92rem; margin-bottom: 0; }

/* ---------- Timings ---------- */
.timings-wrap {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--line);
}
.open-hours-banner {
  background: var(--maroon-700);
  color: #fff;
  text-align: center;
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
}
table.timings-table { width: 100%; border-collapse: collapse; }
.timings-table th, .timings-table td { text-align: left; padding: 14px 22px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.timings-table th { background: var(--cream-100); color: var(--maroon-700); font-family: var(--font-heading); font-weight: 700; }
.timings-table tr:last-child td { border-bottom: none; }
.timings-table td:last-child { text-align: right; color: var(--maroon-700); font-weight: 600; white-space: nowrap; }

/* ---------- Travel ---------- */
.travel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.travel-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  gap: 16px;
}
.travel-card .card-icon { flex-shrink: 0; margin-bottom: 0; }
.travel-card h4 { margin-bottom: 6px; font-size: 1rem; color: var(--maroon-700); }
.travel-card p { font-size: 0.92rem; margin-bottom: 0; }
.travel-map-note { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--ink-500); }

/* ---------- Rules ---------- */
.rules-list {
  max-width: 760px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
}
.rules-list li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--ink-700);
}
.rules-list li::before {
  content: "\2713";
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold-100);
  color: var(--maroon-700);
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: 14px;
}
.gallery-item { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.06); }

.video-heading {
  text-align: center;
  margin: 44px 0 18px;
  font-size: 1.3rem;
}
.videos-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.video-wrap {
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-wrap iframe, .video-wrap video { width: 100%; height: 100%; border: 0; display: block; }
.video-caption {
  text-align: center;
  margin: 12px auto 0;
  font-size: 0.88rem;
  color: var(--ink-500);
}

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

.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 5, 10, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-caption { color: var(--gold-100); text-align: center; margin-top: 12px; font-size: 0.9rem; }
.lightbox-close {
  position: absolute; top: 20px; right: 26px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}
.lightbox-content { position: relative; display: flex; flex-direction: column; align-items: center; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.contact-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: none; }
.contact-row .card-icon { margin-bottom: 0; }
.contact-row h4 { margin: 0 0 2px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-500); }
.contact-row p { margin: 0; font-size: 1rem; color: var(--ink-900); }
.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 260px;
}
.contact-map iframe { width: 100%; height: 100%; min-height: 260px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--maroon-900);
  color: var(--cream-100);
  padding: 40px 0 24px;
  text-align: center;
}
.site-footer .brand-emblem { margin: 0 auto 14px; }
.site-footer p { color: #e6d3bd; font-size: 0.88rem; margin-bottom: 6px; }
.footer-disclaimer { font-size: 0.78rem; color: #c9ac8f; max-width: 560px; margin: 14px auto 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-menu {
    position: fixed;
    top: 66px; left: 0; right: 0;
    background: var(--cream-50);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu a { padding: 12px 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .festivals .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .travel-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
}

@media (max-width: 560px) {
  .section { padding: 52px 0; }
  .cards-grid, .festivals .cards-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .hero { padding: 100px 0 70px; }
  .brand-title { font-size: 0.9rem; }
}
