/* ============================================
   KundliBanao - Virtual Mandir Styles
   ============================================ */

.mandir-main {
    min-height: 100vh;
    padding: 80px 20px 60px;
    background:
        radial-gradient(ellipse 800px 600px at 20% 0%, rgba(245, 158, 11, 0.08), transparent),
        radial-gradient(ellipse 800px 600px at 80% 100%, rgba(139, 92, 246, 0.08), transparent);
}

.mandir-header {
    text-align: center;
    padding: 30px 16px 36px;
    position: relative;
    overflow: hidden;
}
.mandir-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 100%, rgba(245, 158, 11, 0.18), transparent 60%);
    pointer-events: none;
    z-index: -1;
}
.mandir-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.6rem;
    font-weight: 800;
    color: #fde68a;
    margin-bottom: 8px;
    text-shadow: 0 4px 24px rgba(245, 158, 11, 0.35);
}
.mandir-header h1 i {
    color: #f59e0b;
    margin-right: 10px;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}
.mandir-header p {
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto 12px;
}
.mandir-stats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.84rem;
    margin-top: 8px;
}

/* Today's deity */
.aaj-ka-devta { max-width: 900px; margin: 0 auto 40px; }
.aaj-card {
    border: 1px solid;
    border-radius: 20px;
    padding: 22px 24px;
}
.aaj-label {
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 12px;
    font-weight: 600;
}
.aaj-deity {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.aaj-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    color: #fff;
    font-family: 'Noto Sans Devanagari', serif;
    font-size: 2.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.aaj-info { flex: 1; min-width: 220px; }
.aaj-info h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}
.aaj-hindi {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 1rem;
    margin-left: 8px;
}
.aaj-info p {
    color: var(--text-dim);
    margin-bottom: 8px;
    font-size: 0.92rem;
}
.aaj-mantra {
    font-family: 'Noto Sans Devanagari', serif;
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 700;
}

/* Gallery */
.mandir-gallery { max-width: 1100px; margin: 0 auto; }
.mandir-section-title {
    color: var(--text);
    font-size: 1.4rem;
    margin-bottom: 18px;
    text-align: center;
    font-weight: 700;
}
.mandir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* Deity card with temple-arch silhouette */
.mandir-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.2)),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px 20px 14px 14px;
    padding: 24px 16px 18px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}
.mandir-card::before {
    /* Temple arch top */
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 100px;
    border-radius: 50% 50% 0 0;
    background: linear-gradient(180deg, var(--deity-color, #8b5cf6) 0%, transparent 80%);
    opacity: 0.15;
    pointer-events: none;
}
.mandir-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--deity-color, #8b5cf6);
}
.mandir-card-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, var(--deity-color, #8b5cf6) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
}
.mandir-card-symbol {
    font-family: 'Noto Sans Devanagari', serif;
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 30px currentColor;
    position: relative;
    z-index: 1;
}
.mandir-card-arch {
    position: relative;
    margin: 6px auto 12px;
    width: 90px;
    height: 100px;
}
.mandir-card-deity {
    position: absolute;
    inset: 0;
    border-radius: 50% 50% 14px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 2.2rem;
    box-shadow: inset 0 -16px 30px rgba(0, 0, 0, 0.3), 0 10px 24px rgba(0, 0, 0, 0.4);
}
.mandir-card-deity::after {
    /* Aureole */
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50% 50% 14px 14px;
    background: radial-gradient(circle, transparent 50%, var(--deity-color, #8b5cf6) 60%, transparent 70%);
    opacity: 0.4;
    z-index: -1;
}
.mandir-card-name {
    font-weight: 700;
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 2px;
}
.mandir-card-hindi {
    font-family: 'Noto Sans Devanagari', serif;
    color: var(--text-dim);
    font-size: 1rem;
    margin-bottom: 8px;
}
.mandir-card-day {
    color: var(--text-dim);
    font-size: 0.74rem;
    margin-bottom: 12px;
}
.mandir-card-btn {
    width: 100%;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--deity-color, #8b5cf6), var(--deity-color, #8b5cf6));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    transition: filter 0.2s;
}
.mandir-card:hover .mandir-card-btn {
    filter: brightness(1.15);
}

/* ====== Darshan Modal ====== */
.darshan-modal {
    position: fixed;
    inset: 0;
    background: #0a0a14;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    padding: 0;
}
.darshan-bg-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
    animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.7; }
}
.darshan-close {
    position: fixed;
    top: 16px;
    right: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}
.darshan-stage {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 760px;
    padding: 40px 20px 40px;
}

/* Temple arch */
.darshan-arch {
    position: relative;
    margin: 30px auto 24px;
    width: 280px;
    height: 360px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.darshan-deity {
    position: relative;
    width: 200px;
    height: 260px;
}
.dd-aureole {
    position: absolute;
    top: -20px;
    left: -40px;
    right: -40px;
    height: 280px;
    border-radius: 50%;
    animation: aureoleSpin 18s linear infinite;
    opacity: 0.7;
}
@keyframes aureoleSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.dd-idol {
    position: absolute;
    inset: 0;
    border-radius: 50% 50% 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow:
        inset 0 -40px 60px rgba(0, 0, 0, 0.4),
        0 30px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}
.dd-symbol {
    font-family: 'Noto Sans Devanagari', serif;
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}
.dd-name {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0.85;
}
.dd-pedestal {
    position: absolute;
    bottom: -20px;
    left: -30px;
    right: -30px;
    height: 30px;
    background: linear-gradient(180deg, #5b4a2a, #2d1f10);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* Diyas (lamps) on sides */
.darshan-diyas {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}
.diya-slot {
    width: 40px;
    height: 50px;
    position: relative;
    background: linear-gradient(180deg, #b45309, #7c2d12);
    border-radius: 8px 8px 4px 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}
.diya-slot::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    height: 12px;
    background: #1f1f1f;
    border-radius: 50%;
}
.diya-flame {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 30px;
    border-radius: 50% 50% 30% 30% / 60% 60% 30% 30%;
    background: linear-gradient(180deg, #fde047, #f97316, #dc2626);
    opacity: 0;
    transition: opacity 0.4s;
    box-shadow: 0 0 24px #f59e0b, 0 0 40px rgba(245, 158, 11, 0.4);
    animation: flameDance 0.7s ease-in-out infinite alternate;
}
.diya-slot.diya-lit .diya-flame { opacity: 1; }
@keyframes flameDance {
    0% { transform: translateX(-50%) scaleY(1) skewX(-3deg); }
    100% { transform: translateX(-50%) scaleY(1.1) skewX(3deg); }
}

/* Darshan info card */
.darshan-info {
    background: rgba(20, 18, 35, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 22px 20px;
    color: var(--text);
}
.darshan-info h2 {
    font-size: 1.6rem;
    margin-bottom: 14px;
    font-family: 'Cinzel', serif;
}
.di-hindi {
    color: var(--text-dim);
    font-weight: 500;
    font-family: 'Noto Sans Devanagari', serif;
}
.di-mantra {
    text-align: center;
    padding: 16px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    margin-bottom: 18px;
}
.di-mantra-sanskrit {
    font-family: 'Noto Sans Devanagari', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fde68a;
}
.di-mantra-translit {
    color: #c4b5fd;
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.di-mantra-meaning {
    color: var(--text-dim);
    font-size: 0.82rem;
}

.di-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.di-grid > div {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}
.di-grid > div span {
    display: block;
    color: var(--text-dim);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.di-grid > div b {
    color: var(--text);
    font-size: 0.88rem;
}
.di-grid-wide { grid-column: span 2; }

/* Offering bar */
.offering-bar {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.offer-btn {
    padding: 14px 8px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s, color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.offer-btn i { font-size: 1.2rem; }
.offer-btn:hover {
    transform: translateY(-2px);
    background: rgba(139, 92, 246, 0.18);
    color: #fff;
}
.offer-btn:active { transform: scale(0.95); }
.offer-diya { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
.offer-flower { color: #f87171; border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }
.offer-chant { color: #a78bfa; border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.08); }
.offer-aarti { color: #34d399; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }

.offering-stats {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--text-dim);
    font-size: 0.86rem;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}
.offering-stats b { color: var(--text); }

/* Particles layer */
.mandir-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}
.particle {
    position: absolute;
    top: -20px;
    font-size: 1.4rem;
    animation: particleFall 3.5s ease-out forwards;
}
.particle-spark {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}
.particle-petal { color: #f87171; }
.particle-om {
    font-family: 'Noto Sans Devanagari', serif;
    font-weight: 800;
    font-size: 2rem;
    text-shadow: 0 0 12px currentColor;
}
@keyframes particleFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg) scale(0.5); opacity: 0; }
}

/* Mobile */
@media (max-width: 640px) {
    .mandir-header h1 { font-size: 2rem; }
    .mandir-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .mandir-card { padding: 18px 12px 14px; }
    .mandir-card-symbol { font-size: 2.4rem; }
    .mandir-card-arch { width: 70px; height: 80px; }
    .mandir-card-deity { font-size: 1.6rem; }
    .aaj-deity { flex-direction: column; text-align: center; }
    .darshan-arch { width: 220px; height: 280px; }
    .darshan-deity { width: 160px; height: 220px; }
    .dd-symbol { font-size: 4rem; }
    .dd-name { font-size: 1.3rem; }
    .di-grid { grid-template-columns: 1fr; }
    .di-grid-wide { grid-column: span 1; }
    .offering-bar { grid-template-columns: repeat(2, 1fr); }
}
