/* --- VARIABLE & FONT DEFINITIONS --- */
:root {
    --primary-color: #FF9933; /* Saffron */
    --secondary-color: #FFD700; /* Gold */
    --dark-color: #2c1608; /* Deep Brown */
    --light-color: #FFF8E1; /* Cream */
    --text-color: #4f321f;
    --font-sans-serif: 'Poppins', sans-serif;
    --font-sanskrit: 'Tiro Devanagari Sanskrit', serif;
}

/* --- GENERAL & RESET STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: hidden; /* Prevent horizontal scroll caused by off-screen elements */
}

body {
    font-family: var(--font-sans-serif);
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Cg fill-rule="evenodd"%3E%3Cg fill="%23e0d7c1" fill-opacity="0.2"%3E%3Cpath opacity=".5" d="M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z"/%3E%3Cpath d="M6 5V0h1v5h5v1H6v5H5V6H0V5h5V0h1v5h90v1H6v90H5V6H0V5h5V0h1v5h90v1H6v90H5V6H0V5h5z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 4.5rem 0;
}

.section-title {
    font-family: var(--font-sanskrit);
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn:hover {
    background: var(--secondary-color);
    color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* --- PRE-LOADER --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column; /* Stack loader and text vertically */
    justify-content: center;
    align-items: center;
    /* Cosmic background */
    background-color: #0c0c1d; /* Deep dark blue */
    background-image: 
        radial-gradient(1px 1px at 30px 60px, white, transparent),
        radial-gradient(1px 1px at 90px 20px, white, transparent),
        radial-gradient(1.5px 1.5px at 150px 100px, #ccc, transparent),
        radial-gradient(2px 2px at 220px 180px, #fff, transparent);
    background-repeat: repeat;
    background-size: 250px 250px;
    transition: opacity 1.5s ease-in-out, visibility 1.5s ease-in-out;
    visibility: visible;
    opacity: 1;
    overflow: hidden;
    animation: move-stars 150s linear infinite;
}

/* Nebula effect */
#preloader::before {
    content: '';
    position: absolute;
    top: -50%; left: -100%; width: 300%; height: 200%;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    opacity: 0.4;
    animation: move-nebula 50s ease-in-out infinite;
    z-index: 0;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.mandala-loader {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem; /* Space between mandala and text */
    z-index: 1; /* Ensure mandala is above the nebula */
}

.mandala-core {
    animation: pulse-glow-loader 4s ease-in-out infinite;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFC300 50%, var(--primary-color) 100%);
    /* The glow is handled by the animation's box-shadow */
}

.mandala-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 50%;
}

/* Outermost, fastest ring */
.mandala-ring:nth-child(1) {
    border-color: var(--secondary-color);
    animation: rotate-mandala 8s linear infinite;
}

/* Middle, dashed, reverse-rotating ring */
.mandala-ring:nth-child(2) {
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    border-color: var(--primary-color);
    border-style: dashed;
    opacity: 0.5;
    animation: rotate-mandala 15s linear infinite reverse;
}

/* Innermost, slowest ring */
.mandala-ring:nth-child(3) {
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    border-color: var(--light-color);
    opacity: 0.3;
    animation: rotate-mandala 12s linear infinite;
}

.preloader-text {
    position: relative; /* Position relative to be able to use z-index */
    color: var(--secondary-color);
    font-family: var(--font-sanskrit);
    font-size: 2.2rem;
    font-weight: bold;
    opacity: 0.8;
    letter-spacing: 2px;
    animation: pulse-text-loader 4s ease-in-out infinite;
    z-index: 1; /* Ensure text is above the nebula */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.preloader-dedication {
    position: absolute;
    bottom: 2rem;
    font-family: 'Dancing Script', cursive;
    font-size: 1.2rem;
    color: var(--secondary-color);
    opacity: 0;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    transition: opacity 1.2s ease-out; /* Use a simple transition for reliability */
    z-index: 1;
    text-align: center;
    padding: 0 1rem;
}

.preloader-dedication.visible {
    opacity: 0.9; /* The state we want to transition to */
}

@keyframes rotate-mandala {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow-loader {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 20px 5px rgba(255, 215, 0, 0.7), 0 0 40px 10px rgba(255, 153, 51, 0.5);
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
        box-shadow: 0 0 30px 10px rgba(255, 215, 0, 0.8), 0 0 60px 15px rgba(255, 153, 51, 0.6);
    }
}

@keyframes pulse-text-loader {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
    }
}

@keyframes move-stars {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}

@keyframes move-nebula {
    0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
    50% { transform: translateX(20%) translateY(10%) rotate(15deg); }
}

/* --- HEADER & NAVIGATION --- */
#header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#header.scrolled {
    background-color: rgba(255, 248, 225, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
}

.logo-container {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-main {
    font-family: var(--font-sanskrit);
    font-size: 2.2rem;
    font-weight: bold;
    line-height: 1.1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    color: var(--primary-color);
    font-size: 2rem; /* Adjust size for better alignment */
}

.logo-text {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 5s linear infinite;
}

.logo-sub {
    font-size: 0.7rem;
    color: var(--text-color);
    margin-top: -4px;
}

.logo-author {
    font-size: 0.65rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: -2px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger { display: none; cursor: pointer; }

.lang-btn {
    background: transparent;
    border: 2px solid var(--dark-color);
    color: var(--dark-color);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: var(--dark-color);
    color: var(--light-color);
}

@keyframes shimmer {
    to {
        background-position: -200% center;
    }
}

/* --- HERO SECTION --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #ff9933, #f5deb3);
    z-index: -1;
}

.sun {
    position: absolute;
    bottom: 20%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #FFC300 40%, #FF9933 80%, rgba(255,153,51,0)); /* A more defined and darker sun */
    box-shadow: 0 0 100px 50px rgba(255, 153, 51, 0.6); /* Darker, more saffron glow */
    border-radius: 50%;
    transform: translateX(-50%);
    animation: rise 30s linear infinite, pulse-glow 4s ease-in-out infinite; /* Slow down rise and add pulse */
}

@keyframes rise {
    0% {
        bottom: -100px;
        left: 25%; /* Start from bottom-left of center */
        opacity: 0.5;
        transform: translateX(-50%) scale(0.8);
    }
    50% {
        bottom: 50%;
        left: 50%;
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    100% {
        bottom: 110%;
        left: 75%; /* End at top-right */
        opacity: 0.5;
        transform: translateX(-50%) scale(0.8);
    }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 100px 50px rgba(255, 153, 51, 0.6); }
    50% { box-shadow: 0 0 120px 60px rgba(255, 153, 51, 0.7); }
    100% { box-shadow: 0 0 100px 50px rgba(255, 153, 51, 0.6); }
}

.parallax-mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    pointer-events: none; /* Allow clicks to go through */
}

.mountain-layer {
    position: absolute;
    bottom: 0;
    left: -5%; /* Start slightly off-screen to allow for parallax movement */
    width: 110%; /* Make it wider than the screen */
    height: 100%;
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: cover;
    transition: transform 0.2s ease-out; /* Smooth transition for parallax */
}

/* Furthest mountain, lightest color */
#mountain-3 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path fill="%236b4a31" d="M0,120 L150,80 L300,100 L450,70 L600,90 L750,60 L900,100 L1050,80 L1200,110 L1200,120 L0,120 Z" /></svg>');
    z-index: 1;
}

/* Middle mountain, medium color */
#mountain-2 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path fill="%234f321f" d="M0,120 L100,90 L250,110 L400,80 L550,100 L700,70 L850,110 L1000,90 L1150,120 L1200,100 L1200,120 L0,120 Z" /></svg>');
    z-index: 2;
}

/* Closest mountain/temple, darkest color */
#mountain-1 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path fill="%232c1608" d="M0,120 C200,90 350,90 500,100 C700,110 850,110 1200,90 L1200,120 L0,120 Z" /></svg>');
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--dark-color);
}
.hero-content h2 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--dark-color);
    margin-bottom: 1rem;
}
.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}
.cta-buttons a { margin: 0 0.5rem; }

/* --- ABOUT SECTION --- */
.about-content { text-align: center; max-width: 800px; margin: 0 auto; }
.highlight { color: var(--primary-color); font-weight: 600; }
.about-content .read-more { margin-top: 1.5rem; display: inline-block; }

/* --- DEITIES SECTION --- */
.deity-link {
    text-decoration: none;
    color: inherit;
}

.deity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.deity-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 4px solid var(--primary-color);
}
.deity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.deity-card img { width: 100%; height: 200px; object-fit: cover; }
.deity-card h3 { margin: 1rem 0 0.5rem; color: var(--dark-color); }
.deity-card p { padding: 0 1.5rem; font-size: 0.9rem; }

/* --- SCRIPTURES SECTION --- */
.tab-buttons { display: flex; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap; }
.tab-btn {
    background: transparent;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-color);
    position: relative;
    transition: color 0.3s;
}
.tab-btn.active { color: var(--primary-color); }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}
.tab-content { display: none; }
.tab-content.active { display: block; text-align: center; }

.scripture-list {
    margin: 1.5rem auto;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-left: 3px solid var(--secondary-color);
    max-width: 600px;
    border-radius: 0 8px 8px 0;
}

.scripture-list h4 {
    font-family: var(--font-sanskrit);
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.scripture-list ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
}

.scripture-list li {
    background: var(--light-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.scripture-list ul.clickable-list li {
    background: var(--light-color);
    padding: 0; /* Remove padding from li to let the anchor handle it */
    border-radius: 15px;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.scripture-list ul.clickable-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background: var(--primary-color);
}

.scripture-list ul.clickable-list a {
    display: block;
    padding: 0.25rem 0.75rem;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}
.scripture-list ul.clickable-list li:hover a { color: #fff; }
/* --- FESTIVALS TIMELINE --- */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::after {
    /* The vertical timeline line is hidden as requested. */
    display: none;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

/* Position odd items on the left */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

/* Position even items on the right */
.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 15px;
    background-color: var(--light-color);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.timeline-item:nth-child(odd) .timeline-icon {
    right: -25px;
}
.timeline-item:nth-child(even) .timeline-icon {
    left: -25px;
}

.timeline-content { padding: 20px 30px; background: #fff; border-radius: 6px; }
.timeline-item:nth-child(odd) .timeline-content { border-right: 4px solid var(--primary-color); }
.timeline-item:nth-child(even) .timeline-content { border-left: 4px solid var(--primary-color); }

/* --- TEMPLES PARALLAX SECTION --- */
.parallax-section {
    height: 70vh;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.parallax-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
.parallax-content { text-align: center; color: #fff; z-index: 1; }
.parallax-content h2 { font-size: 3rem; font-family: var(--font-sanskrit); margin-bottom: 1rem; }

/* --- TEMPLES SECTION (HOME PAGE) --- */
.temple-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.temple-card {
    background-color: rgba(255, 248, 225, 0.15); /* Semi-transparent cream */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.5); /* Gold border */
    width: 300px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.temple-card:hover {
    background-color: rgba(255, 248, 225, 0.3);
    transform: translateY(-5px);
}

/* --- MANTRAS SECTION --- */
.mantra-display { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.mantra-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    width: 45%;
    min-width: 300px;
    text-align: center;
    border-top: 5px solid var(--secondary-color);
}
.mantra-text {
    font-family: var(--font-sanskrit);
    font-size: 1.5rem;
    margin: 1rem 0;
    min-height: 100px;
    color: var(--dark-color);
}
.btn-audio {
    background: var(--dark-color);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-audio:hover { background: var(--primary-color); }

/* --- BLOG SECTION --- */
/* Adding slightly more vertical space to the final content section for better visual separation from the footer. */
#blog {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.blog-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-content { padding: 1.5rem; }
.blog-card-content h3 { margin-bottom: 0.5rem; }
.blog-card-content p { font-size: 0.9rem; margin-bottom: 1rem; }

/* --- FOOTER --- */
footer {
    background: var(--dark-color);
    color: var(--light-color);
    padding: 4rem 0 2rem;
}
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; margin-bottom: 3rem; }
.footer-section {
    flex: 1;
    min-width: 200px;
    text-align: center;
}
.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-family: var(--font-sanskrit);
}
.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 2rem;
    font-size: 0.9rem;
}

.author-credit {
    font-size: 0.8rem;
    color: rgba(255, 248, 225, 0.7);
    margin-left: 1rem; /* Add space between the two text elements */
    font-weight: 600;
}

.footer-link {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.social-icons a {
    color: var(--light-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.social-icons svg {
    width: 24px;
    height: 24px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .section-title { font-size: 2.5rem; }
    .hero-content h1 { font-size: 3rem; }
}

/* Add space for language button on desktop to prevent overlap */
@media (min-width: 769px) {
    .nav-menu .lang-btn {
        margin-left: 1.5rem; /* 24px */
    }
}

@media (max-width: 768px) {
    /* Hide nav links by default on mobile to prevent them from pushing the hamburger icon off-screen */
    .nav-links {
        display: none;
    }

    /* When the mobile menu is active, display the links as a column */
    .nav-menu.active .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%; /* Ensure the list container takes full width */
        align-items: center; /* Center the list items horizontally */
        padding-bottom: 2rem;
    }
    .nav-menu {
        position: fixed;
        top: 5rem;
        right: 0;
        transform: translateX(100%); /* Hide menu off-screen to the right */
        width: 100%;
        max-width: 320px; /* Give the menu a max-width for better aesthetics */
        height: calc(100vh - 5rem);
        background: var(--light-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: transform 0.4s ease-in-out; /* Animate the transform property */
        box-shadow: -5px 0 20px rgba(0,0,0,0.1); /* Add a shadow for depth */
    }
    .nav-menu.active {
        transform: translateX(0); /* Bring menu on-screen */
    }

    .lang-btn {
        margin-top: 1rem;
    }
    .nav-links li { margin: 1.5rem 0; }
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--dark-color);
        border-radius: 2px;
        transition: all 0.3s ease-in-out;
    }
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* --- TIMELINE MOBILE STYLES --- */
    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        left: 0;
        padding: 10px 25px 10px 70px;
        text-align: left;
    }
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        border-right: none;
        border-left: 4px solid var(--primary-color);
    }
    .timeline-icon, .timeline-item:nth-child(odd) .timeline-icon, .timeline-item:nth-child(even) .timeline-icon { left: 15px; }

    /* --- PARALLAX MOBILE FIX --- */
    .parallax-section {
        background-attachment: scroll; /* Disable parallax on mobile to prevent layout issues */
        height: auto; /* Allow height to be determined by content */
        padding: 4.5rem 2rem; /* Add padding for spacing, consistent with other sections */
    }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .section-title { font-size: 2rem; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content h2 { font-size: 1.5rem; }
    .cta-buttons { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
    .footer-content { flex-direction: column; text-align: center; }
}

/* --- DARSHAN PAGE STYLES --- */
#darshan-hero {
    padding-top: 8rem; /* Add padding to account for fixed header */
    padding-bottom: 4.5rem;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.darshan-subtitle {
    max-width: 700px;
    margin: -2rem auto 3rem;
    font-size: 1.1rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    width: 100%; /* Ensure it takes full width within the flex container */
    max-width: 960px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border: 4px solid var(--secondary-color);
    background-color: #000; /* Black background for loading */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.aarti-button-container {
    margin-top: 3rem;
}

/* --- AARTI PAGE STYLES --- */
#aarti-section {
    padding-top: 8rem;
    padding-bottom: 4.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.aarti-instruction {
    text-align: center;
    margin: -2rem auto 2rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

#aarti-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    /* Height is now determined by the content (the image) */
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    border: 5px solid var(--secondary-color);
    overflow: hidden;
    /* Add a subtle glowing background to complement the image and handle letterboxing */
    background: radial-gradient(circle, #fffde7, #fdfaf3 80%);
}

.aarti-deity-image {
    display: block;
    width: 100%;
    height: auto;
    /* Set a max-height to prevent the container from becoming too tall on certain screens */
    max-height: 70vh;
    object-fit: contain;
    position: relative; /* Ensure it's above the container's background */
    z-index: 2;
    /* Prevent the image itself from being dragged by the browser's default behavior */
    user-select: none;
    -webkit-user-drag: none;
}

/* Animated light rays background for Aarti container */
@keyframes rotate-light-rays {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#aarti-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 90deg,
        rgba(255, 215, 0, 0.4) 0deg, transparent 20deg, transparent 160deg,
        rgba(255, 215, 0, 0.4) 180deg, transparent 200deg, transparent 340deg,
        rgba(255, 215, 0, 0.4) 360deg
    );
    animation: rotate-light-rays 25s linear infinite;
    z-index: 1;
}

.puja-item {
    position: relative; /* Changed from absolute */
    cursor: grab;
    /* Add transition for smooth return animation */
    transition: transform 0.4s ease, top 0.4s ease, left 0.4s ease;
    user-select: none; /* Prevent text selection while dragging */
    -webkit-user-drag: none; /* Prevent ghost image on drag */
}

.puja-item.dragging {
    position: fixed; /* Use fixed position while actively dragging for viewport-relative coords */
    cursor: grabbing;
    z-index: 1002; /* Highest z-index only while actively dragging */
    /* No transition on transform while dragging for immediate response */
    transition: none;
}

#flower-shower-btn {
    width: 60px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#flower-shower-btn:hover {
    transform: scale(1.1);
}

#puja-bell {
    height: 45px;
    width: 30px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#puja-bell:hover {
    transform: scale(1.1);
}

#diya {
    width: 80px;
}

#incense-stick {
    width: 40px;
}

/* --- Aarti Control Button (Mute) --- */
.aarti-control-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10; /* Above deity image and light rays */
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 2px solid var(--primary-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem; /* For emoji icon */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    color: var(--primary-color);
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.aarti-control-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
}

/* --- Flower Shower Effect --- */
.flower-shower-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 5; /* Above deity, below dragged items */
}

.flower {
    position: absolute;
    top: -50px; /* Start above the container */
    width: 30px;
    height: 30px;
    /* background-image is now set by JS */
    background-size: contain;
    background-repeat: no-repeat;
    animation-name: fall;
    animation-timing-function: linear;
    opacity: 0; /* Start invisible, animation will make it visible */
}

/* --- Puja Tray for Aarti Page --- */
.puja-tray {
    margin-top: 2.5rem;
    background: #fff;
    padding: 1rem 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(44, 22, 8, 0.1);
    border: 2px solid var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    width: 100%;
    max-width: 400px;
}

/* --- Aarti Notes Section --- */
.aarti-notes {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    max-width: 450px;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-color);
    border: 1px solid rgba(255, 153, 51, 0.3);
}

.aarti-notes h4 {
    font-family: var(--font-sans-serif);
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.aarti-notes ul {
    list-style: none;
    padding-left: 0;
}

.aarti-notes li { margin-bottom: 0.25rem; }
.aarti-notes li:last-child { margin-bottom: 0; }
.aarti-notes strong { color: var(--primary-color); }

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0);
        opacity: 1;
    }
    100% {
        /* Fall past the bottom of the container (max-height is 70vh) */
        transform: translateY(calc(70vh + 100px)) rotate(720deg);
        opacity: 0;
    }
}

/* --- Deity Selector for Aarti Page --- */
.deity-selector-title {
    font-family: var(--font-sanskrit);
    font-size: 1.8rem;
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 2rem;
}

.deity-selector-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.deity-selector-card {
    background: #fff;
    border: 3px solid transparent;
    border-radius: 10px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.deity-selector-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.deity-selector-card.active {
    border-color: var(--primary-color);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.deity-selector-card img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.deity-selector-card span {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: var(--dark-color);
}

/* --- SCRIPTURE DETAILS PAGE --- */
#scripture-details-section {
    padding-top: 8rem;
    padding-bottom: 4.5rem;
    max-width: 900px;
}

#scripture-content h3 {
    font-family: var(--font-sanskrit);
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

#scripture-content p {
    line-height: 1.8;
    font-size: 1.05rem;
    text-align: justify;
    margin-bottom: 1rem;
}

/* --- DEITY PAGE STYLES --- */
#deity-hero {
    padding-top: 8rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.deity-image-container {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.deity-image-container img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border: 3px solid var(--secondary-color);
}

.deity-intro-text {
    flex: 1.5;
    min-width: 300px;
}

.deity-intro-text .section-title {
    text-align: left;
    font-size: 3.5rem;
}

.deity-intro-text .section-title::after {
    margin: 0.5rem 0 0;
}

.deity-subtitle {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
}

.deity-content-section {
    max-width: 900px;
    padding-bottom: 6rem; /* Add extra space before the footer */
}

.deity-content-section h2 {
    font-family: var(--font-sanskrit);
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.deity-history {
    margin-top: 3rem;
}
.deity-content-section p {
    line-height: 1.8;
    font-size: 1.05rem;
    text-align: justify;
}

/* --- STATIC PAGE STYLES (About, Privacy) --- */
.static-page-container {
    padding: 8rem 5% 4rem; /* 8rem top for header, 4rem bottom */
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.static-page-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-family: var(--font-sanskrit);
    font-size: 2.8rem;
    color: var(--dark-color);
}

.static-page-container h2 {
    font-family: var(--font-sanskrit);
    font-size: 2rem;
    color: var(--dark-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.static-page-container section {
    padding: 0; /* Reset section padding inside this container */
    margin-bottom: 2rem;
}

/* --- CONTACT FORM STYLES --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 700px; /* Give it a max-width */
    margin: 2rem auto 0; /* Center it */
}
.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-sans-serif); /* Inherit font */
}
.contact-form button {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.contact-form button:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    transform: translateY(-3px);
}

/* --- FORM SUBMISSION RESULT --- */
#form-result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
    display: none; /* Hidden by default, shown by JS */
    transition: opacity 0.3s ease;
}
.success {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green */
}
.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red */
}

/* --- BACK TO TOP BUTTON --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 90px; /* Adjusted to avoid overlapping with the chatbot */
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 999;
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#back-to-top:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}
