/* ============================================================
   Shantinath Foundation — Public Site
   Theme: maroon + gold on cream. Serif display, sans body.
   Self-hosted fonts only (no CDN). Fully responsive.
   ============================================================ */

/* ── Self-hosted premium fonts (variable, latin subset) ── */
@font-face {
    font-family: 'Playfair Display';
    src: url('/fonts/PlayfairDisplay.woff2') format('woff2');
    font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter.woff2') format('woff2');
    font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ============================================================
   THEME TOKENS — single source of truth.
   Change the whole colour combination from HERE ONLY. Every
   component below references these variables (no hard-coded
   colours anywhere else in this file). Swap the palette group
   and the entire site re-themes.
   ============================================================ */
:root {
    /* — Palette (raw colours) — */
    --maroon-900: #3a0a0a;
    --maroon-800: #4a0e0e;
    --maroon-700: #5e1414;
    --maroon-600: #6b1a1a;
    --gold-500:   #c99a3f;
    --gold-400:   #d4a94a;
    --gold-300:   #e2c078;
    --cream-100:  #faf5e8;
    --cream-200:  #f7f0e0;
    --cream-300:  #efe4cf;
    --ink-900:    #2a1a10;
    --ink-700:    #4a3826;
    --ink-500:    #6f5a44;
    --white:      #ffffff;

    /* — Semantic roles (use these in components) — */
    --brand-dark:    var(--maroon-800);   /* header / footer / hero bg */
    --brand-darker:  var(--maroon-900);
    --brand-mid:     var(--maroon-700);
    --accent:        var(--gold-500);     /* gold accents / buttons */
    --accent-light:  var(--gold-400);
    --accent-lighter:var(--gold-300);
    --surface:       var(--cream-100);    /* cards */
    --page-bg:       var(--cream-200);
    --border:        var(--cream-300);
    --text:          var(--ink-900);
    --text-muted:    var(--ink-700);
    --text-faint:    var(--ink-500);
    --on-brand:      var(--cream-100);    /* text on maroon */

    /* — Status / misc colours — */
    --live-red:      #c0392b;
    --success-bg:    #e6f4ea; --success-fg: #1e7e34; --success-border: #b7e0c2;
    --error-bg:      #fdecea; --error-fg:   #b02a37; --error-border:   #f5c2c7;
    --overlay-15:    rgba(255, 255, 255, .15);
    --overlay-30:    rgba(255, 255, 255, .30);
    --overlay-08:    rgba(255, 255, 255, .08);
    --overlay-12:    rgba(255, 255, 255, .12);
    --overlay-35:    rgba(255, 255, 255, .35);
    --overlay-40:    rgba(255, 255, 255, .40);

    /* — Shape / layout — */
    --shadow-xs:  0 1px 3px rgba(58, 10, 10, .08);
    --shadow-sm:  0 4px 14px rgba(58, 10, 10, .10);
    --shadow-md:  0 10px 30px rgba(58, 10, 10, .14);
    --shadow-lg:  0 20px 50px rgba(58, 10, 10, .20);
    --shadow-gold:0 8px 24px rgba(201, 154, 63, .30);
    --radius:     16px;
    --radius-sm:  11px;
    --radius-lg:  22px;
    --wrap:       1280px;
    --header-h:   80px;
    --ease:       cubic-bezier(.22, 1, .36, 1);
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink-900);
    background: var(--cream-200);
    line-height: 1.6;
    font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; margin: 0 0 .4em; line-height: 1.2; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 15px;
    transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--maroon-900);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border: 2px solid var(--gold-400); color: var(--gold-300); }
.btn-outline:hover { background: var(--gold-400); color: var(--maroon-900); }

/* ── Ornamental section title ─────────────────────── */
.sec-title {
    text-align: center;
    color: var(--maroon-800);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 26px;
    position: relative;
}
.sec-title::before, .sec-title::after {
    content: "\276E\2726\276F";
    color: var(--gold-500);
    font-size: .7em;
    margin: 0 .6em;
    vertical-align: middle;
    letter-spacing: -2px;
}

.section { padding: 56px 0; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: linear-gradient(180deg, var(--maroon-800), var(--maroon-900));
    color: var(--cream-100);
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    min-height: var(--header-h); gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo-img { height: 52px; width: auto; display: block; }
.brand-tagline { color: var(--accent-lighter); font-size: 12px; letter-spacing: 1px; padding-left: 12px; border-left: 1px solid var(--overlay-15); white-space: nowrap; }
@media (max-width: 640px) { .brand-tagline { display: none; } }
.brand-logo {
    width: 46px; height: 46px; flex: none;
    display: grid; place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 30%, var(--gold-300), var(--gold-500));
    color: var(--maroon-900); font-size: 24px;
}
.brand-text { line-height: 1.05; }
.brand-text .b-sub    { font-size: 10px; letter-spacing: 3px; color: var(--gold-300); }
.brand-text .b-main   { font-family: var(--font-serif); font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.brand-text .b-tagline{ font-size: 11px; color: var(--cream-100); opacity: .8; }

.main-nav ul { display: flex; list-style: none; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
    display: block; padding: 8px 14px; border-radius: 8px;
    font-size: 15px; color: var(--cream-100); transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--gold-300); }
.main-nav a.active { color: var(--gold-300); }

.nav-toggle {
    display: none; background: none; border: none; cursor: pointer;
    color: var(--gold-300); padding: 6px;
}
.nav-toggle span { display: block; width: 26px; height: 3px; background: currentColor; border-radius: 2px; margin: 5px 0; transition: .3s; }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero { position: relative; overflow: hidden; background: var(--maroon-900); }
.hero-track { display: flex; transition: transform .6s ease; }
.hero-slide { position: relative; flex: 0 0 100%; }
.hero-img { width: 100%; height: 460px; object-fit: cover; display: block; }

.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--overlay-15); border: 1px solid var(--overlay-35);
    color: var(--white); cursor: pointer; font-size: 20px;
    display: grid; place-items: center; backdrop-filter: blur(2px);
    transition: background .2s;
}
.hero-arrow:hover { background: var(--overlay-30); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-dots {
    position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 5;
}
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: var(--overlay-40); cursor: pointer; padding: 0; }
.hero-dots button.active { background: var(--gold-400); }

/* ============================================================
   QUICK TABS (About / Committee / Live Darshan)
   ============================================================ */
.quick-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: -34px auto 0; position: relative; z-index: 10; }
.quick-tab {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 20px; border-radius: var(--radius-sm);
    background: var(--cream-100); color: var(--maroon-800);
    font-family: var(--font-serif); font-size: 18px; font-weight: 700;
    box-shadow: var(--shadow-sm); border: 1px solid var(--cream-300);
    transition: transform .15s, box-shadow .15s;
}
.quick-tab .qt-icon { font-size: 22px; }
.quick-tab:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-tab.active { background: linear-gradient(180deg, var(--maroon-700), var(--maroon-800)); color: var(--cream-100); }

/* ── Quick-tab buttons (reset for <button>) ───────── */
.quick-tab { border: none; cursor: pointer; font-family: var(--font-serif); width: 100%; }

/* ── Tab panels (switch in place on home) ─────────── */
.tabs-section { padding-bottom: 40px; }
.tab-panel { display: none; margin-top: 26px; }
.tab-panel.active { display: block; animation: tabfade .3s ease; }
@keyframes tabfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel-card {
    background: var(--cream-100); border: 1px solid var(--cream-300);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 34px;
}
.tab-intro { max-width: 820px; margin: 0 auto 18px; text-align: center; color: var(--ink-700); }
.tab-intro p { margin: 0 0 10px; }
.panel-actions { text-align: center; margin-top: 24px; }

/* ── Live Darshan grid — adjusts by stream count ──── */
.darshan-grid { display: grid; gap: 20px; }
.darshan-grid.count-1 { grid-template-columns: 1fr; max-width: 860px; margin: 0 auto; }
.darshan-grid.count-2 { grid-template-columns: repeat(2, 1fr); }
.darshan-grid.count-3 { grid-template-columns: repeat(3, 1fr); }
.darshan-grid.grid-auto { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.darshan-item .darshan-stage { background-size: cover; background-position: center; }
.darshan-item .darshan-stage.has-embed::after { display: none; }
.darshan-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; }
.mt-40 { margin-top: 40px; }
.darshan-item .darshan-stage::after { content: ""; position: absolute; inset: 0; background: rgba(30,8,8,.45); }
.darshan-item .live-badge, .darshan-item .darshan-placeholder { position: relative; z-index: 2; }
.darshan-title { margin-top: 10px; text-align: center; font-family: var(--font-serif); color: var(--maroon-800); font-size: 17px; }
.darshan-empty { text-align: center; color: var(--ink-500); padding: 30px; }

/* ── small utilities (avoid inline styles) ────────── */
.pt-0 { padding-top: 0; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-16 { margin-top: 16px; }
.mt-22 { margin-top: 22px; }

/* 404 / error page */
.error-hero { min-height: 70vh; display: grid; place-items: center; }
.error-code { font-size: 4rem; }
.error-msg { color: var(--on-brand); opacity: .9; }

/* ============================================================
   ABOUT card
   ============================================================ */
.about-card {
    background: var(--cream-100); border: 1px solid var(--cream-300);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center;
}
.about-text p { margin: 0 0 10px; text-align: center; color: var(--ink-700); }
.about-media img { border-radius: var(--radius-sm); box-shadow: var(--shadow-md); width: 100%; }

/* ============================================================
   GALLERY (folders sidebar + carousel)
   ============================================================ */
.gallery-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
.gallery-folders {
    background: var(--cream-100); border: 1px solid var(--cream-300);
    border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm);
}
.gallery-folders h3 {
    margin: 0; padding: 14px 16px; font-size: 16px;
    background: linear-gradient(180deg, var(--maroon-700), var(--maroon-800));
    color: var(--cream-100);
}
.gallery-folders ul { list-style: none; margin: 0; padding: 6px; }
.gallery-folders li a {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--ink-700);
    transition: background .2s, color .2s;
}
.gallery-folders li a:hover, .gallery-folders li a.active {
    background: var(--cream-300); color: var(--maroon-800); font-weight: 600;
}
/* Home folder chips (buttons that AJAX-filter the photos) */
.gallery-folders li .folder-chip {
    display: flex; align-items: center; gap: 8px; width: 100%;
    background: none; border: none; cursor: pointer; text-align: left;
    padding: 10px 12px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink-700);
    transition: background .2s, color .2s;
}
.gallery-folders li .folder-chip:hover, .gallery-folders li .folder-chip.active {
    background: var(--cream-300); color: var(--maroon-800); font-weight: 600;
}
.gallery-panel {
    background: var(--cream-100); border: 1px solid var(--cream-300);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; position: relative;
}
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.photo-card { border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); position: relative; aspect-ratio: 4/3; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.photo-card:hover img { transform: scale(1.06); }
.photo-card .caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 10px 12px; font-size: 13px; color: var(--white);
    background: linear-gradient(0deg, rgba(30,8,8,.85), transparent);
}
/* ── Gallery carousel (home) ──────────────────────── */
.gallery-carousel { position: relative; padding: 0 44px; }
.gc-viewport { overflow: hidden; }
.gc-track { display: flex; gap: 0; transition: transform .5s ease; }
.gc-item { flex: 0 0 25%; max-width: 25%; padding: 8px; box-sizing: border-box; }
.gc-item .photo-card { cursor: pointer; }
.gc-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
    width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--maroon-700); color: var(--cream-100); font-size: 20px;
    display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.gc-arrow:hover { background: var(--maroon-800); }
.gc-arrow.gc-prev { left: 0; }
.gc-arrow.gc-next { right: 0; }
.gc-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.gc-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: var(--cream-300); cursor: pointer; padding: 0; }
.gc-dots button.active { background: var(--gold-500); }
.lb-item { cursor: pointer; }

/* ── Lightbox viewer ──────────────────────────────── */
.lightbox {
    position: fixed; inset: 0; z-index: 1000; display: none;
    align-items: center; justify-content: center;
    background: rgba(20, 6, 6, .92); padding: 40px;
}
.lightbox.open { display: flex; }
.lb-figure { margin: 0; max-width: 90vw; max-height: 86vh; text-align: center; }
.lb-figure img { max-width: 90vw; max-height: 78vh; border-radius: 8px; box-shadow: var(--shadow-md); }
.lb-figure figcaption { color: var(--cream-100); margin-top: 12px; font-family: var(--font-serif); font-size: 18px; }
.lb-close {
    position: absolute; top: 18px; right: 22px; z-index: 2;
    background: none; border: none; color: var(--cream-100); font-size: 40px; line-height: 1; cursor: pointer;
}
.lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--overlay-15); color: var(--white); font-size: 26px; display: grid; place-items: center;
}
.lb-nav:hover { background: var(--overlay-30); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
@media (max-width: 560px) {
    .gallery-carousel { padding: 0 34px; }
    .lb-nav { width: 42px; height: 42px; font-size: 22px; }
}

.gallery-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.gallery-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: var(--cream-300); cursor: pointer; padding: 0; }
.gallery-dots button.active { background: var(--gold-500); }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
    background: linear-gradient(180deg, var(--maroon-800), var(--maroon-900));
    color: var(--cream-100); padding: 48px 0; text-align: center;
}
.page-hero h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero .crumbs { color: var(--gold-300); font-size: 14px; }
.page-hero .crumbs a:hover { color: var(--white); }

/* ── Committee grid ───────────────────────────────── */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.member-card {
    background: var(--cream-100); border: 1px solid var(--cream-300);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); text-align: center;
    padding: 24px; transition: transform .15s, box-shadow .15s;
}
.member-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.member-card img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 3px solid var(--gold-300); }
.member-card .m-name { font-family: var(--font-serif); font-size: 18px; color: var(--maroon-800); }
.member-card .m-role { color: var(--gold-500); font-weight: 600; font-size: 14px; margin: 2px 0 8px; }
.member-card .m-phone { font-size: 13px; color: var(--ink-500); }

/* ── Events grid ──────────────────────────────────── */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.event-card {
    background: var(--cream-100); border: 1px solid var(--cream-300);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.event-card .e-media { aspect-ratio: 16/9; overflow: hidden; }
.event-card .e-media img { width: 100%; height: 100%; object-fit: cover; }
.event-card .e-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.event-card .e-date { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-500); font-weight: 600; font-size: 13px; }
.event-card .e-title { font-family: var(--font-serif); color: var(--maroon-800); font-size: 19px; }
.event-card .e-meta { font-size: 13px; color: var(--ink-500); }
.event-card .e-excerpt { font-size: 14px; color: var(--ink-700); margin-top: auto; }
.event-card .e-more { color: var(--accent); font-weight: 600; font-size: 14px; margin-top: 10px; }
.event-card:hover .e-more { text-decoration: underline; }

/* ── Event detail + rich content ──────────────────── */
.event-detail .ed-media { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 18px; }
.event-detail .ed-media img { width: 100%; max-height: 420px; object-fit: cover; }

/* Placeholder when an event has no image */
.no-image {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; min-height: 120px;
    background: var(--cream-dark, #f0e6d2); color: var(--text-faint, #9a8f7d);
    font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.event-detail .ed-media .no-image { min-height: 180px; }
.event-detail .ed-meta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 8px; }
.event-detail .ed-title { color: var(--brand-dark); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; }
.rich-content { color: var(--text-muted); line-height: 1.8; max-width: 820px; }
.rich-content p { margin: 0 0 14px; }
.rich-content h1, .rich-content h2, .rich-content h3 { color: var(--brand-dark); margin: 22px 0 10px; }
.rich-content ul, .rich-content ol { margin: 0 0 14px; padding-left: 22px; }
.rich-content li { margin-bottom: 6px; }
.rich-content a { color: var(--accent); text-decoration: underline; }
.rich-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 12px 0; }
.rich-content blockquote { border-left: 4px solid var(--accent); margin: 0 0 14px; padding: 6px 16px; color: var(--text-faint); }

/* ── Live Darshan ─────────────────────────────────── */
.darshan-stage {
    aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
    background: var(--maroon-900); display: grid; place-items: center; color: var(--cream-100);
    box-shadow: var(--shadow-md); position: relative;
}
.darshan-stage .live-badge {
    position: absolute; top: 14px; left: 14px;
    background: var(--live-red); color: var(--white); font-size: 12px; font-weight: 700;
    padding: 4px 12px; border-radius: 999px; letter-spacing: 1px;
    display: inline-flex; align-items: center; gap: 6px;
}
.darshan-stage .live-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--white); }
.darshan-placeholder { text-align: center; padding: 40px; }
.darshan-placeholder .play { font-size: 54px; color: var(--gold-400); }
.schedule-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.schedule-list li {
    background: var(--cream-100); border: 1px solid var(--cream-300); border-left: 4px solid var(--gold-500);
    border-radius: var(--radius-sm); padding: 12px 16px;
}
.schedule-list .s-time { color: var(--maroon-700); font-weight: 700; }
.schedule-list .s-name { font-size: 14px; color: var(--ink-700); }

/* ── Donate ───────────────────────────────────────── */
.donate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.donate-card {
    background: var(--cream-100); border: 1px solid var(--cream-300);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px;
    display: flex; flex-direction: column; gap: 12px;
}
.donate-card .d-title { font-family: var(--font-serif); color: var(--maroon-800); font-size: 20px; }
.donate-card .d-desc { font-size: 14px; color: var(--ink-700); }
.amount-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.amount-chips span { padding: 6px 14px; border-radius: 999px; background: var(--cream-300); color: var(--maroon-800); font-weight: 600; font-size: 14px; }

/* ── Contact + forms ──────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.contact-info { display: grid; gap: 16px; }
.contact-info .ci-row { display: flex; gap: 14px; align-items: flex-start; background: var(--cream-100); border: 1px solid var(--cream-300); border-radius: var(--radius-sm); padding: 16px; }
.contact-info .ci-icon { font-size: 20px; color: var(--gold-500); }
.form-card { background: var(--cream-100); border: 1px solid var(--cream-300); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.field input, .field textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--cream-300); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 15px; background: var(--white); color: var(--ink-900);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold-300); border-color: var(--gold-400); }

.prose { max-width: 820px; margin: 0 auto; color: var(--ink-700); }
.prose p { margin: 0 0 14px; }

/* ── Flash (legacy inline — kept for any direct use) ── */
.flash { max-width: var(--wrap); margin: 16px auto 0; padding: 0 20px; }
.flash-msg { padding: 12px 18px; border-radius: var(--radius-sm); font-weight: 600; }
.flash-success { background: var(--success-bg); color: var(--success-fg); border: 1px solid var(--success-border); }
.flash-error   { background: var(--error-bg); color: var(--error-fg); border: 1px solid var(--error-border); }

/* ── Toast notifications (top-right, both sides) ──── */
.toast-container {
    position: fixed; top: 18px; right: 18px; z-index: 2000;
    display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 36px));
}
.toast {
    display: flex; align-items: flex-start; gap: 10px;
    background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
    padding: 13px 14px; border-left: 4px solid var(--text-faint);
    transform: translateX(120%); opacity: 0; transition: transform .3s ease, opacity .3s ease;
}
.toast.show { transform: none; opacity: 1; }
.toast-ico { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--white); font-weight: 700; font-size: 13px; }
.toast-msg { flex: 1; font-size: 14px; color: var(--text); line-height: 1.45; }
.toast-x { background: none; border: none; cursor: pointer; font-size: 20px; line-height: 1; color: var(--text-faint); padding: 0 2px; }
.toast-success { border-left-color: var(--success-fg); }
.toast-success .toast-ico { background: var(--success-fg); }
.toast-error   { border-left-color: var(--error-fg); }
.toast-error .toast-ico { background: var(--error-fg); }
.toast-info    { border-left-color: var(--accent); }
.toast-info .toast-ico { background: var(--accent); }

/* ── Inline field validation ─────────────────────── */
.field-error { color: var(--error-fg); font-size: 13px; margin-top: 5px; min-height: 1em; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--error-fg); }
.field.has-error input:focus, .field.has-error textarea:focus, .field.has-error select:focus { outline-color: var(--error-fg); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: linear-gradient(180deg, var(--maroon-800), var(--maroon-900));
    color: var(--cream-100); padding: 44px 0 0; margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.6fr 1fr; gap: 28px; }
.footer-col h4 { color: var(--gold-300); font-size: 17px; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { font-size: 14px; opacity: .9; }
.footer-col a:hover { color: var(--gold-300); opacity: 1; }
.footer-contact .fc-row { display: flex; gap: 10px; font-size: 14px; margin-bottom: 10px; opacity: .92; }
.footer-contact .fc-icon { color: var(--gold-400); }
.social-row { display: flex; gap: 10px; margin-top: 6px; }
.social-row a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--overlay-12); color: var(--on-brand); transition: background .2s; }
.social-row a svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.social-row a:hover { background: var(--gold-500); color: var(--maroon-900); }
.qr-box { margin-top: 14px; width: 96px; height: 96px; background: var(--white); border-radius: 8px; display: grid; place-items: center; padding: 6px; }
.qr-box img { width: 100%; }
.newsletter input { width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: none; margin-bottom: 10px; font-family: inherit; }
.newsletter .btn { width: 100%; }
.footer-bottom { border-top: 1px solid var(--overlay-15); margin-top: 34px; padding: 16px 0; text-align: center; font-size: 13px; opacity: .85; }
.footer-bottom .heart { color: var(--live-red); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .gallery-wrap { grid-template-columns: 200px 1fr; }
}
@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
        background: var(--maroon-900); max-height: 0; overflow: hidden;
        transition: max-height .3s ease; box-shadow: var(--shadow-md);
    }
    .main-nav.open { max-height: 70vh; }
    .main-nav ul { flex-direction: column; gap: 0; padding: 8px; }
    .main-nav a { padding: 14px 16px; border-bottom: 1px solid var(--overlay-08); }
    .quick-tabs { grid-template-columns: 1fr; margin-top: 22px; }
    .about-card { grid-template-columns: 1fr; }
    .about-media { order: -1; }
    .gallery-wrap { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-img { height: 340px; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 40px 0; }
    .about-card { padding: 22px; }
    .hero-arrow { width: 38px; height: 38px; }
    .brand-text .b-tagline { display: none; }
}

/* ════════════════════════════════════════════════════════════
   PREMIUM POLISH & ANIMATIONS  (added by design-system pass)
   ════════════════════════════════════════════════════════════ */

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4 { letter-spacing: -.01em; }

/* Subtle page texture — faint radial warmth */
body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(1200px 600px at 100% -5%, rgba(201,154,63,.10), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(94,20,20,.06), transparent 60%);
}

/* ── Keyframes ─────────────────────────────────── */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes shimmer  { 0% { transform: translateX(-120%); } 60%,100% { transform: translateX(220%); } }
@keyframes floatY   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulseRing{ 0% { box-shadow: 0 0 0 0 rgba(201,154,63,.5); } 100% { box-shadow: 0 0 0 12px rgba(201,154,63,0); } }

/* ── Scroll reveal (JS adds .in) ───────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* ── Header: sticky glass on scroll ────────────── */
.site-header { transition: background .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s; }
.site-header.scrolled { background: linear-gradient(180deg, rgba(58,10,10,.92), rgba(58,10,10,.86)); backdrop-filter: blur(10px) saturate(1.2); box-shadow: var(--shadow-md); }
.main-nav a { position: relative; }
.main-nav a::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
    background: var(--accent-light); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

/* ── Buttons: shimmer + lift ───────────────────── */
.btn { position: relative; overflow: hidden; letter-spacing: .02em; }
.btn-gold { box-shadow: var(--shadow-gold); }
.btn-gold::before {
    content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: translateX(-120%);
}
.btn-gold:hover::before { animation: shimmer 1.1s var(--ease); }
.btn:active { transform: translateY(0) scale(.98); }

/* ── Hero: slow zoom + refined dots ────────────── */
.hero-img { animation: kenburns 14s ease-in-out infinite alternate; }
.hero-dots button { transition: width .3s var(--ease), background .3s; }
.hero-dots button.active { width: 26px; border-radius: 6px; }

/* ── Section titles: flourish underline ────────── */
.sec-title { padding-bottom: 14px; }
.sec-title::first-line { line-height: 1.1; }
.sec-title { background-position: center bottom; }

/* ── Cards: unified premium hover ──────────────── */
.about-card, .panel-card, .member-card, .event-card, .donate-card, .gallery-panel, .gallery-folders, .form-card, .contact-info .ci-row {
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.member-card:hover, .event-card:hover { box-shadow: var(--shadow-lg); border-color: var(--accent-lighter); }
.photo-card img { transition: transform .6s var(--ease); }

/* Quick-tabs premium */
.quick-tab { transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, color .3s; }
.quick-tab.active { box-shadow: var(--shadow-md); }

/* Committee avatar subtle float on hover */
.member-card:hover img { animation: floatY 2.4s ease-in-out infinite; }

/* Live badge pulse */
.live-badge { animation: pulseRing 1.8s ease-out infinite; }

/* Gallery folder active accent bar */
.gallery-folders li a { position: relative; }
.gallery-folders li a.active::before {
    content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--accent);
}

/* Footer link hover slide */
.footer-col a { transition: color .25s, padding-left .25s var(--ease); }
.footer-col ul a:hover { padding-left: 4px; }

/* Social icons pop */
.social-row a { transition: transform .25s var(--ease), background .25s; }
.social-row a:hover { transform: translateY(-3px) scale(1.06); }

/* Page hero subtle gradient sheen */
.page-hero { position: relative; overflow: hidden; }
.page-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(600px 200px at 50% -20%, rgba(201,154,63,.18), transparent 70%);
}

/* ════════════════════════════════════════════════════════════
   MOBILE-SPECIFIC LAYOUT FIXES (≤ 860px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {

    /* ── Live Darshan: stack streams one below another ── */
    .darshan-grid.count-2, .darshan-grid.count-3, .darshan-grid.grid-auto { grid-template-columns: 1fr; }
    .darshan-item .darshan-stage { aspect-ratio: 16/9; }

    /* ── Gallery folders → horizontal scrolling chips ── */
    .gallery-folders h3 { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
    .gallery-folders ul {
        display: flex; gap: 8px; overflow-x: auto; padding: 12px;
        -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: thin;
    }
    .gallery-folders li { flex: 0 0 auto; }
    .gallery-folders li a,
    .gallery-folders li .folder-chip {
        white-space: nowrap; background: var(--cream-200); border: 1px solid var(--border);
        border-radius: 999px; padding: 8px 14px; scroll-snap-align: start; width: auto;
    }
    .gallery-folders li a.active,
    .gallery-folders li .folder-chip.active { background: var(--maroon-700); color: var(--cream-100); }
    .gallery-folders li a.active::before { display: none; }

    /* ── Gallery photos → single-row horizontal scroll ── */
    #galleryGrid {
        display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px;
        grid-template-columns: none; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    }
    #galleryGrid .photo-card { flex: 0 0 80%; aspect-ratio: 4/3; scroll-snap-align: center; }

    /* ── Upcoming Events → single-row horizontal scroll ── */
    .event-grid {
        display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px;
        grid-template-columns: none; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    }
    .event-grid .event-card { flex: 0 0 84%; scroll-snap-align: center; }

    /* Thin, themed scrollbars for the horizontal scrollers */
    #galleryGrid::-webkit-scrollbar, .event-grid::-webkit-scrollbar, .gallery-folders ul::-webkit-scrollbar { height: 6px; }
    #galleryGrid::-webkit-scrollbar-thumb, .event-grid::-webkit-scrollbar-thumb, .gallery-folders ul::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 6px; }

    /* Reveal off for horizontal scrollers so off-screen cards aren't blank */
    .event-grid .reveal, #galleryGrid .reveal { opacity: 1 !important; transform: none !important; }
}
