/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Lato:ital,wght@0,300;0,400;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* ISKCON Color Palette */
    --saffron: #FF9933;
    --saffron-dark: #E68A2E;
    --tulasi-green: #597D51;
    --terracotta: #E2725B;
    --gold: #FFD700;
    --gold-dark: #D4AF37;
    --off-white: #FDFBF7;
    --dark-text: #2C2A29;
    --light-gray: #F0EEE9;

    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
    --font-script: 'Great Vibes', cursive;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--off-white);
    color: var(--dark-text);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

body.loaded {
    opacity: 1;
}

/* Typography styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--saffron-dark);
}

.script-text {
    font-family: var(--font-script);
    font-size: 2.5rem;
    color: var(--tulasi-green);
}

a {
    text-decoration: none;
    color: var(--tulasi-green);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--saffron);
}

/* Access Page specific */
#access-page {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(253, 251, 247, 0.9) 0%, rgba(226, 114, 91, 0.1) 100%), url('images/access-bg.jpg') center/cover no-repeat;
    text-align: center;
}

.access-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 400px;
    width: 90%;
}

.access-container h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.access-container p {
    margin-bottom: 2rem;
    color: #666;
}

.access-input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-family: var(--font-sans);
    font-size: 1rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.access-input:focus {
    outline: none;
    border-color: var(--saffron);
}

.access-btn {
    background-color: var(--saffron);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.access-btn:hover {
    background-color: var(--saffron-dark);
    transform: translateY(-2px);
}

#access-error {
    color: var(--terracotta);
    font-size: 0.9rem;
    margin-top: 1rem;
    display: none;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: padding 0.3s ease;
}

.main-nav.shrink {
    padding: 0.5rem 5%;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--saffron-dark);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links li a {
    color: var(--dark-text);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--saffron);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--saffron-dark);
}

/* Footer */
footer {
    background-color: var(--saffron-dark);
    color: var(--off-white);
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    display: block;
}

.footer-section a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--off-white);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Layout & Utility Classes --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.py-large {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

/* Colors Utility */
.text-saffron {
    color: var(--saffron);
}

.text-tulasi {
    color: var(--tulasi-green);
}

.text-terracotta {
    color: var(--terracotta);
}

.text-gold {
    color: var(--gold);
}

.text-white {
    color: white;
}

.bg-light {
    background-color: var(--light-gray);
}

.bg-saffron {
    background-color: var(--saffron-dark);
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--saffron);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--saffron);
    color: white;
}

.btn-primary:hover {
    background-color: var(--saffron-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    border-color: var(--tulasi-green);
    color: var(--tulasi-green);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--tulasi-green);
    color: white;
}

/* Home Hero */
.home-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: url('images/home-hero.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-subtitle {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--gold);
}

.hero-title {
    font-size: 4rem;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-desc {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
}

/* Images & Lists */
.rounded-img {
    border-radius: 10px;
    width: 100%;
    height: auto;
    display: block;
}

.shadow-lg {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-list {
    list-style: none;
    margin-top: 1.5rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.feature-list i {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

/* Testimonial */
.quote-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.testimonial-text {
    font-size: 1.5rem;
    font-style: italic;
    font-family: var(--font-serif);
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.testimonial-author {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: var(--gold);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .reverse-on-mobile {
        display: flex;
        flex-direction: column-reverse;
    }
}

/* --- Secondary Pages Utilities --- */
.page-header {
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    margin-top: 0;
}

.page-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-subtitle {
    font-size: 1.2rem;
    font-style: italic;
    font-family: var(--font-serif);
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-large {
    margin-bottom: 4rem;
}

.mt-large {
    margin-top: 4rem;
}

/* Timeline Component */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--saffron);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    right: -20px;
    background-color: var(--off-white);
    border: 4px solid var(--saffron);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tulasi-green);
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -20px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--tulasi-green);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:nth-child(even) .timeline-content {
    border-left: none;
    border-right: 4px solid var(--tulasi-green);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    color: var(--saffron-dark);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        left: 0 !important;
    }

    .timeline-icon {
        left: 11px !important;
    }

    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        border-left: 4px solid var(--tulasi-green);
        border-right: none;
    }
}

/* --- Teachings Page Utilities --- */
.items-start {
    align-items: start;
}

/* Quotes Rotator */
.quotes-rotator {
    position: relative;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.quote-slider {
    position: relative;
    height: 150px;
}

.quote-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.quote-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.quote-text {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-style: italic;
    color: var(--dark-text);
    line-height: 1.4;
}

/* Accordion */
.accordion {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.accordion-item {
    background: white;
    border-bottom: 1px solid var(--light-gray);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: var(--off-white);
}

.accordion-header h3 {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--dark-text);
    display: flex;
    align-items: center;
}

.accordion-header h3 i {
    margin-right: 15px;
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: var(--saffron);
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background-color: white;
    padding: 0 1.5rem;
}

.accordion-header.active+.accordion-content {
    padding: 0 1.5rem 1.5rem;
    /* Max height large enough to accommodate content */
    max-height: 500px;
}

@media (max-width: 768px) {
    .quote-text {
        font-size: 1.5rem;
    }

    .quote-slider {
        height: 200px;
    }
}

/* --- Legacy Page Utilities --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    padding: 2rem;
    border-radius: 15px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--saffron-dark);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dark-text);
    letter-spacing: 1px;
}

/* --- Gallery Page Utilities --- */
.pb-large {
    padding-bottom: 5rem;
}

.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}

@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }
}

.masonry-item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.masonry-item:hover .gallery-img {
    transform: scale(1.05);
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(226, 114, 91, 0.6);
    /* Terracotta overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.masonry-item:hover .img-overlay {
    opacity: 1;
}

.img-overlay i {
    color: white;
    font-size: 2.5rem;
    transform: scale(0.5);
    transition: transform 0.3s ease;
}

.masonry-item:hover .img-overlay i {
    transform: scale(1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 5px;
    animation: zoomIn 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 45px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover {
    color: var(--saffron);
}