/* Parappuveettil Temple - peacock blue + gold */
:root {
  --blue: #0e5f6e;
  --blue-dk: #0a4753;
  --blue-xdk: #073540;
  --gold: #d4a03a;
  --gold-lt: #f0cf86;
  --gold-dk: #8a6116;
  --cream: #fbf4e4;
  --cream-2: #f4e8cc;
  --ink: #23302f;
  --muted: #5d6b69;
  --card: #fffdf7;
  --line: #e6d6ad;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(7, 53, 64, .10);
  --font: "Noto Sans Malayalam", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7;
  color: var(--ink); background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.35; color: var(--blue-dk); margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

/* language switch */
html[data-lang="ml"] .en { display: none !important; }
html[data-lang="en"] .ml { display: none !important; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .92em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* header */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, var(--blue-dk), var(--blue-xdk));
  color: #fff; border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.brand img { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-ml { font-weight: 700; font-size: 1.05rem; color: var(--gold-lt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-en { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; opacity: .88; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.lang { display: flex; border: 1px solid rgba(240, 207, 134, .55); border-radius: 999px; overflow: hidden; }
.lang button {
  font: inherit; font-size: .8rem; line-height: 1; padding: 8px 11px; border: 0; cursor: pointer;
  background: transparent; color: #fff; min-height: 34px;
}
html[data-lang="ml"] [data-set-lang="ml"], html[data-lang="en"] [data-set-lang="en"] {
  background: var(--gold); color: var(--blue-xdk); font-weight: 700;
}

.menu-btn {
  width: 42px; height: 42px; border: 1px solid rgba(240, 207, 134, .55); border-radius: 10px;
  background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.menu-btn svg { stroke: var(--gold-lt); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }

.nav { display: none; border-top: 1px solid rgba(240, 207, 134, .25); }
.nav.open { display: block; }
.nav ul { list-style: none; margin: 0; padding: 6px 16px 12px; }
.nav a {
  display: block; padding: 10px 6px; color: #fff; text-decoration: none; font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nav a[aria-current="page"] { color: var(--gold-lt); }

@media (min-width: 960px) {
  .menu-btn { display: none; }
  .nav, .nav.open { display: block; }
  .nav ul { display: flex; justify-content: center; gap: 4px; padding: 0 16px; }
  .nav a { border: 0; padding: 10px 14px; border-bottom: 3px solid transparent; margin-bottom: -3px; }
  .nav a:hover { color: var(--gold-lt); }
  .nav a[aria-current="page"] { border-bottom-color: var(--gold); }
}

.lang .ls { display: none; }
@media (max-width: 560px) {
  .lang .lf { display: none; }
  .lang .ls { display: inline; }
  .lang button { padding: 8px 10px; min-width: 38px; }
  .brand img { width: 36px; height: 36px; }
  .brand-ml { white-space: normal; font-size: .95rem; line-height: 1.25; }
  .brand-en { font-size: .68rem; letter-spacing: .04em; }
}

/* hero */
.hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(212, 160, 58, .18), transparent 45%),
    linear-gradient(160deg, var(--blue) 0%, var(--blue-dk) 55%, var(--blue-xdk) 100%);
  color: #fff; overflow: hidden;
}
.hero-in { display: grid; gap: 24px; padding-top: 28px; padding-bottom: 32px; align-items: center; }
.eyebrow { color: var(--gold-lt); letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; margin: 0 0 6px; font-weight: 600; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 1.3rem + 3vw, 3.1rem); margin-bottom: 8px; }
.hero h1 .h1-en { display: block; font-size: .5em; color: var(--gold-lt); letter-spacing: .06em; font-weight: 600; margin-top: 4px; }
.tagline { font-size: 1.1rem; opacity: .95; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-photo {
  border-radius: 200px 200px var(--radius) var(--radius); overflow: hidden;
  border: 3px solid var(--gold); box-shadow: 0 0 0 6px rgba(212, 160, 58, .25), 0 20px 40px rgba(0, 0, 0, .35);
  max-width: 420px; justify-self: center; width: 100%; aspect-ratio: 3 / 4;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 820px) {
  .hero-in { grid-template-columns: 1.15fr .85fr; padding-top: 56px; padding-bottom: 56px; gap: 48px; }
}

.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px; text-decoration: none; font-weight: 700;
  background: var(--gold); color: var(--blue-xdk); border: 2px solid var(--gold); transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--gold-lt); }
.sec .btn.ghost { color: var(--gold-dk); }

.divider {
  height: 14px;
  background:
    linear-gradient(45deg, transparent 33%, var(--gold) 33% 67%, transparent 67%) 0 0 / 14px 14px,
    var(--cream-2);
  opacity: .8;
}

/* page header */
.ph {
  position: relative; color: #fff; text-align: center; padding: 56px 0 48px;
  background: linear-gradient(rgba(7, 53, 64, .78), rgba(7, 53, 64, .88)), var(--bg, none) center / cover, var(--blue-dk);
  border-bottom: 3px solid var(--gold);
}
.ph h1 { color: #fff; font-size: clamp(1.7rem, 1.3rem + 2vw, 2.5rem); margin: 0; }
.ph h1::after { content: ""; display: block; width: 72px; height: 3px; background: var(--gold); margin: 14px auto 0; border-radius: 2px; }
.ph-sub { margin: 12px 0 0; opacity: .9; }

/* sections */
.sec { padding: 40px 0; }
.sec.alt { background: var(--cream-2); }
@media (min-width: 820px) { .sec { padding: 60px 0; } }
.lead { font-size: 1.12rem; }
.intro { text-align: center; max-width: 820px; }
.intro .lead::before, .intro .lead::after { content: "✦"; color: var(--gold); margin: 0 10px; }
.prose p { font-size: 1.05rem; }
.note { color: var(--muted); text-align: center; font-size: .95rem; margin-top: 16px; }
.soon { color: var(--muted); font-style: italic; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  border-top: 4px solid var(--blue);
}
.card h2 { font-size: 1.2rem; }
.more { margin-top: auto; padding-top: 10px; font-weight: 700; text-decoration: none; color: var(--blue); }
.cards3 { display: grid; gap: 18px; }
@media (min-width: 820px) { .cards3 { grid-template-columns: repeat(3, 1fr); } }

/* timings */
.tgrid { display: grid; gap: 18px; }
@media (min-width: 640px) { .tgrid:not(.compact) { grid-template-columns: 1fr 1fr; } }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.tgrid.compact { gap: 10px; }
.tgrid.compact .tcard { padding: 0; border: 0; box-shadow: none; background: none; }
.tcard h3 { color: var(--gold-dk); font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.ttable { width: 100%; border-collapse: collapse; }
.ttable th, .ttable td { padding: 8px 0; border-bottom: 1px dashed var(--line); text-align: left; font-weight: 400; vertical-align: top; }
.ttable td { text-align: right; font-weight: 700; color: var(--blue-dk); white-space: nowrap; padding-left: 12px; }
.ttable tr:last-child th, .ttable tr:last-child td { border-bottom: 0; }
.tgrid.compact .ttable th, .tgrid.compact .ttable td { padding: 4px 0; font-size: .95rem; }

.dtext { margin: 0; font-weight: 600; color: var(--blue-dk); }
.dtime { margin: 2px 0 0; color: var(--gold-dk); font-weight: 700; }
.tgrid.compact { grid-template-columns: 1fr 1fr; }
.tgrid.compact .tcard { border-left: 3px solid var(--gold); padding-left: 10px; }
.page-timings .note { font-size: 1.05rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 12px 16px; text-align: left; }

/* monthly + events */
.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mlist li {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 10px 14px;
}
.mlist .mm { font-weight: 700; color: var(--blue-dk); }
.mlist li.past { opacity: .5; border-left-color: var(--line); }
.mlist li.next { border-left-color: var(--blue); box-shadow: var(--shadow); }
.mlist li.next .mm::after { content: " ●"; color: var(--gold); }
.mlist.next-only li { display: none; }
.mlist.next-only li.next, .no-js .mlist.next-only li:first-child { display: flex; flex-direction: column; border: 0; padding: 0; background: none; box-shadow: none; }
.mlist.next-only li.next .mm { font-size: 1.4rem; }
.mlist.next-only li.next .mm::after { content: ""; }

.elist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.elist li { display: flex; gap: 14px; align-items: flex-start; }
.elist li.past { display: none; }
.elist h3 { margin: 0 0 2px; }
.elist p { margin: 0; }
.edate {
  flex: none; width: 66px; text-align: center; background: var(--blue); color: #fff; border-radius: 10px;
  padding: 6px 4px; line-height: 1.15; font-size: .78rem; border-bottom: 3px solid var(--gold);
}
.edate b { display: block; font-size: 1.5rem; color: var(--gold-lt); }
.edate small { display: block; opacity: .8; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 820px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.tile {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3;
  text-decoration: none; box-shadow: var(--shadow); border: 2px solid var(--gold);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile:hover img { transform: scale(1.05); }
.tile > span {
  position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; color: #fff; font-weight: 700;
  background: linear-gradient(transparent, rgba(7, 53, 64, .92));
}

/* gallery */
.ggrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .ggrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .ggrid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.ggrid.strip { margin-bottom: 24px; }
.gitem { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--cream-2); box-shadow: var(--shadow); }
.gitem img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gitem:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(4, 25, 30, .94);
  display: flex; align-items: center; justify-content: center; padding: 50px 8px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: var(--gold-lt); margin-top: 10px; text-align: center; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(240, 207, 134, .5);
  width: 46px; height: 46px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer;
}
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* deities */
.dgrid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
@media (min-width: 820px) { .dgrid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.dcard { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.dcard .gitem { border-radius: 0; aspect-ratio: 3 / 4; box-shadow: none; }
.dbody { padding: 12px 14px; border-top: 3px solid var(--gold); text-align: center; }
.dbody h2 { font-size: 1.05rem; margin: 0; }
.dbody p { margin: 6px 0 0; font-size: .95rem; color: var(--muted); }

/* vazhipadu */
.vlist { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 640px) { .vlist { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .vlist { grid-template-columns: repeat(3, 1fr); } }
.vlist li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 14px 52px;
  position: relative; box-shadow: var(--shadow);
}
.vlist li::before {
  content: ""; position: absolute; left: 16px; top: 18px; width: 22px; height: 22px;
  background: url(favicon.svg) center / contain no-repeat;
}
.vlist h3 { margin: 0 0 4px; }
.vlist p { margin: 0; color: var(--muted); font-size: .95rem; }

/* festivals */
.fgrid { display: grid; gap: 18px; }
@media (min-width: 820px) { .fgrid { grid-template-columns: 1fr 1fr; } }
.fcard {
  display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
}
.fcard img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; }
.fcard h3 { margin: 2px 0; }
.fcard p { margin: 0 0 4px; }
.when { color: var(--gold-dk); font-weight: 700; font-size: .95rem; }
.none-left { color: var(--muted); }

/* footer */
.foot { background: var(--blue-xdk); color: #dfe9e8; padding: 32px 0 20px; border-top: 3px solid var(--gold); margin-top: 0; }
.foot .wrap { display: grid; gap: 18px; }
.foot-brand { display: flex; gap: 12px; align-items: center; }
.foot-brand strong { color: var(--gold-lt); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-nav a { color: #dfe9e8; text-decoration: none; font-size: .95rem; }
.foot-nav a:hover { color: var(--gold-lt); }
.foot-copy { margin: 0; font-size: .85rem; opacity: .7; }
@media (min-width: 820px) { .foot .wrap { grid-template-columns: auto 1fr; align-items: center; } .foot-nav { justify-content: flex-end; } .foot-copy { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
