/* CSS Variables - Standard Light Theme */
:root {
    /* Colors */
    --primary: #5850ec;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #ec4899;
    --secondary-hover: #db2777;
    
    --bg-color: #ffffff;
    --bg-alt: #f8fafc;
    --bg-surface: #ffffff;
    
    --text-main: #111827;
    --text-dim: #374151;
    --text-muted: #6b7280;
    --text-on-primary: #ffffff;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(17, 24, 39, 0.08);
    --glass-shadow: 0 10px 40px -10px rgba(17, 24, 39, 0.1);

    /* Shadow System */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --card-shadow: var(--shadow-md);

    /* Radius Tokens */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Spacing Tokens */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Gradients */
    --chat-gradient: linear-gradient(135deg, #5850ec, #a855f7);
    --accent-gradient: linear-gradient(135deg, #5850ec, #ec4899);
    --surface-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #f8fafc 100%);
    
    /* Animations */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

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

/* Background Animation - Softer for Light Mode */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: #fdfdfd;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: float 15s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #e0e7ff;
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 45vw;
    height: 45vw;
    background: #fae8ff;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 35vw;
    height: 35vw;
    background: #e0f2fe;
    animation-delay: -2s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 8%) scale(1.05); }
}

/* Premium Preloader (Buffer) */
#preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-content {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.glow-orbit {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-orbit::before,
.glow-orbit::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.glow-orbit::after {
    inset: 10px;
    border-top-color: var(--secondary);
    border-right-color: var(--primary);
    animation-direction: reverse;
    animation-duration: 1s;
}

.loader-text {
    font-size: 1.75rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    animation: pulse 2s ease-in-out infinite;
}

.loader-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-6) 5%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-base);
}

nav.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4) 5%;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-dim);
    transition: var(--transition-fast);
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

.profile-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--glass-border);
    transition: var(--transition-base);
    color: var(--text-dim);
}

.profile-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: var(--space-2);
}

.hamburger svg {
    width: 28px;
    height: 28px;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) 5% var(--space-8);
    position: relative;
    background: var(--surface-gradient);
}

.hero-content {
    max-width: 900px;
    text-align: center;
    z-index: 1;
}

h1 {
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.05;
    margin-bottom: var(--space-6);
    letter-spacing: -0.04em;
}

h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-top: var(--space-2);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-dim);
    margin-bottom: var(--space-12);
    max-width: 720px;
    margin-inline: auto;
    line-height: 1.6;
}

.btn {
    background: var(--primary);
    color: var(--text-on-primary);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition-base);
    box-shadow: 0 10px 25px -5px rgba(88, 80, 236, 0.4);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(88, 80, 236, 0.5);
}

.content-section {
    padding: var(--space-16) 5%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-8);
    width: 100%;
}

.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-12);
    align-items: center;
    margin-bottom: var(--space-16);
    width: 100%;
}

.two-column.reverse .image-placeholder {
    order: -1;
}

@media (min-width: 1024px) {
    .two-column {
        grid-template-columns: 1fr 1fr;
    }
}

.text-content h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-4);
    color: var(--text-main);
    line-height: 1.2;
}

.text-content p {
    margin-bottom: var(--space-4);
    color: var(--text-dim);
}

.text-content ul {
    list-style: none;
    margin: var(--space-6) 0;
}

.text-content li {
    margin-bottom: var(--space-3);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    color: var(--text-dim);
}

.text-content li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 900;
}

.image-content {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition-base);
    line-height: 0;
}

.image-content:hover {
    transform: scale(1.02);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
}

.responsive-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.feature-card {
    background: var(--bg-surface);
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    transition: var(--transition-base);
    box-shadow: var(--card-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.25rem;
    margin-bottom: var(--space-6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--text-main);
}

.feature-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
}

.leaderboard-cta {
    background: var(--bg-alt);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    margin: var(--space-12) auto;
    width: 90%;
    max-width: 1100px;
    border: 1px solid var(--glass-border);
    transition: var(--transition-base);
}

.leaderboard-cta:hover {
    background: var(--bg-surface);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
    transform: translateY(-4px);
}

.cta-content {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.cta-icon {
    font-size: 3.5rem;
}

.cta-text h3 {
    font-size: clamp(1.25rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: var(--space-1);
    color: var(--text-main);
}

.cta-text p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

footer {
    padding: var(--space-16) 5% var(--space-8);
    background: var(--bg-alt);
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-12);
    max-width: 1200px;
    margin: 0 auto var(--space-12);
}

.footer-col h4 {
    font-weight: 800;
    margin-bottom: var(--space-6);
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

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

.footer-col li {
    margin-bottom: var(--space-3);
}

.footer-col a {
    color: var(--text-dim);
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.social-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-dim);
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.social-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px) rotate(8deg);
    box-shadow: var(--shadow-lg);
}

.footer-text {
    text-align: center;
    margin-top: var(--space-12);
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    padding-top: var(--space-6);
}

/* Responsive Improvements */
@media (max-width: 768px) {
    nav {
        padding: var(--space-4) 5%;
    }

    h1 {
        font-size: clamp(2.25rem, 12vw, 3.5rem);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-surface);
        flex-direction: column;
        justify-content: center;
        padding: var(--space-16) var(--space-8);
        gap: var(--space-6);
        transition: right var(--transition-slow);
        box-shadow: -10px 0 50px rgba(17, 24, 39, 0.15);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.25rem;
        font-weight: 700;
        width: 100%;
        text-align: left;
        padding: var(--space-3) 0;
        border-bottom: 1px solid var(--glass-border);
        color: var(--text-main);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a.profile-icon {
        width: 50px;
        height: 50px;
        border-radius: var(--radius-md);
        margin-top: var(--space-4);
        border: 2px solid var(--primary-light);
    }

    .hamburger {
        display: block;
        z-index: 1001;
        background: var(--bg-alt);
        padding: 0.6rem;
        border-radius: 12px;
        border: 1px solid var(--glass-border);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        outline: none;
    }

    .hamburger:focus {
        outline: none;
    }

    .hamburger.active {
        background: var(--primary);
        color: white;
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 20px rgba(88, 80, 236, 0.4);
        transform: scale(1.05);
    }

    .hamburger.active line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
        transform-origin: 12px 12px;
        stroke-width: 2.5;
    }

    .hamburger.active line:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .hamburger.active line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
        transform-origin: 12px 12px;
        stroke-width: 2.5;
    }

    .hamburger line {
        transition: var(--transition-base);
    }
    .leaderboard-cta {
        flex-direction: column;
        text-align: center;
        gap: var(--space-8);
        width: 95%;
    }

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

    .featured-course-card {
        grid-template-columns: 1fr;
        padding: var(--space-8) var(--space-6);
        text-align: center;
    }

    .featured-course-card h3 {
        font-size: 2.25rem;
    }

    .practice-topics {
        grid-template-columns: 1fr;
    }
}

/* Floating Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.chat-button {
    width: 60px;
    height: 60px;
    background: var(--chat-gradient);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
    position: relative;
}

.chat-button:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.6);
}

.chat-button svg {
    width: 28px;
    height: 28px;
}

.chat-tooltip {
    position: absolute;
    right: 75px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 8px 15px;
    border-radius: 12px;
    color: var(--text-main);
    box-shadow: 0 4px 20px rgba(17, 24, 39, 0.1);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: var(--glass-shadow);
}

.chat-button:hover .chat-tooltip {
    opacity: 1;
    transform: translateX(0);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: #ef4444;
    border: 3px solid var(--bg-color);
    border-radius: 50%;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@media (max-width: 768px) {
    .chat-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .chat-button {
        width: 55px;
        height: 55px;
    }
    
    .chat-tooltip {
        display: none;
    }
}
/* Featured Course Section */
.featured-course-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 4rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.featured-course-card::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    z-index: -1;
    filter: blur(50px);
}

.course-badge {
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.featured-course-card h3 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-weight: 900;
}

.practice-topics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.topic-item {
    background: #f1f5f9;
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-dim);
    transition: all 0.3s ease;
}

.topic-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(5px);
}

.course-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat-box {
    text-align: left;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .featured-course-card {
        grid-template-columns: 1fr;
        padding: 2.5rem;
        gap: 3rem;
    }
    .featured-course-card h3 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .practice-topics {
        grid-template-columns: 1fr;
    }
    .course-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.faq-item:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s;
}

.faq-question::after {
    content: '\00d7'; /* Standardized Multiplication Sign for X */
    font-size: 1.8rem;
    color: var(--primary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 300;
}

details[open] summary::after {
    transform: rotate(180deg);
    color: var(--secondary);
}

.faq-item.active .faq-question::after {
    transform: rotate(180deg);
    color: var(--secondary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0, 1, 0, 1);
    background: #fcfcfd;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    transition: all 0.3s cubic-bezier(1, 0, 1, 0);
    padding: 0 2rem 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.faq-answer p {
    color: var(--text-dim);
    line-height: 1.8;
    padding-top: 1.5rem;
}

@media (max-width: 768px) {
    .faq-question {
        font-size: 1rem;
        padding: 1.2rem 1.5rem;
    }
    .faq-answer {
        padding: 0 1.5rem 1.2rem;
    }
}

/* Standardized Close Button */
.close-btn-std {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
    transition: all 0.2s;
    opacity: 0.7;
}

.close-btn-std:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE AUDIT FIXES — Phase 1
   Fixes: overflow, spacing, grid stacking, text clipping, touch targets
   ═══════════════════════════════════════════════════════════════════ */

/* Prevent ALL horizontal overflow site-wide */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Ensure images never overflow their containers */
img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* Minimum touch target for all interactive elements (WCAG 2.5.5) */
a, button, [role="button"], input, select, textarea, label {
    min-height: 44px;
    min-width: 44px;
}
/* Override for inline elements that shouldn't stretch */
.nav-links a, .footer-col a, .social-icon {
    min-height: unset;
    min-width: unset;
}

/* Quick link buttons — wrap properly on small screens */
.quick-link-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(88, 80, 236, 0.08);
    border: 1px solid rgba(88, 80, 236, 0.15);
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 36px;
    min-width: unset;
}
.quick-link-btn:hover {
    background: rgba(88, 80, 236, 0.14);
    transform: translateY(-2px);
}

/* ── Extra-small phones (≤ 375px) ───────────────────────────────── */
@media (max-width: 375px) {
    nav {
        padding: 0.75rem 4%;
    }
    .logo {
        font-size: 1.45rem;
    }
    h1 {
        font-size: 2rem;
        letter-spacing: -0.02em;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    .btn {
        font-size: 0.95rem;
        padding: 0.75rem 1.25rem;
        width: 100%;
        justify-content: center;
    }
    .featured-course-card {
        padding: 1.5rem 1.25rem;
    }
    .featured-course-card h3 {
        font-size: 1.75rem;
    }
    .section-header h2 {
        font-size: 1.65rem;
    }
    .leaderboard-cta {
        padding: 1.25rem;
    }
    .cta-icon {
        font-size: 2.5rem;
    }
    .course-quick-links {
        gap: 6px !important;
    }
    .quick-link-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .faq-question {
        font-size: 0.9rem;
        padding: 1rem 1.25rem;
    }
}

/* ── Mobile (≤ 480px) ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .content-section {
        padding: 3rem 4%;
    }
    .two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }
    .two-column.reverse .image-content {
        order: -1;
    }
    .text-content h3 {
        font-size: 1.5rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .feature-card {
        padding: 1.5rem;
    }
    .course-quick-links {
        gap: 8px !important;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    .social-links {
        gap: 0.75rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* ── Tablets (481px – 768px) ─────────────────────────────────────── */
@media (min-width: 481px) and (max-width: 768px) {
    .content-section {
        padding: 3.5rem 5%;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .two-column {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Large tablets / small laptops (769px – 1024px) ─────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-section {
        padding: 4rem 5%;
    }
    .featured-course-card {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2.5rem;
    }
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Large desktops (≥ 1400px) ───────────────────────────────────── */
@media (min-width: 1400px) {
    .content-section {
        max-width: 1300px;
    }
    .footer-grid {
        max-width: 1300px;
    }
    h1 {
        font-size: 5.5rem;
    }
}

/* ── Landscape phones (short height) ────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        min-height: auto;
        padding: 6rem 5% 3rem;
    }
    h1 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    .hero-subtitle {
        margin-bottom: 1.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PWA / MOBILE-NATIVE ENHANCEMENTS — Phase 6
   ═══════════════════════════════════════════════════════════════════ */

/* Safe area support for iPhone X+ notch & home indicator */
nav {
    padding-left: max(5%, env(safe-area-inset-left));
    padding-right: max(5%, env(safe-area-inset-right));
}

footer {
    padding-bottom: max(var(--space-8), env(safe-area-inset-bottom));
    padding-left: max(5%, env(safe-area-inset-left));
    padding-right: max(5%, env(safe-area-inset-right));
}

.chat-widget {
    bottom: max(30px, calc(20px + env(safe-area-inset-bottom)));
    right: max(30px, env(safe-area-inset-right));
}

/* Smooth native scrolling on iOS */
body {
    -webkit-overflow-scrolling: touch;
}

/* Prevent text from looking too small or zooming on inputs in iOS */
input, select, textarea {
    font-size: max(16px, 1rem);
}

/* Remove tap highlight on mobile (replaced by CSS transitions) */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Interactive elements get a subtle tap state on mobile */
@media (hover: none) {
    a:active, button:active {
        opacity: 0.7;
    }
    .feature-card:active {
        transform: translateY(-4px);
    }
    .btn:active {
        transform: translateY(-1px);
    }
}

/* Reduce expensive animations on low-power devices */
@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;
    }
    .blob {
        animation: none;
    }
    .glow-orbit::before, .glow-orbit::after {
        animation: none;
    }
}

/* ── Splash Screen Colors for PWA ───────────────────────────────── */
/* Controlled via manifest.json background_color + theme_color */

/* ── Print Styles (SEO pages should print cleanly) ──────────────── */
@media print {
    nav, footer, .chat-widget, .bg-blobs, #preloader,
    #pwa-install-banner, #pwa-update-toast, #pwa-offline-indicator {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: #666;
    }
}


