/* ===========================
   Education - Styles
   Version: 2.0
   Standards: CSS3, WCAG 2.1 Level AA Compliant
   =========================== */

/* ===========================
   CSS RESET & BASE STYLES
   =========================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fixed: Added CSS Custom Properties for better maintainability */
:root {
    /* Light Theme Colors */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gold-accent: #d4af37;
    --gold-light: #f4e397;
    --gold-dark: #c4941f;

    /* Neutral Colors */
    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;

    /* Dark Theme Colors */
    --dark-bg: #0a0b1e;
    --dark-surface: #161830;
    --dark-surface-light: #1e2142;
    --dark-text: #e2e8f0;
    --dark-text-secondary: #94a3b8;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;

    /* Spacing */
    --section-padding: 8rem;
    --container-max-width: 1440px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Border Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;

    /* Animations */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 35px 60px -12px rgba(0, 0, 0, 0.3);

    /* Z-index Scale */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* Dark Theme Variables - Enhanced: More comprehensive dark theme support */
[data-theme="dark"] {
    --neutral-50: var(--dark-bg);
    --neutral-100: var(--dark-surface);
    --neutral-200: var(--dark-surface-light);
    --neutral-800: var(--dark-text);
    --neutral-900: var(--dark-text);
    --neutral-600: var(--dark-text-secondary);
    --glass-bg: rgba(0, 0, 0, 0.3);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Base HTML & Body */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.8;
    color: var(--neutral-800);
    background-color: var(--neutral-50);
    overflow-x: hidden;
    transition: var(--transition-smooth);
    min-height: 100vh;
    padding-top: 10px;
}

[data-theme="dark"] body {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

/* ===========================
   ACCESSIBILITY ENHANCEMENTS
   =========================== */

/* Fixed: Added screen reader only utility class */
.sr-only,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Fixed: Added skip-to-content link for keyboard users */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--gold-accent);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    border-radius: 0 0 4px 0;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
    outline: 2px solid var(--neutral-900);
    outline-offset: 2px;
}

/* Enhanced: Better focus styles for accessibility */
*:focus-visible {
    outline: 3px solid var(--gold-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--gold-accent);
    outline-offset: 2px;
}

/* Enhanced: Focus styles for keyboard navigation */
.keyboard-navigation *:focus {
    outline: 3px solid var(--gold-accent) !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

/* ===========================
   CUSTOM CURSOR
   =========================== */
.custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    opacity: 0.8;
    mix-blend-mode: difference;
    will-change: transform;
}

.custom-cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--gold-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.05s ease;
    will-change: transform;
}

/* ===========================
   LOADING SCREEN
   =========================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-animation {
    text-align: center;
    color: white;
}

.loading-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 1rem;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.loading-animation p {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===========================
   NAVIGATION
   =========================== */
nav {
    /* position: fixed; FIXED: Uncommented to match z-index usage */
    /* top: 0; */
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    /* backdrop-filter: blur(20px); */
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: var(--z-sticky);
    transition: var(--transition-smooth);
    padding: 0 2rem;
}

[data-theme="dark"] nav {
    background: rgba(10, 11, 30, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo-container {
    flex-shrink: 0;
}

.logo {
    height: 50px;
    width: auto;
    transition: var(--transition-smooth);
    display: block;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--neutral-700);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-smooth);
    display: inline-block;
}

[data-theme="dark"] .nav-link {
    color: var(--dark-text-secondary);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--gold-accent);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-accent);
    transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--neutral-600);
}

[data-theme="dark"] .theme-toggle {
    color: var(--dark-text-secondary); /* FIXED: Added for consistency */
}

.theme-toggle:hover,
.theme-toggle:focus {
    background: var(--gold-accent);
    color: white;
    transform: scale(1.1);
}

.menu-button {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition-smooth);
}

.menu-button span {
    width: 25px;
    height: 3px;
    background: var(--neutral-700);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

[data-theme="dark"] .menu-button span {
    background: var(--dark-text-secondary); /* FIXED: Changed from --dark-text for consistency */
}

.menu-button:hover span,
.menu-button:focus span {
    background: var(--gold-accent);
}

/* ===========================
   SIDEBAR (Mobile Navigation)
   =========================== */
.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 320px;
    max-width: 85vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-modal);
    transition: var(--transition-smooth);
    padding: 2rem 0;
    overflow-y: auto;
}

[data-theme="dark"] .sidebar {
    background: rgba(10, 11, 30, 0.95);
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 0 2rem 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-close {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--neutral-600);
    margin-left: auto;
}

[data-theme="dark"] .sidebar-close {
    color: var(--dark-text-secondary); /* FIXED: Added for consistency */
}

.sidebar-close:hover,
.sidebar-close:focus {
    background: var(--gold-accent);
    color: white;
    transform: rotate(90deg);
}

.sidebar-links {
    list-style: none;
    padding: 2rem 0;
}

.sidebar-link {
    display: block;
    padding: 1rem 2rem;
    text-decoration: none;
    color: var(--neutral-700);
    font-weight: 500;
    transition: var(--transition-smooth);
    border-left: 3px solid transparent;
}

[data-theme="dark"] .sidebar-link {
    color: var(--dark-text-secondary); /* FIXED: Changed from --dark-text for consistency */
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: var(--glass-bg);
    border-left-color: var(--gold-accent);
    color: var(--gold-accent);
}

/* ===========================
   RESPONSIVE (Mobile)
   =========================== */
/* ADDED: Media query to show menu button on mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-button {
        display: flex;
    }
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    z-index: -1;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cpattern id='grain' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='20' cy='20' r='1.5' fill='white' opacity='0.1'/%3E%3Ccircle cx='80' cy='40' r='1' fill='white' opacity='0.1'/%3E%3Ccircle cx='40' cy='60' r='1.5' fill='white' opacity='0.1'/%3E%3Ccircle cx='90' cy='90' r='1' fill='white' opacity='0.1'/%3E%3Ccircle cx='10' cy='80' r='1.5' fill='white' opacity='0.1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23grain)'/%3E%3C/svg%3E");
    opacity: 0.3;
    animation: particleFloat 20s ease-in-out infinite;
    will-change: transform;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23f9fafb'/%3E%3C/svg%3E") bottom/cover no-repeat;
}

[data-theme="dark"] .hero-waves {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%230a0b1e'/%3E%3C/svg%3E") bottom/cover no-repeat;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 1000px;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.word-1 {
    background: linear-gradient(45deg, var(--gold-accent), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.word-2 {
    color: white;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 400;
    margin-bottom: 3rem;
    opacity: 0.95;
    letter-spacing: 0.5px;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero-para {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    opacity: 0.9;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-xl);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.cta-button.primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cta-button.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.cta-button.primary:hover::before,
.cta-button.primary:focus::before {
    left: 100%;
}

.cta-button.secondary {
    background: rgba(212, 175, 55, 0.2);
    color: white;
    border: 2px solid rgba(212, 175, 55, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.scroll-arrow:hover,
.scroll-arrow:focus {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

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

/* ===========================
   REVEAL ANIMATIONS
   =========================== */
.reveal-animation {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-animation.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   SECTION STYLES
   =========================== */
.section-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

[data-theme="dark"] .section-title {
    color: var(--dark-text);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gold-accent);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--neutral-600);
    max-width: 600px;
    margin: 0 auto;
}

[data-theme="dark"] .section-subtitle {
    color: var(--dark-text-secondary);
}

/* ===========================
   GLASS MORPHISM EFFECT
   =========================== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

/* ===========================
   COURSE CATEGORIES
   =========================== */
.course-category {
    padding: var(--section-padding) 0;
    background: var(--neutral-100);
}

[data-theme="dark"] .course-category {
    background: var(--dark-surface);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
    gap: 2rem;
}

.category-card {
    padding: 3rem 2rem;
    border-radius: var(--border-radius-xl);
    text-align: center;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-smooth);
}

.category-card:hover::before,
.category-card:focus-within::before {
    transform: scaleX(1);
}

.category-card:hover,
.category-card:focus-within {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.category-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 50%;
    color: white;
    transition: var(--transition-bounce);
}

.category-card:hover .category-icon,
.category-card:focus-within .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-svg {
    width: 50px;
    height: 50px;
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 1rem;
}

[data-theme="dark"] .category-card h3 {
    color: var(--dark-text);
}

.category-card p {
    color: var(--neutral-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

[data-theme="dark"] .category-card p {
    color: var(--dark-text-secondary);
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gold-accent);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius-xl);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-bounce);
}

.category-link:hover,
.category-link:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    background: var(--gold-dark);
}

/* ===========================
   LEARNING BITES
   =========================== */
.learning-bites {
    padding: var(--section-padding) 0;
    background: var(--neutral-50);
}

[data-theme="dark"] .learning-bites {
    background: var(--dark-bg);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
    gap: 2rem;
}

.video-card {
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    transition: var(--transition-bounce);
    position: relative;
}

.video-card:hover,
.video-card:focus-within {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--neutral-200);
}

[data-theme="dark"] .video-wrapper {
    background: var(--dark-surface-light);
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.video-wrapper:hover .video-overlay,
.video-wrapper:focus-within .video-overlay {
    opacity: 1;
}

.video-overlay i {
    font-size: 3rem;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.video-info {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .video-info {
    background: rgba(22, 24, 48, 0.9);
}

.video-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .video-info h3 {
    color: var(--dark-text);
}

.video-info p {
    color: var(--neutral-600);
    margin-bottom: 1rem;
}

[data-theme="dark"] .video-info p {
    color: var(--dark-text-secondary);
}

.video-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--neutral-500);
    flex-wrap: wrap;
}

[data-theme="dark"] .video-meta {
    color: var(--dark-text-secondary);
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ===========================
   TEACHERS SECTION
   =========================== */
.teachers {
    padding: var(--section-padding) 0;
    background: var(--neutral-100);
}

[data-theme="dark"] .teachers {
    background: var(--dark-surface);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
}

.teacher-card {
    padding: 2.5rem 2rem 2rem;
    border-radius: var(--border-radius-xl);
    text-align: center;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.teacher-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-smooth);
}

.teacher-card:hover::before,
.teacher-card:focus-within::before {
    transform: scaleX(1);
}

.teacher-card:hover,
.teacher-card:focus-within {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.teacher-image {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border-radius: 50%;
    border: 4px solid var(--neutral-200);
}

[data-theme="dark"] .teacher-image {
    border-color: var(--dark-surface-light);
}

.teacher-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.teacher-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.teacher-image:hover .teacher-overlay,
.teacher-image:focus-within .teacher-overlay {
    opacity: 1;
}

.teacher-image:hover img,
.teacher-image:focus-within img {
    transform: scale(1.1);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 35px;
    height: 35px;
    background: var(--gold-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-bounce);
    font-size: 0.9rem;
}

.social-links a:hover,
.social-links a:focus {
    transform: scale(1.2);
    background: var(--gold-dark);
}

.teacher-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .teacher-info h3 {
    color: var(--dark-text);
}

.teacher-subject {
    color: var(--gold-accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.teacher-quote {
    color: var(--neutral-600);
    font-style: italic;
    font-size: 0.95rem;
}

[data-theme="dark"] .teacher-quote {
    color: var(--dark-text-secondary);
}

/* ===========================
   FOUNDER SECTION
   =========================== */
.founder {
    padding: var(--section-padding) 0;
    background: var(--neutral-50);
}

[data-theme="dark"] .founder {
    background: var(--dark-bg);
}

.founder-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem;
    border-radius: var(--border-radius-xl);
    position: relative;
    overflow: hidden;
}

.founder-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gold-accent);
}

.founder-image {
    position: relative;
    justify-self: center;
}

.founder-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .founder-image img {
    border-color: var(--dark-surface-light);
}

.founder-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: var(--gold-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 3px solid white;
}

[data-theme="dark"] .founder-badge {
    border-color: var(--dark-surface-light);
}

.founder-info h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 1rem;
}

[data-theme="dark"] .founder-info h3 {
    color: var(--dark-text);
}

.founder-titles {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.title-tag {
    background: var(--gold-accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: var(--border-radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.founder-description p {
    margin-bottom: 1rem;
    color: var(--neutral-700);
    line-height: 1.8;
}

[data-theme="dark"] .founder-description p {
    color: var(--dark-text-secondary);
}

.founder-mission {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--neutral-600);
}

[data-theme="dark"] .founder-mission {
    color: var(--dark-text-secondary);
}

.social-media {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-bounce);
    border: 2px solid;
}

.social-link.youtube {
    color: #ff0000;
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
}

.social-link.facebook {
    color: #1877f2;
    border-color: #1877f2;
    background: rgba(24, 119, 242, 0.1);
}

.social-link.community {
    color: var(--gold-accent);
    border-color: var(--gold-accent);
    background: rgba(212, 175, 55, 0.1);
}

.social-link:hover,
.social-link:focus {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.social-link.youtube:hover,
.social-link.youtube:focus {
    background: #ff0000;
    color: white;
}

.social-link.facebook:hover,
.social-link.facebook:focus {
    background: #1877f2;
    color: white;
}

.social-link.community:hover,
.social-link.community:focus {
    background: var(--gold-accent);
    color: white;
}

/* ===========================
   FOOTER
   =========================== */
footer {
    background: var(--neutral-900);
    color: var(--neutral-300);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

[data-theme="dark"] footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--dark-surface-light);
}

.footer-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    line-height: 1.8;
    color: var(--neutral-400);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

[data-theme="dark"] .footer-section h4 {
    color: var(--dark-text);
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--neutral-400);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-section ul li a:hover,
.footer-section ul li a:focus {
    color: var(--gold-accent);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--neutral-800);
    color: var(--neutral-400);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-bounce);
}

[data-theme="dark"] .footer-social a {
    background: var(--dark-surface-light);
}

.footer-social a:hover,
.footer-social a:focus {
    background: var(--gold-accent);
    color: white;
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--neutral-800);
    color: var(--neutral-500);
}

[data-theme="dark"] .footer-bottom {
    border-top-color: var(--dark-surface-light);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 6rem;
    }

    .founder-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 3rem 2rem;
    }

    .founder-titles {
        justify-content: center;
    }

    .social-media {
        justify-content: center;
    }

    .hero-cta {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem;
    }

    .hideOnMobile {
        display: none;
    }

    .menu-button {
        display: flex;
    }

    nav {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0.8rem 0;
    }

    .logo {
        height: 40px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .teachers-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    }

    .founder-content {
        padding: 2rem;
    }

    .founder-image img {
        width: 200px;
        height: 200px;
    }

    .founder-info h3 {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-social {
        justify-content: center;
    }

    .custom-cursor,
    .custom-cursor-dot {
        display: none;
    }
}

@media (max-width: 480px) {
    .section-container {
        padding: 0 1rem;
    }

    .category-card,
    .teacher-card {
        padding: 2rem 1.5rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero {
        padding: 1rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }

    .founder-content {
        padding: 1.5rem;
    }
}

/* ===========================
   PERFORMANCE OPTIMIZATIONS
   =========================== */

/* Fixed: Enhanced accessibility - Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-particles {
        animation: none;
    }

    .loading-dots span {
        animation: none;
    }
}

/* Smooth scrolling for better UX */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Fixed: High contrast support for accessibility */
@media (prefers-contrast: high) {
    :root {
        --glass-bg: rgba(255, 255, 255, 0.95);
        --glass-border: rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] {
        --glass-bg: rgba(0, 0, 0, 0.95);
        --glass-border: rgba(255, 255, 255, 0.3);
    }

    button,
    a,
    .cta-button {
        border-width: 2px;
    }
}

/* Fixed: Print styles for better printability */
@media print {
    *,
    *::before,
    *::after {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    nav,
    .sidebar,
    .custom-cursor,
    .custom-cursor-dot,
    .loading-screen,
    .scroll-indicator,
    .theme-toggle,
    .menu-button,
    .hero-background,
    .video-overlay,
    footer .footer-social {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    .section-container {
        max-width: 100%;
    }

    .hero-content {
        color: black !important;
    }
}

/* Fixed: Dark mode color scheme support */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
    }
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        color-scheme: light;
    }
}

/* ===========================
   UTILITY CLASSES
   =========================== */

/* Enhanced: Utility classes for better maintainability */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Performance: GPU acceleration for animated elements */
.hero-particles,
.custom-cursor,
.custom-cursor-dot,
.reveal-animation {
    will-change: transform;
}

/* Prevent layout shifts */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* Enhanced: Better selection colors */
::selection {
    background: var(--gold-accent);
    color: white;
}

::-moz-selection {
    background: var(--gold-accent);
    color: white;
}
