:root {
    --primary-color: #ffb84d; /* Divine gold */
    --accent-color: #e63946;  /* Deep temple red */
    --bg-dark: #0f0c08;       /* Very dark warm brown */
    --text-main: #f1faee;
    --glass-bg: rgba(20, 15, 10, 0.6);
    --glass-border: rgba(255, 184, 77, 0.2);
}

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

body {
    font-family: 'Anek Malayalam', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

h1, h2, h3, .site-title {
    font-family: 'Cinzel', serif; /* For English/Titles if needed, mixing with Malayalam */
}

h1, h2, h3 {
    font-family: 'Anek Malayalam', sans-serif;
    font-weight: 800;
}

/* 3D Canvas Background */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    transform: translateZ(0); /* Hardware acceleration */
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(15,12,8,0.9) 0%, rgba(15,12,8,0) 100%);
    padding: 1rem 0;
    transition: background 0.3s ease;
}

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

.site-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(255, 184, 77, 0.5);
}

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

.main-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

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

.main-nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 2rem;
    background-image: url('../images/temple_hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Overlay for the hero background to ensure text readability and blend with canvas */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 12, 8, 0.6);
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    background: rgba(10, 5, 0, 0.7); /* Darker glass for hero to stand out over canvas */
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 15px rgba(255,184,77,0.6);
}

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

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, var(--accent-color), #b02a35);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
}

/* Sections General */
.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Deities Section */
.temple-doors-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 4rem auto;
    height: 500px;
    perspective: 1500px;
    background: rgba(10,5,0,0.4);
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8) inset;
}

.temple-doors-wrapper:hover .left-door,
.temple-doors-wrapper.doors-open .left-door {
    transform: rotateY(-105deg);
}

.temple-doors-wrapper:hover .right-door,
.temple-doors-wrapper.doors-open .right-door {
    transform: rotateY(105deg);
}

/* Flower Shower Container */
.flower-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5; /* behind the doors (z-index 10) but in front of the deities */
    overflow: hidden;
    border-radius: 16px;
}

.flower-petal {
    position: absolute;
    pointer-events: none;
    font-size: 24px;
    z-index: 5;
    will-change: transform, opacity;
    user-select: none;
}

.temple-doors-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    perspective: 1500px;
    transform-style: preserve-3d;
}

.temple-door {
    width: 50%;
    height: 100%;
    background-color: #3e2723;
    background-image: url('../images/temple_door_texture.png');
    background-size: 200% 100%;
    border: 2px solid #ffb84d;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
}

.left-door {
    transform-origin: left center;
    border-right: 1px solid #1a0f00;
    background-position: left center;
}

.right-door {
    transform-origin: right center;
    border-left: 1px solid #1a0f00;
    background-position: right center;
}

/* Deities Swiper */
.deities-swiper {
    width: 100%;
    height: 100%;
    padding: 2rem;
    --swiper-theme-color: #ffb84d;
}

.deities-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.deity-card {
    text-align: center;
    padding: 1rem;
    width: 100%;
    max-width: 350px;
    background: rgba(20, 15, 10, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.deity-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 2px solid var(--primary-color);
}

.deity-card h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.subsection-title {
    font-size: 1.8rem;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 1.5rem;
}

.sub-deities-list {
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
}

/* Festivals */
.festival-list {
    list-style: none;
}

.festival-list li {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.festival-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.festival-list strong {
    color: var(--primary-color);
    display: block;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

/* History */
.history-subtitle {
    text-align: center;
    color: var(--accent-color);
    margin-top: -2rem;
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.history-content p {
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    text-align: center;
}

.invocation {
    text-align: center !important;
    font-size: 1.4rem !important;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 2rem !important;
}

.text-glow p {
    text-shadow: 0 0 2px rgba(255,255,255,0.1);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem;
    background: rgba(10,5,0,0.9);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

/* Swiper Pagination Om Icon */
.swiper-pagination-bullet {
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    opacity: 0.5 !important;
    font-size: 24px;
    color: var(--primary-color) !important;
    margin: 0 8px !important;
}

.swiper-pagination-bullet::before {
    content: "🕉";
    display: inline-block;
}

.swiper-pagination-bullet-active {
    opacity: 1 !important;
    text-shadow: 0 0 15px var(--primary-color);
    transform: scale(1.3);
    transition: all 0.3s ease;
}

/* Background Music Toggle Button */
.music-player-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1rem;
    pointer-events: none; /* Let clicks pass through empty spaces */
}

.music-title-label {
    background: rgba(10, 5, 0, 0.85);
    border: 1px solid var(--glass-border);
    color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.music-player-container:hover .music-title-label {
    opacity: 1;
    transform: translateX(0);
}

.music-toggle-btn {
    pointer-events: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.8rem;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-toggle-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 0 20px rgba(255, 184, 77, 0.6);
}

/* Blog Section */
.blog-section {
    padding-bottom: 2rem;
}

/* Swiper Slide Layout for Blog */
.blog-swiper {
    padding: 2rem 1rem 4rem 1rem;
    position: relative;
    overflow: hidden;
}

.blog-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.blog-swiper .blog-card {
    width: 100%;
}

.blog-next,
.blog-prev {
    color: var(--primary-color) !important;
    width: 44px;
    height: 44px;
    background: rgba(15, 12, 8, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.blog-next:after,
.blog-prev:after {
    font-size: 1.2rem !important;
    font-weight: bold;
}

.blog-next:hover,
.blog-prev:hover {
    background: var(--primary-color);
    color: var(--bg-dark) !important;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 184, 77, 0.5);
    border-color: var(--primary-color);
}

.blog-pagination {
    bottom: 10px !important;
}

.blog-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.3) !important;
    width: 10px;
    height: 10px;
    opacity: 1;
}

.blog-pagination .swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
    width: 24px;
    border-radius: 5px;
    transition: width 0.3s;
}

.blog-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    height: 100%;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(255, 184, 77, 0.25);
    border-color: var(--primary-color);
}

.blog-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

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

.blog-card:hover .blog-thumbnail img {
    transform: scale(1.08);
}

.placeholder-thumbnail {
    background: linear-gradient(135deg, rgba(30, 20, 10, 0.8), rgba(15, 10, 5, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.placeholder-thumbnail .divine-symbol {
    font-size: 3.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(255, 184, 77, 0.6);
}

.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-date {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.blog-card-title {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    line-height: 1.4;
    font-weight: 700;
    transition: color 0.3s;
}

.blog-card:hover .blog-card-title {
    color: var(--primary-color);
}

.blog-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(241, 250, 238, 0.85);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-readmore {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s;
}

.blog-readmore:hover {
    text-decoration: underline;
}

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Contact Section */
.contact-section {
    padding-bottom: 4rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-subtitle {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.address-details {
    margin-bottom: 2rem;
}

.address-line {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.address-line .icon {
    font-size: 1.4rem;
}

.map-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.map-link-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 184, 77, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s, transform 0.3s;
}

.map-link-btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 184, 77, 0.3);
}

/* Premium Form Design Update */
.contact-form-wrapper {
    background: linear-gradient(135deg, rgba(25, 20, 15, 0.75), rgba(15, 10, 5, 0.9)) !important;
    border: 1px solid rgba(255, 184, 77, 0.15) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6) !important;
    padding: 2.5rem !important;
    border-radius: 16px !important;
}

.temple-form {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-shadow: 0 0 5px rgba(255, 184, 77, 0.15);
}

.form-group input,
.form-group textarea {
    background: rgba(8, 4, 2, 0.85) !important;
    border: 1px solid rgba(255, 184, 77, 0.25) !important;
    color: var(--text-main) !important;
    padding: 0.9rem 1.2rem !important;
    border-radius: 12px !important;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(241, 250, 238, 0.35) !important;
    font-style: italic;
    font-size: 0.9rem;
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: rgba(255, 184, 77, 0.45) !important;
    background: rgba(12, 6, 3, 0.9) !important;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    background: rgba(15, 10, 5, 0.95) !important;
    box-shadow: 0 0 15px rgba(255, 184, 77, 0.3), inset 0 0 5px rgba(255, 184, 77, 0.1) !important;
    transform: translateY(-2px);
}

/* Premium Form Submit Button */
.btn-submit {
    padding: 1.1rem !important;
    background: linear-gradient(135deg, var(--accent-color) 0%, #b31b27 50%, #801018 100%) !important;
    border: 1px solid rgba(255, 184, 77, 0.2) !important;
    color: #fff !important;
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 50px !important;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 15px rgba(230, 57, 70, 0.2) !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: inherit;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #ff4d5a 0%, var(--accent-color) 50%, #9e1823 100%) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4), 0 0 20px rgba(255, 184, 77, 0.3) !important;
    border-color: var(--primary-color) !important;
}

.btn-submit:active {
    transform: translateY(-1px) scale(1.0);
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3) !important;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
}

.status-msg {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.status-msg.success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid #2ecc71;
    color: #2ecc71;
    text-shadow: 0 0 5px rgba(46, 204, 113, 0.3);
}

.status-msg.error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    text-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

.blog-title-link {
    text-decoration: none;
    color: inherit;
}

/* Thank You Page */
.thankyou-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
}

.thankyou-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.glowing-symbol {
    font-size: 5rem;
    color: var(--primary-color);
    text-shadow: 0 0 25px rgba(255, 184, 77, 0.9);
    animation: pulseGlow 2s infinite ease-in-out;
}

.thankyou-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.thankyou-message {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.btn-back-home {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--accent-color), #b02a35);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-back-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 25px rgba(255, 184, 77, 0.9);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 40px rgba(255, 184, 77, 1);
    }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .main-nav ul { display: none; } /* Add hamburger menu for real prod */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
