:root {
  --saffron: #e8740c;
  --saffron-light: #fdf0e1;
  --maroon: #7a1f1f;
  --maroon-dark: #561414;
  --gold: #c9962b;
  --ink: #2b1d14;
  --muted: #6e5a4c;
  --bg: #fffaf3;
  --card: #ffffff;
  --line: #eedfcc;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(122, 31, 31, 0.08);
  --font-display: "Rozha One", "Rasa", "Mukta Vaani", Georgia, serif;
  --font-body: "Mukta Vaani", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--maroon); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; margin: 0 0 .4em; color: var(--maroon); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.3rem; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.gu { font-family: "Mukta Vaani", sans-serif; color: var(--saffron); font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 250, 243, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #ffb347, var(--saffron) 60%, var(--maroon));
  display: grid; place-items: center; color: #fff; font-size: 22px; flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; color: var(--maroon); }
.brand-text span { font-size: .8rem; color: var(--saffron); font-weight: 600; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .97rem;
}
.nav a:hover { background: var(--saffron-light); }
.nav a.active { background: var(--maroon); color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 1.2rem; cursor: pointer; color: var(--maroon); }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 66px;
    flex-direction: column; background: var(--bg); padding: 10px 16px 16px; border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; border-radius: 10px; }
}

/* ---------- Toran (decorative border) ---------- */
.toran {
  height: 14px;
  background:
    radial-gradient(circle at 10px 0, var(--saffron) 7px, transparent 8px) 0 0 / 20px 14px repeat-x,
    linear-gradient(var(--maroon), var(--maroon)) 0 0 / 100% 3px no-repeat;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: center;
  padding: clamp(70px, 12vw, 140px) 0 clamp(60px, 10vw, 110px);
  background:
    linear-gradient(180deg, rgba(86, 20, 20, .55), rgba(86, 20, 20, .8)),
    var(--hero-img, none) center / cover,
    radial-gradient(ellipse at top, #c2410c, var(--maroon-dark) 70%);
  overflow: hidden;
}
.hero::before {
  content: "ॐ"; position: absolute; font-size: 380px; line-height: 1; opacity: .07;
  left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none;
}
.hero h1 { color: #fff; font-size: clamp(2.2rem, 6vw, 4rem); margin-bottom: .2em; }
.hero .gu-title { font-size: clamp(1.3rem, 3vw, 1.9rem); color: #ffd38a; font-weight: 700; margin: 0; }
.hero p { max-width: 640px; margin: 14px auto 0; opacity: .95; }
.hero-actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.page-hero { padding: 54px 0 46px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem; border: 2px solid transparent;
  font-family: inherit;
}
.btn-primary { background: var(--saffron); color: #fff; }
.btn-primary:hover { background: #cf6406; }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-outline { border-color: var(--maroon); color: var(--maroon); background: transparent; }
.btn-outline:hover { background: var(--maroon); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .9rem; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-alt { background: var(--saffron-light); }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head p { color: var(--muted); max-width: 640px; margin: 6px auto 0; }
.divider { width: 80px; height: 3px; background: var(--gold); margin: 10px auto 0; border-radius: 2px; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-body { padding: 22px; }
.card-img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: var(--saffron-light); }
.meta { color: var(--muted); font-size: .95rem; }
.meta-row { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; }
.meta-row .ico { width: 20px; flex-shrink: 0; text-align: center; }

/* ---------- Next event banner ---------- */
.next-event {
  margin-top: -50px; position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  padding: 26px 30px; border-top: 4px solid var(--saffron);
}
.next-event .label { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--saffron); font-weight: 700; }
.countdown { display: flex; gap: 10px; }
.countdown div { text-align: center; background: var(--maroon); color: #fff; border-radius: 12px; padding: 10px 14px; min-width: 72px; }
.countdown b { display: block; font-size: 1.7rem; line-height: 1; font-family: var(--font-display); font-weight: 400; }
.countdown small { font-size: .75rem; opacity: .85; }
@media (max-width: 700px) {
  .next-event { grid-template-columns: 1fr; padding: 22px; }
}

/* ---------- Badges / tags ---------- */
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--saffron-light); color: var(--saffron); text-transform: uppercase; letter-spacing: .05em; }
.tag.havan { background: #fde4d3; color: #b23c07; }
.tag.chokra { background: #e5f3e1; color: #2f6b22; }
.tag.nived { background: #f3e5f5; color: #7b2d8b; }
.tag.done { background: #ececec; color: #555; }
.tag.booked { background: #e1efff; color: #1d5fa8; }

/* ---------- Event cards ---------- */
.event-card { display: grid; grid-template-columns: 110px 1fr; }
.event-date {
  background: linear-gradient(180deg, var(--maroon), var(--maroon-dark)); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 8px; text-align: center;
}
.event-date .d { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; }
.event-date .m { text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; }
.event-date .y { font-size: .8rem; opacity: .8; }
.event-card ul { margin: 8px 0 0; padding-left: 20px; }
.event-card .photos { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.event-card .photos img { width: 74px; height: 56px; object-fit: cover; border-radius: 8px; cursor: pointer; }
@media (max-width: 520px) { .event-card { grid-template-columns: 1fr; } .event-date { flex-direction: row; gap: 10px; padding: 10px; } .event-date .d { font-size: 1.6rem; } }

.tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 26px; flex-wrap: wrap; }
.tabs button {
  border: 2px solid var(--maroon); background: transparent; color: var(--maroon);
  padding: 9px 20px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
}
.tabs button.active { background: var(--maroon); color: #fff; }

.empty { text-align: center; color: var(--muted); padding: 30px; border: 2px dashed var(--line); border-radius: var(--radius); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--maroon); color: #fff; font-weight: 600; white-space: nowrap; }
tbody tr:nth-child(even) { background: #fffaf3; }
tfoot td { font-weight: 700; background: var(--saffron-light); }
td.num, th.num { text-align: right; white-space: nowrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select {
  font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; flex: 1 1 200px;
}
.toolbar select { flex: 0 1 160px; }

/* ---------- Mobile: stack table rows into cards ---------- */
@media (max-width: 640px) {
  .stack-table thead { display: none; }
  .stack-table tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .stack-table td { display: flex; justify-content: space-between; gap: 12px; border: none; padding: 5px 14px; text-align: right; }
  .stack-table td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
}

/* ---------- Temple feature ---------- */
.temple-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.temple-feature .card-img { aspect-ratio: auto; height: 100%; min-height: 260px; }
@media (max-width: 760px) { .temple-feature { grid-template-columns: 1fr; } .temple-feature .card-img { min-height: 200px; } }

.contact-line { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Gallery ---------- */
.album { margin-bottom: 44px; }
.album-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; border-bottom: 2px solid var(--line); padding-bottom: 8px; margin-bottom: 16px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.photo-grid figure { margin: 0; cursor: pointer; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.photo-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .3s; }
.photo-grid figure:hover img { transform: scale(1.05); }
.photo-grid figcaption { padding: 8px 12px; font-size: .9rem; color: var(--muted); }

.lightbox {
  position: fixed; inset: 0; background: rgba(20, 8, 4, .94); z-index: 100;
  display: none; align-items: center; justify-content: center; flex-direction: column; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 80vh; max-width: 100%; border-radius: 8px; }
.lightbox p { color: #fff; margin-top: 12px; text-align: center; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none; font-size: 1.8rem;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Quick links ---------- */
.quick { text-align: center; padding: 28px 20px; text-decoration: none; color: inherit; transition: transform .2s; display: block; }
.quick:hover { transform: translateY(-4px); }
.quick .big { font-size: 2.4rem; }
.quick h3 { margin-top: 8px; }
.quick p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--maroon-dark); color: #f5e6d8; padding: 50px 0 24px; margin-top: 0; }
.site-footer h3 { color: #ffd38a; font-size: 1.15rem; }
.site-footer a { color: #ffd38a; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,.15); margin-top: 34px; padding-top: 18px; font-size: .88rem; opacity: .8; }

/* ---------- Loading fade ---------- */
main { transition: opacity .25s; }
body:not(.ready) main { opacity: 0; }
.sub { color: var(--saffron); font-weight: 600; }
html[data-lang="gu"] h1, html[data-lang="gu"] h2, html[data-lang="gu"] h3 { letter-spacing: 0; }

/* ---------- Header: language switch ---------- */
.header-right { display: flex; align-items: center; gap: 8px; order: 3; }
.site-header .nav { order: 2; }
.lang-switch { display: inline-flex; border: 2px solid var(--maroon); border-radius: 999px; overflow: hidden; }
.lang-switch button { border: 0; background: transparent; color: var(--maroon); font: inherit; font-weight: 700; font-size: .85rem; padding: 5px 11px; cursor: pointer; }
.lang-switch button.on { background: var(--maroon); color: #fff; }
.draft-bar { background: #fff3c4; color: #6b4b00; text-align: center; font-size: .85rem; padding: 6px 12px; }

/* ---------- Nived guide ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 34px; }
.chip { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--saffron); border-radius: 12px; padding: 10px 16px; box-shadow: var(--shadow); }
.chip:hover { border-color: var(--saffron); }
.chip b { color: var(--maroon); }
.chip small { color: var(--muted); }
.nived-card { scroll-margin-top: 80px; }
.nived-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 22px 22px 0; }
.nived-head h2 { margin: 0; }
.nived-img { width: 100%; max-height: 340px; object-fit: cover; margin-top: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.fact { display: flex; gap: 10px; background: var(--saffron-light); border-radius: 12px; padding: 12px 14px; }
.fact .ico { font-size: 1.4rem; }
.fact small { display: block; color: var(--muted); font-size: .82rem; }
.fact strong { font-weight: 600; }
.n-block { margin-top: 26px; }
.n-block h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; color: var(--maroon); margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.n-block ol, .n-block ul { margin: 0; padding-left: 24px; }
.n-block li { margin: 6px 0; }
.n-block ol li::marker { color: var(--saffron); font-weight: 700; }
.n-note { margin-top: 22px; background: #fff8e6; border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 8px; }

/* ---------- Print (Nived page) ---------- */
@media print {
  .site-header, .site-footer, .toran, .no-print, .draft-bar, .page-hero, .lightbox { display: none !important; }
  body { background: #fff; font-size: 13pt; }
  section { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid-page; }
  body.printing-one .nived-card:not(.print-target) { display: none; }
  .table-wrap { box-shadow: none; }
  th { background: #eee !important; color: #000 !important; }
}
