/* ===== Arulmigu Sri Krishnan Thirukkovil ===== */
:root {
  --saffron: #E07A1F;
  --saffron-dark: #B85C10;
  --maroon: #7A1F1F;
  --gold: #C9972B;
  --gold-soft: #E9C46A;
  --cream: #FFF8EC;
  --cream-2: #FBEFD8;
  --ink: #2A1E12;
  --ink-soft: #5c4a38;
  --line: #ead9bb;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(122, 31, 31, .10);
  --radius: 16px;
  --maxw: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  font-family: "Hind Madurai", "Noto Sans Tamil", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: 92%; max-width: var(--maxw); margin: 0 auto; }

h1, h2, h3, h4 { font-family: "Catamaran", "Hind Madurai", sans-serif; line-height: 1.25; font-weight: 800; color: var(--maroon); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.2rem; color: var(--saffron-dark); }

/* ===== Topbar ===== */
.topbar { background: var(--maroon); color: #ffe9c9; font-size: .82rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 7px 0; flex-wrap: wrap; }
.topbar__reg { opacity: .85; }

/* ===== Header ===== */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,248,236,.97); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand__mark { font-size: 1.9rem; color: var(--saffron); line-height: 1; }
.brand__text strong { display: block; font-family: "Catamaran", sans-serif; color: var(--maroon); font-size: 1.02rem; font-weight: 800; }
.brand__text small { display: block; color: var(--ink-soft); font-size: .78rem; letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a { padding: .5rem .8rem; border-radius: 10px; font-weight: 600; font-size: .95rem; color: var(--ink); transition: .2s; white-space: nowrap; }
.nav a:hover { background: var(--cream-2); color: var(--saffron-dark); }
.nav__cta { background: var(--saffron); color: #fff !important; }
.nav__cta:hover { background: var(--saffron-dark) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--maroon); border-radius: 3px; transition: .25s; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 78vh; display: flex; align-items: center;
  background: linear-gradient(rgba(42,14,8,.35), rgba(42,14,8,.6)), url("../images/temple-view.jpg") center/cover no-repeat;
  text-align: center; color: #fff;
}
.hero__content { position: relative; padding: 5rem 0; }
.hero__eyebrow { color: var(--gold-soft); letter-spacing: .18em; font-weight: 600; margin-bottom: .6rem; }
.hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.8rem); text-shadow: 0 2px 18px rgba(0,0,0,.4); }
.hero__sub { margin-top: 1rem; font-size: 1.1rem; color: #ffeccf; }
.hero__btns { margin-top: 2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-block; padding: .8rem 1.7rem; border-radius: 50px; font-weight: 700; font-size: 1rem; transition: .25s; border: 2px solid transparent; }
.btn--primary { background: var(--saffron); color: #fff; box-shadow: 0 8px 20px rgba(224,122,31,.4); }
.btn--primary:hover { background: var(--saffron-dark); transform: translateY(-2px); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.15); }

/* ===== Facts ===== */
.facts { background: var(--maroon); color: #fff; }
.facts__grid { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.fact { padding: 1.8rem 1rem; border-right: 1px solid rgba(255,255,255,.12); }
.fact:last-child { border-right: 0; }
.fact__num { display: block; font-family: "Catamaran", sans-serif; font-size: 2rem; font-weight: 800; color: var(--gold-soft); }
.fact__label { font-size: .9rem; opacity: .9; }

/* ===== Sections ===== */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--cream-2); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 2.6rem; }
.section__lead { color: var(--ink-soft); margin-top: .6rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--saffron); margin-bottom: .4rem; }
.section p { margin-bottom: 1rem; color: var(--ink-soft); }
.section p strong { color: var(--ink); }
.muted { color: var(--ink-soft); font-style: italic; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.media img { border-radius: var(--radius); box-shadow: var(--shadow); border: 5px solid #fff; }
.media--stack { display: grid; gap: 1rem; }

.addr-card { margin-top: 1.4rem; background: #fff; border-left: 5px solid var(--saffron); border-radius: 12px; padding: 1.1rem 1.3rem; box-shadow: var(--shadow); }
.addr-card strong { display: block; color: var(--maroon); margin-bottom: .3rem; }

/* ===== Cards ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.4rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); transition: .25s; }
.card:hover { transform: translateY(-5px); border-color: var(--gold-soft); }
.card__icon { font-size: 2rem; display: block; margin-bottom: .6rem; }
.card h3 { margin-bottom: .4rem; }
.card p { font-size: .95rem; margin: 0; }

/* ===== Ticks list ===== */
.ticks { list-style: none; margin: 1rem 0; }
.ticks li { position: relative; padding: .45rem 0 .45rem 2rem; color: var(--ink-soft); border-bottom: 1px dashed var(--line); }
.ticks li::before { content: "卐"; position: absolute; left: 0; color: var(--saffron); font-weight: 700; }

/* ===== Note band ===== */
.note-band { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; max-width: 820px; margin: 0 auto; text-align: center; box-shadow: var(--shadow); }
.note-band .btn { margin-top: .6rem; }

.pill-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.pill { background: var(--cream); border: 1px solid var(--gold-soft); color: var(--saffron-dark); padding: .4rem .9rem; border-radius: 50px; font-size: .85rem; font-weight: 600; }

.committee__title { text-align: center; margin: 3rem 0 1.6rem; }
.committee__sub { text-align: center; font-size: 1.05rem; color: var(--maroon); margin: 2rem 0 1.1rem; font-family: "Catamaran", "Hind Madurai", sans-serif; font-weight: 800; }
.committee__sub::after { content: ""; display: block; width: 54px; height: 3px; margin: .55rem auto 0; background: var(--gold-soft); border-radius: 3px; }
.committee-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.committee-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--gold-soft); border-radius: 12px; padding: .8rem 1rem; box-shadow: var(--shadow); }
.committee__name { font-weight: 700; color: var(--maroon); }
.committee__role { font-size: .85rem; color: var(--saffron-dark); background: var(--cream); padding: .25rem .7rem; border-radius: 50px; white-space: nowrap; }
.committee { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.1rem; }
.member { background: #fff; border: 1px solid var(--gold-soft); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.member:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(122, 31, 31, .18); }
.member img { width: 100%; aspect-ratio: 36 / 46; object-fit: cover; background: var(--cream-2); }
.member figcaption { padding: .7rem .8rem .9rem; text-align: center; }
.member__name { display: block; font-weight: 700; color: var(--maroon); font-size: .98rem; }
.member__role { display: inline-block; margin-top: .4rem; font-size: .78rem; color: var(--saffron-dark); background: var(--cream); padding: .22rem .7rem; border-radius: 50px; }
.member__role--priest { color: #fff; background: var(--saffron); }

/* ===== Gallery ===== */
.gallery__sub { text-align: center; font-size: 1.05rem; color: var(--maroon); margin: 2.4rem 0 1.3rem; font-family: "Catamaran", "Hind Madurai", sans-serif; font-weight: 800; }
.gallery__sub:first-of-type { margin-top: .6rem; }
.gallery__sub::after { content: ""; display: block; width: 54px; height: 3px; margin: .55rem auto 0; background: var(--gold-soft); border-radius: 3px; }
.gallery__sub small { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-soft, #666); margin-top: .35rem; }
.gallery + .gallery__sub { margin-top: 3rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery__item { position: relative; overflow: hidden; border-radius: 12px; box-shadow: var(--shadow); cursor: pointer; background: #000; }
.gallery__item img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: .4s; }
.gallery__item:hover img { transform: scale(1.08); opacity: .9; }
.gallery__item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .8rem; font-size: .85rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); }

/* ===== Donate ===== */
.section--donate { background: linear-gradient(135deg, var(--maroon), #4d1414); color: #fff; }
.section--donate h2, .section--donate .eyebrow { color: var(--gold-soft); }
.section--donate .section__lead { color: #ffe9c9; }
.donate-card { max-width: 640px; margin: 0 auto; background: #fff; color: var(--ink); border-radius: var(--radius); padding: 2rem; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.donate-card h3 { text-align: center; margin-bottom: 1.2rem; }
.bank { display: grid; gap: .1rem; }
.bank > div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .2rem; border-bottom: 1px dashed var(--line); }
.bank dt { font-weight: 700; color: var(--maroon); }
.bank dd { text-align: right; color: var(--ink-soft); }
.donate-note { margin-top: 1.2rem; font-size: .88rem; text-align: center; color: var(--saffron-dark); background: var(--cream); padding: .7rem; border-radius: 10px; }

/* ===== Footer ===== */
.footer { background: #2A1309; color: #e9d4b4; padding-top: 3rem; }
.footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding-bottom: 2rem; }
.footer h4 { color: var(--gold-soft); margin-bottom: .7rem; font-size: 1rem; }
.footer p { font-size: .92rem; line-height: 1.8; color: #cdb690; }
.footer__links { list-style: none; }
.footer__links a { color: #cdb690; font-size: .92rem; line-height: 2; }
.footer__links a:hover { color: var(--gold-soft); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0; text-align: center; font-size: .85rem; color: #b89a72; }

/* ===== Lightbox ===== */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; z-index: 100; flex-direction: column; }
.lightbox.open { display: flex; }
.lightbox__img { max-width: 90vw; max-height: 80vh; border-radius: 8px; box-shadow: 0 0 40px rgba(0,0,0,.6); }
.lightbox__cap { color: #fff; margin-top: 1rem; font-size: 1rem; }
.lightbox__close { position: absolute; top: 18px; right: 26px; background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; line-height: 1; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); border: 0; color: #fff; font-size: 1.6rem; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; transition: .2s; }
.lightbox__nav:hover { background: var(--saffron); }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }

/* ===== To top ===== */
.to-top { position: fixed; bottom: 24px; right: 24px; width: 46px; height: 46px; border-radius: 50%; background: var(--saffron); color: #fff; display: grid; place-items: center; font-size: 1.3rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .3s; z-index: 40; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--saffron-dark); }

/* ===== Reveal animation ===== */
.section > .container { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.section.in > .container { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav { position: fixed; top: 64px; right: 0; bottom: 0; width: min(78vw, 300px); flex-direction: column; align-items: stretch; background: var(--cream); padding: 1.2rem; gap: .3rem; box-shadow: -10px 0 30px rgba(0,0,0,.15); transform: translateX(100%); transition: transform .3s; overflow-y: auto; }
  .nav.open { transform: none; }
  .nav a { padding: .8rem 1rem; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .grid-2 { grid-template-columns: 1fr; gap: 1.8rem; }
  .grid-2--rev .media { order: -1; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(2) { border-right: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .topbar__reg { display: none; }
}
@media (max-width: 420px) {
  .facts__grid { grid-template-columns: 1fr; }
  .fact { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
}
