/* =========================================
   PREMIUM GLASSMORPHISM DESIGN SYSTEM (2026)
   ========================================= */

:root {
    /* Color Palette - Deep Saffron, Gold & Vermillion */
    --bg-base: #0c0603;
    --text-primary: #f8f9fa;
    --text-secondary: #c8b8af;
    --accent-cyan: #FFB300;     /* Turmeric Gold */
    --accent-purple: #FF6F00;   /* Saffron Orange */
    --accent-electric: #B71C1C; /* Sindoor Crimson Red */
    
    /* RGB bases for opacity treatments */
    --accent-cyan-rgb: 255, 179, 0;
    --accent-purple-rgb: 255, 111, 0;
    --accent-electric-rgb: 183, 28, 28;
    
    /* Glass Optics (Defined and warm glass) */
    --glass-bg: rgba(20, 10, 5, 0.75);
    --glass-bg-hover: rgba(30, 15, 8, 0.85);
    --card-glass-bg: rgba(14, 7, 3, 0.94);
    --card-glass-bg-hover: rgba(24, 12, 6, 0.97);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-highlight: rgba(255, 179, 0, 0.4);
    --glass-blur: blur(16px);
    
    /* Shadows & Depth (Warm drop shadows & saffron glows) */
    --shadow-soft: 0 15px 40px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    --shadow-glow: 0 0 25px rgba(255, 179, 0, 0.2), inset 0 0 0 1px rgba(255, 179, 0, 0.3);
    
    /* Form & Input Fields */
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-bg-focus: rgba(255, 255, 255, 0.12);
    
    /* Card Bases */
    --card-bg: rgba(10, 15, 30, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-bg: rgba(255, 255, 255, 0.02);
    
    /* Easing (Apple/Linear style) */
    --ease-premium: cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fast: all 0.25s var(--ease-premium);
    --transition-slow: all 0.45s var(--ease-premium);
}

html.light-theme {
    --bg-base: #f7f4eb; /* Warm soft wheat/cream background */
    --text-primary: #352219; /* Deeper contrast warm dark brown text */
    --text-secondary: #7e6c62;
    
    /* Light Glass Optics */
    --glass-bg: rgba(250, 245, 235, 0.82); /* Soft warm sand tinted cream glass bg */
    --glass-bg-hover: rgba(242, 235, 222, 0.9);
    --card-glass-bg: rgba(252, 248, 240, 0.96);
    --card-glass-bg-hover: rgba(246, 239, 226, 0.98);
    --glass-border: rgba(53, 34, 25, 0.16); /* More visible outline */
    --glass-border-highlight: rgba(255, 111, 0, 0.6);
    
    /* Light Shadows */
    --shadow-soft: 0 15px 40px rgba(43, 27, 18, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    --shadow-glow: 0 0 25px rgba(255, 111, 0, 0.15), inset 0 0 0 1px rgba(255, 111, 0, 0.25);
    
    /* Form & Input Fields (Light Theme) */
    --input-bg: rgba(43, 27, 18, 0.05);
    --input-border: rgba(43, 27, 18, 0.15);
    --input-bg-focus: rgba(43, 27, 18, 0.08);
    
    /* Card Bases (Light Theme) */
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(43, 27, 18, 0.1);
    --card-hover-bg: rgba(43, 27, 18, 0.02);
}

/* Base Styles & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Prevent layout shifts */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) var(--bg-base);
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: transparent;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Premium Theme Form Field & WebKit Autofill Overrides */
input, select, textarea {
    background-color: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--input-border);
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 100px var(--bg-base) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}


/* High-Performance Floating Ambient Orbs */
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
    will-change: transform;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--accent-cyan-rgb), 0.28) 0%, rgba(var(--accent-cyan-rgb), 0.08) 45%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation: drift-reverse 30s infinite alternate var(--ease-premium);
}

@keyframes drift-reverse {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-80px, -60px) scale(1.05); }
}

/* Typography Overrides */
h1, h2, h3, h4, .hindi-text, .slogan {
    font-family: 'Tiro Devanagari Hindi', serif;
    letter-spacing: -0.5px;
    line-height: 1.35; /* Ensure Devanagari characters are not clipped vertically */
}

.gradient-text {
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.py-5 {
    padding: 100px 0;
}

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

/* Premium Buttons */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition-slow);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    gap: 10px;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-electric));
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(var(--accent-purple-rgb), 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(var(--accent-purple-rgb), 0.6);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-highlight);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Magnetic Interaction Wrapper (Optional utility) */
.magnetic-wrap {
    display: inline-block;
}

/* Header - Floating Pill Glassmorphism */
header {
    position: fixed;
    top: 42px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    transition: var(--transition-slow);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
    padding: 0 24px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    box-shadow: var(--shadow-soft);
    overflow: visible;
    position: relative;
}

.logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: visible;
}

.logo h1 {
    color: var(--text-primary);
    font-size: 1.38rem; /* Scaled down slightly to comfortably fit within 75px height */
    line-height: 1.38;  /* Balanced line height for Devanagari character height */
    padding-top: 2px;
    padding-bottom: 1px;
}

.logo span {
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo p {
    font-size: 0.65rem; /* Scaled down tagline to prevent overflow */
    color: var(--text-secondary);
    letter-spacing: 0.8px;
    line-height: 1.1;
}

/* Navbar Flex Setup for Theme Toggle Alignment */
#navbar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    font-weight: 400;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.nav-links li a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.nav-links li a.btn-primary {
    color: #fff !important;
    padding: 10px 24px;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

/* Ambient Background Icons Layer */
.hero-bg-icons-layer {
    position: absolute; /* Restore absolute positioning to let it scroll away naturally */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Adaptively stretches to parent height (100vh in hero section, full height in body on subpages) */
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

/* Deity/Astral Medallions in Background */
.bg-icon-item {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease;
    --bg-icon-opacity-min: 0.16;
    --bg-icon-opacity-max: 0.32;
    opacity: var(--bg-icon-opacity-max); /* Static optimized opacity to prevent continuous composition updates */
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.bg-icon-item svg.svg-spiritual-icon {
    color: var(--accent-cyan);
    width: 140px;
    height: 140px;
    position: relative;
    z-index: 2;
}

/* Celestial Astral Ring */
.celestial-ring {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border: 1px dashed rgba(255, 179, 0, 0.22);
    border-radius: 50%;
    animation: spin-slow 25s linear infinite;
    pointer-events: none;
}

/* Second concentric ring with reverse spin */
.celestial-ring-outer {
    position: absolute;
    top: -24px;
    left: -24px;
    right: -24px;
    bottom: -24px;
    border: 1px dotted rgba(255, 111, 0, 0.15);
    border-radius: 50%;
    animation: spin-reverse-slow 35s linear infinite;
    pointer-events: none;
}

/* Soft central nebula glow */
.nebula-glow {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 179, 0, 0.42) 0%, rgba(255, 179, 0, 0.18) 45%, transparent 75%);
    z-index: 1;
    pointer-events: none;
}

/* Light Theme adaptations */
html.light-theme .bg-icon-item {
    --bg-icon-opacity-min: 0.11;
    --bg-icon-opacity-max: 0.22;
    opacity: var(--bg-icon-opacity-max);
}
html.light-theme .bg-icon-item svg.svg-spiritual-icon {
    color: var(--accent-purple);
}
html.light-theme .celestial-ring {
    border-color: rgba(255, 111, 0, 0.2);
}
html.light-theme .celestial-ring-outer {
    border-color: rgba(183, 28, 28, 0.12);
}
html.light-theme .nebula-glow {
    background: radial-gradient(circle, rgba(255, 111, 0, 0.26) 0%, rgba(255, 111, 0, 0.11) 45%, transparent 75%);
}

/* Individual Icon Positioning & Animations */
.icon-om {
    top: 15%;
    left: 8%;
    animation: float-bg-1 9s ease-in-out infinite;
}

.icon-sun {
    top: 12%;
    right: 8%;
    animation: float-bg-2 10s ease-in-out infinite;
}

.icon-moon {
    top: 45%;
    left: 5%;
    animation: float-bg-3 8s ease-in-out infinite;
}

.icon-veena {
    top: 48%;
    right: 5%;
    animation: float-bg-1 11s ease-in-out infinite;
}

.icon-dharma {
    bottom: 15%;
    left: 10%;
    animation: float-bg-2 12s ease-in-out infinite;
}

.icon-fire {
    bottom: 12%;
    right: 10%;
    animation: float-bg-3 9s ease-in-out infinite;
}

.icon-stars {
    top: 30%;
    right: 25%;
    width: 70px;
    height: 70px;
    animation: pulse-slow-star 4s ease-in-out infinite;
}

.icon-stars svg.svg-spiritual-icon {
    width: 42px;
    height: 42px;
    color: var(--accent-cyan);
    animation: none;
}

/* Custom Animation Keyframes */
@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-reverse-slow {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes float-bg-1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(8deg); }
}

@keyframes float-bg-2 {
    0%, 100% { transform: translateY(0) rotate(0deg) translate3d(0,0,0); }
    50% { transform: translateY(12px) rotate(4deg) translate3d(0,0,0); }
}

@keyframes float-bg-3 {
    0%, 100% { transform: translateY(0) rotate(0deg) translate3d(0,0,0); }
    50% { transform: translateY(-10px) rotate(-10deg) translate3d(0,0,0); }
}

@keyframes pulse-slow-star {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.45; }
}

@keyframes breathing-container {
    0%, 100% { opacity: var(--bg-icon-opacity-min); }
    50% { opacity: var(--bg-icon-opacity-max); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeUp 1s var(--ease-premium) forwards;
    opacity: 0;
    transform: translateY(30px);
}

/* Symmetrical Altar Layout */
.hero-altar-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-areas: "left-card center-text right-card";
    gap: 30px;
    align-items: center;
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    z-index: 2;
    animation: fadeUp 1s var(--ease-premium) forwards;
}

/* Deity Float Wrappers with Symmetrical Positioning */
.deity-float-wrapper {
    position: relative;
    z-index: 2;
    will-change: transform;
}

.left-deity {
    grid-area: left-card;
    justify-self: end;
    animation: float-slow-left 6s ease-in-out infinite;
}

.right-deity {
    grid-area: right-card;
    justify-self: start;
    animation: float-slow-right 7s ease-in-out infinite;
}

.deity-float-wrapper:hover {
    animation-play-state: paused;
}

@keyframes float-slow-left {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes float-slow-right {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.hero-center-side {
    grid-area: center-text;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hero-center-side .slogan {
    text-align: center;
    font-size: 3.8rem;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-center-side .slogan span {
    font-size: 2.5rem;
}

.hero-center-side .sub-slogan {
    text-align: center;
    margin: 0 auto 35px;
    max-width: 550px;
}

.hero-center-side .hero-buttons {
    justify-content: center;
}

/* Deity Glass Shrine Cards (Glow & Glassmorphism Upgrade) */
.deity-glass-card {
    background: linear-gradient(135deg, rgba(20, 10, 5, 0.7), rgba(40, 20, 10, 0.45));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 179, 0, 0.22);
    border-radius: 120px 120px 24px 24px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.65), 
                inset 0 0 0 1px rgba(255, 255, 255, 0.05),
                0 0 15px rgba(255, 179, 0, 0.08);
    transition: all 0.5s var(--ease-premium);
    width: 196px;
    position: relative;
    overflow: hidden;
}

/* Light Theme Deity Card override */
html.light-theme .deity-glass-card {
    background: linear-gradient(135deg, rgba(250, 245, 235, 0.85), rgba(242, 235, 222, 0.65));
    border-color: rgba(255, 111, 0, 0.3);
    box-shadow: 0 15px 35px rgba(43, 27, 18, 0.1), 
                inset 0 0 0 1px rgba(255, 255, 255, 0.8),
                0 0 15px rgba(255, 111, 0, 0.05);
}

.deity-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: radial-gradient(circle at top, rgba(255, 179, 0, 0.15), transparent 70%);
    opacity: 0.6;
    transition: var(--transition-fast);
    pointer-events: none;
}

.deity-glass-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(255, 179, 0, 0.5);
    box-shadow: 0 20px 45px rgba(255, 179, 0, 0.25), 
                inset 0 0 0 1px rgba(255, 179, 0, 0.2), 
                0 0 30px rgba(255, 179, 0, 0.2);
}

.deity-glass-card:hover::before {
    opacity: 1;
}

/* Deity Double Gold Filigree Arch Frame */
.deity-arch-frame {
    width: 158px;
    height: 208px;
    border-radius: 100px 100px 16px 16px;
    overflow: hidden;
    border: 2px solid rgba(255, 179, 0, 0.35);
    outline: 1px solid rgba(255, 179, 0, 0.15);
    outline-offset: 4px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transition: all 0.5s var(--ease-premium);
    background: var(--bg-base);
    margin-bottom: 5px; /* Added spacing to compensate outline-offset */
}

/* Light Theme Deity Frame override */
html.light-theme .deity-arch-frame {
    border-color: rgba(255, 111, 0, 0.4);
    outline-color: rgba(255, 111, 0, 0.18);
}

.deity-glass-card:hover .deity-arch-frame {
    border-color: var(--accent-cyan);
    outline-color: rgba(255, 179, 0, 0.3);
    box-shadow: 0 10px 25px rgba(255, 179, 0, 0.4);
}

.deity-arch-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-premium);
}

.deity-glass-card:hover .deity-arch-frame img {
    transform: scale(1.07);
}

.deity-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    transition: var(--transition-fast);
    position: relative;
    z-index: 2;
}

.deity-glass-card:hover .deity-card-title {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(255, 179, 0, 0.35);
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.slogan {
    font-size: clamp(1.8rem, 5vw, 4.2rem);
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.15;
    font-weight: 600;
}

.slogan span {
    font-size: clamp(1.2rem, 3.5vw, 2.8rem);
    display: block;
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 8px;
    font-weight: 500;
    line-height: 1.25;
}

.sub-slogan {
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    margin-bottom: 40px;
    color: var(--text-secondary);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* Glowing Background Outline Figure */
.hero-bg-outline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 650px;
    height: auto;
    pointer-events: none;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    mix-blend-mode: screen;
}

.outline-bg-img {
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
    filter: contrast(1.5) brightness(0.9) drop-shadow(0 0 20px rgba(255, 179, 0, 0.45));
    animation: outline-glow 5s infinite alternate ease-in-out;
}

@keyframes outline-glow {
    0% {
        opacity: 0.15;
        filter: contrast(1.5) brightness(0.8) drop-shadow(0 0 15px rgba(255, 179, 0, 0.35));
    }
    100% {
        opacity: 0.25;
        filter: contrast(1.5) brightness(1.1) drop-shadow(0 0 35px rgba(255, 179, 0, 0.7));
    }
}

/* Universal Glass Component */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

/* Shimmer Effect Pseudo-element */
.glass-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: var(--transition-slow);
}

.glass-panel:hover::after {
    left: 150%;
    transition: left 0.8s var(--ease-premium);
}

/* About Section */
.about-section {
    position: relative;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 60px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.about-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

.img-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1.5px solid var(--accent-cyan);
    background-color: #0c0603;
    padding: 15px;
    padding-bottom: 35px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), var(--shadow-glow);
}

.img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    filter: contrast(1.05);
    transition: var(--transition-slow);
}

.img-wrapper:hover img {
    transform: scale(1.02);
}

.name-badge {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #110805;
    border: 1.5px solid var(--accent-cyan);
    color: #ffffff;
    padding: 10px 35px;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8), var(--shadow-glow);
    z-index: 2;
}

.name-badge h3 {
    font-size: 1.25rem;
    margin: 0;
    font-family: 'Tiro Devanagari Hindi', serif;
    font-weight: 500;
}

.about-text {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    color: var(--text-primary);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.highlights {
    margin-top: 30px;
    width: 100%;
}

.highlights li {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-primary);
}

.highlights li i {
    color: var(--accent-cyan);
    font-size: 1.3rem;
    margin-right: 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px; /* Squircle look */
}

/* Services Section (Home Page Grid) */
.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 20px auto 0;
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    padding: 40px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-slow);
    will-change: transform, border-color;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--glass-border-highlight);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), var(--shadow-glow);
}

.service-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    display: inline-block;
    transition: var(--transition-slow);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer Section */
.footer-section {
    margin-top: 100px;
    border-top: 1px solid var(--glass-border);
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    padding: 80px 0 30px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 40px;
}

.footer-brand {
    flex: 1;
    min-width: 300px;
}

.footer-brand h2 {
    color: var(--text-primary);
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.slogan-small {
    margin-top: 20px;
    color: var(--accent-cyan) !important;
    font-weight: 500;
}

.footer-contact {
    flex: 1;
    min-width: 300px;
}

.footer-contact h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact ul li {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.footer-contact ul li i {
    color: var(--accent-purple);
    width: 30px;
    font-size: 1.2rem;
}

.footer-contact ul li a {
    transition: var(--transition-fast);
}

.footer-contact ul li a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* =========================================
   RESPONSIVE DESIGN — MOBILE FIRST
   ========================================= */

@media (max-width: 1100px) {
    .hero-altar-container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "center-text center-text"
            "left-card right-card";
        gap: 30px;
        justify-items: center;
        padding-top: 140px;
    }
    .left-deity { grid-area: left-card; justify-self: center; }
    .right-deity { grid-area: right-card; justify-self: center; }
}

@media (max-width: 992px) {
    .hero-bg-outline { max-width: 460px; }

    .about-container {
        flex-direction: column;
        padding: 40px 24px;
        gap: 40px;
    }
    .about-text {
        align-items: center;
        text-align: center;
    }
    .highlights {
        display: inline-flex;
        flex-direction: column;
        align-items: flex-start;
        max-width: 360px;
        margin: 24px auto 0;
    }
    .about-text .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-bg-outline { max-width: 320px; }

    /* Header pill shrinks on mobile */
    header {
        top: 42px;
        width: 95%;
    }
    .header-container {
        padding: 0 16px;
        height: 65px;
    }
    .logo h1 { font-size: 1.1rem; }
    .logo p  { font-size: 0.58rem; }

    .hamburger { display: block; }

    /* Mobile dropdown nav */
    .nav-links {
        position: absolute;
        top: 70px;
        left: -110%;
        flex-direction: column;
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        width: 100%;
        text-align: center;
        transition: 0.4s var(--ease-premium);
        border: 1px solid var(--glass-border);
        border-radius: 20px;
        padding: 24px 0;
        gap: 20px;
        z-index: 999;
    }
    .nav-links.active { left: 0; }

    /* Hero altar: text on top, both deity cards side-by-side below */
    .hero-altar-container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "center-text center-text"
            "left-card right-card";
        gap: 20px;
        padding-top: 120px;
        padding-bottom: 20px;
    }
    .left-deity { justify-self: end; }
    .right-deity { justify-self: start; }

    .hero-center-side .slogan { font-size: clamp(1.55rem, 6vw, 2.2rem); }
    .hero-center-side .slogan span { font-size: clamp(1.1rem, 4.5vw, 1.5rem); }
    .hero-center-side .sub-slogan { font-size: 0.92rem; margin-bottom: 22px; }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Deity shrine cards smaller on phone */
    .deity-glass-card {
        width: 140px;
        padding: 10px;
        border-radius: 80px 80px 18px 18px;
    }
    .deity-arch-frame {
        width: 118px;
        height: 155px;
        border-radius: 70px 70px 12px 12px;
        border-width: 1.5px;
    }
    .deity-card-title { font-size: 0.75rem; margin-top: 6px; }

    /* About section */
    .about-container { padding: 30px 16px; gap: 30px; }
    .img-wrapper { padding: 12px; padding-bottom: 28px; }
    .name-badge { padding: 8px 22px; }
    .name-badge h3 { font-size: 1rem; }

    /* Services & Team grids: single column */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 30px;
    }
    .service-card { padding: 28px 20px; }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Footer */
    .footer-section { padding: 60px 0 24px; }
    .footer-top {
        flex-direction: column;
        gap: 30px;
    }
    .footer-brand, .footer-contact {
        min-width: unset;
        width: 100%;
    }

    /* Background icons: keep at full desktop opacity on mobile so they remain visible */
    .bg-icon-item { opacity: 0.28 !important; }
    html.light-theme .bg-icon-item { opacity: 0.20 !important; }
    .icon-stars, .icon-music { display: none; }

    /* Section spacing */
    .py-5 { padding: 60px 0; }
    .container { padding: 0 16px; }
}

@media (max-width: 480px) {
    .hero-bg-outline { max-width: 220px; opacity: 0.12; }

    /* Header even more compact */
    header { top: 36px; width: 94%; }
    .header-container { height: 58px; padding: 0 14px; }
    .logo h1 { font-size: 1rem; }
    .logo p  { display: none; }

    /* Deity cards even smaller */
    .deity-glass-card {
        width: 120px;
        padding: 8px;
        border-radius: 70px 70px 14px 14px;
    }
    .deity-arch-frame {
        width: 104px;
        height: 136px;
        border-radius: 60px 60px 10px 10px;
    }
    .deity-card-title { font-size: 0.7rem; }

    /* Deity cards side-by-side on very small phones too */
    .hero-altar-container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "center-text center-text"
            "left-card right-card";
        gap: 12px;
        padding-top: 110px;
    }
    .left-deity { justify-self: end; }
    .right-deity { justify-self: start; }

    /* About */
    .about-container { padding: 24px 12px; }
    .name-badge { padding: 7px 18px; }

    /* Typography */
    .hero-center-side .slogan { font-size: 1.45rem; }
    .hero-center-side .slogan span { font-size: 1rem; }
    .section-title { font-size: 1.5rem; }

    /* Buttons full-width */
    .btn-primary, .btn-secondary { padding: 12px 20px; font-size: 0.9rem; }

    /* Cards */
    .service-card { padding: 22px 14px; }
    .team-card { padding: 18px 14px; }
    .team-img-wrapper { width: 100px; height: 100px; }

    /* Form rows always stack */
    .form-row { flex-direction: column; gap: 12px; }

    /* Ticker hide on smallest */
    .ticker-wrap { height: 26px; }
    .ticker__item { font-size: 0.7rem; padding: 0 24px; }

    /* Padding */
    .py-5 { padding: 48px 0; }
    .container { padding: 0 12px; }
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    border: 1px solid var(--glass-border);
}

.theme-toggle-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent-cyan);
    transform: scale(1.05);
}

.theme-toggle-btn i {
    color: var(--accent-cyan);
}

/* Light Theme overrides for Maa Baglamukhi outline in Hero Section */
html.light-theme .hero-bg-outline {
    mix-blend-mode: normal;
}

html.light-theme .outline-bg-img {
    filter: contrast(1.2) brightness(0.95) drop-shadow(0 0 20px rgba(255, 111, 0, 0.3));
    animation: outline-glow-light 5s infinite alternate ease-in-out;
}

@keyframes outline-glow-light {
    0% {
        opacity: 0.25;
        filter: contrast(1.2) brightness(0.9) drop-shadow(0 0 15px rgba(255, 111, 0, 0.25));
    }
    100% {
        opacity: 0.4;
        filter: contrast(1.2) brightness(1.0) drop-shadow(0 0 30px rgba(255, 111, 0, 0.45));
    }
}

/* =========================================
   SCHOLARS & TEAM SECTION STYLES
   ========================================= */
.team-section {
    position: relative;
    z-index: 5;
    background: transparent;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    transition: var(--transition-slow);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 111, 0, 0.08), transparent 70%);
    opacity: 0.6;
    transition: var(--transition-fast);
}

.team-card:hover {
    transform: translateY(-8px);
    border-color: var(--glass-border-highlight);
    box-shadow: var(--shadow-glow);
}

.team-card:hover::before {
    opacity: 1;
}

.team-img-wrapper {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 3px solid var(--glass-border-highlight);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition-fast);
}

.team-card:hover .team-img-wrapper {
    transform: scale(1.05);
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 25px rgba(255, 111, 0, 0.3);
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-info h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: var(--transition-fast);
}

.team-card:hover .team-info h3 {
    color: var(--accent-cyan);
}

.team-role {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-weight: 500;
}

.view-profile-btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    transition: var(--transition-fast);
}

.team-card:hover .view-profile-btn {
    background: var(--accent-purple);
    color: #ffffff;
    border-color: var(--accent-purple);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.2);
}

/* =========================================
   GLASSMORPHIC MODAL COMPONENT
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 6, 3, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-premium);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s var(--ease-premium);
    border-radius: 32px;
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close-btn:hover {
    background: var(--accent-electric);
    border-color: var(--accent-electric);
    color: #ffffff;
    transform: rotate(90deg);
}

.modal-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
}

.modal-left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-img-wrapper {
    width: 200px;
    height: 200px;
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid var(--glass-border-highlight);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-right {
    display: flex;
    flex-direction: column;
}

.modal-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.modal-role {
    font-size: 1.05rem;
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 20px;
}

.modal-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.modal-meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.meta-val {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-detail-section {
    margin-bottom: 20px;
}

.modal-detail-section h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent-purple);
    margin-bottom: 8px;
    font-weight: 600;
}

.modal-text {
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .modal-card {
        padding: 30px 20px;
    }
    .modal-img-wrapper {
        width: 150px;
        height: 150px;
    }
    .modal-name {
        font-size: 1.5rem;
        text-align: center;
    }
    .modal-role {
        text-align: center;
        margin-bottom: 15px;
    }
    .modal-meta-row {
        justify-content: center;
        text-align: center;
    }
    .modal-detail-section h4 {
        text-align: center;
    }
    .modal-text {
        text-align: justify;
    }
}

/* Light Theme overrides for Scholars Section & Modal readability */
html.light-theme .team-card:hover .team-info h3 {
    color: var(--accent-purple); /* Saffron Orange (higher contrast than Gold on cream) */
}

html.light-theme .modal-role {
    color: var(--accent-purple); /* Saffron Orange (higher contrast than Gold on cream) */
}

html.light-theme .modal-detail-section h4 {
    color: var(--accent-electric); /* Deep Crimson Red for high visibility title section */
}

html.light-theme .modal-close-btn:hover {
    color: #ffffff;
}

/* =========================================
   TOP SCROLLING TICKER MARQUEE
   ========================================= */
.ticker-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1001;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 25s linear infinite;
    will-change: transform;
}
.ticker__item {
    display: inline-block;
    padding: 0 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-cyan);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
html.light-theme .ticker__item {
    color: var(--accent-purple);
}
@keyframes ticker-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}
