:root {
    --primary: #b31b1b; 
    --secondary: #e6a817; 
    --bg-light: #fcf9f2;
    --text-dark: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar & Premium Mobile Menu */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.logo img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
    mix-blend-mode: multiply; 
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    transition: all 0.3s ease;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    transition: all 0.3s ease;
}

/* --- Hero Section & 3D Background Magic --- */
.hero-wrapper {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    overflow: hidden; 
    perspective: 1200px; 
}

/* 3D Background Layer */
.hero-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('/img/shri-gangadhareshwara-temple-ichilampady-kadaba-taluk.webp') center/cover no-repeat;
    z-index: -1;
    transition: transform 0.1s ease-out;
    transform-origin: center center;
}

/* Transparent Content Card */
.hero-content {
    background: transparent; 
    padding: 60px 20px;
    max-width: 1000px;
    transition: transform 0.1s ease-out;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    color: var(--secondary);
    text-shadow: 3px 3px 15px rgba(0,0,0,0.9), -2px -2px 15px rgba(0,0,0,0.9);
    animation: fadeInDown 1s ease-out;
}

.hero-content p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-weight: 600;
    text-shadow: 2px 2px 12px rgba(0,0,0,0.9), -2px -2px 12px rgba(0,0,0,0.9);
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.btn {
    padding: 12px 35px;
    background-color: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
    display: inline-block;
    animation: fadeInUp 1s ease-out 0.6s backwards;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    font-size: 1.1rem;
}

.btn:hover {
    background-color: transparent;
    color: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-3px);
}

/* Section Layouts */
section {
    padding: 80px 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 50px;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: center;
}

.content-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.content-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.content-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.rounded-img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.rounded-img:hover {
    transform: scale(1.02);
}

ul.custom-list { list-style: none; }
ul.custom-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
ul.custom-list li::before {
    content: '🕉';
    position: absolute;
    left: 0;
    color: var(--secondary);
}

/* --- Premium Video Container --- */
.video-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    border: 4px solid #fff;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Magical Parallax Banner --- */
.parallax-divider {
    position: relative;
    height: 400px;
    background: url('/img/shri-gangadhareshwara-temple-shankhadweepa.webp') center center / cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.6);
    margin: 40px 0;
}

.parallax-content {
    background: rgba(179, 27, 27, 0.85); /* Deep Temple Red */
    padding: 25px 50px;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    border: 1px solid rgba(255,255,255,0.3);
    text-align: center;
    max-width: 80%; /* Prevents the box from touching screen edges */
    transition: transform 0.3s ease;
}

.parallax-content:hover {
    transform: scale(1.05);
}

.parallax-content h3 {
    color: var(--secondary);
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

/* Map Container */
.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    line-height: 0;
}
.map-container iframe {
    width: 100%;
    height: 450px;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: #fff;
    text-align: center;
    padding: 40px 20px;
}

/* --- Animations & Effects --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Image Modal (Lightbox) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--secondary);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .hero-content {
        padding: 40px 10px;
    }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1.1rem; }
    
    .hamburger { display: flex; }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 40px;
    }

    .nav-links.nav-active { right: 0; }

    .toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .toggle .line2 { opacity: 0; }
    .toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

    section { padding: 60px 20px; text-align: center; }
    .section-title { font-size: 2rem; margin-bottom: 30px; }
    .section-title::after { margin: 10px auto 25px; }
    
    .content-grid { grid-template-columns: 1fr; gap: 30px; }
    .content-card { padding: 25px 20px; text-align: center; }

    ul.custom-list {
        display: inline-block;
        text-align: left;
        margin: 0 auto;
        padding-left: 20px;
    }
    ul.custom-list li { font-size: 1rem; }

    /* Magical Parallax Mobile Fixes */
    .parallax-divider {
        background-attachment: scroll;
        height: 300px;
        margin: 20px 0;
    }

    .parallax-content {
        padding: 15px 25px;
        max-width: 90%; 
    }

    .parallax-content h3 {
        font-size: 1.6rem;
    }

    .map-container iframe { height: 350px; border-radius: 10px; }
}

/* ====================================================
   ULTRA-PREMIUM DUAL THEATER (YOUTUBE + LOCAL VIDEOS)
   ==================================================== */
.temple-video-section {
    position: relative;
    background: radial-gradient(circle at center, #240a0a 0%, #0d0202 100%);
    padding: 90px 5%;
    overflow: hidden;
}

.temple-video-section .section-title {
    color: var(--secondary);
}

.divine-glow-bg {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(230, 168, 23, 0.16) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.sacred-video-showcase {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Master Player Frame */
.master-video-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 30px rgba(230, 168, 23, 0.3);
    border: 2px solid rgba(230, 168, 23, 0.7);
    aspect-ratio: 16 / 9;
}

.master-video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
    transition: opacity 0.3s ease;
}

.yt-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

.yt-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.om-watermark {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.2rem;
    color: rgba(230, 168, 23, 0.35);
    pointer-events: none;
    z-index: 5;
    text-shadow: 0 0 10px rgba(230, 168, 23, 0.6);
}

.video-active-title {
    background: linear-gradient(180deg, transparent 0%, rgba(10, 2, 2, 0.95) 100%);
    padding: 30px 25px 15px;
    position: absolute;
    bottom: 0;
    width: 100%;
    pointer-events: none;
    z-index: 6;
}

.sacred-badge {
    background: var(--primary);
    color: #fff;
    padding: 3px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    border: 1px solid var(--secondary);
}

.video-active-title h3 {
    color: #fff;
    font-size: 1.25rem;
    margin-top: 6px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
}

/* Switcher Playlist Grid */
.video-playlist-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 30px;
}

.playlist-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(230, 168, 23, 0.25);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary);
    box-shadow: 0 10px 25px rgba(230, 168, 23, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.playlist-card.active {
    border-color: var(--secondary);
    background: linear-gradient(135deg, rgba(179, 27, 27, 0.45), rgba(230, 168, 23, 0.2));
    box-shadow: 0 0 25px rgba(230, 168, 23, 0.45);
}

.thumb-wrapper {
    position: relative;
    height: 65px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.play-icon {
    font-size: 1.2rem;
    color: var(--secondary);
    transition: transform 0.3s ease;
}

.playlist-card:hover .play-icon {
    transform: scale(1.3);
}

.format-badge {
    position: absolute;
    bottom: 5px;
    right: 6px;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.yt-badge {
    background: #ff0000;
    color: #fff;
}

.hd-badge {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--secondary);
}

.card-info h4 {
    color: var(--secondary);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.card-info p {
    color: #ccc;
    font-size: 0.8rem;
    line-height: 1.35;
}

@media (max-width: 900px) {
    .video-playlist-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .video-playlist-grid {
        grid-template-columns: 1fr;
    }
    .video-active-title h3 {
        font-size: 1rem;
    }
}