/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #8B1A1A;
    --color-primary-dark: #5C0E0E;
    --color-gold: #D4A843;
    --color-gold-light: #F0D68A;
    --color-bg: #FFF8F0;
    --color-bg-alt: #FFF0E0;
    --color-text: #2D2D2D;
    --color-text-light: #5A5A5A;
    --color-white: #FFFFFF;
    --font-main: 'Noto Sans Malayalam', sans-serif;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 8px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.temple-name h1 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-gold-light);
}

.temple-name .location {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Menu Toggle */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-gold-light);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Language Toggle */
.lang-toggle {
    background: var(--color-gold);
    color: var(--color-primary-dark);
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-main);
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-toggle:hover {
    background: var(--color-gold-light);
}

/* Navigation */
.nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: var(--color-primary-dark);
}

.nav.open {
    max-height: 400px;
}

.nav ul {
    list-style: none;
    padding: 8px 0;
}

.nav ul li a {
    display: block;
    padding: 12px 20px;
    color: var(--color-gold-light);
    font-size: 0.95rem;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav ul li a:hover {
    background: rgba(255,255,255,0.08);
}

/* ===== Hero ===== */
.hero {
    background: url('../req/image/banner4.png') center bottom / cover no-repeat;
    min-height: 60vh;
    display: none;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 20%, rgba(0,0,0,0.3) 100%);
}

.hero-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px 48px;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

.hero-oom {
    height: 140px;
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.hero-content h2 {
    font-family: 'Noto Serif Malayalam', serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--color-gold-light);
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
}

/* ===== Mobile Banner ===== */
.mobile-banner {
    display: block;
    position: relative;
}

.mobile-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.mobile-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.mobile-banner-overlay h2 {
    font-family: 'Noto Serif Malayalam', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--color-gold-light);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 4px;
}

.mobile-banner-overlay p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ===== Sections ===== */
.section {
    padding: 48px 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-title {
    text-align: center;
    font-family: 'Noto Serif Malayalam', serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: 32px;
    position: relative;
    padding-bottom: 12px;
    letter-spacing: 0.02em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--color-gold);
    border-radius: 2px;
}

/* ===== History ===== */
.history-text p {
    margin-bottom: 16px;
    font-size: 0.95rem;
    text-align: left;
}

.history-text .history-quote {
    font-style: italic;
    text-align: center;
    margin-top: 24px;
    font-size: 1rem;
    color: var(--primary-color, #b8860b);
}

/* ===== Video ===== */
.video-title {
    font-size: 1.5rem;
    cursor: default;
    animation: glow-pulse 2.5s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { text-shadow: 0 0 8px rgba(184, 134, 11, 0.3); }
    50% { text-shadow: 0 0 18px rgba(184, 134, 11, 0.7), 0 0 30px rgba(184, 134, 11, 0.3); }
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== Timings ===== */
.timings-grid {
    display: grid;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.timing-card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--color-gold);
    text-align: center;
}

.timing-card h3 {
    color: var(--color-primary);
    margin-bottom: 16px;
    font-size: 1.15rem;
}

.timing-detail {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px dashed #E0D5C5;
}

.timing-detail:last-child {
    border-bottom: none;
}

.timing-label {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.timing-value {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.timings-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 16px;
    font-style: italic;
}

/* ===== Vazhipad Table ===== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vazhipad-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.vazhipad-table thead {
    background: var(--color-primary);
    color: var(--color-gold-light);
}

.vazhipad-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
}

.vazhipad-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid #F0E8DC;
}

.vazhipad-table tbody tr:hover {
    background: var(--color-bg-alt);
}

.vazhipad-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Gallery ===== */
.gallery-note {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 2001;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 4px;
    z-index: 2001;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== Administration ===== */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.admin-card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.admin-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-bg-alt), #E0D5C5);
    margin: 0 auto 12px;
    border: 3px solid var(--color-gold);
}

.admin-card h3 {
    font-size: 0.9rem;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.admin-designation {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    gap: 24px;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--color-bg-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h3 {
    font-size: 0.95rem;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.contact-item a {
    color: var(--color-text-light);
}

.contact-item a:hover {
    color: var(--color-primary);
}

.contact-map iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: block;
}

/* ===== Nav Donate Link ===== */
.nav-donate-link {
    background: linear-gradient(135deg, #2d5016, #4a7c28) !important;
    color: #fff !important;
    border-radius: 6px;
    font-weight: 700 !important;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 20px 16px;
    font-size: 0.8rem;
}

.footer-donate-btn {
    display: inline-block;
    padding: 12px 28px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #2d5016, #4a7c28);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
    border: 2px solid #6aad3a;
    transition: transform 0.2s, box-shadow 0.2s;
}

.footer-donate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

/* ===== Floating Program 2026 Button ===== */
.floating-program-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff6b35, #d4145a, #ff6b35);
    background-size: 200% 200%;
    animation: floatingGradient 3s ease infinite, floatingBounce 2s ease-in-out infinite;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(212, 20, 90, 0.5), 0 0 40px rgba(255, 107, 53, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.floating-program-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(212, 20, 90, 0.7), 0 0 60px rgba(255, 107, 53, 0.4);
    animation: floatingGradient 3s ease infinite;
}

.floating-program-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    animation: floatingPulse 2s ease-in-out infinite;
}

.floating-program-text {
    position: relative;
    z-index: 1;
}

.floating-program-arrow {
    position: relative;
    z-index: 1;
    font-size: 1rem;
    animation: floatingArrow 1s ease-in-out infinite;
}

@keyframes floatingGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatingBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes floatingPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0; transform: scale(1.3); }
}

@keyframes floatingArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

/* ===== Desktop (768px+) ===== */
@media (min-width: 768px) {
    .mobile-banner {
        display: none;
    }

    .hero {
        display: flex;
    }

    .header-top {
        padding: 14px 24px;
    }

    .temple-name h1 {
        font-size: 1.4rem;
    }

    .menu-toggle {
        display: none;
    }

    .nav {
        max-height: none;
        background: var(--color-primary-dark);
    }

    .nav ul {
        display: flex;
        justify-content: center;
        padding: 0;
    }

    .nav ul li a {
        padding: 12px 18px;
        font-size: 0.85rem;
        border-bottom: none;
    }

    .hero {
        min-height: 60vh;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .hero-sub {
        font-size: 1.2rem;
    }

    .section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 2rem;
    }


    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .admin-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .admin-photo-placeholder {
        width: 100px;
        height: 100px;
    }

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

    .container {
        padding: 0 24px;
    }
}

/* ===== Large Desktop (1024px+) ===== */
@media (min-width: 1024px) {
    .hero-content h2 {
        font-size: 3rem;
    }

    .history-text {
        max-width: 800px;
        margin: 0 auto;
    }

    .history-text p {
        text-align: justify;
    }

    .vazhipad-table th,
    .vazhipad-table td {
        padding: 14px 24px;
    }
}
