/* =========================================================================
   Shri Jagannath Mandir — pixel-matched to design mockup
   Colors, spacing and type follow the mockup exactly; do not redesign.
   ========================================================================= */

:root {
    --maroon: #7B1113;
    --maroon-dark: #570c0e;
    --gold: #D4AF37;
    --gold-light: #e6c866;
    --cream: #FFF8F0;
    --accent: #F4E7C5;
    --white: #ffffff;
    --text: #222222;
    --text-muted: #6b5c52;

    --radius-card: 14px;
    --radius-img: 16px;
    --radius-btn: 6px;
    --shadow: 0 8px 24px rgba(123, 17, 19, 0.12);
    --shadow-lg: 0 16px 40px rgba(123, 17, 19, 0.18);

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--cream);
    line-height: 1.65;
}

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
p { color: var(--text-muted); font-family: var(--font-body); }

.section-tag {
    display: inline-block;
    font-family: var(--font-heading);
    color: var(--maroon);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius-btn);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0.3px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn-primary { background: var(--maroon); color: var(--white); border-color: var(--maroon); }
.btn-primary:hover { background: var(--maroon-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--maroon); border-color: var(--maroon); }
.btn-outline:hover { background: var(--maroon); color: var(--white); transform: translateY(-2px); }
.btn-outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--maroon); }
.btn-gold { background: var(--gold); color: var(--maroon-dark); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-live { background: var(--maroon); color: var(--white) !important; padding: 10px 20px; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 9px 18px; font-size: 12.5px; }

/* ---------------- Loader ---------------- */
.loader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--cream);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-emblem svg { width: 56px; height: 56px; }
.loader-emblem circle { fill: none; stroke: var(--maroon); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 200; stroke-dashoffset: 0; animation: loader-spin 1.1s linear infinite; }
@keyframes loader-spin { to { transform: rotate(360deg); } }
.loader-emblem svg { transform-origin: center; }

/* ---------------- Top bar ---------------- */
.topbar { background: var(--maroon); color: var(--accent); font-family: var(--font-body); font-size: 12.5px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; flex-wrap: wrap; gap: 6px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar-item { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.topbar-item i { color: var(--gold-light); font-size: 12px; }
.topbar-social { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.topbar-social a {
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 11px;
}

/* ---------------- Main header / nav (always solid) ---------------- */
.main-header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 200; }
.main-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; }
.logo-text strong { font-family: var(--font-display); font-weight: 700; color: var(--maroon); font-size: 19px; line-height: 1.1; }
.logo-text small { font-family: var(--font-body); color: var(--text-muted); font-size: 11px; }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 32px; height: 32px; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--maroon); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav { display: flex; align-items: center; gap: 24px; }
.main-nav a {
    font-family: var(--font-heading);
    font-size: 12.5px; font-weight: 600; letter-spacing: 0.4px;
    text-transform: uppercase; color: var(--text); padding: 6px 0;
}
.main-nav a.active, .main-nav a:hover { color: var(--maroon); }
.main-nav a.btn-live:hover { color: var(--white) !important; background: var(--maroon-dark); }

/* ---------------- Hero ---------------- */
.hero { background: linear-gradient(180deg, #fffaf2 0%, var(--cream) 100%); padding: 56px 0 0; overflow: hidden; position: relative; }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; }
.hero-text h1 { font-size: 34px; color: var(--maroon-dark); margin-bottom: 14px; }
.hero-text h1 .accent { color: var(--maroon); display: block; }
.hero-text p.addr { color: var(--text-muted); font-family: var(--font-body); margin-bottom: 6px; font-size: 15px; }
.hero-text p.tagline { color: var(--text-muted); margin-bottom: 26px; font-size: 15px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

.hero-media { position: relative; }
.hero-media .frame {
    border-radius: var(--radius-img);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.hero-media img { width: 100%; height: 360px; object-fit: cover; display: block; }
.hero-media .curve {
    position: absolute; left: -6%; right: -6%; bottom: -1px;
    height: 60px; z-index: 2;
}
.hero-media .curve path { fill: var(--gold); }

/* ---------------- Quick info strip (maroon band) ---------------- */
.quick-info-strip { background: var(--maroon); padding: 34px 0; margin-top: 26px; }
.quick-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.info-card {
    background: var(--cream);
    border-radius: var(--radius-card);
    text-align: center;
    padding: 22px 10px;
    box-shadow: var(--shadow);
}
.info-card .icon-wrap { width: 44px; height: 44px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; }
.info-card .icon-wrap i { font-size: 22px; color: var(--maroon); }
.info-card span { font-family: var(--font-heading); font-size: 13px; font-weight: 600; color: var(--text); }

/* ---------------- About preview (home) ---------------- */
.about-preview { padding: 56px 0; background: var(--white); }
.about-preview-inner { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: center; }
.about-preview .about-img { border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow); }
.about-preview .about-img img { width: 100%; height: 320px; object-fit: cover; }
.about-content h2 { font-size: 30px; color: var(--maroon-dark); }
.about-content p { margin-bottom: 20px; font-size: 15px; }

/* ---------------- Upcoming events (home strip) ---------------- */
.events-strip { padding: 50px 0 60px; background: var(--cream); }
.events-strip .heading { text-align: center; margin-bottom: 32px; }
.events-strip h2 { color: var(--maroon-dark); font-size: 28px; display: inline-flex; align-items: center; gap: 14px; }
.events-strip h2::before, .events-strip h2::after { content: "\2726"; color: var(--gold); font-size: 15px; }
.event-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.event-card { background: var(--white); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); }
.event-card-img { position: relative; height: 130px; }
.event-card-img img { width: 100%; height: 100%; object-fit: cover; }
.event-card-img .date-badge {
    position: absolute; top: 10px; left: 10px;
    background: var(--gold); color: var(--maroon-dark);
    border-radius: 6px; padding: 5px 9px; text-align: center;
    font-family: var(--font-heading); font-weight: 700; font-size: 14px; line-height: 1.1;
}
.event-card-img .date-badge small { display: block; font-weight: 600; font-size: 9.5px; letter-spacing: 0.5px; }
.event-card-body { padding: 14px 16px 18px; }
.event-card-body h4 { font-family: var(--font-heading); font-size: 15px; color: var(--maroon-dark); margin-bottom: 4px; font-weight: 600; }
.event-card-body p { font-size: 12.5px; margin: 0; }

/* ---------------- CTA banner ---------------- */
.cta-banner { background: var(--maroon); color: var(--white); text-align: center; padding: 40px 20px; position: relative; overflow: hidden; }
.cta-banner h3 { color: var(--white); font-size: 24px; margin-bottom: 18px; }
.cta-banner .ornament { position: absolute; top: 50%; transform: translateY(-50%); font-size: 100px; color: rgba(255,255,255,0.07); }
.cta-banner .ornament.left { left: 10px; }
.cta-banner .ornament.right { right: 10px; }

/* ---------------- Page banner (inner pages) ---------------- */
.page-banner {
    position: relative;
    padding: 54px 0;
    color: var(--white);
    background: linear-gradient(rgba(87,12,14,0.82), rgba(87,12,14,0.9)), var(--maroon);
    background-size: cover;
    background-position: center;
}
.page-banner.with-photo { background-image: linear-gradient(rgba(87,12,14,0.82), rgba(87,12,14,0.9)), url('../assets/images/hero.webp'); }
.page-banner .section-tag { color: var(--gold-light); }
.page-banner h1 { color: var(--white); font-size: 30px; margin-bottom: 8px; }
.page-banner .breadcrumb { font-family: var(--font-body); color: var(--accent); font-size: 13px; margin: 0; }
.page-banner .breadcrumb a { color: var(--white); }
.page-banner .breadcrumb a:hover { color: var(--gold-light); }

/* ---------------- About page ---------------- */
.about-main { padding: 50px 0; background: var(--white); }
.about-main-inner { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; margin-bottom: 40px; }
.about-main .about-img { border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow); }
.about-main .about-img img { width: 100%; height: 260px; object-fit: cover; }
.about-main h2 { font-size: 28px; color: var(--maroon-dark); }

.value-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 30px 0; text-align: center; }
.value-item .icon-wrap {
    width: 58px; height: 58px; border-radius: 50%; background: var(--accent);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
}
.value-item .icon-wrap i { font-size: 24px; color: var(--maroon); }
.value-item span { font-family: var(--font-heading); font-weight: 600; font-size: 14px; }

.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; text-align: center; border-top: 1px solid var(--accent); padding-top: 26px; }
.stat-item strong { display: block; font-family: var(--font-display); font-size: 26px; color: var(--maroon); }
.stat-item span { font-family: var(--font-body); font-size: 12px; color: var(--text-muted); }

/* ---------------- Events page (list rows) ---------------- */
.events-page { padding: 50px 0; background: var(--white); }
.event-row {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
    align-items: center;
    background: var(--cream);
    border-radius: var(--radius-card);
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.event-date {
    background: var(--maroon); color: var(--white); border-radius: 8px;
    text-align: center; padding: 10px 4px; font-family: var(--font-heading);
}
.event-date .day { font-size: 20px; font-weight: 700; display: block; line-height: 1; }
.event-date .month { font-size: 10px; letter-spacing: 1px; }
.event-thumb-title { display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: center; }
.event-thumb { border-radius: 8px; overflow: hidden; height: 70px; }
.event-thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-info h4 { font-family: var(--font-heading); color: var(--maroon-dark); font-size: 15px; margin-bottom: 4px; font-weight: 600; }
.event-info p { font-size: 12.5px; margin: 0 0 10px; }

/* ---------------- Gallery page ---------------- */
.gallery-page { padding: 50px 0; background: var(--white); }
.gallery-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.gallery-filters button {
    background: var(--white); border: 1.5px solid var(--accent);
    padding: 8px 18px; border-radius: var(--radius-btn);
    font-family: var(--font-heading); font-size: 12.5px; font-weight: 600;
    cursor: pointer; color: var(--text);
}
.gallery-filters button.active, .gallery-filters button:hover { background: var(--maroon); color: var(--white); border-color: var(--maroon); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.gallery-item { border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; position: relative; height: 200px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.08); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(20,5,5,0.92); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute; background: rgba(255,255,255,0.14); color: var(--white); border: none;
    border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------------- Contact page ---------------- */
.contact-page { padding: 50px 0; background: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.contact-info-card, .contact-form-card { background: var(--cream); border-radius: var(--radius-card); padding: 24px 20px; box-shadow: var(--shadow); }
.contact-photo { border-radius: var(--radius-img); overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow); }
.contact-photo img { width: 100%; height: 150px; object-fit: cover; }
.contact-info-card h3, .contact-form-card h3 { color: var(--maroon-dark); font-size: 20px; }
.contact-item { display: flex; gap: 12px; margin-bottom: 16px; }
.contact-item .icon-wrap { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-item .icon-wrap i { color: var(--maroon); font-size: 14px; }
.contact-item strong { display: block; font-family: var(--font-heading); font-size: 13.5px; }
.contact-item span, .contact-item a { font-size: 13px; }
.social-row { display: flex; gap: 10px; margin: 16px 0 20px; }
.social-row a { width: 32px; height: 32px; border-radius: 50%; background: var(--maroon); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 13px; }

.map-block { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); position: relative; height: 220px; }
.map-block iframe { width: 100%; height: 100%; border: 0; filter: grayscale(15%); }
.map-pin-card {
    position: absolute; top: 14px; left: 14px; background: var(--white);
    padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 220px;
}
.map-pin-card strong { display: block; font-family: var(--font-heading); font-size: 12.5px; color: var(--maroon-dark); }
.map-pin-card span { font-size: 11px; }

.form-row { margin-bottom: 14px; }
.form-row input, .form-row textarea {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--accent);
    border-radius: var(--radius-btn); font-family: var(--font-body); font-size: 14px;
    background: var(--white); color: var(--text);
}
.form-row textarea { resize: vertical; min-height: 100px; }
.form-success { display: none; background: #e4f6e9; color: #1c6b3a; padding: 12px 16px; border-radius: var(--radius-btn); font-size: 13px; margin-bottom: 14px; }
.form-success.show { display: block; }

/* ---------------- Footer (single bar, per mockup) ---------------- */
.site-footer { background: var(--maroon-dark); color: var(--accent); padding: 16px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 12.5px; font-family: var(--font-body); }
.footer-links a:hover { color: var(--gold-light); }

/* ---------------- Back to top ---------------- */
.back-to-top {
    position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%;
    background: var(--maroon); color: var(--white); border: none; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all 0.3s ease; z-index: 300;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------------- Magnetic buttons (subtle, GSAP-driven) ---------------- */
.magnetic { will-change: transform; }

/* ---------------- Generic content card + grid (seva/news/legal pages) ---------------- */
.card-block { background: var(--cream); border-radius: var(--radius-card); padding: 24px 20px; box-shadow: var(--shadow); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose p { font-size: 15px; margin-bottom: 16px; }
.news-card { background: var(--cream); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); }
.news-card img { width: 100%; height: 160px; object-fit: cover; }
.news-card-body { padding: 16px 18px; }
.news-card-body .news-date { color: var(--gold); font-family: var(--font-heading); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.news-card-body h4 { font-family: var(--font-heading); font-size: 15.5px; color: var(--maroon-dark); margin: 8px 0; font-weight: 600; }
.news-card-body a.read-more { color: var(--maroon); font-family: var(--font-heading); font-weight: 600; font-size: 13px; }

/* ---------------- Utility ---------------- */
.text-center { text-align: center; }
