/* ============================================================================
   Maa Koteshwari Seva Samiti Trust — Theme Polish Layer
   ----------------------------------------------------------------------------
   Slim heritage refinement on top of the Modern Heritage design system.
   Loaded LAST on every page so it wins ties by source order.
   Pure CSS (gradients + inline-SVG data-URIs), bilingual-safe, reduced-motion aware.
   ============================================================================ */

:root {
    --mt-gold-antique: #b8893b;
    --mt-gold-deep: #8c6322;
    --mt-gold-leaf: #d9b25f;
    --mt-gold-hair: rgba(184, 137, 59, 0.45);
    --mt-gold-ghost: rgba(184, 137, 59, 0.16);
    --mt-gold-wash: rgba(184, 137, 59, 0.1);
    --mt-parchment: #fdf8ee;
    --mt-parchment-2: #fbf3e2;
    --mt-halo: radial-gradient(circle, rgba(217, 178, 95, 0.2) 0%, rgba(184, 137, 59, 0.1) 40%, transparent 70%);
    --mt-shadow-quiet: 0 16px 40px -28px rgba(58, 38, 18, 0.34);
}

/* ── Site-wide backdrop vignette ── */
.mandir-pattern {
    background-image: radial-gradient(ellipse 90% 60% at 50% 0%, var(--mt-gold-ghost), transparent 60%) !important;
    background-size: auto !important;
    opacity: 0.85;
}

/* ── Navbar: antique-gold hairline + soft brass CTA ── */
.navbar-mandir {
    border-bottom: 1px solid var(--mt-gold-hair);
}

.logo-icon {
    border: 1px solid var(--mt-gold-antique);
    border-radius: 12px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 2px 8px -4px rgba(50, 30, 8, 0.25);
}

.nav-link.nav-cta {
    background: linear-gradient(135deg, #f3e3ba 0%, #e6cd94 100%);
    color: var(--maroon-800);
    border: 1px solid var(--mt-gold-antique);
}

.nav-link.nav-cta:hover {
    background: linear-gradient(135deg, var(--maroon-600), var(--maroon-800));
    color: #fff;
}

/* ── Hero: concentric mandala halo behind content ── */
.hero-temple::after,
.page-hero::after {
    content: '';
    position: absolute;
    background:
        repeating-conic-gradient(from 0deg, transparent 0deg 12deg, var(--mt-gold-wash) 12deg 15.5deg, transparent 15.5deg 30deg),
        repeating-conic-gradient(from 0deg, var(--mt-gold-wash) 0deg 6deg, transparent 6deg 12deg),
        radial-gradient(circle, transparent 38%, var(--mt-gold-wash) 39% 40%, transparent 41% 54%, var(--mt-gold-wash) 55% 56%, transparent 57%),
        radial-gradient(circle, transparent 64%, var(--mt-gold-wash) 64.6% 65.4%, transparent 66%);
    -webkit-mask: radial-gradient(circle, #000 55%, transparent 74%);
    mask: radial-gradient(circle, #000 55%, transparent 74%);
    left: 50%;
    top: 50%;
    width: min(85vw, 600px);
    height: min(85vw, 600px);
    transform: translate(-50%, -50%);
    opacity: 0.32;
    pointer-events: none;
    z-index: 0;
}

.hero-temple::after {
    animation: mt-mandala-breathe 16s ease-in-out infinite;
}

/* ── Title divider: Om mark flanked by gold hairlines ── */
.title-divider {
    width: min(280px, 75%);
    max-width: 100%;
    height: 22px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ctext x='14' y='21' font-size='20' text-anchor='middle' fill='%23b8893b' font-family='serif'%3E%E0%A5%90%3C/text%3E%3C/svg%3E") center/auto 20px no-repeat;
}

/* ── Icon badges: brass medallions with a warm diya halo ── */
.section-icon,
.card-icon,
.seva-item .card-icon {
    position: relative;
    background: linear-gradient(160deg, var(--mt-parchment), var(--mt-parchment-2));
    border: 1px solid var(--mt-gold-antique);
    box-shadow: 0 0 0 4px rgba(127, 38, 38, 0.06);
}

.feature-icon {
    position: relative;
    background: linear-gradient(160deg, var(--mt-parchment), var(--mt-parchment-2));
    border: 1px solid var(--mt-gold-antique);
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.75), 0 10px 24px -14px rgba(58, 38, 18, 0.35);
}

.section-icon::after,
.card-icon::after,
.feature-icon::after {
    content: '';
    position: absolute;
    inset: -13px;
    border-radius: 50%;
    background: var(--mt-halo);
    z-index: -1;
    pointer-events: none;
    animation: mt-halo-flicker 5.5s ease-in-out infinite;
}

/* ── Cards: calm parchment, hairline brass frame, quiet lift ── */
.card-mandir,
.seva-item,
.notice-card,
.member-card,
.social-card,
.summary-panel,
.gallery-card,
.timeline-content,
.story-panel,
.qr-card {
    background: #fffdf8;
    border-color: rgba(184, 137, 59, 0.26);
    box-shadow: inset 0 0 0 1px rgba(255, 252, 246, 0.6), var(--mt-shadow-quiet);
}

/* ── Buttons: brass-rimmed ── */
.btn-primary,
.btn-mandir {
    border: 1px solid var(--mt-gold-antique);
}

.btn-secondary {
    background: linear-gradient(135deg, #f3e3ba 0%, #e6cd94 100%);
    color: var(--maroon-800);
    border: 1px solid var(--mt-gold-antique);
}

/* ── Forms: paper inputs, warm focus ring ── */
.field-control {
    background-color: var(--mt-parchment);
    border: 1px solid var(--mt-gold-hair);
}

.field-control:focus {
    border-color: var(--mt-gold-deep);
    box-shadow: 0 0 0 3px rgba(140, 99, 34, 0.22), 0 0 0 2px var(--mt-gold-deep);
    background-color: #fffdf8;
}

.field-label {
    color: var(--maroon-800);
}

input[type='file'].field-control {
    border: 2px dashed var(--mt-gold-hair);
}

input[type='file'].field-control:hover {
    border-color: var(--mt-gold-antique);
}

.captcha-question {
    color: var(--mt-gold-deep);
}

/* ── Gallery actions + member avatar: brass family ── */
.gallery-action {
    border-color: var(--mt-gold-hair);
}

.member-avatar {
    border: 4px solid var(--mt-gold-antique);
    box-shadow: 0 0 0 5px rgba(201, 162, 74, 0.2), 0 10px 24px rgba(0, 0, 0, 0.2);
}

/* ── Modals: parchment + brass ── */
.seva-modal,
.gallery-lightbox-dialog {
    background: linear-gradient(180deg, var(--mt-parchment), var(--mt-parchment-2));
    border: 1px solid var(--mt-gold-ghost);
}

/* ── Footer: Om bookend on the gold top rule ── */
.footer-mandir {
    position: relative;
    border-top: 1px solid rgba(201, 162, 74, 0.45);
}

.footer-mandir::after {
    content: 'ॐ';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--gold-300);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    background: #190505;
    border: 1px solid rgba(201, 162, 74, 0.55);
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(201, 162, 74, 0.4);
    pointer-events: none;
}

/* ── Keyframes ── */
@keyframes mt-mandala-breathe {

    0%,
    100% {
        opacity: 0.32;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.42;
        transform: translate(-50%, -50%) scale(1.02);
    }
}

@keyframes mt-halo-flicker {

    0%,
    100% {
        opacity: 0.85;
    }

    50% {
        opacity: 1;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {

    .hero-temple::after,
    .section-icon::after,
    .card-icon::after,
    .feature-icon::after {
        animation: none !important;
    }
}

/* ── Landscape shorts: hide the hero mandala band ── */
@media (max-height: 520px) and (orientation: landscape) {

    .hero-temple::after,
    .page-hero::after {
        display: none;
    }
}