/* ===========================================================
   Maa Chandrabadani Devi — site styles
   Palette: maroon / saffron-gold / cream, Himalayan theme
   Self-contained, no external fonts or assets.
   =========================================================== */

:root {
  --maroon: #6b1414;
  --maroon-dark: #4a0d0d;
  --saffron: #e07b00;
  --gold: #d4a017;
  --gold-soft: #e8c873;
  --cream: #fdf6ea;
  --cream-deep: #f6ead3;
  --ink: #2a211c;
  --ink-soft: #5b4f47;
  --line: #e4d6bd;
  --shadow: 0 10px 30px rgba(74, 13, 13, 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--maroon); text-decoration: none; transition: color .2s; }
a:hover { color: var(--saffron); }

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

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- Top bar / nav ---------- */
.topbar {
  background: linear-gradient(180deg, var(--maroon-dark), var(--maroon));
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 14px rgba(0,0,0,.25);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 0;
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--cream); }
.brand:hover { color: var(--gold-soft); }
.brand .mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-soft), var(--gold) 60%, var(--saffron));
  box-shadow: 0 0 0 2px rgba(255,255,255,.25) inset;
}
.brand .mark svg { width: 26px; height: 26px; }
.brand-text strong { font-family: var(--serif); font-size: 1.18rem; display: block; letter-spacing: .5px; }
.brand-text span { font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; opacity: .8; }

.nav-links { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--cream);
  padding: .5rem .85rem;
  border-radius: 6px;
  font-size: .92rem;
  letter-spacing: .3px;
}
.nav-links a:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-links a.active { background: var(--gold); color: var(--maroon-dark); font-weight: 600; }

.nav-toggle { display: none; background: none; border: 0; color: var(--cream); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .2rem .4rem; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--maroon-dark);
    max-height: 0; overflow: hidden;
    transition: max-height .35s ease;
    box-shadow: 0 14px 26px rgba(0,0,0,.35);
  }
  /* tall enough for every item; scrolls instead of clipping on short screens */
  .nav-links.open { max-height: min(85vh, 680px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  /* display:block makes each link fill the whole row — otherwise the inline
     <a> only paints its background/top-border under the text width, which
     leaves stray dashes and a partial-width active highlight on mobile. */
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: .9rem 1.2rem; border-top: 1px solid rgba(255,255,255,.10); border-radius: 0; }
  .nav-links a.active { font-weight: 600; }
}

/* keep the brand from crowding the hamburger on small phones */
@media (max-width: 400px) {
  .brand .mark { width: 36px; height: 36px; }
  .brand .mark svg { width: 22px; height: 22px; }
  .brand-text strong { font-size: 1.02rem; }
  .brand-text span { letter-spacing: 1px; }
  section { padding: 3rem 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--cream);
  text-align: center;
  padding: 5.5rem 0 9.5rem;
  overflow: hidden;
  /* Drop a photo at assets/img/hero.jpg to use it as the banner background.
     A soft dark halo sits behind the text for readability while keeping the
     photo clear; the maroon color is a graceful fallback if no photo exists. */
  background-color: #6b1414;
  background-image:
    radial-gradient(ellipse 62% 68% at 50% 46%, rgba(20,4,4,.55) 0%, rgba(20,4,4,.18) 55%, transparent 78%),
    linear-gradient(180deg, rgba(40,8,8,.32) 0%, rgba(60,15,12,.20) 45%, rgba(74,13,13,.55) 100%),
    url('../img/hero.jpg');
  background-size: cover;
  background-position: center;
}
.hero .mountains { position: absolute; bottom: -2px; left: 0; width: 100%; height: 90px; z-index: 1; }
.hero .sun {
  position: absolute; top: 14%; left: 50%; transform: translateX(-50%);
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,238,200,.95), rgba(232,200,115,.55) 55%, transparent 72%);
  filter: blur(2px);
}
.hero-content { position: relative; z-index: 2; }
.hero .eyebrow { letter-spacing: 5px; text-transform: uppercase; font-size: .8rem; opacity: .85; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); margin: .4rem 0 .2rem; text-shadow: 0 2px 22px rgba(0,0,0,.6), 0 1px 4px rgba(0,0,0,.5); }
.hero .eyebrow, .hero .sanskrit, .hero p.lead { text-shadow: 0 1px 9px rgba(0,0,0,.6); }
.hero .sanskrit { font-family: var(--serif); font-size: 1.3rem; color: var(--gold-soft); margin-bottom: 1.4rem; }
.hero p.lead { max-width: 640px; margin: 0 auto 2rem; font-size: 1.1rem; opacity: .95; }

/* page header (interior pages) */
.page-head {
  background: linear-gradient(160deg, var(--maroon-dark), var(--maroon));
  color: var(--cream);
  text-align: center;
  padding: 3.4rem 0 3.6rem;
  position: relative;
}
.page-head h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
.page-head .crumb { font-size: .8rem; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-soft); margin-bottom: .6rem; }
.page-head p { max-width: 620px; margin: .8rem auto 0; opacity: .9; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .8rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .5px;
  font-size: .95rem;
  transition: transform .15s, box-shadow .2s;
}
.btn-primary { background: var(--gold); color: var(--maroon-dark); box-shadow: var(--shadow); }
.btn-primary:hover { color: var(--maroon-dark); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(212,160,23,.45); }
.btn-ghost { background: rgba(74,13,13,.55); border: 2px solid var(--gold); color: #fff; font-weight: 700; margin-left: .6rem; backdrop-filter: blur(3px); text-shadow: 0 1px 4px rgba(0,0,0,.6); box-shadow: var(--shadow); }
.btn-ghost:hover { background: var(--gold); color: var(--maroon-dark); border-color: var(--gold); text-shadow: none; transform: translateY(-2px); }
@media (max-width: 520px){ .btn-ghost { margin-left: 0; margin-top: .7rem; } .hero .btn, .page-head .btn { display: block; max-width: 280px; margin-left: auto; margin-right: auto; } }

/* ---------- Sections ---------- */
section { padding: 4rem 0; }
.section-tag { text-align: center; letter-spacing: 4px; text-transform: uppercase; font-size: .78rem; color: var(--saffron); font-weight: 700; }
.section-title { text-align: center; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .4rem 0 1rem; }
.section-intro { text-align: center; max-width: 700px; margin: 0 auto 2.6rem; color: var(--ink-soft); }

.divider { width: 90px; height: 3px; margin: 0 auto 1.6rem; background: linear-gradient(90deg, transparent, var(--gold), transparent); border-radius: 2px; }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: 1.6rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem;
  box-shadow: 0 6px 18px rgba(74,13,13,.06);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .ic { width: 52px; height: 52px; margin-bottom: 1rem; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(135deg, var(--cream-deep), #fff); color: var(--maroon); }
.card .ic svg { width: 30px; height: 30px; }
.card h3 { margin: 0 0 .5rem; font-size: 1.25rem; }
.card p { margin: 0; color: var(--ink-soft); }

/* ---------- Place cards (image on top) ---------- */
.card.place { padding: 0; overflow: hidden; }
.card.place .place-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; transition: transform .45s ease; }
.card.place:hover .place-img { transform: scale(1.05); }
.card.place .place-body { padding: 1.4rem 1.6rem 1.6rem; }
.card.place .place-body h3 { margin: 0 0 .5rem; font-size: 1.25rem; }
.card.place .place-body p { margin: 0; color: var(--ink-soft); }

/* ---------- Alt section background ---------- */
.alt { background: var(--cream-deep); }
.alt::before, .alt::after { content: none; }

/* ---------- Two-column feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.split .panel {
  border-radius: 16px;
  min-height: 320px;
  background: linear-gradient(160deg, #6b1414, #8a3a12);
  display: grid; place-items: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ---------- Prose ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 2.4rem; font-size: 1.7rem; }
.prose h3 { margin-top: 1.8rem; color: var(--saffron); }
.prose p { margin: 1rem 0; }
.prose blockquote {
  margin: 1.8rem 0; padding: 1rem 1.4rem;
  border-left: 4px solid var(--gold);
  background: var(--cream-deep);
  border-radius: 0 10px 10px 0;
  font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--maroon-dark);
}
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .4rem 0; }

/* ---------- Fact strip ---------- */
.facts { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; text-align: center; }
@media (max-width: 820px){ .facts { grid-template-columns: repeat(2,1fr);} }
.fact .num { font-family: var(--serif); font-size: 2.1rem; color: var(--saffron); font-weight: 700; }
.fact .lbl { font-size: .85rem; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Steps / timeline ---------- */
.steps { counter-reset: step; max-width: 760px; margin: 0 auto; }
.step { display: flex; gap: 1.2rem; padding: 1.1rem 0; border-bottom: 1px dashed var(--line); }
.step:last-child { border-bottom: 0; }
.step .n {
  counter-increment: step; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--maroon); color: var(--cream);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700;
}
.step .n::before { content: counter(step); }
.step h4 { margin: .2rem 0 .3rem; }
.step p { margin: 0; color: var(--ink-soft); }

/* ---------- Info table ---------- */
.info-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.info-table th, .info-table td { text-align: left; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.info-table th { background: var(--maroon); color: var(--cream); font-family: var(--serif); width: 38%; font-weight: 600; }
.info-table tr:last-child td, .info-table tr:last-child th { border-bottom: 0; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 820px){ .gallery { grid-template-columns: repeat(2,1fr);} }
.tile {
  aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; position: relative;
  display: grid; place-items: end start; color: #fff; box-shadow: var(--shadow);
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform .45s ease; }
.tile:hover img { transform: scale(1.06); }
.tile span { position: relative; z-index: 2; padding: .7rem .9rem; font-size: .9rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.tile::after { content:""; position:absolute; inset:0; z-index: 1; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.6)); }

/* ---------- Quote band ---------- */
.band {
  background: linear-gradient(160deg, var(--maroon-dark), var(--maroon));
  color: var(--cream); text-align: center; padding: 4rem 0;
}
.band p { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 1.9rem); max-width: 760px; margin: 0 auto; font-style: italic; }
.band .who { display:block; margin-top: 1rem; font-size: .85rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-soft); font-style: normal; }

/* ---------- Footer ---------- */
.footer { background: var(--maroon-dark); color: rgba(253,246,234,.85); padding: 3rem 0 1.4rem; }
.footer .cols { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.5fr; gap: 2rem; }
.footer .managed { font-style: normal; }
.footer .managed .name { color: var(--cream); font-weight: 600; }
@media (max-width: 820px){ .footer .cols { grid-template-columns: 1fr; } }
.footer h4 { color: var(--gold-soft); margin: 0 0 .8rem; font-size: 1rem; letter-spacing: 1px; }
.footer a { color: rgba(253,246,234,.85); display: block; padding: .2rem 0; }
.footer a:hover { color: #fff; }
.footer .copy { text-align: center; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; opacity: .7; }

.note { font-size: .85rem; color: var(--ink-soft); background: var(--cream-deep); border: 1px dashed var(--line); border-radius: 10px; padding: .8rem 1rem; margin-top: 1.4rem; }

.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.in { opacity: 1; transform: none; }

/* ---------- Hindi / Devanagari ---------- */
/* The whole stylesheet reads var(--sans)/var(--serif); overriding them on the
   Hindi document swaps every element to a Devanagari font automatically. */
html[lang="hi"] {
  --sans: "Noto Sans Devanagari", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Noto Serif Devanagari", "Iowan Old Style", Palatino, Georgia, serif;
}
/* Devanagari snippets on the English pages (mantras, verse) */
.sanskrit { font-family: "Noto Serif Devanagari", var(--serif); }

/* ---------- Language switcher ---------- */
.nav-links .lang-switch a { border: 1px solid rgba(232,200,115,.55); border-radius: 6px; font-weight: 700; letter-spacing: .5px; }
.nav-links .lang-switch a:hover { background: var(--gold); color: var(--maroon-dark); }
@media (max-width: 820px){ .nav-links .lang-switch a { border: 0; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0; } }

/* ---------- Deity image slot (covers the yantra panel if a photo exists) ---------- */
.split .panel { position: relative; }
.panel-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }

/* ---------- Devotional banner (home) ---------- */
.devi-banner { padding: 0; }
.devi-strip {
  background: linear-gradient(160deg, var(--maroon-dark) 0%, var(--maroon) 55%, #8a3a12 100%);
  color: var(--cream);
  padding: 3.6rem 0;
}
.devi-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2.8rem; }
.devi-words { max-width: 560px; }
.devi-portrait { margin: 0; }
.devi-portrait img {
  width: 300px; max-width: 72vw;
  aspect-ratio: 3 / 4; object-fit: cover; object-position: center top;
  border-radius: 16px; border: 3px solid var(--gold);
  box-shadow: 0 16px 42px rgba(0,0,0,.45);
}
.devi-strip .sanskrit { font-family: var(--serif); font-size: clamp(1.5rem,3.4vw,2.2rem); color: var(--gold-soft); margin: 0 0 .8rem; line-height: 1.5; }
.devi-strip p { font-size: 1.08rem; opacity: .95; margin: 0; max-width: 560px; }
@media (max-width: 820px) {
  .devi-inner { flex-direction: column; text-align: center; gap: 1.8rem; }
  .devi-strip p { margin: 0 auto; }
}

/* ---------- Map ---------- */
.map-wrap { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); line-height: 0; }
.map-wrap iframe { width: 100%; height: 420px; border: 0; display: block; }
.map-actions { text-align: center; margin-top: 1.2rem; }
@media (max-width: 820px){ .map-wrap iframe { height: 320px; } }
