/* ==========================================================
   Sri Sai Baba Pooja Samiti, Kala Ghoda — site styles
   Colours and fonts are set once here in :root.
   ========================================================== */
:root {
  --saffron: #e07b1a;
  --saffron-dark: #b85f0c;
  --maroon: #7a1f1f;
  --maroon-dark: #561414;
  --gold: #c9a046;
  --cream: #fbf6ec;
  --sand: #f3e8d4;
  --ink: #2b211a;
  --muted: #6b5d50;
  --line: #e6d8bf;
  --white: #fff;

  --font-head: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --radius: 14px;
  --shadow: 0 6px 24px rgba(74, 40, 10, .10);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 88px; } /* keep linked sections clear of the sticky header */
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); }
a:hover { color: var(--saffron-dark); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; color: var(--maroon-dark); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.45rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--white); padding: 8px 12px; }

/* Items the committee needs to confirm or update (remove class when done) */
.todo {
  background: #fff3c4;
  border-left: 4px solid #e0b100;
  padding: .6em .9em;
  border-radius: 6px;
  font-size: .95rem;
  color: #5c4a00;
}

/* ---------- Header & navigation ---------- */
.top-bar {
  background: var(--maroon-dark);
  color: #f3dcc0;
  font-size: .9rem;
}
.top-bar .wrap { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.top-bar a { color: #ffe2b8; text-decoration: none; }
@media (max-width: 600px) {
  .top-bar { display: none; }
  .brand-name { font-size: 1.12rem; }
  .brand-mark { width: 38px; height: 38px; font-size: 1.15rem; }
}

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(251, 246, 236, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--maroon-dark); }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #f6b25c, var(--saffron) 60%, var(--saffron-dark));
  color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 1.35rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; line-height: 1.1; }
.brand-sub { display: block; font-family: var(--font-body); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font: inherit; font-weight: 600; color: var(--maroon-dark); cursor: pointer;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem;
}
.main-nav a:hover { background: var(--sand); color: var(--maroon); }
.main-nav a[aria-current="page"] { color: var(--maroon); background: var(--sand); }
.main-nav .btn { margin-left: 6px; }

@media (max-width: 920px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .main-nav a { padding: 12px; }
  .main-nav .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--saffron); color: var(--white) !important; }
.btn-primary:hover { background: var(--saffron-dark); }
.btn-outline { border-color: var(--maroon); color: var(--maroon); }
.btn-outline:hover { background: var(--maroon); color: var(--white); }
.btn-light { background: var(--white); color: var(--maroon) !important; }
.main-nav a.btn-primary { padding: 9px 18px; }
.main-nav a.btn-primary:hover,
.main-nav a.btn-primary[aria-current="page"] { background: var(--saffron-dark); }

/* ---------- Hero (home) ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% 20%, rgba(224,123,26,.18), transparent 60%),
    linear-gradient(180deg, var(--cream), var(--sand));
  padding: clamp(40px, 7vw, 88px) 0;
}
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-eyebrow { font-family: var(--font-head); font-size: 1.35rem; color: var(--saffron-dark); font-weight: 600; margin-bottom: .3em; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.5em; }
.hero-figure img {
  border-radius: 200px 200px var(--radius) var(--radius);
  box-shadow: 0 0 0 8px var(--white), 0 0 0 10px var(--gold), var(--shadow);
}
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-figure { max-width: 320px; margin-inline: auto; order: -1; }
}

/* ---------- Page header (inner pages) ---------- */
.page-head {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon) 60%, #8f3a12);
  color: #fbe7cc;
  padding: clamp(36px, 6vw, 64px) 0;
}
.page-head h1 { color: var(--white); margin-bottom: .2em; }
.page-head p { margin: 0; font-size: 1.15rem; max-width: 40em; opacity: .92; }

/* ---------- Sections ---------- */
.section { padding: clamp(44px, 7vw, 80px) 0; }
.section-alt { background: var(--sand); }
.section-head { max-width: 44em; margin-bottom: 2em; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.2em; }
.prose h2:first-child { margin-top: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.split-top { align-items: start; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.rounded { border-radius: var(--radius); box-shadow: var(--shadow); }
.split img.rounded { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2.4rem; color: var(--saffron-dark); line-height: 1; margin-bottom: 6px; }
.stat span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 2px 8px rgba(74,40,10,.04);
}
a.card { text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; }
a.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card-body { padding: 20px 22px 24px; flex: 1; }
.card-body h3 { margin-bottom: .3em; }
.card-body p { color: var(--muted); margin: 0; }
.card-tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--saffron-dark); margin-bottom: 6px; }

/* ---------- Fund detail blocks (Our Work) ---------- */
.fund { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: start; padding: 32px 0; border-top: 1px solid var(--line); }
.fund:first-of-type { border-top: 0; }
.fund img { border-radius: var(--radius); }
@media (max-width: 760px) { .fund { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Tables (sevas, sponsorship, events) ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--sand); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--maroon-dark); }
tr:last-child td { border-bottom: 0; }
td.amount, th.amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Info boxes ---------- */
.info-box { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--saffron); border-radius: var(--radius); padding: 22px 24px; }
.info-box h3 { margin-top: 0; }
.info-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.info-box dt { font-weight: 700; color: var(--muted); }
.info-box dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .info-box dl { grid-template-columns: 1fr; } .info-box dd { margin-bottom: 8px; } }

/* ---------- Scheme list & flyer (Support) ---------- */
.scheme-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.scheme-list li { position: relative; padding-left: 28px; }
.scheme-list li::before {
  content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px;
  border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 3px rgba(224,123,26,.2);
}
.flyer { margin: 0; }
.flyer img { border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s; }
.flyer a:hover img { transform: translateY(-2px); }
.flyer figcaption { margin-top: 10px; font-size: .95rem; color: var(--muted); }

/* ---------- Appeal / CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--saffron-dark), var(--saffron)); color: var(--white); padding: clamp(40px, 6vw, 64px) 0; }
.cta-band h2 { color: var(--white); }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band p { margin: 0; max-width: 38em; font-size: 1.1rem; }

/* ---------- People (committees) ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.people li { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.people .role { display: block; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--saffron-dark); }
.committee { margin-top: 2.5em; }
.committee h3 { border-bottom: 2px solid var(--gold); padding-bottom: 6px; display: inline-block; }
.member-list { color: var(--muted); margin-top: 1em; }
.mt-lg { margin-top: 2.5em; }

/* ---------- Schedule ---------- */
.schedule { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.schedule .card-body ul { padding-left: 1.1em; margin: .5em 0 0; color: var(--ink); }
.time { font-family: var(--font-head); font-size: 1.6rem; color: var(--saffron-dark); font-weight: 700; display: block; }

/* Upcoming event card */
.event {
  display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); max-width: 900px;
}
.event-date {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: linear-gradient(160deg, var(--maroon), var(--maroon-dark)); color: var(--white);
  border-radius: 12px; padding: 14px 8px 12px;
}
.event-month { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .85rem; color: #ffd9a8; }
.event-day { font-family: var(--font-head); font-size: 3.4rem; font-weight: 700; line-height: 1; }
.event-year { font-size: .8rem; opacity: .85; margin-top: 4px; }
.event-body { min-width: 0; }
.event-body h3 { font-size: 1.9rem; }
.timeline { list-style: none; padding: 0; margin: 0 0 1em; border-left: 2px solid var(--gold); }
.timeline li { position: relative; padding: 6px 0 6px 20px; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--saffron); border: 2px solid var(--white);
}
.programme-head { font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--saffron-dark); margin: 1.2em 0 .5em; }
.event-venue a { white-space: nowrap; }
.timeline .t { display: inline-block; min-width: 170px; font-weight: 700; color: var(--maroon); font-variant-numeric: tabular-nums; }
.event-note { color: var(--muted); font-size: .97rem; }
@media (max-width: 600px) {
  .event { grid-template-columns: 1fr; padding: 20px; gap: 16px; }
  .event-date { flex-direction: row; gap: 10px; justify-content: center; align-items: baseline; padding: 10px; }
  .event-day { font-size: 2.2rem; }
  .timeline .t { display: block; min-width: 0; }
}

details.past { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
details.past summary { cursor: pointer; font-weight: 700; color: var(--maroon); }
details.past[open] summary { margin-bottom: 12px; }

/* ---------- Video (YouTube loads only after a click) ---------- */
.video {
  position: relative; aspect-ratio: 16 / 9; max-width: 900px; width: 100%;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon) 60%, var(--saffron-dark));
}
.video-play { all: unset; cursor: pointer; display: block; width: 100%; height: 100%; position: relative; }
.video-play:focus-visible { outline: 3px solid var(--saffron); outline-offset: -3px; }
.video-play img { width: 100%; height: 100%; object-fit: cover; }
.play-icon {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--saffron); box-shadow: 0 4px 18px rgba(0,0,0,.35); transition: transform .15s;
}
.play-icon::after {
  content: ""; position: absolute; left: 30px; top: 22px;
  border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent var(--white);
}
.video-play:hover .play-icon { transform: translate(-50%, -50%) scale(1.08); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-link { margin-top: 12px; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.gallery figure { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery button { all: unset; cursor: zoom-in; display: block; width: 100%; }
.gallery button:focus-visible { outline: 3px solid var(--saffron); outline-offset: -3px; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .25s; }
.gallery button:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 12px 14px; font-size: .95rem; color: var(--muted); }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1000px, 94vw); }
dialog.lightbox::backdrop { background: rgba(20, 10, 4, .85); }
dialog.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: 10px; }
dialog.lightbox p { color: #f6e7d2; text-align: center; margin: 12px 0 0; }
dialog.lightbox .close {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 1.4rem; cursor: pointer;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.contact-grid .info-box p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--maroon-dark); color: #ead2b4; padding: 48px 0 24px; font-size: .97rem; }
.site-footer a { color: #ffe2b8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-family: var(--font-head); font-size: 1.3rem; color: var(--white); margin: 0 0 .5em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 16px; font-size: .88rem; opacity: .8; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
