:root {
    /* STRICT 3-COLOR PALETTE: Saffron Orange, Sacred Cream, Deep Royal Indigo */
    --bg-color: #fffdf5; /* Sacred Cream (Main Background) */
    --primary-color: #ff9933; /* Divine Saffron (Action/Contrast) */
    --secondary-color: #fb8c00; /* Bold Orange Accent */
    --accent-color: #261e47; /* Deep Royal Indigo (Depth/Elegance) */
    
    /* Variable Derived Colors */
    --text-main: #1a1530; /* Dark Indigo (Almost Black for readability) */
    --text-muted: #4b447a; /* Muted Indigo */
    --text-dark: #1a1530;
    --white: #ffffff;
    --gold: #d4af37; /* Supporting metallic element */
    --accent-gold: #d4af37;
    --glass: rgba(255, 253, 245, 0.85);
    --glass-bg: rgba(255, 253, 245, 0.95);
    --glass-border: rgba(38, 30, 71, 0.15); /* Indigo-based border */

    /* Spiritual & Retro Typography */
    --font-heading: 'Tiro Devanagari Hindi', serif;
    --font-body: 'Playfair Display', serif;
    --font-accent: 'Playfair Display', serif;
    --font-eighties: 'Playfair Display', serif;

    /* Modern Effects */
    --glass-bg: rgba(255, 253, 245, 0.85);
    --glass-border: rgba(128, 0, 0, 0.15);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    --shadow-soft: 0 10px 30px rgba(38, 30, 71, 0.08);
    --shadow-card: 0 15px 40px rgba(38, 30, 71, 0.15);
    --transition-base: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    --sacred-glow: 0 0 20px rgba(255, 140, 0, 0.4);
}

/* ==========================================================================
   HEADER & NAVIGATION REDESIGN
   ========================================================================== */

/* Top Bar: Professional & Informative */
.top-bar {
    background: var(--secondary-color);
    color: var(--white);
    height: 44px;
    font-size: 0.85rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1100;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--accent-gold);
    display: flex;
    align-items: center;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.top-bar.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.contact-strip {
    display: flex;
    gap: 25px;
}

.contact-strip span {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

.social-strip {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-strip a {
    color: var(--white);
    font-size: 1rem;
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.social-strip a:hover {
    opacity: 1;
    transform: scale(1.2) translateY(-2px);
    color: var(--accent-gold);
}

.top-cta {
    background: transparent;
    color: #110805 !important; /* Bold, high-contrast black link */
    padding: 0;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-family: var(--font-heading); /* Divine, Sacred Font */
    margin-left: 20px;
    letter-spacing: 1px;
    border: none;
    box-shadow: none;
    transition: var(--transition-base);
}

.top-cta:hover {
    color: #110805 !important; /* Fixed Black: No Hover Glow */
    transform: none;
    opacity: 1;
}

/* Main Header: Floating Glassmorphism Style */
header#main-header {
    position: fixed;
    top: 44px;
    /* Perfectly sits below Top Bar */
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2px 0;
}

header#main-header.scrolled {
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    padding: 0px 0;
    box-shadow: none;
    border-bottom: 3px solid var(--primary-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition-smooth);
}

.logo-container img {
    height: 75px; /* Increased logo size */
    border: 3px solid var(--accent-gold);
    border-radius: 50%;
    transition: var(--transition-smooth);
}

header#main-header.scrolled .logo-container img {
    height: 60px; /* Increased scrolled logo size */
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--white);
    letter-spacing: 1.5px;
    text-shadow: none;
    margin: 0;
}

header#main-header.scrolled .logo-text h1 {
    color: var(--secondary-color);
    text-shadow: none;
}

/* Nav Menu */
nav#main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav#main-nav ul li a {
    font-family: var(--font-accent);
    color: var(--white);
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.95rem;
    padding: 5px 0;
    position: relative;
    text-shadow: none;
}

header#main-header.scrolled nav#main-nav ul li a {
    color: var(--text-main);
    text-shadow: none;
}

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

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

nav#main-nav ul li a:hover,
nav#main-nav ul li a.active {
    color: var(--primary-color) !important;
}

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

body {
    font-family: var(--font-eighties), serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: 154px;
}

p {
    font-family: var(--font-body), sans-serif !important;
}

h1, h2, h3, h4, h5, h6, .sacred-text {
    font-family: var(--font-heading) !important;
}

.nav-link, .btn, .badge, 
.logo-text, .footer-links h3, .top-bar, .ticker-label, .vm-badge {
    font-family: var(--font-body), serif !important;
}

.sacred-pattern {
    background-image: radial-gradient(var(--glass-border) 0.5px, transparent 0.5px);
    background-size: 30px 30px;
    background-color: var(--bg-color);
}

h1,
h2,
h3,
h4,
.sacred-text {
    font-family: var(--font-heading);
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.sub-title {
    font-family: var(--font-accent);
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
}

.section-header h2 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* 2D Modern Card Animations */
.item-card,
.event-card,
.gallery-item {
    transition: var(--transition-smooth);
    border: none;
    background: white;
}

.item-card:hover,
.event-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(44, 24, 16, 0.15);
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gold);
    transform: scaleX(0.3);
    transition: transform 0.5s ease;
    transform-origin: center;
}

.item-card:hover::before {
    transform: scaleX(1);
    background: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

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

/* Layout Utilities */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-padding {
    padding: 140px 0;
}

.section-header {
    margin-bottom: 80px;
}

.section-header .badge {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-gold);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 25px;
    display: inline-block;
}

.section-header h2 {
    font-size: 3.5rem;
    color: var(--secondary-color);
    line-height: 1.2;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 20px auto 0;
}

/* Premium Animations */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar */
/* Navbar Enhancement */
header#main-header {
    position: fixed;
    top: 44px;
    width: 100%;
    z-index: 2000;
    /* Extremely high to stay above everything */
    background: #fffdf5;
    /* Solid, 100% Opaque Sacred Cream */
    border-bottom: 2px solid var(--accent-gold);
    transition: var(--transition-smooth);
    padding: 12px 0;
    box-shadow: none;
}

header#main-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 8px 0;
    box-shadow: none;
    top: 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0; /* Removed extra padding to make navbar thinner */
}

/* Improved Navigation */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container img {
    height: 75px; /* Increased logo size */
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    transition: var(--transition-bounce);
}

header.scrolled .logo-container img {
    height: 60px; /* Increased scrolled logo size */
}

/* Branding Typography */
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text h1 {
    font-family: var(--font-heading);
    margin: 0;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.eng-name {
    font-size: 16px; /* Reduced text size */
    color: #110805 !important;
    font-weight: 800;
}

.kan-name {
    font-family: 'Noto Sans Kannada', sans-serif;
    font-size: 13px !important; /* Reduced text size */
    color: #110805 !important;
    opacity: 0.9;
    font-weight: 700;
}

/* Scrolled/Sticky State Overrides */
header#main-header.scrolled .eng-name {
    color: var(--secondary-color);
}

header#main-header.scrolled .kan-name {
    color: var(--text-muted);
}

/* Navigation Links */
nav ul {
    display: flex;
    list-style: none;
    gap: 35px;
}

nav ul li a {
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary-color) !important; /* Divine Saffron Orange */
    position: relative;
    padding: 5px 0;
    display: inline-block;
    transition: var(--transition-base);
}

header#main-header.scrolled nav ul li a {
    color: var(--secondary-color) !important;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

header#main-header.scrolled nav ul li a {
    color: var(--secondary-color);
}


nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-base);
}

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

nav ul li a:hover {
    color: var(--primary-color) !important;
}

/* Buttons Modernization */
.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-bounce);
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 140, 0, 0.4);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: white;
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Hero Slider - Ken Burns & Immersive Layout */
.hero-slider {
    position: relative;
    height: 85vh;
    min-height: 600px;
    overflow: hidden;
    background: #000;
}

.slider-wrapper {
    height: 100%;
    width: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents cropping as requested */
    background: #110805; /* Black-ish background for gaps */
    transform: scale(1);
    transition: opacity 1.5s ease-in-out;
}

.slide.active .slide-bg img {
    transform: scale(1);
}

.slide-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(26, 15, 10, 0.85), rgba(128, 0, 0, 0.4), transparent);
}

.slide-content {
    color: white;
    max-width: 900px;
    z-index: 10;
}

.slide-content h2 {
    font-size: 5rem;
    line-height: 1.1;
    font-family: var(--font-heading);
    margin-bottom: 25px;
    color: var(--white);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(60px);
    opacity: 0;
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s;
}

.slide.active .slide-content h2 {
    transform: translateY(0);
    opacity: 1;
}

.slide-content h2 span {
    color: var(--primary-color);
    display: block;
}

.slide-content p {
    font-size: 1.25rem;
    margin-bottom: 45px;
    opacity: 0;
    transform: translateY(40px);
    max-width: 650px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s;
    line-height: 1.8;
}

.slide.active .slide-content p {
    opacity: 1;
    transform: translateY(0);
}

.slide-content .cta-group {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 1s;
}

.active .slide-content .cta-group {
    opacity: 1;
    transform: translateY(0);
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 40px;
}

.prev-slide,
.next-slide {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.prev-slide:hover,
.next-slide:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 153, 51, 0.5);
}

.slider-dots {
    display: flex;
    gap: 12px;
}

.dot {
    width: 30px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.dot.active {
    background: var(--primary-color);
    width: 50px;
}

/* Premium 3D Interaction Styles */
.item-card,
.event-card,
.gallery-item {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.item-card:hover,
.event-card:hover {
    transform: translateY(-12px) rotateX(2deg) rotateY(2deg);
}

.btn {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Footer Modernization */
/* ==========================================================================
   FOOTER REDESIGN
   ========================================================================== */
footer {
    background: linear-gradient(to bottom, #fffdf8, #fff9e6);
    color: var(--text-main);
    padding: 100px 0 0;
    border-top: 6px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

/* Decorative Background Pattern */
footer::before {
    content: '🔱';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 200px;
    opacity: 0.05;
    transform: rotate(15deg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr; /* Optimized for branding + 3 stacks */
    gap: 60px;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
    align-items: start; /* Ensures all columns start at the same top line */
}

.footer-logo h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: left;
}

.footer-logo p {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 320px; /* Prevents text from stretching too far */
    margin: 0;
}

.footer-links h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--secondary-color);
    margin: 0 0 35px 0; /* Standardized spacing for all headers */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 12px;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 5px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    font-family: var(--font-accent);
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition-smooth);
    opacity: 0.8;
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    opacity: 1;
    padding-left: 10px;
}

/* Footer Bottom Bar */
.footer-bottom {
    background: var(--secondary-color);
    padding: 30px 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Social Icons in Footer */
.social-links-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links-footer a {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-sm);
}

.social-links-footer a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

/* Stats Section Modernization */
.stats {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.stats::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: -1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 40px;
    border-radius: 30px;
    background: white;
    box-shadow: var(--shadow-md);
    transition: var(--transition-bounce);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.stat-item h3 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.stat-item p {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Background Styles (Section-wise) */
.bg-fixed-1 {
    background: linear-gradient(rgba(255, 253, 245, 0.95), rgba(255, 253, 245, 0.85)), url('../img/gallery/g15.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.bg-fixed-2 {
    background: linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)), url('../img/images/bg.webp') center/cover no-repeat fixed;
}

/* Staggered Mosaic Achievements Layout */
.achievements-staggered {
    background: linear-gradient(rgba(44, 24, 16, 0.65), rgba(44, 24, 16, 0.55)),
        url('../img/images/bg.webp') center top / 100% 100% no-repeat !important;
    position: relative;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    color: #fff !important; /* Ensure all text inside is white */
}

.mosaic-container {
    display: flex;
    flex-direction: column;
    gap: 120px;
}

.mosaic-item {
    display: flex;
    align-items: center;
    gap: 80px;
}

.mosaic-item.reverse {
    flex-direction: row-reverse;
}

.mosaic-media {
    flex: 1.2;
    position: relative;
    z-index: 10;
}

.image-offset-frame {
    position: relative;
    padding: 0;
    transition: var(--transition-smooth);
}

.image-offset-frame::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent-gold);
    z-index: -1;
    transition: var(--transition-smooth);
    border-radius: 15px;
}

.mosaic-item.reverse .image-offset-frame::before {
    top: -20px;
    left: 20px;
    right: -20px;
}

.image-offset-frame img {
    width: 100%;
    height: 450px;
    object-fit: contain; /* No cropping for achievements images */
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    background: rgba(0,0,0,0.2);
}

.mosaic-content {
    flex: 1;
    color: white;
}

.mosaic-year {
    display: block;
    font-family: var(--font-heading);
    color: var(--accent-gold);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    opacity: 0.6;
}

.mosaic-content h3 {
    font-size: 2.2rem;
    color: white !important;
    margin-bottom: 25px;
    line-height: 1.2;
    font-weight: 700;
}

.mosaic-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 35px;
}

.mosaic-item:hover .image-offset-frame {
    transform: scale(1.02) rotate(1deg);
}

/* Improved Visibility for Achievements Header */
.achievements-staggered .section-header {
    background: rgba(38, 30, 71, 0.9);
    padding: 30px 40px; /* Reduced padding */
    border-radius: 30px;
    border: 1px solid var(--accent-gold);
    display: block; /* Changed to block */
    max-width: 900px;
    margin: 0 auto 60px; /* Centered */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.achievements-staggered .section-header h2 {
    color: #ffd700 !important; /* Gold headings on dark orange */
    font-size: 3.5rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.achievements-staggered .section-header p {
    color: #fffaf0 !important;
    font-size: 1.3rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@media screen and (max-width: 992px) {

    .mosaic-item,
    .mosaic-item.reverse {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .mosaic-year {
        font-size: 2.5rem;
    }

    .image-offset-frame img {
        height: 300px;
    }

    .achievements-staggered .section-header h2 {
        font-size: 2.5rem;
    }
}


/* ==========================================================================
   EVENTS PAGE REDESIGN: PREMIUM MOSAIC & CARDS
   ========================================================================== */

.featured-event-card {
    display: flex;
    background: var(--white);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition-bounce);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.featured-img-container {
    flex: 1.2;
    position: relative;
    overflow: hidden;
}

.featured-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

.event-glow-label {
    position: absolute;
    top: 25px;
    left: 25px;
    background: var(--secondary-color);
    color: white;
    padding: 10px 25px;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: var(--font-heading);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.featured-body {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-body h3 {
    font-size: 2.8rem;
    color: var(--secondary-color);
    margin: 20px 0;
    line-height: 1.1;
}

.event-meta {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.featured-event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 70px rgba(44, 24, 16, 0.25);
}

.featured-event-card:hover .featured-img-container img {
    transform: scale(1.1);
}

/* Events Masonry Grid */
.events-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.mosaic-event-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f0f0f0;
    transition: var(--transition-base);
}

.mosaic-img {
    height: 250px;
    position: relative;
    overflow: hidden;
}

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

.mosaic-date {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--accent-gold);
    color: var(--secondary-color);
    padding: 8px 20px;
    font-family: var(--font-heading);
    font-weight: 800;
    border-radius: 5px;
}

.mosaic-info {
    padding: 30px;
}

.mosaic-info h4 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.mosaic-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.past-faded {
    opacity: 0.8;
}

.past-faded filter: grayscale(1);

.status-badge {
    background: #f5f5f5;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
}

.mosaic-event-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-gold);
}

@media screen and (max-width: 992px) {
    .featured-event-card {
        flex-direction: column;
    }

    .featured-body {
        padding: 40px 30px;
    }

    .featured-body h3 {
        font-size: 2rem;
    }
}

.bg-cream {
    background-color: #FFF9E6;
}

.sacred-glow {
    text-shadow: var(--sacred-glow);
}

/* Mission Highlights Modernization */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.item-card {
    padding: 50px;
    border-radius: 30px;
    background: white;
    box-shadow: var(--shadow-md);
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.item-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

.item-card .icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 140, 0, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 30px;
    transition: var(--transition-bounce);
}

.item-card:hover .icon {
    background: var(--primary-color);
    transform: rotate(10deg);
}

.item-card h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
}

/* Interactive Elements & Animations */
.mobile-toggle {
    display: none;
    width: 35px;
    height: 25px;
    position: relative;
    cursor: pointer;
    z-index: 100001; /* Extremely high to stay above everything */
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    position: absolute;
    transition: var(--transition-base);
}

header:not(.scrolled) .mobile-toggle span {
    background: var(--text-main); /* Match main text color for visibility */
}

.mobile-toggle span:first-child {
    top: 0;
}

.mobile-toggle span:nth-child(2) {
    top: 9px;
}

.mobile-toggle span:last-child {
    top: 18px;
}

.mobile-toggle.open span:first-child {
    transform: rotate(45deg);
    top: 9px;
}

.mobile-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.open span:last-child {
    transform: rotate(-45deg);
    top: 9px;
}

/* Sticky Header Scroll state */
header.scrolled .mobile-toggle span {
    background: var(--text-main);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}

.float {
    animation: float 4s ease-in-out infinite;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .section-header h2 {
        font-size: 2.8rem;
    }

    .slide-content h2 {
        font-size: 3.5rem;
    }

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

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    #main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        padding: 100px 40px;
        transition: var(--transition-bounce);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 100000; /* Higher than ribbon and header stack */
    }

    #main-nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 25px;
    }

    nav ul li a {
        font-size: 1.2rem;
        color: var(--primary-color) !important;
    }

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

    .slide-content p {
        font-size: 1.1rem;
    }

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

    .top-bar {
        display: none;
    }

    header {
        padding: 15px 0;
        top: 0 !important; /* Forces header to top on 768px devices too */
    }
}

/* Generic Internal Page Hero */
.page-hero {
    position: relative;
    padding: 220px 0 140px;
    background: linear-gradient(135deg, rgba(44, 24, 16, 0.9), rgba(128, 0, 0, 0.8)), url('../img/gallery/g9.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
    border-bottom: 5px solid var(--gold);
}

.page-hero h2 {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-heading);
}

.breadcrumbs {
    font-size: 0.94rem;
    color: var(--accent-gold); /* Saffron/Gold separators */
    margin-bottom: 25px;
    font-weight: 500;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center; /* PERFECTLY CENTERED ALIGNMENT */
    gap: 12px;
    text-transform: uppercase;
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.85); /* Highly visible light text against dark heroes */
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
}

.breadcrumbs span {
    color: var(--primary-color); /* The 'Bright Saffron' current page marker */
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 153, 51, 0.3);
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.social-links-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links-footer a {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--accent-gold);
    transition: var(--transition-bounce);
}

.social-links-footer a:hover {
    background: var(--accent-gold);
    color: var(--secondary-color);
    transform: translateY(-5px);
}

.badge {
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 700;
    margin-bottom: 15px;
}

.content-box {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    position: relative;
}

.content-box h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
}



/* Membership Styles */
.form-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.benefit-box {
    background: var(--text-dark);
    color: white;
    padding: 40px;
    border-radius: 20px;
}

.benefit-box h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.benefit-box ul {
    list-style: none;
}

.benefit-box ul li {
    margin-bottom: 15px;
    opacity: 0.9;
}

.spiritual-form {
    background: white;
    padding: 60px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border-top: 5px solid var(--primary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 10px rgba(255, 153, 51, 0.1);
}

.form-footer {
    margin-top: 40px;
    text-align: right;
}

/* Admin Mock Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.admin-table th,
.admin-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    vertical-align: middle;
}

.pres-img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    box-shadow: var(--shadow-sm);
}

.admin-table tr:hover {
    background: rgba(212, 175, 55, 0.03);
}

.admin-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.admin-table tr {
    border-bottom: 1px solid #eee;
}

.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status.pending {
    background: #fff3cd;
    color: #856404;
}

.status.approved {
    background: #d4edda;
    color: #155724;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.success-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-container {
        grid-template-columns: 1fr;
    }

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

    .form-group.full-width {
        grid-column: span 1;
    }
}

/* Gallery Grid Improvements */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-soft);
    cursor: zoom-in;
    transform: translateY(0);
    transition: var(--transition-smooth);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-card);
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(transparent, rgba(44, 24, 16, 0.9));
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Gallery categories */
.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 10px 25px;
    border: none;
    background: white;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    color: var(--text-dark);
}

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

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

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-base);
    z-index: 10000;
}

.close-lightbox:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.4s ease;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Immersive Text Animations */
.text-reveal {
    overflow: hidden;
}

.text-reveal h2 {
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.aos-animate .text-reveal h2 {
    transform: translateY(0);
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.float {
    animation: float 4s ease-in-out infinite;
}

/* Section Transitions */
.section-fade {
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease;
    transform: translateY(20px);
}

.aos-animate.section-fade {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Specific */
.contact-details-list {
    margin: 30px 0;
}

.contact-detail-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.contact-detail-item span {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-detail-item strong {
    font-size: 1.1rem;
    color: white;
}

.mt-50 {
    margin-top: 50px;
}

.section-padding-small {
    padding: 50px 0;
}

.contact-info-box h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}



/* ==========================================================================
   REFINED PRESIDENTS TIMELINE: MAJESTIC LEADERSHIP
   ========================================================================== */

.timeline-container {
    position: relative;
    padding: 60px 0;
    max-width: 1100px;
    margin: 60px auto;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, 
                rgba(212, 175, 55, 0), 
                var(--accent-gold), 
                var(--secondary-color), 
                rgba(212, 175, 55, 0));
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    margin-bottom: 80px;
}

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

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

.timeline-dot {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--white);
    border: 4px solid var(--accent-gold);
    border-radius: 50%;
    top: 60px;
    z-index: 5;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    transition: var(--transition-bounce);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -12px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -12px;
}

.timeline-dot.active {
    background: var(--primary-color);
    border-color: var(--white);
    box-shadow: 0 0 25px var(--primary-color);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 153, 51, 0.7); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 15px rgba(255, 153, 51, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 153, 51, 0); }
}

.timeline-date {
    display: inline-block;
    padding: 3px 12px;
    background: var(--primary-color);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.78rem;
    border-radius: 4px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.timeline-card {
    background: var(--white);
    padding: 35px;
    border-radius: 25px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-bounce);
    display: flex;
    align-items: center;
    gap: 30px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
    /* Removed overflow:hidden to prevent bio cropping */
}

.timeline-info {
    flex: 1; /* Allows the information block to expand naturally */
}

.timeline-item:nth-child(odd) .timeline-card {
    flex-direction: row-reverse;
}

.timeline-img {
    width: 140px;
    height: 140px;
    border-radius: 15px; /* Elite Portrait Format */
    object-fit: contain; /* Full president portraits */
    border: 3px solid var(--accent-gold);
    padding: 6px;
    background: white;
    box-shadow: 0 10px 25px rgba(44, 24, 16, 0.15);
    flex-shrink: 0;
}

.timeline-info h3 {
    font-size: 1.7rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.2;
    font-family: var(--font-heading);
}

.timeline-info p {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
}

.timeline-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 40px 80px rgba(128, 0, 0, 0.18);
    border-color: var(--accent-gold);
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--accent-gold);
    opacity: 0.9;
}

.timeline-item:nth-child(odd) .timeline-card::before {
    left: auto;
    right: 0;
}

/* Featured / Highlight Specifics */
.current-president {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, #fffbf2 100%);
    box-shadow: 0 30px 60px rgba(255, 153, 51, 0.15);
}

.current-president h3 {
    color: var(--primary-color);
}

/* Events Grid & Components */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 40px;
}

.event-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.event-img {
    height: 250px;
    position: relative;
    overflow: hidden;
}

.event-img img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Full event visibility */
    background: #fdfdfd;
}

.event-body {
    padding: 30px;
}

.event-body h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

/* Final Responsive Polish */
@media screen and (max-width: 992px) {
    .timeline-container::after {
        left: 40px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 80px;
        padding-right: 20px;
        text-align: left !important;
        left: 0 !important;
    }

    .timeline-item:nth-child(odd) .timeline-card {
        flex-direction: row;
    }

    .timeline-dot {
        left: 31px !important;
        right: auto !important;
    }

    .timeline-card::before {
        left: 0 !important;
        right: auto !important;
    }
}

@media screen and (max-width: 600px) {
    .timeline-card {
        flex-direction: column !important;
        padding: 30px 20px;
    }

    .timeline-img {
        width: 100%;
        height: 200px;
    }
}
/* Lightbox Enhancements with Captions */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(30, 20, 50, 0.92) 0%, rgba(10, 8, 18, 0.96) 100%); /* Semi-translucent depth */
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: default;
    padding: 20px;
    backdrop-filter: blur(20px);
}

.lightbox-content {
    width: 80%; /* Slightly wider for floating layout */
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
    padding: 0; /* Remove padding to avoid background illusion */
    background: transparent !important; /* Strictly transparent as requested */
    border: none !important;
    box-shadow: none !important;
    overflow: visible; /* Content should float */
}

.lightbox img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.9); /* Strong drop shadow for float effect */
    border: 2px solid rgba(255,215,0,0.1); /* Subtle gold rim */
}

.lb-slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    max-width: 100%; /* Take full 70% width */
}

.lb-track-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
}

.lb-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    align-items: center;
}

.lb-track img {
    min-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    flex-shrink: 0;
    padding: 10px;
}

.lb-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10001;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lb-nav-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 30px rgba(255, 153, 51, 0.4);
}

.lb-prev { left: -80px; }
.lb-next { right: -80px; }

.lb-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10001;
    background: rgba(0,0,0,0.5);
    padding: 5px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.lb-dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lb-dot.active {
    background: var(--primary-color);
    transform: scale(1.5);
    box-shadow: 0 0 10px var(--primary-color);
}

.lb-prev { left: -60px; }
.lb-next { right: -60px; }

.lb-extra-info {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    margin-top: 20px;
    font-style: normal;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 15px;
    letter-spacing: 0.5px;
}

@media (max-width: 1200px) {
    .lb-prev { left: -10px; } /* Pulling inside for smaller desktop */
    .lb-next { right: -10px; }
}

@media (max-width: 768px) {
    .lightbox { padding: 0; }
    .lightbox-content { 
        width: 100%; 
        height: 100%; 
        border-radius: 0; 
        gap: 15px; 
    }
    .lb-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
        background: rgba(0,0,0,0.5);
    }
    .lb-prev { left: 5px; }
    .lb-next { right: 5px; }
    .lightbox-caption {
        padding: 15px;
        width: 100%;
    }
    .lightbox-caption h4 { font-size: 1.3rem; }
}
.lightbox-caption {
    background: rgba(255, 255, 255, 0.03); /* Vapor thin background */
    padding: 20px 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 800px;
    border: 1px solid rgba(255,215,0,0.15); /* Soft gold border */
    backdrop-filter: blur(15px);
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.lightbox-caption h4 {
    color: var(--secondary-color); /* Saffron gold */
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-family: var(--font-heading);
    letter-spacing: 1.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.lightbox-caption p {
    color: rgba(255,255,255,0.9);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 55px;
    font-weight: 200;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    z-index: 10000;
}

.close-lightbox:hover {
    color: var(--primary-color);
    transform: rotate(90deg) scale(1.2);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ULTIMATE RESPONSIVENESS BOOSTER
   Fixes for zero-cropping, zero-overflow, and perfect alignment on all sizes.
   ========================================================================== */

html, body {
    overflow-x: hidden; /* Hard fix for horizontal scroll issues */
    width: 100%;
    position: relative;
}

@media screen and (max-width: 1024px) {
    .mosaic-item, .mosaic-item.reverse {
        flex-direction: column;
        gap: 40px;
    }
    
    .mosaic-media { width: 100%; }
    .image-offset-frame img { height: 350px; }
    .mosaic-content { text-align: center; }
}

@media screen and (max-width: 992px) {
    .section-padding { padding: 60px 0; }
    
    .section-header h2 { font-size: 2.2rem; }
    
    .hero-slider .slide-content h2 { font-size: 2.4rem; line-height: 1.1; }
    
    /* Expanded Timeline Mobile Transformation for Tablets + Phones */
    .timeline-container::after {
        left: 40px;
    }
    
    .timeline-item {
        width: 100% !important;
        padding-left: 80px !important;
        padding-right: 20px !important;
        text-align: left !important;
        left: 0 !important;
    }
    
    .timeline-dot {
        left: 28px !important;
        right: auto !important;
        top: 45px;
    }
    
    .timeline-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 25px;
        padding: 30px;
    }
    
    .timeline-img {
        align-self: center; /* Centers the elite portrait frame in stacked view */
        width: 130px;
        height: 130px;
    }
    
    .timeline-date {
        align-self: flex-start;
    }

    .timeline-card::before {
        left: 0 !important;
        right: auto !important;
    }
}

@media screen and (max-width: 480px) {
    .logo-text .eng-name { font-size: 0.85rem; }
    .logo-text .kan-name { font-size: 0.65rem !important; }
    
    .top-bar { display: none; } /* Hide topbar on ultra-small to save space */
    
    header#main-header { top: 0; padding: 10px 0; }
    
    .hero-slider .slide-content h2 { font-size: 1.8rem; }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .footer-links h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-logo p { margin: 0 auto; }
}

/* Fix for Mosaic Images on Mobile */
@media screen and (max-width: 600px) {
    .image-offset-frame img {
        height: 280px;
    }
    
    .mosaic-year {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* CRITICAL OVERFLOW & TEXT CLIPPING FIXES */
.timeline-card, .event-card, .item-card, .mosaic-item {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all; /* Last resort for very long names */
    hyphens: auto;
}

.timeline-info h3 {
    word-break: normal; /* Restore normal for headers unless they are huge */
    overflow-wrap: anywhere;
}

.timeline-info p {
    word-break: normal;
    overflow-wrap: break-word;
}

/* Ensure the card can grow to any height needed by its text content */
.timeline-card {
    height: auto !important;
    min-height: fit-content;
}

/* Fix for the absolute dot positioning in the middle of text flow */
.timeline-item {
    display: flex;
    flex-direction: column;
}

/* Enhanced Table/Symmetry Fix for Mosaic */
.mosaic-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Final Global Responsive Width Fix */
* {
    box-sizing: border-box;
}


/* PRECISE ALIGNMENT HARMONIZER for Leadership Names */
.timeline-item {
    text-align: left !important; /* Force easy-to-read left alignment for EVERY card */
}

.timeline-info h3 {
    text-align: left !important;
    font-size: 1.85rem;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    display: block;
    width: 100%;
}

.timeline-card {
    /* Ensure all cards have identical flex behavior for perfect symmetry */
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: left !important;
}

/* Ensure images always sit on the lead-side for scanning */
.timeline-img {
    margin-right: 0;
    order: -1; /* Guarantees image is always first */
}

/* Fix for odd items previously trying to align right */
.timeline-item:nth-child(odd) {
    text-align: left !important;
}

/* Enhanced Visual Balance for the timeline line */
.timeline-container::after {
    box-shadow: 0 0 20px rgba(255, 153, 51, 0.25);
    background: var(--accent-gold);
    width: 2px;
}

@media screen and (max-width: 992px) {
    .timeline-info h3 {
        font-size: 1.5rem;
        text-align: center !important;
    }
    
    .timeline-card {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .timeline-info p {
        text-align: center !important;
    }
    
    .timeline-date {
        align-self: center !important;
    }
}

/* ==========================================================================
   FINAL UNIVERSAL RESPONSIVE AUDIT & NO-CROP FIXES
   Ensuring perfect visibility for all content on micro-screens. Raul.
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* Hero Section Responsive Padding */
    .page-hero {
        padding: 140px 0 80px; /* Reduced for mobile */
    }
    
    .page-hero h2 {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }

    /* Zero-Cropping Asset Policy - Strict Override */
    .hero-slider .slide img,
    .mosaic-media img,
    .timeline-img,
    .event-img,
    .gallery-item img,
    .achievement-card img {
        object-fit: contain !important;
        background: transparent;
    }

    /* Mosaic Alignment Stabilizer */
    .mosaic-item {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        text-align: center !important;
    }

    .mosaic-media, .mosaic-content {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .image-offset-frame {
        margin: 0 auto !important;
        transform: translate(0,0) !important;
    }

    .image-offset-frame::before {
        display: none; /* Hide decorative offset frames on tiny screens to avoid layout shift */
    }

    /* Membership & Contact Form Spacing */
    .form-container, .grid-2 {
        grid-template-columns: 1fr !important;
    }

    .spiritual-form {
        padding: 30px 20px !important;
    }

    /* Stats Section Wrapping */
    .stats-container {
        flex-wrap: wrap !important;
        gap: 30px !important;
    }

    .stat-item {
        width: 45% !important;
    }
}

@media screen and (max-width: 480px) {
    .stat-item {
        width: 100% !important;
    }
    
    .hero-slider .slide-content h2 {
        font-size: 1.6rem !important;
    }
    
    .breadcrumbs {
        flex-wrap: wrap; /* Ensure multi-line breadcrumbs on tiny screens */
        font-size: 0.8rem;
    }
    
    /* Responsive Table/Grid Fix for very small screens */
    .admin-table {
        display: block;
        overflow-x: auto;
    }
}

/* Ensure no content pushes right */
section, header, footer {
    width: 100%;
    margin: 0;
    overflow-x: hidden;
}


/* ==========================================================================
   FLOATING INTERACTIVE CONTROLS (Floating Sidebar)
   Premium responsive Engagement system for WhatsApp, Membership & News. Raul.
   ========================================================================== */
.floating-controls {
    position: fixed;
    right: 30px; /* Slightly more space */
    top: 60%; /* Positioned on the right side middle */
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
    transform: translateY(-50%); /* Better vertical centering around 60% */
}

.float-btn {
    pointer-events: auto;
    width: 45px;
    height: 45px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: visible;
}

.float-btn i {
    font-size: 1.2rem;
}

/* Specific Button Themes */
.float-btn.whatsapp { 
    background: #25d366; 
    color: white; 
    border: none;
}
.float-btn.membership { 
    background: var(--primary-color); 
    color: white; 
    border: none;
}
.float-btn.news { 
    background: var(--secondary-color); 
    color: white; 
    border: none;
}
.float-btn.scroll-top {
    background: var(--text-dark);
    color: white;
    border: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
.float-btn.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.float-label {
    position: absolute;
    right: 80px;
    background: var(--white);
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: var(--shadow-card);
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    border-right: 4px solid var(--accent-gold);
}

.float-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

.float-btn:hover .float-label {
    opacity: 1;
    transform: translateX(0);
}

/* RESPONSIVE FLOATING CONTROLS */
@media screen and (max-width: 768px) {
    .floating-controls {
        top: auto;
        bottom: 5px;
        right: 15px;
        transform: none;
        flex-direction: column; /* Keep vertical, bottom horizontal obscures footer */
        width: auto;
        gap: 10px;
    }
    
    .float-btn {
        width: 40px;
        height: 40px;
    }
    
    .float-btn i { font-size: 1rem; }
    
    .float-label { display: none; } /* Hide labels on mobile to avoid screen clutter */
}

@media screen and (max-width: 480px) {
    .floating-controls {
        right: 15px; /* Back to right side */
        top: 65%; /* Slightly lower on mobile */
        transform: translateY(-50%); 
    }
}

/* ==========================================================================
   INSTITUTIONAL FLASH NEWS TICKER (Top Bar Redesign)
   Premium high-visibility alert system with responsive scrolling. Raul.
   ========================================================================== */

.top-bar {
    height: 45px !important;
    background: var(--accent-color); /* Switched to Royal Indigo */
    display: flex !important; 
    align-items: center;
    border-bottom: 1px solid var(--accent-gold);
    overflow: hidden;
    position: relative;
    z-index: 10001;
}

.ticker-container {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 15px;
}

.ticker-label {
    background: var(--primary-color);
    color: white;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 10px 0 20px rgba(0,0,0,0.2);
}

.ticker-label i { margin-right: 8px; }

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 20px;
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-roll 30s linear infinite;
    padding-right: 100%; /* Spacing for continuous loop */
}

.ticker-item {
    display: inline-block;
    padding: 0 30px;
    font-size: 0.9rem;
    color: var(--white);
    font-weight: 500;
}

@keyframes ticker-roll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* RESPONSIVE TICKER OVERRIDES */
@media screen and (max-width: 1024px) {
    .top-bar { display: flex !important; }
}

@media screen and (max-width: 768px) {
    .ticker-label {
        font-size: 0.7rem;
        padding: 0 10px;
    }
    
    .ticker-item {
        font-size: 0.8rem;
        padding: 0 15px;
    }
    
    .ticker {
        animation-duration: 20s; /* Faster on mobile if needed */
    }
}

@media screen and (max-width: 480px) {
    .top-bar {
        height: 35px !important;
    }
    
    .ticker-label span { display: none; } /* Hide 'FLASH NEWS' text, keep icon */
}

/* ==========================================================================
   POSITIONING CORRECTIONS: TICKER AT TOP & FLOATING ICONS
   Ensuring a stable, institutional communication layer. Raul.
   ========================================================================== */

/* Force Ticker to be the very first element at the top, ALWAYS sticky */
.top-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    width: 100%;
    height: 45px !important;
    z-index: 10002 !important; /* Above everything */
}

/* Fix Header to start exactly below the ticker */
header#main-header {
    top: 45px !important;
    z-index: 100005 !important;
    background: #fffdf5; /* Match initial Sacred Cream background */
}

/* Unified Scrolled State */
header#main-header.scrolled,
.body-scrolled header#main-header {
    top: 0 !important; /* Moves to very top once ticker is hidden */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    padding: 8px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Move floating icons significantly down to avoid collision with breadcrumbs or headers */
/* Already defined globally above */

/* Responsive adjustment for top alignment - ensures NO GAP on mobile as Ticker is hidden */
@media screen and (max-width: 480px) {
    header#main-header {
        top: 0 !important; /* Ticker is hidden on mobile, so header must be at top */
    }
    
    header#main-header.scrolled {
        top: 0 !important;
    }
}

/* ==========================================================================
   INTERACTIVE TICKER LINK STYLING
   Enabling smooth institutional navigation from the news header. Raul.
   ========================================================================== */

.ticker-item {
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.ticker-item:hover {
    color: var(--primary-color) !important;
    text-shadow: 0 0 10px rgba(255, 153, 51, 0.5);
    background: rgba(255,255,255,0.05); /* Very subtle highlight on hover */
    border-radius: 5px;
}

/* Pause the ticker on hover for easier reading and clicking */
.ticker-wrap:hover .ticker {
    animation-play-state: paused;
}

/* ==========================================================================
   INSTITUTIONAL LEADERSHIP RIBBON (Top 6 Officials)
   Premium leadership gallery with responsive symmetry. Raul.
   ========================================================================== */

.leadership-ribbon {
    position: fixed;
    top: 155px; /* Alignment for (45px Ticker + 110px Header) */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 3px solid var(--accent-gold);
    z-index: 10000;
    padding: 15px 0; /* Increased Height */
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.leadership-ribbon.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.ribbon-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
}

.ribbon-group {
    display: flex;
    gap: 40px;
    align-items: center;
}

.ribbon-item {
    display: flex;
    flex-direction: column; /* Portrait Over Text */
    align-items: center;
    gap: 12px; /* Slightly more space to move text below */
    text-align: center;
}

.ribbon-item img {
    width: 85px; 
    height: 90px;
    border-radius: 4px; /* Maintaining subtle corner softness */
    object-fit: contain; /* Full display without any cropping */
    border: none; /* Border removed as requested */
    box-shadow: 0 5px 12px rgba(38, 30, 71, 0.1);
    transition: var(--transition-smooth);
}

.ribbon-item:hover img {
    transform: scale(1.1);
    box-shadow: 0 8px 18px rgba(38, 30, 71, 0.2);
}

.ribbon-info {
    display: flex;
    flex-direction: column;
}

.ribbon-info strong {
    font-size: 0.8rem;
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.2;
}

.ribbon-info span {
    font-size: 0.62rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* RESPONSIVE RIBBON ADAPTATION */
@media screen and (max-width: 1200px) {
    .ribbon-container { gap: 20px; }
    .ribbon-info strong { font-size: 0.7rem; }
}

@media screen and (max-width: 1024px) {
    /* Vertical stack for tablets to preserve portraits */
    .leadership-ribbon {
        position: relative; /* Scrolls away on mobile to save viewport space */
        top: 0;
        padding: 15px 0;
    }
    
    .ribbon-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .ribbon-group {
        width: 100%;
        justify-content: center;
        gap: 15px;
    }
}

@media screen and (max-width: 768px) {
    .ribbon-group {
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .ribbon-item {
        width: 45%;
        justify-content: center;
        text-align: left;
    }
}

@media screen and (max-width: 480px) {
    .ribbon-item { width: 100%; justify-content: flex-start; padding-left: 10%; }
}

/* Compensate page padding for the extra ribbon height on desktop */
@media screen and (min-width: 1025px) {
    .page-hero { padding-top: 180px !important; }
}

/* ==========================================================================
   RIBBON POSITIONING REFINEMENT (Pushed Below Navbar)
   Ensuring the leadership strip is fully visible and perfectly ordered. Raul.
   ========================================================================== */

.leadership-ribbon {
    position: fixed !important;
    top: 155px !important; /* Perfect Anchor Below 45px Ticker + 110px Header */
    left: 0;
    width: 100%;
    z-index: 10000 !important;
}

/* Sync with scrolled header */
.body-scrolled .leadership-ribbon {
    top: 66px !important; /* Attached to scrolled header (top:0 + height:~66px) */
    padding: 10px 0; /* Slightly thinner on scroll */
}

/* Page Hero Buffer for Ticker (45) + Header (110) + Ribbon (100) = ~255px */
@media screen and (min-width: 1025px) {
    .page-hero { 
        padding-top: 270px !important; 
    }
}

/* Ensure ribbon is visible on all desktop sizes */
@media screen and (max-width: 1400px) {
    .leadership-ribbon {
        top: 150px !important;
    }
}

/* For mobile, we previously set it to relative, but if they want it 'after the navbar' 
   we'll ensure it has enough margin-top if the navbar is fixed. */
@media screen and (max-width: 1024px) {
    .leadership-ribbon {
        position: fixed !important; /* Keep it fixed to match JS logic and avoid gaps */
        top: 0;
        margin-top: 0px; 
        z-index: 2000; /* Higher than before but below header's 10001 */
        padding: 5px 0; 
        background: #fffdf5;
        border-bottom: 2px solid var(--accent-gold);
    }
}

/* ==========================================================================
   SCROLL-STATE ARCHITECTURE (Hiding TopBar & Syncing Ribbon)
   Premium synchronized communication layers. Raul.
   ========================================================================== */

/* Hiding the TopBar (Ticker) on scroll as requested */
.top-bar.hidden {
    display: none !important; /* Completely clears the viewport space */
}

/* SYNC HEADER & RIBBON on scroll */
/* Normal State */
header#main-header {
    top: 45px; /* Removed !important to allow .scrolled to override it */
}
.leadership-ribbon {
    top: 155px !important; /* Clear ticker (45) + header (~110) */
    z-index: 10000 !important;
    transition: all 0.4s ease;
}

/* Scrolled State (Ticker Hidden) handled above */

.body-scrolled .leadership-ribbon {
    top: 70px !important; /* Follows the smaller scrolled header (~70px height) */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Fixing the "Behind Navbar" alignment issue by adding specific padding */
.leadership-ribbon .ribbon-container {
    padding: 2px 0;
}

/* Mobile Ticker Hiding - Maintain vertical flow */
@media screen and (max-width: 480px) {
    .body-scrolled .leadership-ribbon {
        margin-top: 80px !important; /* Match smaller mobile header */
    }
}

/* ==========================================================================
   VISION & MISSION SECTION
   ========================================================================== */

.vision-mission-section {
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.vision-mission-section .container {
    max-width: 1500px !important;
}

.vision-mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.vm-card {
    background: url('../img/images/vision-mission.png') no-repeat center top !important;
    background-size: 100% 100% !important;
    padding: 240px 100px 180px 100px; /* Increased padding to clear the 3D scroll rollers */
    text-align: center;
    transition: var(--transition-bounce);
    position: relative;
    min-height: 1100px; /* Increased height to fit all content cleanly */
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

/* Removed redundant top gradient bars */

.vm-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.vm-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.vm-badge {
    display: inline-block;
    padding: 5px 18px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #fff;
}

.vision-card .vm-badge,
.mission-card .vm-badge { 
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important; 
}

.vm-card h3 {
    font-size: 2rem; /* Slighly larger */
    color: #4b2c20; 
    margin-bottom: 25px;
    font-family: var(--font-heading);
    text-align: center;
}

.vm-card p, .vm-card ul {
    color: #5d4037; 
    line-height: 1.8;
    font-size: 1.05rem; /* Slightly larger text */
    text-align: center;
    margin: 0 auto;
    max-width: 90%;
}

.vm-card ul {
    list-style: none;
    padding: 0;
    width: 100%;
}

.vm-card ul li {
    margin-bottom: 12px;
    position: relative;
    padding: 0 10px;
    display: block;
}

.vm-card ul li::before {
    display: none; /* Removed dot to keep it cleaner for centered look */
}

.vm-card ul li strong {
    color: #8b4513; /* SaddleBrown for emphasis */
    display: block;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .vision-mission-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .vm-card { 
        padding: 180px 40px 140px 40px; /* Reduced side padding slightly but kept vertical clearance */
        min-height: 800px;
        background-size: 100% 100% !important;
    }
    .vm-card h3 { font-size: 1.6rem; margin-bottom: 15px; }
    .vm-card p, .vm-card ul li { font-size: 0.95rem; line-height: 1.6; }
    .vm-card ul li strong { font-size: 1rem; margin-bottom: 4px; }
}

/* ==========================================================================
   RIBBON POSITION: JS-CONTROLLED (override all hardcoded top values)
   The ribbon top is now set dynamically by script.js via getBoundingClientRect
   ========================================================================== */

/* Reset all conflicting top overrides — JS will set the correct value via setProperty */
.leadership-ribbon,
.body-scrolled .leadership-ribbon {
    position: fixed !important;
    z-index: 10000 !important;
    /* top is controlled entirely by script.js */
}

/* ==========================================================================
   VISION & MISSION: PARALLAX BACKGROUND WITH OVERLAY (REDESIGN)
   ========================================================================== */

/* Parallax Background logic removed to favor user's scroll-card sketch */
.vm-header h2 { 
    color: var(--accent-color) !important; 
    margin-bottom: 30px;
}

/* Mobile: disable fixed attachment (iOS doesn't support it well) */
@media (max-width: 768px) {
    .vision-mission-section {
        background-attachment: scroll;
    }
}

/* ==========================================================================
   HERO SLIDER: REDUCED HEIGHT
   ========================================================================== */
.hero-slider {
    height: 60vh !important;
    min-height: 420px !important;
}

@media (max-width: 768px) {
    .hero-slider {
        height: 50vh !important;
        min-height: 300px !important;
    }
}

/* ==========================================================================
   MAIN CONTENT OFFSET: JS-CONTROLLED
   margin-top on <main> is set dynamically by script.js
   Remove any static padding-top that might conflict
   ========================================================================== */
main {
    margin-top: 0; /* baseline — JS overrides this dynamically */
}

/* Cancel old static page-hero padding overrides */
.page-hero {
    padding-top: 80px !important;
}

@media (min-width: 1025px) {
    .page-hero {
        padding-top: 80px !important;
    }
}

/* ==========================================================================
   ENSURE ZERO GAP between ribbon and hero — JS controls margin-top on main
   ========================================================================== */
main {
    padding-top: 0 !important;
    /* margin-top is set dynamically by script.js */
}

.hero-slider {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ==========================================================================
   PAGE SPACER — height set by JS, pushes content below fixed header stack
   ========================================================================== */
#page-spacer {
    display: block;
    width: 100%;
    /* height is set dynamically by script.js */
}

/* Reset all static padding/margin that might interfere */
main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ==========================================================================
   CRITICAL GAP FIX: Remove body padding-top (154px leftover)
   The #page-spacer already provides all the needed offset for the fixed stack.
   Having both causes a double-offset gap (spacer + body padding = 461px start vs 307px ribbon).
   ========================================================================== */
body {
    padding-top: 0 !important;
}

/* ==========================================================================
   LEADERSHIP RIBBON: LARGER PHOTOS + SMALLER FONTS
   ========================================================================== */
.ribbon-item img {
    width: 85px !important;
    height: 90px !important;
    border: none !important;
}

.ribbon-info strong {
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
}

.ribbon-info span {
    font-size: 0.55rem !important;
    letter-spacing: 0.5px !important;
}

/* ==========================================================================
   VISION & MISSION SECTION: NEW COMMUNITY BACKGROUND IMAGE
   ========================================================================== */
/* Consolidated — background moved to line 3269 */

/* ==========================================================================
   GLOBAL HEADING ALIGNMENT: ALL CENTERED
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.section-header h2,
.section-header p,
.section-header .badge,
.section-header {
    text-align: center !important;
}

/* Allow left-align override for specific components that need it */
.footer-links h3,
.footer-links li,
.footer-logo p,
.timeline-card h3,
.timeline-card p,
.content-box h3,
.content-box p {
    text-align: left !important;
}

/* Keep ribbon items centered */
.ribbon-info strong,
.ribbon-info span {
    text-align: center !important;
}

/* Cards and items — center their headings */
.item-card h3,
.stat-item p,
.vm-card h3,
.vm-card p,
.mosaic-content h3,
.highlight-card h3 {
    text-align: center !important;
}

/* Consolidated styling handled in the redesigned section above */

/* ==========================================================================
   OUR COMMUNITY SECTION: PARALLAX BACKGROUND
   ========================================================================== */
.community-parallax {
    position: relative;
    background-image: url('../img/gallery/g10.jpg'); /* The original background from VM section */
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.community-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(38, 30, 71, 0.88) 0%,
        rgba(230, 81, 0, 0.82) 50%,
        rgba(38, 30, 71, 0.92) 100%
    );
    z-index: 1;
}

/* Ensure stats boxes pop firmly against the new dark background */
.community-parallax .stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.community-parallax .stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .community-parallax {
        background-attachment: scroll;
    }
}

/* ==========================================================================
   VISION & MISSION: POINT HEADINGS MAROON
   ========================================================================== */
.vm-card li strong {
    color: var(--secondary-color); /* Divine Saffron Orange */
}

/* ==========================================================================
   REDUCED HEIGHT FOR COMMUNITY SECTION
   ========================================================================== */
.community-parallax {
    padding: 30px 0 !important;
}

/* ==========================================================================
   OUR LEADERS SYNC SECTION
   ========================================================================== */
.our-leaders-section {
    padding: 100px 0;
    overflow: hidden;
    position: relative;
    background-image: url('../img/gallery/g8.jpg'); /* Premium architectural background */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax feel */
    color: white;
}

/* Unique Midnight-Indigo Overlay */
.our-leaders-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg, 
        rgba(15, 12, 41, 0.92) 0%, 
        rgba(48, 43, 99, 0.88) 50%, 
        rgba(36, 36, 62, 0.95) 100%
    );
    z-index: 1;
}

/* Ensure container is above overlay */
.our-leaders-section .container {
    position: relative;
    z-index: 2;
}

.our-leaders-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://www.transparenttextures.com/patterns/silk.png");
    opacity: 0.15;
    pointer-events: none;
}

.our-leaders-section .section-header h2,
.our-leaders-section .section-header p {
    color: white !important;
}

.our-leaders-section .leader-card h4,
.our-leaders-section .leader-card span {
    color: white !important;
}

.our-leaders-section .ob-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: white;
}

.our-leaders-section .ob-card h5 {
    color: var(--accent-gold) !important;
}

.our-leaders-section .ob-card span {
    color: rgba(255, 255, 255, 0.8) !important; /* Increased visibility */
}

.leaders-slider-container {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

.leaders-slider-track-wrap {
    overflow: hidden;
    flex: 1;
}

.leaders-slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.leader-card {
    min-width: 25%; /* 4 items on desktop as requested previously */
    padding: 40px 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
    transform: scale(0.9);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.leader-card::before {
    content: '';
    position: absolute;
    top: 10px; bottom: 10px; left: 10px; right: 10px;
    background: rgba(255, 255, 255, 0.05); /* Premium Glassy Card */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    z-index: -1;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: var(--transition-smooth);
}

.leader-card.active {
    opacity: 1;
    transform: scale(1.05);
}

.leader-card.active::before {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.leader-card img {
    width: 180px;
    height: 180px;
    border-radius: 12px; /* Square Format */
    object-fit: cover;
    margin-bottom: 20px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transition: var(--transition-smooth);
    display: inline-block;
}

.leader-card.active img {
    border-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(255, 153, 51, 0.3);
}

.leader-card h4 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 5px;
    text-align: center !important;
}

.leader-card span {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center !important;
    display: block;
}

.slider-btn {
    background: var(--white);
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    position: absolute;
    z-index: 10;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition-bounce);
}

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

.slider-btn.prev-leader-btn { left: 0; }
.slider-btn.next-leader-btn { right: 0; }

.ob-title {
    font-size: 1.4rem;
    color: var(--accent-gold) !important; /* Changed from Maroon to Gold */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.office-bearers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
}

.office-bearers-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.office-bearers-grid.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.ob-card {
    text-align: center;
    background: var(--white);
    padding: 5px; 
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Sync Header & Ribbon z-indices for consistent stacking */
header#main-header {
    z-index: 100005 !important; /* Extremely high core z-index */
}
.leadership-ribbon {
    z-index: 20000 !important; /* Lower than header but higher than normal page items */
}
.top-bar {
    z-index: 100006 !important; /* Always on top of header */
}

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

.ob-card img {
    width: 95%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 8px; /* Square matching leaders */
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid var(--accent-gold);
    display: inline-block;
    transition: var(--transition-smooth);
}

.ob-card h5 {
    font-size: 0.7rem;
    color: var(--white) !important; /* Changed to white for better contrast on Indigo */
    margin-bottom: 2px;
    text-align: center !important;
}

.ob-card span {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.75) !important; /* Changed to lighter ivory */
    text-align: center !important;
    display: block;
}

@media screen and (max-width: 1024px) {
    .leader-card { min-width: 50%; /* 2 items on tablet */ }
    .office-bearers-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}

@media screen and (max-width: 768px) {
    .leader-card { min-width: 100%; /* 1 item on mobile */ }
    .office-bearers-grid { grid-template-columns: repeat(2, 1fr); }
    
    /* Responsive sizing reductions */
    body { font-size: 14px; }
    .section-header h2 { font-size: 2rem !important; }
    .section-header p { font-size: 1rem !important; }
    .item-card, .stat-item { padding: 25px !important; }
    .hero-slider { height: 40vh !important; min-height: 250px !important; }
    .slide-content h2 { font-size: 1.8rem !important; }
    .slide-content p { font-size: 0.9rem !important; margin-bottom: 20px !important; }
    .btn { padding: 10px 20px; font-size: 0.75rem; }
    .mosaic-content h3 { font-size: 1.5rem !important; }
    .mosaic-year { font-size: 1.8rem !important; }
    
    /* Fix news section heading width */
    .achievements-staggered .section-header {
        padding: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media screen and (max-width: 480px) {
    .section-header h2 { font-size: 1.6rem !important; }
    .office-bearers-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-item h3 { font-size: 2rem !important; }
    .logo-text .eng-name { font-size: 12px; }
    .logo-text .kan-name { font-size: 10px !important; }
    .logo-container img { height: 50px; }
}
@media screen and (max-width: 768px) {
    .logo-container img { height: 50px !important; }
    
    header#main-header {
        top: 0 !important;
        padding: 15px 0 !important;
        z-index: 100005 !important;
        height: auto !important;
        overflow: visible !important;
    }

    header#main-header.nav-open {
        backdrop-filter: none !important;
        background: rgba(255, 255, 255, 0.98) !important;
        overflow: visible !important;
    }

    .top-bar {
        display: flex !important;
        top: 80px !important; /* Positioned exactly below the 80px high mobile navbar */
        height: 40px !important;
        z-index: 100000 !important; /* Just below the header */
        transition: transform 0.4s ease;
    }

    .leadership-ribbon {
        top: 120px !important; /* Navbar (80) + Ticker (40) */
    }

    #page-spacer {
        height: 120px !important; /* Initial gap for fixed header stack */
    }

    .body-scrolled .top-bar {
        transform: translateY(-200%); /* Completely hide when scrolling */
    }

    .body-scrolled .leadership-ribbon {
        top: 80px !important; /* Moves up to follow the navbar when ticker is hidden */
    }
}

@media screen and (max-width: 480px) {
    header#main-header { padding: 10px 0 !important; }
    .top-bar { top: 70px !important; } /* Adjusted for smaller header */
    .leadership-ribbon { top: 110px !important; }
    .body-scrolled .leadership-ribbon { top: 70px !important; }

    /* Scale down the scroll image padding and text for smaller mobile */
    .vm-card {
        padding: 130px 25px 100px 25px !important;
        min-height: 600px;
    }
    .vm-card h3 {
        font-size: 1.25rem !important;
        margin-bottom: 12px;
    }
    .vm-card p, .vm-card ul li {
        font-size: 0.82rem !important;
        line-height: 1.5;
        margin-bottom: 8px;
    }
    .vm-card ul li strong {
        font-size: 0.9rem !important;
        margin-bottom: 3px;
    }
}
