: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;
    --primary-color: #ff9933;
    /* Divine Saffron */
    --primary-dark: #cc7a29;
    /* Saffron Shadow */
    --secondary-color: #fb8c00;
    /* Bold Orange Accent */
    --secondary-dark: #e67e22;
    /* Deep Orange Shade */
    --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);

    /* Dynamic Layout Constants */
    --top-bar-height: 25px;
    /* Unified top bar height */
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-center {
    text-align: center !important;
}

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

/* Top Bar: Professional & Informative */
.top-bar {
    background: var(--secondary-color);
    color: var(--white);
    height: var(--top-bar-height);
    font-size: 0.8rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1100;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    /* Subtle divider */
    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;
}

/* Duplicate header styles purged. Consolidated rules are now central at Line 400. */

.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: 40px;
    /* Further reduced logo size */
    border: 3px solid var(--accent-gold);
    border-radius: 50%;
    transition: var(--transition-smooth);
}

header#main-header.scrolled .logo-container img {
    height: 32px;
    /* Further reduced 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: 0;
    /* Removed fixed padding, handled by #page-spacer */
}

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: 70px 0;
    /* Further reduced from 100px to minimize empty space */
}

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

.section-header .badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    padding: 6px 18px !important;
    border-radius: 50px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    box-shadow: 0 5px 15px rgba(251, 140, 0, 0.4) !important;
    margin-bottom: 10px !important;
    display: inline-block !important;
    text-transform: uppercase !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    animation: badge-glow 3s infinite ease-in-out !important;
}

@keyframes badge-glow {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(251, 140, 0, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(251, 140, 0, 0.7);
    }
}

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

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 10px 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: var(--top-bar-height);
    width: 100%;
    z-index: 2000;
    background: #fffdf5;
    border-bottom: 2px solid var(--accent-gold);
    /* Strong bottom anchor */
    transition: var(--transition-smooth);
    padding: 8px 0;
    /* Tightened from 12px */
    box-shadow: none;
    /* Removed fixed shadow to eliminate visual gap artifacts */
}

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 !important;
    /* FIXED: NO GAP */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    /* Restored side padding for breathability */
    max-width: 100% !important;
    /* Attached both end lines */
}

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

.logo-container img {
    height: 60px;
    /* Reduced from 75px for a slimmer profile */
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    transition: var(--transition-bounce);
}

header.scrolled .logo-container img {
    height: 50px;
    /* Adjusted to be smaller than the new 60px base */
}

/* 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: 65vh;
    /* Reduced from 85vh */
    min-height: 500px;
    /* Reduced from 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: #FFF9E6; /* Creamy background as requested */
    padding: 40px 50px;
    border-radius: 30px;
    border: 2px solid var(--accent-gold);
    display: block;
    max-width: 900px;
    margin: 0 auto 60px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: none; /* No blur needed for solid color */
}

.achievements-staggered .section-header h2 {
    color: #8B0000 !important; /* Deep Red for the creamy background */
    font-size: 3.5rem;
    text-shadow: none; /* Removed shadow for light background */
}

.achievements-staggered .section-header p {
    color: #444444 !important; /* Dark Gray for text */
    font-size: 1.3rem;
    text-shadow: none;
}

@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: 2000001 !important;
    margin-left: 20px; /* Space from nav */
}

.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(--bg-color);
        /* padding-top is set dynamically by JS to match real header height.
           The static value below is a safe fallback only. */
        padding: 80px 40px 40px;
        transition: var(--transition-smooth);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1000000 !important;
        display: block !important;
        overflow-y: auto; /* allow scrolling inside the menu on small screens */
    }

    #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 {
        height: 35px !important;
        display: flex !important; /* Re-enable top-bar to stack upon navbar */
    }

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

/* Generic Internal Page Hero */
.page-hero {
    position: relative;
    padding: 60px 0 60px; /* Reduced from 120px since #page-spacer handles offset */
    /* SHIFTED DOWN: Added more padding to avoid hiding behind navbar */
    margin-top: 0;
    /* REMOVED negative margin to prevent overlap gap */
    background: linear-gradient(135deg, rgba(44, 24, 16, 1), rgba(128, 0, 0, 0.95)), url('../img/gallery/g9.webp');
    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: 3.5rem;
    /* Matches About Page precisely */
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-family: var(--font-heading);
    font-weight: 800;
}

.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 Styles Refined: Matching the Classic Sacred Theme */
/* ==========================================================================
   GALLERY PAGE: RESTORED TO LIGHT BRANDING (Matches About Page)
   ========================================================================== */
.gallery-page {
    /* Background removed to inherit .sacred-pattern from base.html body */
    color: var(--text-main);
}

.gallery-page .page-hero {
    /* Inherits the sophisticated dark red about-page header styling */
    border-bottom: 5px solid var(--accent-gold);
}

/* Overrides removed to maintain perfect synchronization with About/Internal headers */

.gallery-page .section-padding {
    background-color: transparent !important;
    /* Allow pattern to show */
}

.gallery-page .tab-btn {
    background: var(--white);
    color: var(--text-muted);
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 700;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-sm);
}

.gallery-page .tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--sacred-glow);
}

/* Integrated Filter Bar */
.gallery-filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    width: 100%;
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; /* Increased gap for groups */
    flex-wrap: wrap;
    background: var(--white);
    padding: 15px 35px;
    border-radius: 100px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
}

.filter-category-group, .filter-year-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-divider-vertical {
    width: 2px;
    height: 30px;
    background: var(--glass-border);
    opacity: 0.5;
}

.tab-btn, .year-btn {
    background: transparent;
    border: 2px solid transparent;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    color: var(--text-muted);
}

.tab-btn:hover, .year-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 153, 51, 0.05);
}

.tab-btn.active, .year-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 153, 51, 0.3);
}

/* Specific styling for Year buttons to distinguish them */
.year-btn {
    font-size: 0.85rem;
    padding: 6px 16px;
    border: 1px solid var(--glass-border);
}

/* Modal Styles Removed */
    color: var(--secondary-color);
    min-width: 160px;
    text-align: center;
}

.nav-btn, .close-modal-btn {
    background: #f0f2f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.nav-btn:hover, .close-modal-btn:hover {
    background: var(--primary-color);
    color: white;
}

.calendar-body {
    flex: 1;
}

.weekday-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 15px;
}

.weekday-labels span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.day-cell {
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.day-cell:hover:not(.empty) {
    background: #f0f2f5;
    color: var(--primary-color);
}

.day-cell.selected {
    background: var(--secondary-color) !important;
    color: white !important;
    border-radius: 50%;
}

.day-cell.in-range {
    background: rgba(255, 153, 51, 0.1);
    color: var(--primary-color);
    border-radius: 0;
}

.day-cell.range-start { border-radius: 50% 0 0 50%; }
.day-cell.range-end { border-radius: 0 50% 50% 0; }

.day-cell.today {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Calendar Footer */
.calendar-footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 25px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.range-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-item label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.status-item span {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.range-arrow {
    color: var(--text-light);
    font-size: 1.2rem;
}

.reset-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    color: var(--primary-color);
}

/* Responsive Stacking */
@media (max-width: 768px) {
    .modal-container {
        flex-direction: column;
        max-width: 450px;
        min-height: auto;
    }
    
    .modal-sidebar {
        width: 100%;
        padding: 25px;
        order: 2;
        border-right: none;
        border-top: 1px solid var(--glass-border);
    }
    
    .preset-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .preset-btn {
        flex: 1 1 40%;
    }
}


/* ==========================================================================
   PHOTOSEN-STYLE GALLERY GRID (MASONRY)
   ========================================================================== */
.gallery-grid {
    column-count: 2; /* Increased size by reducing to 2 columns */
    column-gap: 20px;
    width: 100%;
}

.gallery-item {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
    /* Matches gap for perfect squareness */
    border-radius: 0;
    /* Sharp, minimal look as per Picasso gallery style */
    overflow: hidden;
    cursor: pointer;
    break-inside: avoid;
    background: #0d0d0d;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.gallery-item:hover {
    transform: scale(1.03);
    /* Subtle zoom in place */
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    filter: brightness(0.9);
}

.gallery-item:hover img {
    filter: brightness(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
    display: flex;
    align-items: flex-end;
    /* ALIGN TO BOTTOM FOR MODERN LOOK */
    justify-content: center;
    padding: 30px;
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: var(--transition-bounce);
}

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

.overlay-title {
    font-family: var(--font-heading);
    color: var(--white);
    font-size: 1.4rem;
    margin: 0 0 5px 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.overlay-date {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-body);
}

/* ==========================================================================
   PHOTOSEN-STYLE SLIDER LIGHTBOX (MINIMALIST)
   ========================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.98);
    /* Deep, near-black backdrop */
    z-index: 999999;
    display: none;
    flex-direction: column !important;
    justify-content: space-between;
    /* Space between Top Bar, Image, and Bottom Section */
    align-items: center;
    padding: 0;
    /* Remove padding to maximize space */
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lightbox.active {
    display: flex !important;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
}

/* 1. Top Bar: Counter & Actions */
.lb-top-bar {
    padding: 30px 40px 10px; /* Further reduced to maximize image height */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    width: 100%;
    z-index: 100;
}

.lb-counter {
    font-family: var(--font-body);
    font-size: 0.9rem;
    opacity: 0.7;
    letter-spacing: 1px;
}

.lb-icon-btn {
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    opacity: 0.6;
}

.lb-icon-btn:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* 2. Main Stage: Large Image & Arrows */
.lb-main-stage {
    flex: 1;
    /* Take all available middle space */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px 20px; /* Reduced vertical padding */
    position: relative;
    width: 100%;
    overflow: hidden;
}

.lb-current-image-wrapper {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lb-current-image-wrapper img {
    max-width: 100%;
    max-height: 100vh; /* Maximum vertical fill */
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 1);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
}

.lb-nav-arrow {
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 20px;
    transition: 0.3s;
    opacity: 0.8;
    /* Higher visibility */
    z-index: 100;
    position: absolute;
    /* Move off the side-by-side flex to float over image */
    top: 50%;
    transform: translateY(-50%);
}

.lb-nav-arrow.prev {
    left: 40px;
}

.lb-nav-arrow.next {
    right: 40px;
}

.lb-nav-arrow:hover {
    opacity: 1;
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.2);
}

/* 3. Bottom Section: Caption & Horizontal Mini-Strip */
.lb-bottom-section {
    width: 100%;
    max-width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    padding: 20px 20px 40px 20px; /* Reduced padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.lb-caption {
    text-align: center;
    max-width: 800px;
    color: white;
}

.lb-caption h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    /* Even larger and more elegant */
    color: var(--white);
    margin-bottom: 5px;
    letter-spacing: 3px;
    font-weight: 400;
}

.lb-caption p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

/* Minimal Thumbnail Strip at bottom */
.lb-thumbnails-strip-wrapper {
    width: 100%;
    max-width: 900px;
}

.lb-thumbnails-strip {
    display: flex;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.lb-thumbnails-strip::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar Webkit */

.mini-thumb {
    width: 100px; /* Increased from 60px */
    height: 70px; /* Increased from 45px */
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.4;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-thumb:hover,
.mini-thumb.active {
    opacity: 1;
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Cleanup for old grid styles no longer in use in template */
.lb-hero-section,
.lb-hero-container,
.lb-collection-section,
.lb-grid,
.lb-grid-item {
    display: none !important;
}

/* Responsive Masonry & Lightbox */
@media (max-width: 1400px) {
    .lb-nav-btn.prev {
        left: 20px;
    }

    .lb-nav-btn.next {
        right: 20px;
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        column-count: 2;
    }

    .lb-caption h3 {
        font-size: 1.5rem;
    }

    .lb-nav-btn {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
    }

    .lb-nav-btn {
        display: none;
    }

    /* Use swipe on mobile */
    .lb-caption {
        padding: 0 20px;
    }

    .lb-close-btn {
        top: 20px;
        right: 20px;
        font-size: 2.5rem;
    }
}

/* 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: 6px 16px;
    background: var(--primary-color);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50px;
    margin-bottom: 15px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 153, 51, 0.3);
    z-index: 10;
    white-space: nowrap;
    text-align: center;
}

@media screen and (min-width: 993px) {
    .timeline-date {
        position: absolute;
        top: 60px; /* Aligns with the card's top area */
        width: 160px;
    }

    .timeline-item:nth-child(odd) .timeline-date {
        left: calc(100% + 60px); /* Move to the right side of the center line */
        text-align: center;
    }

    .timeline-item:nth-child(even) .timeline-date {
        right: calc(100% + 60px); /* Move to the left side of the center line */
        text-align: center;
    }
}

.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.6rem;
    }

    .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: 60px 0 40px;
        /* Further reduced for mobile to maintain compact layout */
    }

    .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;
    bottom: 30px;
    /* Set to bottom */
    display: flex;
    flex-direction: column;
    /* Stack from Top to Bottom */
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
    top: auto !important;
    transform: none !important;
}

.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 {
        bottom: 20px !important;
        right: 20px !important;
        top: auto !important;
        transform: none !important;
        flex-direction: column !important;
        gap: 10px;
    }

    .float-btn {
        width: 42px;
        height: 42px;
    }

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

    .float-label {
        display: none !important;
    }

    /* Hide labels on mobile to avoid screen clutter */
}

@media screen and (max-width: 480px) {
    .floating-controls {
        bottom: 15px !important;
        right: 15px !important;
        top: auto !important;
        transform: none !important;
    }
}

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

.top-bar {
    height: var(--top-bar-height) !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: var(--top-bar-height) !important;
    z-index: 10002 !important;
    /* Above everything */
}

/* Fix Header to start exactly below the ticker */
header#main-header {
    top: var(--top-bar-height) !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;
}

/* LEGACY RIBBON BLOCK PURGED — Consolidated version at end of file. */

/* ==========================================================================
   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;
    }
}

/* Redundant offset purged */

/* ==========================================================================
   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: 20px 0;
    /* Reduced as requested */
    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;
}

/* Pink-Red Premium Gradient Overlay */
.our-leaders-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 20, 147, 0.9) 0%,   /* Deep Pink */
            rgba(220, 20, 60, 0.92) 50%,   /* Crimson */
            rgba(139, 0, 0, 0.95) 100%);  /* Dark Red */
    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 .section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.our-leaders-section .section-header p {
    font-size: 0.9rem;
    opacity: 0.85;
}

.our-leaders-section .section-header {
    margin-bottom: 30px !important; /* Reduced gap as requested */
}

.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 */
}

/* Leadership Hierarchy */
.leadership-hierarchy {
    margin-top: 10px; /* Reduced gap */
    display: flex;
    flex-direction: column;
    gap: 70px;
    position: relative;
    z-index: 2;
}

.leader-rank-group {
    text-align: center;
}

.leader-rank-title {
    color: #ffffff; /* Bright white highlight */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 30px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.4rem; /* Reduced size */
    margin-bottom: 30px;
    font-family: var(--font-heading);
    position: relative;
    display: inline-block;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.leader-rank-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
    border-radius: 2px;
}

.unveiling-soon-container {
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    max-width: 400px;
    margin: 0 auto;
}

.unveiling-soon {
    font-size: 1.25rem;
    color: var(--accent-gold);
    font-family: var(--font-heading);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    font-weight: 600;
}

.president-card {
    display: flex;
    justify-content: center;
}

.leaders-grid {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap; /* Forced single row on desktop */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .leaders-grid {
        flex-wrap: wrap; /* Allow wrapping on smaller screens */
    }
}

.leader-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.leader-card:hover {
    transform: translateY(-15px) scale(1.03);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.leader-card img {
    border-radius: 18px;
    object-fit: cover;
    margin-bottom: 25px;
    border: 5px solid rgba(255, 255, 255, 0.25);
    transition: var(--transition-smooth);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.leader-card:hover img {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.leader-card h4 {
    color: #fffafb !important; /* Extremely pale pink-white */
    font-size: 1.2rem;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.leader-card span {
    color: #ffdae0; /* Soft light pink to match background */
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* Rank Sizing Overrides */
.rank-president {
    width: 360px;
    padding: 40px;
}
.rank-president img {
    width: 250px;
    height: 250px;
    border-width: 6px;
    border-color: var(--primary-color);
}
.rank-president h4 {
    font-size: 1.6rem;
}

.rank-vp {
    width: 220px;
    padding: 25px;
}
.rank-vp img {
    width: 150px;
    height: 150px;
}

.rank-sec {
    width: 190px;
    padding: 20px;
}
.rank-sec img {
    width: 110px;
    height: 110px;
    border-width: 3px;
}
.rank-sec h4 {
    font-size: 1rem;
}

/* Mobile Responsiveness for Leaders Hierarchy */
@media (max-width: 1024px) {
    .leaders-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .leadership-hierarchy {
        gap: 50px;
    }
    .rank-president {
        width: 100%;
        max-width: 320px;
    }
    .rank-vp, .rank-sec {
        width: calc(50% - 15px);
    }
}

@media (max-width: 480px) {
    .rank-vp, .rank-sec {
        width: 100%;
        max-width: 280px;
    }
}


/* Sync Header & Ribbon z-indices for consistent stacking */
header#main-header {
    z-index: 2000000 !important;
    /* Elevated above the mobile menu to keep toggle visible */
}

.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 !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;
    }
}

/* ==========================================================================
   OFFICIALS PAGE STYLES (IABAMRR INSPIRED)
   ========================================================================== */

.officials-hero {
    background: linear-gradient(135deg, #1a1530 0%, #4b0000 100%);
    color: white;
    text-align: center;
    padding: 100px 0 60px;
}

.officials-hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    color: white;
}

.gold-text {
    color: var(--accent-gold);
}

.filter-section {
    margin-top: 30px;
    position: relative;
    z-index: 100;
    padding-bottom: 15px; /* Reduced from 40px */
}

.filter-grid-new {
    background: #fff4e6; /* Light Saffron Cream */
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 153, 51, 0.2);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: center;
}


.filter-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: flex-end;
}

.filter-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    font-family: var(--font-body);
}

.section-padding-sm {
    padding: 60px 0;
}

.category-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.officials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.officials-grid.central {
    display: flex;
    justify-content: center;
}

.official-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-md);
    text-align: center;
    padding: 40px 20px;
    border-bottom: 5px solid var(--primary-color);
}

.official-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-card);
}

.official-card.featured {
    max-width: 450px;
    width: 100%;
    border-bottom: 5px solid var(--gold);
}

.card-img-wrapper {
    width: 180px;
    height: 180px;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--accent-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.featured .card-img-wrapper {
    width: 220px;
    height: 220px;
}

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

.official-badge {
    display: inline-block;
    padding: 5px 20px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: white;
}

.official-badge.president {
    background: var(--gold);
}

.official-badge.sec-gen {
    background: var(--accent-color);
}

.official-badge.vp {
    background: var(--primary-color);
}

.official-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.designation {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .officials-hero h1 {
        font-size: 2.5rem;
    }

    .category-title {
        font-size: 1.8rem;
    }

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

/* Enhanced Officials Design */
.filter-card {
    background: linear-gradient(to right, #ffffff, #fffdf5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 15px 45px rgba(38, 30, 71, 0.1);
}

.filter-message {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 153, 51, 0.05);
    border-radius: 12px;
    font-family: var(--font-body);
    color: var(--text-main);
    font-weight: 600;
    font-style: italic;
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

#searchBtn {
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

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

.officials-grid {
    transition: var(--transition-smooth);
}

/* Fix for button visibility in case of legacy styles */
input[type="button"].btn-primary,
button.btn-primary {
    color: #ffffff !important;
}

.official-msg {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   HORIZONTAL OFFICIAL CARD DESIGN (IABAMRR EXACT MATCH)
   ========================================================================== */

.officials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Column Grid for members */
    gap: 40px;
}

.officials-grid.central {
    display: block;
    max-width: 900px;
    margin: 0 auto 50px;
}

.official-card {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    background: transparent;
    box-shadow: none;
    border: none;
    text-align: left;
    padding: 0;
    margin-bottom: 50px;
    overflow: visible !important;
    /* Fix for badge cropping */
}

.official-card:hover {
    transform: none;
    box-shadow: none;
}

.card-img-wrapper {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    margin: 0;
    border: 6px solid var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    /* Prevents cropping heads */
}

.card-info-content {
    flex-grow: 1;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    position: relative;
    border-top: 10px solid var(--primary-color);
    /* The Badge Bar */
}

.official-card.featured .card-info-content {
    border-top-color: var(--gold);
}

.official-card.secondary .card-info-content {
    border-top-color: var(--accent-color);
}

.card-info-content h3 {
    font-size: 1.6rem;
    color: #003366;
    /* Deep Academic Blue */
    margin-bottom: 5px;
    font-family: 'Playfair Display', serif !important;
}

.official-region {
    color: #b22222;
    /* Crimson Red */
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: block;
    font-family: var(--font-body);
}

.official-msg {
    font-family: var(--font-body) !important;
    font-size: 0.92rem;
    color: #333333;
    line-height: 1.5;
    /* Reduced from 1.8 */
    text-align: left;
    font-style: normal;
    margin-top: 10px;
    padding-top: 0;
    border-top: none;
    max-width: 100%;
    display: block;
}

.official-badge {
    position: absolute;
    top: -35px;
    left: 0;
    margin-bottom: 0;
    border-radius: 4px 4px 0 0;
    font-size: 0.7rem;
    padding: 4px 15px;
}

@media (max-width: 1024px) {
    .officials-grid {
        grid-template-columns: 1fr;
    }

    .official-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .card-info-content {
        text-align: left;
        width: 100%;
    }

    .card-img-wrapper {
        width: 180px;
        height: 180px;
    }
}

/* ==========================================================================
   PREMIUM OFFICIALS REDESIGN (ATTRACTIVE & MODERN)
   ========================================================================== */

.officials-hero {
    background: linear-gradient(135deg, #1a1530 0%, #4b2c20 100%);
    background-attachment: fixed;
    border-bottom: 5px solid var(--accent-gold);
}

.filter-card {
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transform: translateY(-50px);
}

.official-card {
    transition: var(--transition-smooth);
    margin-bottom: 40px;
    align-items: center;
    /* Better vertical alignment */
}

.official-card:hover {
    transform: translateX(10px);
}

.card-img-wrapper {
    width: 140px;
    height: 140px;
    border: 4px solid var(--accent-gold);
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-bounce);
}

.official-card:hover .card-img-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.card-info-content {
    background: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-top: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    padding: 25px;
    transition: var(--transition-smooth);
}

.official-card:hover .card-info-content {
    box-shadow: var(--shadow-card);
    border-top-width: 8px;
}

.card-info-content h3 {
    font-family: var(--font-heading) !important;
    font-size: 1.4rem;
    color: var(--secondary-color);
    letter-spacing: 0.5px;
}

.official-region {
    color: #8b0000;
    /* Deep Maroon */
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.official-msg {
    color: #444;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 12px;
}

/* Featured Treatment */
.official-card.featured .card-img-wrapper {
    width: 180px;
    height: 180px;
    outline-color: var(--gold);
}

.official-card.featured .card-info-content {
    background: linear-gradient(to bottom right, #ffffff, #fffef0);
    border-top-color: var(--gold);
    border-left: 1px solid var(--gold);
}

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

/* Fix grid for larger screens (clumsy on wide displays otherwise) */
@media (min-width: 1400px) {
    .officials-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
}

/* ==========================================================================
   STUNNING & SACRED OFFICIALS REDESIGN
   ========================================================================== */

.officials-category {
    background: radial-gradient(circle at top right, rgba(255, 153, 51, 0.03), transparent),
        radial-gradient(circle at bottom left, rgba(38, 30, 71, 0.03), transparent);
    padding: 60px 40px;
    border-radius: 40px;
    margin-bottom: 80px;
}

.official-card {
    /* UNIQUE BACKGROUND: Sacred Parchment Effect */
    background: #fffdf5;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(38, 30, 71, 0.05);
}

.official-card:hover {
    transform: translateY(-5px);
    /* Gentle vertical lift instead of horizontal */
    box-shadow: 0 15px 40px rgba(255, 153, 51, 0.1);
}

/* Remove hover effect for photos as requested */
.official-card:hover .card-img-wrapper {
    transform: none !important;
}

.card-img-wrapper {
    /* STUNNING IMAGE DESIGN: Double Sacred Ring */
    width: 150px;
    height: 150px;
    border: 3px solid var(--accent-gold);
    padding: 5px;
    background: #ffffff;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
    transition: none;
    /* Removed hover animation */
}

.card-img-wrapper img {
    border-radius: 50%;
}

.card-info-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-top: 6px solid var(--primary-color);
    box-shadow: inset 0 0 40px rgba(212, 175, 55, 0.05);
    border-radius: 15px;
    padding: 30px;
}

.official-card.featured .card-info-content {
    border-top-color: var(--gold);
    background: linear-gradient(135deg, #ffffff, #fffdf0);
}

.category-title {
    font-size: 2.8rem;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.official-region {
    color: var(--primary-color);
    border-left: 3px solid var(--accent-gold);
    padding-left: 10px;
}

.official-badge {
    background: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.official-badge.president {
    background: #b22222;
}

/* Crimson Sacred Badge */

/* ==========================================================================
   INTERACTIVE & WIDE OFFICIALS BODY
   ========================================================================== */

/* Full Width Featured Treatment */
.officials-grid.central {
    display: flex;
    justify-content: center;
    max-width: 100% !important;
    width: 100%;
}

.official-card.featured {
    max-width: 1100px !important;
    /* SIGNIFICANTLY INCREASED WIDTH */
    width: 95%;
    padding: 50px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 253, 245, 0.95));
    border: 2px solid var(--accent-gold);
    box-shadow: 0 30px 60px rgba(212, 175, 55, 0.15);
}

.official-card.featured .card-img-wrapper {
    width: 240px;
    /* Larger image for featured */
    height: 240px;
}

.official-card.featured h3 {
    font-size: 2.8rem !important;
    /* Massive name for President */
}

.official-card.featured .official-msg {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Interactive Page Body: Sacred Watermark Background */
body.officials-page {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 153, 51, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(38, 30, 71, 0.05) 0%, transparent 20%);
    position: relative;
    overflow-x: hidden;
}

/* Floating Sacred Elements (Interactive) */
.sacred-watermark,
.sacred-om-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
    user-select: none;
}

.sacred-watermark {
    font-size: 40rem;
    opacity: 0.02;
    color: var(--accent-gold);
}

.sacred-om-watermark {
    font-size: 80rem;
    opacity: 0.01;
    color: var(--primary-color);
}

/* Section Transitions (Stunning & Interactive) */
.officials-category {
    position: relative;
    margin-bottom: 25px; /* Reduced gap */
    transition: var(--transition-smooth);
}

.officials-category:hover {
    background: rgba(0, 0, 0, 0.01);
}

/* Interactive Reveal Pattern on Scroll (via AOS custom) */
[data-aos="zoom-in-sacred"] {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos="zoom-in-sacred"].aos-animate {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Enhanced Title Animation */
.category-title {
    background: linear-gradient(to right, var(--accent-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding-bottom: 20px;
}

/* ==========================================================================
   OFFICIALS PAGE - CUSTOM BACKGROUND IMAGE
   ========================================================================== */

body.officials-page {
    background-image: url('../img/images/Background For Web.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect for a stunning look */
    background-repeat: no-repeat;
    position: relative;
}

/* Overlay to ensure readability on the custom background */
body.officials-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 253, 245, 0.9);
    /* Sacred Cream tint to soften the background */
    z-index: -1;
    pointer-events: none;
}

.officials-hero {
    background: linear-gradient(135deg, rgba(26, 21, 48, 0.9) 0%, rgba(75, 44, 32, 0.85) 100%),
        url('../img/images/Background For Web.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Reduced Body Overlay Opacity to make background image more visible */
body.officials-page::after {
    background: rgba(255, 253, 245, 0.4);
    /* Reduced from 0.9 to 0.4 for higher visibility */
}

/* Translucent Category Blocks for more interactive depth */
.officials-category {
    background: rgba(255, 253, 245, 0.1);
    /* Highly transparent sacred cream backdrop */
    backdrop-filter: blur(8px);
    /* Crystal glass effect */
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* ==========================================================================
   MEMBERSHIP PAGE DESIGN (IABAMRR STYLE)
   ========================================================================== */

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

.member-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--primary-color);
}

.member-card.premium::before {
    background: var(--gold);
}

.member-card.elite::before {
    background: #b22222;
}

.member-card .icon-box {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.member-card h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.member-card .fee {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.member-card .fee span {
    font-size: 1rem;
    color: var(--text-muted);
}

.member-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
}

.member-features li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.member-features li i {
    color: var(--gold);
    margin-right: 10px;
}

.extra-fees-notce {
    background: rgba(178, 34, 34, 0.05);
    border-left: 5px solid #b22222;
    padding: 20px 30px;
    border-radius: 8px;
    margin-bottom: 50px;
    color: #b22222;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
}

.extra-fees-notce i {
    font-size: 1.5rem;
}

.membership-hero {
    background: linear-gradient(135deg, rgba(26, 21, 48, 0.95), rgba(75, 44, 32, 0.9)),
        url('../img/images/Background For Web.jpeg');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    color: white;
    text-align: center;
}

/* ==========================================================================
   STUNNING 12-TYPE MEMBERSHIP GRID
   ========================================================================== */

.membership-page-clean {
    /* DIFFERENT BACKGROUND: Sacred Geometric Gradient */
    background: radial-gradient(circle at 50% 50%, #fffdf0 0%, #fff9e6 100%);
    background-image:
        linear-gradient(rgba(255, 153, 51, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 153, 51, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    background-attachment: scroll;
}

.membership-hero.clean h1 {
    color: var(--primary-color) !important;
    /* SYNCING COLOR with cards */
    font-size: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.membership-grid-12 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.member-card-compact {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    text-align: left;
    border: 1px solid rgba(255, 153, 51, 0.2);
    border-top: 5px solid var(--primary-color);
    /* SYNCED COLOR with Hero title */
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.member-card-compact:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(255, 153, 51, 0.15);
    border-top-width: 8px;
    /* Dynamic interactive effect */
}

.member-card-compact .card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.member-card-compact .icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.member-card-compact h3 {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-family: var(--font-heading) !important;
}

.member-card-compact .fee {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.member-card-compact .description {
    font-size: 0.85rem;
    color: #666;
    margin: 15px 0;
    line-height: 1.5;
}

.member-card-compact .btn-sm-sacred {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    font-size: 0.8rem;
    border-radius: 4px;
    text-align: center;
    transition: var(--transition-smooth);
}

.member-card-compact:hover .btn-sm-sacred {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 1024px) {
    .membership-grid-12 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ==========================================================================
   DECENT & PREMIUM 12-TYPE MEMBERSHIP (REFINED)
   ========================================================================== */

.membership-grid-refined {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Columns for better readability */
    gap: 30px;
    margin-top: 50px;
}

.member-card-horizontal {
    display: flex;
    align-items: center;
    gap: 25px;
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    border-left: 6px solid var(--primary-color);
    /* SYNCED COLOR with Hero title */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: var(--transition-smooth);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.member-card-horizontal:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 45px rgba(255, 153, 51, 0.1);
    background: #fffef5;
}

.member-card-horizontal .icon-box-refined {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: rgba(255, 153, 51, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.member-card-horizontal .info-box {
    flex-grow: 1;
}

.member-card-horizontal h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 4px;
    font-weight: 700;
}

.member-card-horizontal .fee-tag {
    font-size: 1.1rem;
    color: #1a73e8;
    /* Bold Blue for professional clarity */
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.member-card-horizontal p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.membership-hero.decent h1 {
    font-size: 4rem;
    color: var(--primary-color) !important;
    font-weight: 900;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 992px) {
    .membership-grid-refined {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SACRED TEMPLE BACKGROUND - MEMBERSHIP PAGE
   ========================================================================== */

.membership-page-clean {
    background-image: url('../img/images/bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Immersive parallax effect */
    position: relative;
}

.membership-page-clean::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Layered glassmorphism to keep content "decent" and readable */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 253, 245, 0.85));
    backdrop-filter: blur(5px);
    z-index: -1;
    pointer-events: none;
}

/* Stunning Hero Overlay for Membership */
.membership-hero.decent {
    background: linear-gradient(135deg, rgba(255, 153, 51, 0.9), rgba(212, 175, 55, 0.8)),
        url('../img/images/bg.webp');
    background-size: cover;
    background-position: center;
    padding: 120px 0;
    border-radius: 0 0 50px 50px;
    box-shadow: 0 15px 40px rgba(255, 153, 51, 0.2);
}

.membership-hero.decent h1,
.membership-hero.decent p {
    color: white !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Membership Hero Title Uniform Color Sync */
.page-hero h1 {
    color: var(--primary-color) !important;
    /* Forces uniform Saffron/Gold color as requested */
}

/* ==========================================================================
   HOME PAGE - SPECIFIC ADJUSTMENTS
   ========================================================================== */

/* 1. Reduce Topbar Height */
.top-bar {
    padding: 0 !important;
    /* Removed padding for tighter fit */
}

.ticker-container {
    height: var(--top-bar-height) !important;
}

/* 1.5. Reduce Vision & Mission Gap */
.vm-header {
    margin-bottom: 30px !important;
}

/* 2. Increase OUR MISSION Visibility */
.highlights .badge {
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: 700 !important;
    padding: 6px 15px !important;
    box-shadow: 0 4px 10px rgba(255, 153, 51, 0.3);
}

/* 3. Reduce Mission Highlights Section Padding */
.highlights.section-padding {
    padding: 50px 0 !important;
    /* Reduced from default section padding */
}

/* 4. Force Single Line for Community Impact Description */
.stats .section-header p {
    white-space: nowrap;
    /* Ensures text stays in single line */
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .stats .section-header p {
        white-space: normal;
        /* Restore for mobile to prevent overflow */
    }
}

/* ==========================================================================
   FURTHER HEIGHT REDUCTIONS - HOME PAGE
   ========================================================================== */

/* 1. Ultra Compact Topbar */
.top-bar {
    padding: 2px 0 !important;
    /* Minimized for ultra-sleek look */
}

/* 2. Reduce Vision & Mission Section Height */
.vision-mission-section.section-padding {
    padding: 40px 0 !important;
}

.vision-mission-grid {
    gap: 20px !important;
}

.vm-card {
    padding: 30px !important;
    /* Reduced card padding */
}

/* 3. Reduce News & Awards (Achievements) Section Height */
.achievements-staggered.section-padding {
    padding: 40px 0 !important;
}

.mosaic-container {
    gap: 20px !important;
}

/* Reducer leaders section too as it helps with overall page flow */
.our-leaders-section.section-padding {
    padding: 40px 0 !important;
}

/* ==========================================================================
   ALIGMENT & FIT FIXES - HOME PAGE
   ========================================================================== */

/* 1. Fix Topbar Height (Cramped issue) */
.top-bar {
    padding: 8px 0 !important;
    /* Restore decent height for visibility */
}

/* 2. Fix Vision & Mission Scroll Overlap */
/* Restore the large top padding required by the 3D scroll background graphic */
.vision-mission-section .vm-card {
    padding: 220px 80px 150px 80px !important;
    min-height: 1000px !important;
}

/* 3. Fix Stats Section Statement Alignment */
.stats .section-header p {
    margin-top: 25px !important;
    /* Balanced gap */
    white-space: normal;
    /* Better for mixed screens */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* 4. Fix News & Awards (Achievements) Alignment */
.mosaic-media {
    flex: 1.5;
    /* Larger image area */
}

.mosaic-content {
    flex: 1.2;
}

.mosaic-content .btn-outline {
    width: auto !important;
    /* Prevent stretched pill buttons */
    min-width: 180px;
    display: inline-block;
    padding: 12px 30px;
    margin-top: 15px;
}

/* 5. Fix Office Bearers Grid (Cramped 8-in-a-row) */
.office-bearers-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    /* 4 per row instead of 8 */
    gap: 20px;
    margin-top: 40px;
}

@media (max-width: 992px) {
    .office-bearers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .office-bearers-grid {
        grid-template-columns: 1fr;
    }
}

/* Redundant fix removed to allow the consolidated ribbon styles to take precedence */

/* ==========================================================================
   REFINED NEWS & AWARDS (LESS CLUMSY, BETTER FIT)
   ========================================================================== */

.mosaic-item {
    gap: 100px !important;
    /* Increased breathing room */
    margin-bottom: 80px;
}

.image-offset-frame img {
    height: 380px !important;
    /* Reduced image size for better proportion */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-offset-frame::before {
    border: 2px solid var(--accent-gold) !important;
    /* Reduced border thickness */
    top: -15px !important;
    left: -15px !important;
}

.mosaic-item.reverse .image-offset-frame::before {
    left: 15px !important;
}

.mosaic-year {
    font-size: 2.2rem !important;
    /* Reduced year size */
    margin-bottom: 10px !important;
}

.mosaic-content h3 {
    font-size: 1.8rem !important;
    /* Reduced title size */
    margin-bottom: 15px !important;
}

.mosaic-content p {
    font-size: 1rem !important;
    /* Reduced description size */
    line-height: 1.6 !important;
    margin-bottom: 25px !important;
}

.mosaic-content .btn-outline {
    font-size: 0.9rem !important;
}

/* Section specific padding adjustments */
.our-leaders-section {
    padding-bottom: 80px;
}

/* ==========================================================================
   LEADERSHIP PHOTOS RE-SIZING
   ========================================================================== */

/* 1. Increase Our Leaders Photo Size */
.leader-card img {
    width: 230px !important;
    /* Increased from 180px */
    height: 230px !important;
    border-width: 6px !important;
}

.leader-card {
    padding: 30px 10px !important;
}

/* 2. Reduce Office Bearers Photo Size */
.ob-card img {
    width: 110px !important;
    /* Reduced from 95% (~200px) */
    height: 110px !important;
    margin-left: auto;
    margin-right: auto;
    display: block;
    margin-bottom: 12px;
}

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

.ob-card h5 {
    font-size: 0.9rem !important;
    /* Scaled down text to match smaller photo */
}

/* ==========================================================================
   LOGO & RIBBON REFINEMENTS
   ========================================================================== */

/* 1. Header Logo Text Alignment (Force Left) */
header .logo-text {
    text-align: left !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start !important;
    /* Forces left alignment */
}

header .logo-text h1 {
    text-align: left !important;
    margin-left: 0 !important;
}

/* 2. Fix Header position */
header#main-header {
    top: 25px !important;
}

/* 3. Scrolled State: Maintain TopBar and Navbar stack */
header#main-header.scrolled {
    top: 0 !important;
    background: var(--glass-bg);
}

body.body-scrolled .top-bar {
    transform: none !important;
    /* Prevent slide-away */
}

/* 4. Responsive Visibility & Proportional Fitting */
@media (max-width: 768px) {
    .top-bar {
        height: 35px !important;
        font-size: 0.7rem !important;
    }

    header#main-header {
        top: 35px !important;
    }

    header#main-header.scrolled {
        top: 0 !important;
    }

    #page-spacer {
        height: auto;
        /* Height is now strictly handled by JS to follow dynamic header stack */
    }
}

/* ==========================================================================
   VISION & MISSION: MOBILE RESPONSIVE FIX (320px - 480px)
   Reduces text size and padding to fit within the scroll graphic on small screens.
   ========================================================================== */
@media (max-width: 480px) {
    .vision-mission-section .vm-card {
        padding: 190px 45px 140px 45px !important;
        /* Pushes content strictly into the 'paper' area */
        min-height: 1000px !important;
        background-size: 100% 100% !important;
    }

    .vm-card h3 {
        font-size: 1.35rem !important;
        margin-bottom: 20px !important;
    }

    .vm-card ul {
        max-width: 85% !important;
        /* Narrower list to avoid side edges of scroll */
        margin: 0 auto !important;
        padding-left: 0 !important;
    }

    .vm-card ul li {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
        text-align: left !important;
    }
}

@media (max-width: 375px) {
    .vision-mission-section .vm-card {
        padding: 170px 40px 120px 40px !important;
        /* Optimized for 360px-375px */
        min-height: 950px !important;
    }

    .vm-card h3 {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 320px) {
    .vision-mission-section .vm-card {
        padding: 150px 35px 100px 35px !important;
        min-height: 900px !important;
    }

    .vm-card h3 {
        font-size: 1.15rem !important;
    }

    .vm-card ul li {
        font-size: 0.75rem !important;
    }
}

/* ==========================================================================
   FINAL CONSOLIDATED LEADERSHIP RIBBON (STRICT OVERRIDE)
   ========================================================================== */
.leadership-ribbon {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    background: #fffdf5 !important;
    z-index: 10 !important;
    overflow: visible !important;
    border-bottom: 1px solid rgba(212, 175, 0, 0.1) !important;
    margin-top: 10px !important;
    /* Added small gap below navbar */
    margin-bottom: 15px !important;
}

.leadership-ribbon .ribbon-track {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 2px !important;
    /* Tightened from 4px */
    width: 100% !important;
    max-width: 1300px !important;
    margin: 0 auto !important;
    animation: none !important;
    padding-top: 5px !important;
    /* Reduced from 20px to eliminate the perceived gap below the navbar */
}

/* KILL ALL BORDERS, SHADOWS, AND ORNATE FRAMES */
.leadership-ribbon *,
.leadership-ribbon *::before,
.leadership-ribbon *::after {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background-image: none !important;
    background-color: transparent !important;
}

/* Base Item Setup - RESTORED VISIBILITY */
.leadership-ribbon .ribbon-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    flex: 0 0 180px !important; /* Reduced for better fit */
    gap: 2px !important;
    padding: 0 !important;
}

/* Square Images */
.leadership-ribbon .ribbon-img-wrapper {
    position: relative !important;
    width: 85px !important; /* Increased for premium presence */
    height: 85px !important; /* Increased for premium presence */
    margin-bottom: 5px !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

.leadership-ribbon .ribbon-img-wrapper img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 4px !important;
}

/* Blinking & Text Visibility */
.leadership-ribbon .ribbon-info {
    position: relative !important;
    width: 100% !important;
    height: 25px !important;
    /* Reduced from 30px */
}

.leadership-ribbon .info-primary,
.leadership-ribbon .info-secondary {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
}

.leadership-ribbon .ribbon-info strong {
    display: block !important;
    font-size: 0.7rem !important; /* Reduced font size from 0.75rem */
    color: var(--accent-color) !important;
    line-height: 1.1 !important;
    white-space: normal !important;
}

.leadership-ribbon .ribbon-info span {
    display: block !important;
    font-size: 0.6rem !important; /* Reduced font size from 0.65rem */
    color: var(--text-muted) !important;
}

/* Fixed Info (Removed Blink) */
.leadership-ribbon .primary,
.leadership-ribbon .info-primary {
    visibility: visible !important;
    opacity: 1 !important;
}

.leadership-ribbon .secondary,
.leadership-ribbon .info-secondary {
    display: none !important;
}

.leadership-ribbon .ribbon-om-divider {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 4px !important;
    /* Reduced gap around Ishta-Lingu image */
    line-height: 1 !important;
}

.leadership-ribbon .ribbon-om-divider img {
    height: 55px !important;
    /* Reduced from 75px */
    width: auto !important;
    opacity: 1 !important;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

/* ==========================================================================
   RESPONSIVE: CENTERED SINGLE-ROW FIT
   ========================================================================== */
@media screen and (max-width: 991px) {
    .leadership-ribbon {
        padding: 4px 0 !important;
        margin-bottom: 2px !important;
    }

    .leadership-ribbon .ribbon-track {
        gap: 2px !important; /* Minimum gap to fit all items */
        justify-content: center !important; /* Center items statically */
        overflow: hidden !important; /* Prevent scrolling as requested */
        padding: 5px 2px !important;
        flex-wrap: nowrap !important;
    }

    .leadership-ribbon .ribbon-item {
        flex: 1 1 0 !important; /* Evenly distribute all 6 items */
        max-width: 16.6% !important;
        flex-direction: column !important;
        gap: 1px !important;
    }

    .leadership-ribbon .ribbon-img-wrapper {
        width: 42px !important; /* Reduced size to ensure 6-item fit */
        height: 42px !important;
        margin-bottom: 2px !important;
    }

    .leadership-ribbon .ribbon-info {
        height: auto !important;
        min-height: 40px !important;
        position: relative !important;
    }

    .leadership-ribbon .info-primary {
        position: static !important;
    }

    .leadership-ribbon .ribbon-info strong {
        font-size: 0.48rem !important; /* Very small but fits */
        line-height: 1.1 !important;
        word-break: normal !important;
        white-space: normal !important;
    }

    .leadership-ribbon .ribbon-info span {
        display: block !important;
        font-size: 0.42rem !important;
        line-height: 1.1 !important;
        margin-top: 1px !important;
    }
}

/* Scroll Hide State */
.leadership-ribbon.hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
}
/* ==========================================================================
   FOUNDER SECTION (ABOUT PAGE)
   ========================================================================== */
.founder-section {
    border-bottom: 1px solid var(--glass-border);
}

.founder-wrap-container {
    display: flow-root; /* Contains floats */
    width: 100%;
}

.founder-photo-container {
    float: left;
    width: 320px;
    margin: 0 40px 20px 0;
    position: relative;
    z-index: 5;
}

.founder-frame {
    position: relative;
    width: 100%;
    padding: 0;
    background: #fff;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
}

.founder-frame img {
    border-radius: 12px;
}

.photo-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    gap: 15px;
    border-radius: 5px;
}

.photo-placeholder i {
    font-size: 4rem;
    opacity: 0.3;
}

.photo-placeholder span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.founder-title-badge {
    margin-top: 15px;
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    text-align: center;
}

.founder-title-badge h4 {
    margin: 0;
    font-size: 0.9rem;
    color: white !important;
    font-weight: 700;
}

.founder-info h2 {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.founder-bio {
    display: block; /* Ensure it follows float rules */
}

.founder-bio p, 
.full-content p {
    margin-bottom: 20px;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.read-more-wrapper {
    margin-top: 20px;
}

.full-content {
    max-height: 8000px; /* Increased to accommodate long bio */
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    display: block; /* Bio flow */
    text-align: justify;
}

.full-content:not(.collapsed) {
    overflow: visible; /* Allow text wrapping around float after expansion */
}

.full-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border-top-color: transparent;
}

.btn-read-more {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Introduction Section Styles */
.intro-section p {
    text-align: justify;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.intro-section h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.btn-read-more i {
    transition: transform 0.4s ease;
}

.btn-read-more.active i {
    transform: rotate(180deg);
}

.btn-read-more:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

@media screen and (max-width: 992px) {
    .founder-info h2 {
        font-size: 2.2rem;
    }
}

@media screen and (max-width: 768px) {
    .founder-photo-container {
        float: none;
        width: 100%;
        max-width: 350px;
        margin: 0 auto 30px;
    }
}

.founder-frame img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    transition: transform 0.8s var(--transition-bounce);
}

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

/* ==========================================================================
   DARK THEME COMPONENTS (VISION/MISSION)
   ========================================================================== */
.content-box.dark-theme {
    background: rgba(15, 12, 41, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transition: var(--transition-bounce);
}

.content-box.dark-theme:hover {
    background: rgba(15, 12, 41, 0.6);
    border-color: var(--primary-color);
    transform: translateY(-10px);
}

.content-box.dark-theme p {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ==========================================================================
   OFFICIALS PAGE STYLES (Leadership & Filters)
   ========================================================================== */

.leadership-main-title {
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    margin: 30px 0 60px; /* Increased bottom margin for underline/ornament */
    letter-spacing: 2px;
}

/* Dynamic Leadership Heading - PREMIUM BLUE & UNIQUE UNDERLINE */
.leadership-body-title {
    color: var(--accent-color) !important;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 15px 0 55px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    width: 100%;
}

@media screen and (max-width: 768px) {
    .leadership-body-title {
        margin-bottom: 45px !important;
    }
}

.leadership-body-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.leadership-body-title::before {
    content: '◈'; /* Unique central ornament */
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--accent-color);
    background: var(--bg-color);
    padding: 0 15px;
    z-index: 1;
}


h1.leadership-main-title {
    font-size: 3.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px; /* Reduced from 50px */
}

h2.leadership-main-title {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-top: 30px; /* Reduced from 50px */
    position: relative;
    display: inline-block;
    width: 100%;
}

.leadership-main-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.leadership-main-title::before {
    content: '◈'; /* Unique central ornament */
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--accent-color);
    background: var(--bg-color);
    padding: 0 15px;
    z-index: 1;
}

.president-section, .secretary-section {
    padding: 30px 0; /* Reduced from 60px */
    margin-bottom: 20px; /* Reduced from 40px */
}

.official-card-leadership {
    display: flex;
    align-items: center;
    gap: 50px; /* Increased gap for clarity */
    position: relative;
    max-width: 1100px; /* Slightly wider to accommodate gap */
    margin: 0 auto;
}

.official-img-square-box {
    width: 300px;
    height: 350px;
    z-index: 2;
    flex-shrink: 0;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.15);
}

.official-img-square-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 10px solid var(--secondary-color); /* Themed border */
}

.leadership-message-box {
    background: #ffffff;
    padding: 40px 50px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    border-radius: 12px;
    z-index: 1;
    flex: 1;
    border-left: 6px solid var(--secondary-color); /* Moved to left for symmetry */
}

.secretary-section .official-card-leadership {
    flex-direction: row-reverse;
}

.secretary-section .leadership-message-box {
    margin-left: 0;
    margin-right: 0;
    padding: 40px 50px;
    border-left: none;
    border-right: 6px solid var(--secondary-color); /* Moved to right for symmetry */
}

.role-badge-box {
    display: inline-block;
    width: auto !important; /* Reverted to fit text content as requested */
    text-align: center;
    padding: 8px 25px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 153, 51, 0.3);
    border: none;
}

.leadership-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-bottom: 5px; /* Reduced margin to keep designation close */
}

.leadership-designation {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: right;
    margin-bottom: 25px;
    display: block;
    letter-spacing: 0.5px;
}

.leadership-bio {
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
    text-align: justify; /* Consistent professional alignment */
}

.vp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Back to 2 columns */
    gap: 30px;
    align-items: stretch;
    max-width: 100%; /* Spans full container width */
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .vp-grid {
        grid-template-columns: 1fr;
    }
}

.vp-modular-card {
    display: flex;
    align-items: stretch; /* Stretch to fill row height */
    gap: 20px;
    padding: 10px;
}

.vp-portrait {
    width: 150px; /* Increased size */
    height: 150px; /* Increased size */
    border-radius: 12px; /* Square with subtle curve */
    border: 4px solid var(--primary-color);
    flex-shrink: 0;
    overflow: hidden;
    background: #f0f2f5;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 2;
    margin-top: 0; /* Reset margin for larger square */
}

.vp-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vp-content-box {
    flex: 1;
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    position: relative;
    border-left: 6px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.vp-badge {
    display: inline-block;
    width: fit-content;
    padding: 6px 16px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-radius: 50px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(251, 140, 0, 0.25);
    border: none;
}

/* Response for small mobile */
@media (max-width: 600px) {
    .vp-modular-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .vp-content-box {
        border-left: none;
        border-top: 10px solid var(--primary-color);
        padding-top: 50px;
        width: 100%;
    }
    
    .vp-badge {
        position: absolute;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        top: -15px;
        font-size: 0.7rem !important; /* Smaller text */
        padding: 5px 15px !important; /* Tighter padding */
    }
    .vp-name {
        font-size: 1.25rem !important;
    }
    .vp-bio {
        font-size: 0.9rem !important;
        text-align: justify;
    }
}

.vp-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.vp-district {
    color: #e63946;
    font-weight: 700;
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 15px;
    display: block;
}

.vp-bio {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
    text-align: justify;
    margin: 0;
}

.vp-role {
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: block;
}

.vp-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

/* Redundant definition removed */

.filter-grid-new {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333; /* Darker border */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.form-control-custom {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #666; /* Darker field outlines */
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    border-color: var(--secondary-color);
    background: var(--white);
    outline: none;
    box-shadow: 0 0 10px rgba(251, 140, 0, 0.1);
}

.search-field {
    position: relative;
}

.search-icon-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 1rem;
    pointer-events: none;
}

.status-indicator {
    margin-top: 15px;
    padding: 0 10px;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

@media (max-width: 991px) {
    .filter-grid-new {
        grid-template-columns: repeat(2, 1fr);
    }
    .official-card-leadership {
        flex-direction: column !important;
        align-items: center;
        text-align: center; /* Center text on mobile */
    }
    .official-img-square-box {
        width: 100%;
        height: 400px;
    }
    .leadership-message-box {
        margin: -40px 10px 0 10px !important; /* Wider box */
        padding: 45px 20px 30px !important; /* Balanced padding */
        width: calc(100% - 20px); /* Fill most of screen */
        text-align: center;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    }
    .leadership-name {
        font-size: 1.55rem !important; /* Reduced for better fit */
        margin-bottom: 8px;
    }
    .leadership-designation {
        text-align: center !important;
        font-size: 0.9rem !important;
        margin-bottom: 20px;
    }
    .leadership-bio {
        text-align: justify !important; /* Proper justification */
        font-size: 0.95rem !important;
        line-height: 1.7;
    }
    .role-badge-box {
        margin-left: auto;
        margin-right: auto;
        font-size: 0.75rem !important; /* Slimmer text */
        padding: 6px 20px !important; /* Tighter padding */
    }
    .vp-card {
        flex-direction: column;
    }
    .vp-img-box {
        width: 100%;
        height: 300px;
    }
}

@media (max-width: 576px) {
    .filter-grid-new {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   NEW PREMIUM MEMBERSHIP CARD SYSTEM (IABAMRR CLONE)
   ========================================================================== */
.membership-grid-refined {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Fixed 4 columns for desktop */
    gap: 20px; /* Tighter gap for slim cards */
    margin-top: 50px;
}

@media (max-width: 1200px) {
    .membership-grid-refined {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for smaller laptops */
    }
}

@media (max-width: 992px) {
    .membership-grid-refined {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    }
}

.m-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.m-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 74, 143, 0.12);
}

.m-card-header {
    background: linear-gradient(135deg, #004a8f 0%, #0a6fb8 100%);
    padding: 25px 20px 35px 20px; /* Reduced vertical padding */
    text-align: center; /* Center text */
    position: relative;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center flex items */
}

.m-card-icon {
    font-size: 1.8rem; /* Reduced icon size */
    margin-bottom: 8px; /* Reduced margin */
    opacity: 0.9;
}

.m-card-title {
    font-size: 1.3rem; /* Reduced title size */
    font-weight: 700;
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

.m-card-price {
    font-size: 1rem; /* Reduced price size */
    font-weight: 600;
    margin-top: 5px; /* Reduced margin */
    color: rgba(255, 255, 255, 0.9);
}

.m-card-badge {
    position: absolute;
    bottom: -18px; /* Slightly adjusted */
    left: 50%;
    transform: translateX(-50%); /* Perfectly center the badge */
    background: #ffc107;
    color: #1a1a1a;
    padding: 8px 22px; /* Slightly tighter padding */
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem; /* Slightly smaller font */
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 5;
    white-space: nowrap;
}

.m-card-badge:hover {
    background: #e5ac00;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
    color: #000;
}

.m-card-body {
    padding: 35px 25px 35px; /* Reduced top padding */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.m-card-text {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: justify;
}

.m-card-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.m-card-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #444;
}

.m-card-features li i {
    color: #28a745;
    font-size: 1.1rem;
}

@media (max-width: 576px) {
    .membership-grid-refined {
        grid-template-columns: 1fr; /* 1 column for mobile */
    }
}

/* ==========================================================================
   RESPONSIVE FIXES: GALLERY FILTER, LIGHTBOX ICON, AND NAVBAR ON SCROLL
   ========================================================================== */
@media (max-width: 768px) {
    /* Contact Page Responsive Fixes */
    .spiritual-form {
        padding: 30px 20px;
    }
    .benefit-box {
        padding: 30px 20px;
    }
    .form-container {
        gap: 20px;
    }
    
    /* 1. Gallery Filter Area Responsive Adjustments */
    .gallery-filter-bar {
        margin-bottom: 20px;
    }
    .gallery-tabs {
        padding: 15px;
        gap: 15px;
        flex-direction: column;
        border-radius: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    .filter-category-group, .filter-year-group {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .tab-btn, .year-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .filter-divider-vertical {
        width: 100%;
        height: 1px;
    }
    
    /* 2. Gallery Lightbox Close Icon Visibility */
    .lb-top-bar {
        padding: 15px 20px 5px !important;
        position: relative;
    }
    .lb-icon-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 1.8rem !important;
        opacity: 1 !important;
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border-radius: 50%;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(0,0,0,0.6);
        z-index: 9999;
        backdrop-filter: blur(5px);
    }
}

/* 3. Mobile Navbar Menu After Scroll Display Issue */
header#main-header.scrolled.nav-open {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--bg-color) !important;
}

/* Hide header and top-bar when lightbox is open */
body.lightbox-open #main-header,
body.lightbox-open .top-bar {
    display: none !important;
}

/* ==========================================================================
   INTERACTIVE EVENTS CALENDAR
   ========================================================================== */
.calendar-widget-section {
    max-width: 500px;
    margin: 0 auto 50px;
    background: transparent;
    font-family: var(--font-body);
}

.calendar-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-widget-header h3 {
    font-size: 1.8rem;
    color: #7b4c53; /* Deep maroon shade */
    font-weight: 700;
}

.cal-nav {
    display: flex;
    gap: 10px;
}

.cal-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    color: #7b4c53;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.cal-nav-btn:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.white-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 700;
    color: #b0aab0;
    margin-bottom: 15px;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px 5px;
    text-align: center;
}

.cal-days span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 45px;
    font-weight: 700;
    color: #333;
    position: relative;
    border-radius: 12px;
    z-index: 1;
}

.cal-days span.empty {
    visibility: hidden;
}

.cal-days span.selected-day {
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(255, 153, 51, 0.4);
    transform: scale(1.1);
    z-index: 2;
}

.cal-days span.event-day {
    background: #fff3e0;
}

.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-top: 2px;
}

.festival-dot { background: #f39c12; }
.vrata-dot { background: #9b59b6; }
.jayanthi-dot { background: #3498db; }

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px !important;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
}

.calendar-upcoming-title {
    margin: 30px 0 15px;
}

.calendar-upcoming-title h4 {
    color: #7b4c53;
    font-weight: 700;
    font-size: 1.4rem;
}

.cal-event-card {
    display: flex;
    align-items: center;
    padding: 20px !important;
    gap: 15px;
    transition: transform 0.3s ease;
}

.cal-event-card:hover {
    transform: translateY(-3px);
}

.cal-event-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.festival-bg { background: #fdede2; color: #f39c12; }
.jayanthi-bg { background: #eaf2f8; color: #3498db; }

.cal-event-details h5 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.cal-event-details p {
    margin: 0;
    font-size: 0.9rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.festival-tag { background: #fdede2; color: #f39c12; }
.jayanthi-tag { background: #eaf2f8; color: #3498db; }

@media screen and (max-width: 600px) {
    .cal-days span {
        height: 40px;
    }
}

/* ==========================================================================
   MODERN CONTACT PAGE REDESIGN
   ========================================================================== */
.contact-modern-section {
    background: #fdfaf6;
}

.contact-info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.contact-info-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.contact-info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.contact-info-card.highlighted-card {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05); /* Stand out specifically on desktop */
    box-shadow: 0 20px 40px rgba(255, 153, 51, 0.2);
}

.contact-info-card.highlighted-card h4, 
.contact-info-card.highlighted-card p,
.contact-info-card.highlighted-card .icon-box i {
    color: white !important;
}

.contact-info-card .icon-box {
    width: 70px;
    height: 70px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.contact-info-card:hover .icon-box {
    transform: scale(1.1);
    background: rgba(212, 175, 55, 0.2);
}

.contact-info-card.highlighted-card .icon-box {
    background: rgba(255, 255, 255, 0.2);
}

.contact-info-card .icon-box i {
    font-size: 28px;
    color: var(--primary-color);
}

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

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

.contact-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.modern-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modern-form .form-group {
    margin-bottom: 25px;
    text-align: left;
}

.modern-form label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.modern-form .required {
    color: #e74c3c;
}

.modern-form input,
.modern-form textarea {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fcfcfc;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modern-form input:focus,
.modern-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 153, 51, 0.1);
}

.shadow-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    height: 100%;
    min-height: 500px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}

/* Responsiveness overrides */
@media (max-width: 992px) {
    .contact-info-cards {
        grid-template-columns: 1fr;
    }
    .contact-info-card.highlighted-card {
        transform: scale(1); /* Prevent layout break on mobile stack */
    }
    .contact-main-grid {
        grid-template-columns: 1fr;
    }
    .shadow-container {
        min-height: 400px;
    }
}

@media (max-width: 600px) {
    .modern-form .form-row {
        grid-template-columns: 1fr;
    }
}
