/* ======================== Global Styles & Variables ======================== */
:root {
    --color-maroon: #6D0000;
    --color-saffron: #F9A825;
    --color-cream: #FFF8E1;
    --color-light-bg: #F5F5F5;
    --color-dark-text: #333333;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    background-color: #FFFFFF;
    color: var(--color-dark-text);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--color-maroon);
}

h2 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 60px;
}

/* --- Header & Navigation --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: transparent;
    padding: 15px 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    transition: color 0.3s ease;
}

.main-header.scrolled .main-nav a {
    color: var(--color-dark-text);
    text-shadow: none;
}

.main-header.scrolled .main-nav a:hover {
    color: var(--color-maroon);
}


/* --- 1. Darshan (Slideshow) --- */
#darshan {
    height: 100vh;
    padding: 0;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.slideshow-container {
    width: 100%;
    height: 100%;
}

.slideshow-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slideshow-container img.active {
    opacity: 1;
}

.slide-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    z-index: 10;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.slide-text h1 {
    font-size: 4em;
    color: white;
    margin: 0;
}

.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.3);
    color: white;
    border: none;
    font-size: 2em;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}
.slide-arrow:hover {
    background-color: rgba(0,0,0,0.6);
}
.prev-arrow { left: 20px; }
.next-arrow { right: 20px; }

.slide-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.dot.active {
    background-color: white;
}


/* --- 2. Leela Path --- */
#leela-path {
    background-color: var(--color-light-bg);
    position: relative;
    overflow: hidden; 
}

#leela-path .container {
    position: relative;
    z-index: 1;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--color-maroon);
    opacity: 0.2;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}
.timeline-item:nth-child(odd) {
    left: 0;
}
.timeline-item:nth-child(even) {
    left: 50%;
}
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -12px;
    background-color: white;
    border: 4px solid var(--color-maroon);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even)::after {
    left: -10px;
}
.timeline-content {
    padding: 20px 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}


/* --- DEVOTIONAL BACKGROUND ANIMATION STYLES --- */
.particles-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.particle {
    position: absolute;
    background-color: rgba(249, 168, 37, 0.4);
    border-radius: 50%;
    pointer-events: none;
    animation: floatUp linear infinite;
}
.float-up {
    bottom: -150px;
    animation-name: floatUp;
}
.float-down {
    top: -150px;
    animation-name: floatDown;
}
@keyframes floatUp {
    to { transform: translateY(-105vh); }
}
@keyframes floatDown {
    to { transform: translateY(105vh); }
}


/* --- 3 & 4. Amrit Vani (Videos) --- */
#amrit-vani {
    background-color: #FFFFFF;
}
.video-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}
.filter-btn {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1em;
    padding: 10px 25px;
    background-color: #EEE;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-btn:hover {
    background-color: #DDD;
}
.filter-btn.active {
    background-color: var(--color-maroon);
    color: white;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.video-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid #EEE;
}
.video-card:hover {
    transform: translateY(-5px);
}
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.video-info {
    padding: 20px;
}
.video-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
}
.video-info p {
    margin: 0;
    font-size: 0.9em;
    color: #888;
}


/* --- Footer --- */
.main-footer {
    background-color: var(--color-dark-text);
    color: white;
    text-align: center;
    padding: 30px 0;
}


/* --- MEDITATION PAGE STYLES (DEFINITIVE FIX) --- */
#meditation {
    background-color: var(--color-cream);
    min-height: 100vh;
    position: relative;
    padding: 80px 20px; /* Vertical and side padding */
    box-sizing: border-box;

    /* THIS IS THE FIX: Using Flexbox directly on the section */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.meditation-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('radha-krishan.png');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

/* The .container is removed from the HTML for this section */

#meditation h2 {
    color: white;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    z-index: 1; /* Ensure text is above background image */
}

.meditation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    width: 300px;
    position: relative;
    margin-bottom: 30px;
    z-index: 1;
}

.meditation-circle {
    height: 300px;
    width: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(193, 225, 193, 0.8) 100%);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: transform 4s linear;
}

.meditation-text {
    font-family: var(--font-heading);
    color: var(--color-dark-text);
    font-size: 1.8em;
    z-index: 1;
}

.meditation-pointer-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    animation: rotate 15s linear forwards infinite;
}

.meditation-pointer {
    width: 20px;
    height: 20px;
    background-color: var(--color-maroon);
    border-radius: 50%;
    display: block;
    position: relative;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.meditation-container.grow .meditation-circle {
    transform: translate(-50%, -50%) scale(1.2);
}
.meditation-container.shrink .meditation-circle {
    transform: translate(-50%, -50%) scale(1);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#meditation-audio {
    margin-top: 20px;
    width: 80%;
    max-width: 400px;
    z-index: 1;
}


/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    h2 { font-size: 2.2em; }
    .slide-text h1 { font-size: 2.5em; }
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 60px; padding-right: 15px; }
    .timeline-item:nth-child(even), .timeline-item:nth-child(odd) { left: 0; }
    .timeline-item::after { left: 10px; }

    .meditation-container, .meditation-circle {
        height: 250px;
        width: 250px;
    }
}