:root {
    --primary-brown: #8D5524;
    --dark-brown: #5D3A1A;
    --saffron: #FF9933;
    --gold: #FFD700;
    --temple-grey: #4A4A4A;
    --off-white: #FDF5E6;
    --text-dark: #333333;
    --border-gold: 2px solid var(--gold);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

html {
    scroll-behavior: smooth;
    background-color: var(--off-white);
    height: 100%;
    /* Ensure full height for sticky footer */
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    background-color: var(--off-white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    /* Minimum full viewport height */
    display: flex;
    /* Flexbox for sticky footer */
    flex-direction: column;
}

h1,
h2,
h3 {
    font-family: 'Cinzel Decorative', serif;
    color: var(--dark-brown);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--gold);
    transition: opacity 0.8s ease;
}

.om-symbol {
    font-size: 5rem;
    animation: pulse 2s infinite;
}

.loader-text {
    margin-top: 20px;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

/* Navigation */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(20, 10, 5, 0.9);
    z-index: 999;
    padding: 15px 0;
    padding-top: calc(15px + env(safe-area-inset-top));
    /* Safe area for notch */
    transition: all 0.3s;
    border-bottom: 2px solid var(--gold);
}

#header.scrolled {
    padding: 10px 0;
    padding-top: calc(10px + env(safe-area-inset-top));
    background: rgba(20, 10, 5, 0.98);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 0 auto;
}

.logo a {
    color: var(--gold);
    text-decoration: none;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--saffron);
}

.btn-donate {
    background: var(--saffron);
    padding: 8px 20px;
    border-radius: 4px;
    color: #fff !important;
    font-weight: bold;
}

.btn-donate:hover {
    background: var(--gold);
    color: var(--primary-brown) !important;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--gold);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

/* Hero Section */
#hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-bg img,
.hero-bg video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.6);
}

.hero-content {
    text-align: center;
    color: #fff;
    z-index: 1;
    padding: 0 20px;
}

.statue-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 30px;
    border-radius: 50%;
}

.deity-statue {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.6);
    /* Golden Aura */
    position: relative;
    z-index: 2;
}

.aura-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(255, 153, 51, 0) 70%);
    border-radius: 50%;
    animation: glow 4s infinite alternate;
    z-index: 1;
}

.hero-text .subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.hero-text .title {
    font-size: 4rem;
    margin-bottom: 10px;
    background: -webkit-linear-gradient(#ffd700, #ff9933);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.location {
    font-size: 1.5rem;
    color: #fff;
    opacity: 0.9;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    color: #fff;
    text-align: center;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* Image Grids */
.highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wide-img {
    grid-column: span 2;
}

/* Sections General */
.section-padding {
    padding: 80px 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3rem;
    color: var(--primary-brown);
}

.ornament {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--saffron);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 10px;
}

.underline {
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 15px auto;
}

/* Sacred Story */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.text-block h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark-brown);
}

.text-block p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: justify;
}

.frame-ornament {
    padding: 10px;
    border: 2px solid var(--gold);
    outline: 2px solid var(--primary-brown);
    outline-offset: 5px;
    position: relative;
}

.frame-ornament img {
    width: 100%;
    display: block;
}

/* Philosophy Parallax */
.parallax-section {
    background-image: url('images/hero_bg.jpg');
    /* Reuse heavy texture or bg */
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    position: relative;
    color: #fff;
    text-align: center;
}

.overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.centered-content {
    position: relative;
    z-index: 1;
}

.om-large {
    font-size: 6rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.philosophy-text {
    font-family: 'Cinzel Decorative', serif;
    font-size: 3rem;
    margin-bottom: 20px;
}

.philosophy-desc {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    font-style: italic;
    opacity: 0.9;
}

/* Vision Cards */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.vision-card {
    background: #fff;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid var(--saffron);
    transition: transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.vision-card:hover {
    transform: translateY(-10px);
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-brown);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-content: center;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--gold);
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Footer / Contact */
/* Footer Container */
footer {
    margin-top: auto;
    width: 100%;
}

.dark-footer {
    background: #1a1510;
    color: #ddd;
    border-top: 4px solid var(--gold);
    padding-bottom: env(safe-area-inset-bottom);
}

.contact-layout {
    display: flex;
    justify-content: center;
    text-align: center;
    gap: 50px;
}

.contact-info h3,
.donation-box h3 {
    color: var(--saffron);
    margin-bottom: 20px;
    font-family: 'Cinzel Decorative', serif;
}

.donation-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-left: 3px solid var(--gold);
}

.bank-details p {
    margin: 5px 0;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
    /* Remove default paragraph margin to ensure precise spacing */
}

/* Animations & Responsiveness */
@media (max-width: 768px) {
    .hero-text .title {
        font-size: 2.5rem;
    }

    .content-grid,
    .highlights-grid {
        grid-template-columns: 1fr;
    }

    .wide-img {
        grid-column: span 1;
    }

    .contact-layout {
        flex-direction: column;
    }

    .menu-toggle {
        display: block;
        color: var(--gold);
    }

    .nav-links {
        display: none;
        /* Add responsive toggle logic in JS or CSS */
        position: absolute;
        top: 100%;
        /* Align below the header dynamic height */
        right: 0;
        width: 100%;
        background: rgba(20, 10, 5, 0.95);
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
        border-bottom: 2px solid var(--gold);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .hero-text .subtitle {
        display: none;
    }

    .statue-container {
        width: 180px;
        height: 180px;
    }

    .aura-glow {
        width: 200px;
        height: 200px;
    }

    .logo {
        display: block;
        font-size: 1.2rem;
        /* Smaller logo for mobile */
    }

    .logo a {
        font-size: 1.2rem;
    }
}

@keyframes glow {
    from {
        opacity: 0.5;
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.4);
    }

    to {
        opacity: 0.8;
        box-shadow: 0 0 80px rgba(255, 215, 0, 0.8);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Reveal Animations Classes applied by JS */
.reveal-slow,
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 1s ease-out;
}

.reveal-up {
    transform: translateY(50px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.active-reveal {
    opacity: 1;
    transform: translate(0, 0);
}

/* News Section Utilities */
.chilanka {
    font-family: 'Chilanka', cursive;
}

.orange {
    color: var(--saffron);
}

.center {
    text-align: center;
}

.topmargin-md {
    margin-top: 40px;
}

.mb-5 {
    margin-bottom: 3rem;
}