:root {
    /* Spiritual & Earthy Palette */
    --primary-color: #E65100;
    /* Deep Saffron/Vermilion */
    --primary-light: #FF9800;
    /* Marigold Orange */
    --accent-color: #FBC02D;
    /* Golden Yellow */
    --accent-dark: #F57F17;
    /* Darker Gold */
    --secondary-color: #8D6E63;
    /* Earthy Brown */

    /* Backgrounds */
    --bg-color: #FFF8E1;
    /* Warm Cream */
    --surface-color: #ffffff;
    --surface-alt: #FEF7E6;

    /* Typography */
    --text-color: #3E2723;
    --text-muted: #5D4037;
    --border-color: #FFE0B2;

    --shadow-sm: 0 1px 3px rgba(62, 39, 35, 0.15);
    --shadow-md: 0 4px 8px rgba(230, 81, 0, 0.15);
    --radius-md: 12px;
    --radius-lg: 24px;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;

    --pattern-lotus: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C25 10 35 15 40 20C35 25 25 30 20 40C15 30 5 25 0 20C5 15 15 10 20 0Z" fill="%23FFE0B2" opacity="0.4"/></svg>');
}

/* === LANGUAGE TOGGLE (Global) === */
.lang-toggle-wrapper {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked+.slider:before {
    -webkit-transform: translateX(16px);
    -ms-transform: translateX(16px);
    transform: translateX(16px);
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: var(--pattern-lotus);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    padding-bottom: 80px;
    /* Space for mobile nav */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #BF360C;
    margin-top: 0;
}

/* === NEW HEADER STYLES === */
.main-header {
    background: #FFF3E0;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-bottom: 2px solid var(--accent-color);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-text {
    flex-grow: 1;
    text-align: center;
}

.header-text h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.header-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0.25rem 0 0;
    font-weight: 500;
}

.temple-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.donation-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.paryaya-placeholder {
    width: 60px;
    height: 60px;
    background: var(--surface-alt);
    border: 2px dashed var(--accent-color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-align: center;
}

/* === NEW NAVIGATION STYLES === */
/* Desktop */
.main-nav {
    background: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: center;
    list-style: none;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    transition: background 0.3s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-item span {
    font-size: 1.2rem;
}

/* === MOBILE STYLES === */


/* Hide hamburger on desktop */
/* Hide hamburger on desktop */
/* Mobile Elements - Hidden on Desktop by default */
#mobile-menu-toggle,
#mobileSidebar {
    display: none;
}


/* Main Content Adjustments */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {

    /* Header Re-layout for Mobile */
    .main-header {
        padding-top: 3.5rem;
        /* Space for absolute buttons */
        padding-bottom: 1rem;
        position: relative;
    }

    .header-content {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        padding: 0;
    }

    .header-logo-left {
        order: 1;
        margin: 0;
    }

    .header-logo-right {
        order: 2;
        margin: 0;
    }

    .header-text {
        order: 3;
        width: 100%;
        margin-top: 0.5rem;
        border-top: 1px dashed var(--border-color);
        padding-top: 0.5rem;
    }

    .header-text h1 {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }

    .header-text p {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .temple-logo {
        height: 60px;
        /* Mobile size */
        width: auto;
    }

    /* === MOBILE SIDEBAR & HEADER === */
    body {
        padding-bottom: 0;
    }

    /* Hide Desktop Nav in Mobile */
    .main-nav {
        display: none !important;
    }

    /* Mobile Sidebar */
    #mobileSidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: #FFF8E1;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        z-index: 3000;
        transition: left 0.3s ease-in-out;
        overflow-y: auto;
        flex-direction: column;
    }

    #mobileSidebar.active {
        left: 0;
    }

    .sidebar-header {
        padding: 1.5rem;
        background: var(--primary-color);
        color: white;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar-header h3 {
        margin: 0;
        font-size: 1.2rem;
        color: white;
    }

    .close-btn {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .sidebar-nav {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .sidebar-nav li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .sidebar-nav a {
        display: flex;
        align-items: center;
        padding: 1rem 1.5rem;
        text-decoration: none;
        color: var(--text-color);
        font-weight: 500;
        gap: 1rem;
        transition: background 0.2s;
    }

    .sidebar-nav a:hover {
        background: rgba(230, 81, 0, 0.1);
        color: var(--primary-color);
    }

    .sidebar-nav .material-icons-outlined {
        color: var(--primary-color);
    }

    /* Overlay */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 2999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Hamburger Button - Visible only on mobile */
    #mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        color: var(--primary-color);
        font-size: 2rem;
        cursor: pointer;
        padding: 0.5rem;
        position: absolute;
        left: 10px;
        top: 15px;
        z-index: 9999;
        /* Ensure high z-index */
    }

    /* Adjust header elements to make room for hamburger */
    .header-logo-left {
        margin-left: 40px;
        /* Space for hamburger */
    }

}

/* === SECTION STYLES (Keep existing) === */
.section-card {
    background: var(--surface-color);
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    text-align: center;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* Darshana Section */
.darshana-container {
    display: flex;
    flex-direction: column;
    background: var(--surface-alt);
    border-bottom: 4px solid var(--accent-color);
}

.darshana-image-container {
    width: 100%;
    height: 350px;
    /* Increased height for better visibility */
    position: relative;
    overflow: hidden;
}

.darshana-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.darshana-image-container:hover .darshana-img {
    transform: scale(1.05);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.darshana-info {
    padding: 2rem;
    text-align: center;
}

.primary-btn {
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(230, 81, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 81, 0, 0.5);
}

/* Slider Section */
.slider-section {
    margin: 3rem 0;
}

.slider-container {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0.5rem 0;
}

.slider-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.4s ease-out;
    padding: 0 0.5rem;
}

.slider-item {
    min-width: 85vw;
    aspect-ratio: 16/9;
    background-color: #EEE;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

#prevBtn {
    left: 10px;
}

#nextBtn {
    right: 10px;
}

/* Grid Cards */
.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem 2rem 1rem;
}

.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--accent-color);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.secondary-btn {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.secondary-btn:hover {
    background: var(--surface-alt);
}

/* Donations */
.highlight-section {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    padding: 3rem 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 2rem;
    border: 1px solid var(--accent-color);
}

.grid-container-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.donation-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.icon-large {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.outline-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 1rem;
}

/* Footer */
footer {
    background: #3E2723;
    color: #D7CCC8;
    padding: 3rem 1.5rem 6rem;
    /* Extra padding for bottom nav */
    margin-top: 4rem;
}

footer h3 {
    color: var(--accent-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: #D7CCC8;
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Responsive Desktop Overrides */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }

    .darshana-container {
        flex-direction: row;
        text-align: left;
    }

    .darshana-image-container {
        width: 50%;
        height: 400px;
        /* Taller on desktop */
    }

    .darshana-info {
        width: 50%;
        text-align: left;
        padding: 3rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }

    .slider-item {
        min-width: 300px;
        aspect-ratio: 16/9;
    }

    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-container-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }





    footer {
        padding-bottom: 1rem;
    }
}

/* === Language Specific Visibility (Global) === */
body.lang-en .kn {
    display: none !important;
}

body.lang-kn .en {
    display: none !important;
}

body.lang-kn .kn {
    display: inline !important;
}

/* Default (if JS hasn't run yet, assume EN but hide KN) */
.kn {
    display: none;
}