/* ============================================
   KASTURI ACADEMY - JOYFUL DESIGN SYSTEM
   ============================================ */

/* Kasturi Brand Font */
@font-face {
    font-family: 'Revue';
    src: url('../../assets/fonts/reve_fixed.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.font-revue {
    font-family: 'Revue', serif !important;
    font-weight: normal !important;
    color: #2596be !important;
}

:root {
    /* Primary Color Palette (Academy Blue) */
    --clr-primary: #2596be;    /* Academy Blue */
    --clr-secondary: #2596be;  /* Kasturi Green */
    --clr-accent-1: #2596be;   /* Active Blue */
    --clr-accent-2: #22a366;   /* Success Green */
    --clr-accent-3: #2E3192;   /* Deep College Blue */
    
    /* Neutral Palette */
    --clr-bg: #F0F9FF;         /* Soft Blue Tint */
    --clr-dark: #2D3436;
    --clr-white: #FFFFFF;
    --clr-gray: #7F8C8D;
    
    /* Typography */
    --font-main: 'Quicksand', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    /* Spacing & Borders */
    --radius-pill: 100px;
    --radius-bubble: 30px;
    --radius-card: 24px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-bubbly: 0 15px 40px rgba(37, 150, 190, 0.15);
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Dark Mode Overrides (Manual toggle via data-theme attribute) */
html[data-theme="dark"] {
    --clr-bg: #1A1A2E;
    --clr-dark: #F5F5F7;
    --clr-white: #16213E;
    --clr-gray: #A29BFE;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Dark Mode Overrides (Auto-detect system preference, only when no manual theme is set) */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        --clr-bg: #1A1A2E;
        --clr-dark: #F5F5F7;
        --clr-white: #16213E;
        --clr-gray: #A29BFE;
        --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
}

/* Scrolled nav dark mode fix */
html[data-theme="dark"] .main-nav.scrolled {
    background: rgba(22, 33, 62, 0.9);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--clr-bg);
    color: var(--clr-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-card);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: var(--transition);
}

/* ============================================
   LAYOUT COMPONENTS
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 80px 0;
}

.centered {
    text-align: center;
}

/* Bubbly Button */
.btn-bubbly {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--clr-primary);
    color: #333;
    font-weight: 700;
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 25px rgba(37, 150, 190, 0.3);
}

.btn-bubbly:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 150, 190, 0.4);
}

/* ============================================
   NAVIGATION
   ============================================ */

/* Desktop Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: transparent;
}

.main-nav.scrolled {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Academy logo image */
.main-nav .logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.ka-logo-img {
    height: 50px;
    width: auto;
    display: block;
    mix-blend-mode: normal !important;
}
@media (max-width: 900px) {
    .ka-logo-img { height: 40px; }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.hero-logo {
    width: 100px;
    height: 100px;
    background: #fff;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.9);
    position: relative;
    z-index: 10;
    animation: floatingLogo 4s ease-in-out infinite;
}

@keyframes floatingLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    z-index: 1300;
    cursor: pointer;
    background: var(--clr-primary, #2596be);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(37, 150, 190, 0.3);
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 36px);
}

.nav-links li {
    list-style: none;
}

.nav-links a:not(.btn-join-us) {
    font-weight: 600;
    font-size: clamp(14px, 1.1vw, 15px);
    color: var(--clr-dark);
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-links a:not(.btn-join-us):hover {
    color: var(--clr-primary);
}

.nav-links a:not(.btn-join-us)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent-1));
    border-radius: 10px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    opacity: 0;
}

.nav-links a.active:not(.btn-join-us) {
    color: var(--clr-primary);
    font-weight: 700;
}

.nav-links a.active:not(.btn-join-us)::after,
.nav-links a:not(.btn-join-us):hover::after {
    width: 100%;
    opacity: 1;
}

/* Call to Action Button in Nav */
.nav-links .btn-join-us {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent-1));
    color: white;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(37, 150, 190, 0.3);
    transition: all 0.3s ease;
}

.nav-links .btn-join-us:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 150, 190, 0.4);
    color: white;
}

/* Mobile Bottom Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
    background: var(--clr-white);
    padding: 12px 24px;
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--clr-gray);
}

.mobile-nav-item i {
    font-size: 20px;
}

.mobile-nav-item.active {
    color: var(--clr-secondary);
}

@media (max-width: 900px) {
    .main-nav .desktop-nav { display: none; }
    .mobile-toggle { display: flex; }
    /* Match the specificity of the global .main-nav ~ .mobile-nav hide rule (0,0,2,0)
       so this later-cascade declaration wins and the pill nav shows on mobile. */
    .mobile-nav,
    .main-nav ~ .mobile-nav { display: flex; }
}

/* Wing switcher bar (shared style — mirrors css/styles.css) */
.wing-switcher {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.wing-switcher a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: normal;
    font-family: 'Revue', serif;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.wing-switcher a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.wing-switcher a.ws-active { color: #fff; background: rgba(255,255,255,0.15); }
.wing-switcher .ws-home {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    margin-right: 4px;
    padding-right: 12px;
    border-right: 1px solid rgba(255,255,255,0.15);
}
@media (max-width: 768px) {
    .wing-switcher { gap: 2px; padding: 5px 8px; }
    .wing-switcher a { padding: 4px 8px; font-size: 11px; }
    .wing-switcher .ws-home { display: none; }
}
body.has-wing-switcher .main-nav { top: 36px; }
@media (max-width: 900px) {
    /* 36px wing-switcher + ~58px compact logo header */
    body.has-wing-switcher main { padding-bottom: 80px; padding-top: 94px; }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-img-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.hero-img-grid img {
    height: 300px;
    object-fit: cover;
    animation: float 6s ease-in-out infinite;
}

.hero-img-grid img:nth-child(2) { animation-delay: 1s; }
.hero-img-grid img:nth-child(3) { animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ============================================
   GALLERY (Masonry)
   ============================================ */
.gallery-grid {
    column-count: 3;
    column-gap: 20px;
}

.gallery-item {
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--clr-white);
    box-shadow: var(--shadow-soft);
}

.gallery-item img {
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    color: white;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

@media (max-width: 992px) { .gallery-grid { column-count: 2; } }
@media (max-width: 600px) { .gallery-grid { column-count: 1; } }

/* ============================================
   SHARED FILTER SECTION (Gallery + Videos)
   ============================================ */
.filter-section {
    margin-bottom: 50px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(37, 150, 190, 0.05) 0%, rgba(37, 150, 190, 0.07) 100%);
    border-radius: var(--radius-card);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-weight: 700;
    color: var(--clr-dark);
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-family: var(--font-heading);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--clr-white);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    font-family: var(--font-main);
    color: var(--clr-gray);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-bubbly);
    border-color: var(--clr-primary);
    color: var(--clr-primary);
}

.btn-filter.active {
    background: var(--clr-primary);
    color: white;
    border-color: var(--clr-primary);
    box-shadow: 0 8px 20px rgba(37, 150, 190, 0.3);
}

/* Video search within filter-section */
.video-search-wrapper {
    position: relative;
}

.video-search {
    width: 100%;
    padding: 13px 20px 13px 46px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-size: 0.95rem;
    font-family: var(--font-main);
    font-weight: 500;
    background: var(--clr-white);
    color: var(--clr-dark);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.video-search:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 4px rgba(37, 150, 190, 0.12);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--clr-gray);
    font-size: 0.95rem;
    pointer-events: none;
}

/* Mobile: scrollable filter rows */
@media (max-width: 768px) {
    .filter-section {
        padding: 20px 16px;
    }

    .btn-filter {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 13px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .filter-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
        gap: 8px;
    }

    .filter-buttons::-webkit-scrollbar {
        height: 3px;
    }

    .filter-buttons::-webkit-scrollbar-thumb {
        background: var(--clr-primary);
        border-radius: 2px;
    }
}

/* ============================================
   VIDEO CARDS
   ============================================ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.video-card {
    background: var(--clr-white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-bubbly);
}

.video-thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #000;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.video-card:hover .thumb-img {
    transform: scale(1.05);
}

.video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
}

.video-card:hover .play-overlay {
    background: rgba(37, 150, 190, 0.5);
}

.play-overlay i {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--clr-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    padding-left: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover .play-overlay i {
    transform: scale(1.15);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.video-info {
    padding: 18px 20px 20px;
}

.video-title {
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--clr-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-desc {
    font-size: 0.875rem;
    color: var(--clr-gray);
    line-height: 1.55;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.video-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(37, 150, 190, 0.12);
    color: var(--clr-primary);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: capitalize;
}

.video-views {
    font-size: 0.85rem;
    color: var(--clr-gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-views i {
    font-size: 0.8rem;
}

/* No results empty state */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--clr-gray);
}

.no-results i {
    font-size: 4rem;
    color: rgba(37, 150, 190, 0.3);
    margin-bottom: 20px;
    display: block;
}

/* ============================================
   VIDEO MODAL (PREMIUM)
   ============================================ */
.video-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.video-modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 960px;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-modal.active .video-modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 101;
    line-height: 1;
    transition: transform 0.3s;
}

.close-modal:hover {
    transform: rotate(90deg);
}

#videoPlayerContainer {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

#videoPlayerContainer iframe,
#videoPlayerContainer video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-modal-info {
    padding: 30px;
    color: white;
}

.video-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-bottom: 15px;
}

.video-modal-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.video-modal-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ============================================
   SPECIAL FEATURES
   ============================================ */
.welcome-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--clr-primary);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.86, 0, 0.07, 1);
}

.welcome-banner.hidden {
    transform: translateY(-100%);
}

.welcome-banner h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
	40% {transform: translateY(-30px);}
	60% {transform: translateY(-15px);}
}

/* Light / Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--clr-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    z-index: 1001;
}

/* ============================================
   WATERMARK & MEDIA PROTECTIONS
   ============================================ */
.gallery-item {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.gallery-item::after {
    content: 'KASTURI ACADEMY';
    position: absolute;
    bottom: 10px;
    right: 15px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 800;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 5;
}

/* ============================================
   EVENTS PAGE
   ============================================ */

/* Page hero banner */
.events-hero-banner {
    background: linear-gradient(135deg, #2596be 0%, #2596be 50%, #2E3192 100%);
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
    color: #fff;
    text-align: center;
}

.events-hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.events-hero-banner h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    margin-bottom: 14px;
    position: relative;
}

.events-hero-banner p {
    font-size: 1.05rem;
    opacity: 0.88;
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.65;
    position: relative;
}

/* Stats bar inside banner */
.events-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
}

.event-stat-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    padding: 10px 22px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}

.event-stat-pill .stat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.event-stat-pill.upcoming .stat-dot  { background: #2596be; box-shadow: 0 0 6px #2596be; }
.event-stat-pill.ongoing  .stat-dot  { background: #2596be; box-shadow: 0 0 6px #2596be; animation: pulse-dot 1.5s ease-in-out infinite; }
.event-stat-pill.completed .stat-dot { background: rgba(255,255,255,0.5); }

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.7; }
}

/* Filter section sits below the banner */
.events-filter-wrap {
    background: var(--clr-white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    position: sticky;
    top: 106px; /* wing-switcher 36px + nav ~70px */
    z-index: 50;
    padding: 16px 0;
}

/* Events grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    padding: 50px 0 20px;
}

/* Event card */
.event-card {
    background: var(--clr-white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.event-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* Image area */
.event-image {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: #e8f4ff;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.06);
}

.event-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 3rem;
}

.event-image-placeholder span {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Colour themes per status */
.event-card[data-status="upcoming"]  .event-image-placeholder { background: linear-gradient(135deg, #2596be, #2596be); color: #fff; }
.event-card[data-status="ongoing"]   .event-image-placeholder { background: linear-gradient(135deg, #22a366, #2596be); color: #fff; }
.event-card[data-status="completed"] .event-image-placeholder { background: linear-gradient(135deg, #7F8C8D, #2D3436); color: #fff; }

/* Date badge on image */
.event-date-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #fff;
    border-radius: 14px;
    padding: 8px 14px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    min-width: 52px;
    line-height: 1;
}

.event-date-badge .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--clr-dark);
    line-height: 1;
}

.event-date-badge .month {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 3px;
}

.event-card[data-status="upcoming"]  .event-date-badge .month { color: var(--clr-primary); }
.event-card[data-status="ongoing"]   .event-date-badge .month { color: var(--clr-accent-2); }
.event-card[data-status="completed"] .event-date-badge .month { color: var(--clr-gray); }

/* Status ribbon badge */
.event-status-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.event-card[data-status="upcoming"]  .event-status-badge { background: rgba(255,217,61,0.9);  color: #7a5c00; }
.event-card[data-status="ongoing"]   .event-status-badge { background: rgba(107,203,119,0.9); color: #1a5c28; animation: badge-pulse 2s ease-in-out infinite; }
.event-card[data-status="completed"] .event-status-badge { background: rgba(127,140,141,0.9); color: #fff; }

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(107,203,119,0.5); }
    50%       { box-shadow: 0 0 0 6px rgba(107,203,119,0); }
}

/* Card body */
.event-body {
    padding: 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--clr-dark);
    margin-bottom: 12px;
    line-height: 1.35;
}

.event-meta-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.event-meta-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--clr-gray);
    font-weight: 600;
}

.event-meta-list li i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.event-card[data-status="upcoming"]  .event-meta-list li i { color: var(--clr-primary); }
.event-card[data-status="ongoing"]   .event-meta-list li i { color: var(--clr-accent-2); }
.event-card[data-status="completed"] .event-meta-list li i { color: var(--clr-gray); }

.event-description {
    font-size: 0.875rem;
    color: var(--clr-gray);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card footer */
.event-card-footer {
    padding: 14px 22px;
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.event-year-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--clr-gray);
    opacity: 0.7;
}

.event-card-footer .event-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}

.event-card[data-status="upcoming"]  .event-card-footer .event-icon { background: var(--clr-primary); }
.event-card[data-status="ongoing"]   .event-card-footer .event-icon { background: var(--clr-accent-2); }
.event-card[data-status="completed"] .event-card-footer .event-icon { background: var(--clr-gray); }

/* No events empty state */
.no-events-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.no-events-state i {
    font-size: 4rem;
    color: rgba(0,174,239,0.2);
    display: block;
    margin-bottom: 20px;
}

.no-events-state h3 { color: var(--clr-gray); margin-bottom: 10px; }
.no-events-state p  { color: var(--clr-gray); font-size: 0.95rem; }

/* Responsive */
@media (max-width: 768px) {
    .events-grid { grid-template-columns: 1fr; gap: 20px; padding: 30px 0; }
    .events-stats { gap: 10px; }
    .event-stat-pill { font-size: 0.85rem; padding: 8px 16px; }
}

/* ============================================
   PRINT-FRIENDLY LAYOUT
   ============================================ */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .main-nav, .mobile-nav, .theme-toggle, .btn-filter, .welcome-banner, footer, .hero-ctas, .lightbox-actions, .close-lightbox, .gallery-filters {
        display: none !important;
    }

    .lightbox {
        position: static !important;
        display: block !important;
        background: white !important;
        height: auto !important;
    }

    .lightbox img {
        max-width: 100% !important;
        max-height: none !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    .lightbox-nav {
        display: none !important;
    }

    .lightbox-caption {
        color: black !important;
        font-size: 18px !important;
        text-align: center !important;
    }

    /* Print Header Branding */
    body::before {
        content: "Kasturi Educational Group - Exclusive Content";
        display: block;
        text-align: center;
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 20px;
        color: #333;
    }
}

/* ============================================
   LIGHTBOX & VIDEO MODAL STYLES
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px;
}

.lightbox.active { display: flex; }

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightboxImg {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 20px;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 4px solid rgba(255,255,255,0.1);
}

.lightbox-caption {
    color: white;
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    font-family: var(--font-heading);
}

.lightbox-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.action-btn {
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn.like-btn { background: #ff4757; color: white; }
.action-btn.share-btn { background: #25D366; color: white; }

.close-lightbox {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 48px;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close-lightbox:hover { opacity: 1; }

.lightbox-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-nav button:hover { background: var(--clr-primary); border-color: var(--clr-primary); }
#prevBtn { left: 40px; }
#nextBtn { right: 40px; }

/* Video Modal */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 3100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    background: var(--clr-white);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0,0,0,0.5);
    z-index: 10;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal.active .video-modal-content {
    opacity: 1;
    transform: scale(1);
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.video-wrapper iframe, 
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-modal-info {
    padding: 30px;
}

#modalVideoTitle {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--clr-dark);
}

#modalVideoDesc {
    color: var(--clr-gray);
    font-size: 0.95rem;
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.5);
    color: white;
    border-radius: 50%;
    font-size: 32px;
    line-height: 44px;
    text-align: center;
    z-index: 20;
    border: none;
    cursor: pointer;
}

/* Dark Mode Extra Polish */
html[data-theme="dark"] body { background-color: #0F172A; color: #CBD5E1; }
html[data-theme="dark"] .main-nav:not(.scrolled) a { color: #fff; }
html[data-theme="dark"] .main-nav .logo {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.38);
}
html[data-theme="dark"] .section-padding { background-color: transparent; }
html[data-theme="dark"] .gallery-item, 
html[data-theme="dark"] .video-card { background: #1E293B; border: 1px solid rgba(255,255,255,0.05); }
html[data-theme="dark"] .video-modal-content { background: #1E293B; }
html[data-theme="dark"] .video-modal-info h3 { color: #fff; }
html[data-theme="dark"] .filter-section { background: rgba(255,255,255,0.03); }
html[data-theme="dark"] .filter-label { color: #fff; }
html[data-theme="dark"] .btn-filter { background: #1E293B; border-color: rgba(255,255,255,0.1); color: #94A3B8; }

@media (max-width: 768px) {
    .lightbox { padding: 20px; }
    .lightbox-nav button { width: 44px; height: 44px; font-size: 18px; }
    #prevBtn { left: 10px; }
    #nextBtn { right: 10px; }
    .close-lightbox { top: 20px; right: 20px; font-size: 32px; }
    .video-modal-info { padding: 20px; }
    #modalVideoTitle { font-size: 1.2rem; }
}

