/**
 * Eluway Main Stylesheet
 *
 * This file contains all custom styles for the Eluway theme.
 * It is designed to work WITH Bootstrap initially, but can
 * eventually REPLACE Bootstrap entirely.
 *
 * NAMING CONVENTION:
 * - Use .ew- prefix for all custom classes (eluway)
 * - This prevents conflicts with Bootstrap
 * - Makes it easy to identify custom styles
 *
 * STRUCTURE:
 * 1. Base & Reset
 * 2. Typography
 * 3. Layout & Containers
 * 4. Navigation
 * 5. Hero Section
 * 6. Cards
 * 7. Buttons
 * 8. Forms
 * 9. Badges & Pills
 * 10. Utilities
 * 11. Animations
 * 12. Responsive
 */

/* ==========================================================================
   1. BASE & RESET
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--eluway-font-sans);
    font-size: var(--eluway-text-base);
    font-weight: var(--eluway-font-normal);
    line-height: var(--eluway-leading-normal);
    color: var(--eluway-text);
    background-color: var(--eluway-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
    color: var(--eluway-primary-600);
    text-decoration: none;
    transition: color var(--eluway-transition-fast) var(--eluway-ease-default);
}

a:hover {
    color: var(--eluway-primary-700);
}

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

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.ew-h1, .ew-h2, .ew-h3, .ew-h4, .ew-h5, .ew-h6 {
    font-family: var(--eluway-font-display);
    font-weight: var(--eluway-font-bold);
    line-height: var(--eluway-leading-tight);
    color: var(--eluway-text);
    margin-top: 0;
    margin-bottom: var(--eluway-space-4);
}

h1, .ew-h1 { font-size: var(--eluway-text-4xl); }
h2, .ew-h2 { font-size: var(--eluway-text-3xl); }
h3, .ew-h3 { font-size: var(--eluway-text-2xl); }
h4, .ew-h4 { font-size: var(--eluway-text-xl); }
h5, .ew-h5 { font-size: var(--eluway-text-lg); }
h6, .ew-h6 { font-size: var(--eluway-text-base); }

@media (min-width: 768px) {
    h1, .ew-h1 { font-size: var(--eluway-text-5xl); }
    h2, .ew-h2 { font-size: var(--eluway-text-4xl); }
    h3, .ew-h3 { font-size: var(--eluway-text-3xl); }
}

@media (min-width: 1024px) {
    h1, .ew-h1 { font-size: var(--eluway-text-6xl); }
    h2, .ew-h2 { font-size: var(--eluway-text-5xl); }
}

p {
    margin-top: 0;
    margin-bottom: var(--eluway-space-4);
}

.ew-text-gradient {
    background: linear-gradient(to right, var(--eluway-gradient-1), var(--eluway-gradient-3), var(--eluway-gradient-4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   3. LAYOUT & CONTAINERS
   ========================================================================== */

.ew-container {
    width: 100%;
    max-width: var(--eluway-container-xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--eluway-space-4);
    padding-right: var(--eluway-space-4);
}

@media (min-width: 640px) {
    .ew-container {
        padding-left: var(--eluway-space-6);
        padding-right: var(--eluway-space-6);
    }
}

.ew-container-lg {
    max-width: var(--eluway-container-lg);
}

.ew-container-2xl {
    max-width: var(--eluway-container-2xl);
}

.ew-section {
    padding-top: var(--eluway-space-12);
    padding-bottom: var(--eluway-space-12);
}

@media (min-width: 768px) {
    .ew-section {
        padding-top: var(--eluway-space-16);
        padding-bottom: var(--eluway-space-16);
    }
}

/* ==========================================================================
   4. NAVIGATION (Lexagate Style)
   ========================================================================== */

.ew-navbar {
    position: sticky;
    top: 0;
    z-index: var(--eluway-z-sticky);
    background-color: var(--eluway-bg);
    border-bottom: 1px solid var(--eluway-border);
    transition: background-color var(--eluway-transition-base) var(--eluway-ease-default),
                box-shadow var(--eluway-transition-base) var(--eluway-ease-default);
}

.ew-navbar.is-scrolled {
    box-shadow: var(--eluway-shadow-md);
}

.ew-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem; /* h-14 matches lexagate */
}

/* Logo - hidden on mobile */
.ew-navbar-brand {
    display: none;
    align-items: center;
    gap: var(--eluway-space-2);
    font-size: var(--eluway-text-xl);
    font-weight: var(--eluway-font-bold);
    color: var(--eluway-text);
    text-decoration: none;
}

@media (min-width: 768px) {
    .ew-navbar-brand {
        display: flex;
    }
}

.ew-navbar-brand:hover {
    color: var(--eluway-text);
}

.ew-navbar-brand img,
.ew-navbar-logo {
    height: 2rem;
    width: auto;
    max-height: 2rem;
    object-fit: contain;
}

/* Nav Links Container - matches lexagate layout */
.ew-navbar-nav {
    display: none;
    align-items: center;
    gap: var(--eluway-space-1);
}

@media (min-width: 768px) {
    .ew-navbar-nav {
        display: flex;
    }
}

/* Mobile wrapper - contains nav links + login, uses justify-evenly */
.ew-navbar-mobile-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-evenly;
}

@media (min-width: 768px) {
    .ew-navbar-mobile-wrapper {
        width: auto;
        justify-content: flex-end;
    }
}

/* Mobile nav links - use contents to unwrap for justify-evenly */
.ew-navbar-mobile-nav {
    display: contents;
}

@media (min-width: 768px) {
    .ew-navbar-mobile-nav {
        display: none;
    }
}

/* Nav Link - Lexagate Style with Icon + Uppercase */
.ew-nav-link {
    display: flex;
    align-items: center;
    gap: var(--eluway-space-1);
    padding: 0.5rem 0.55rem;
    font-size: 0.9rem;
    font-weight: var(--eluway-font-medium);
    color: var(--eluway-surface-600);
    transition: color var(--eluway-transition-fast) var(--eluway-ease-default);
    text-decoration: none;
}

.dark .ew-nav-link {
    color: var(--eluway-surface-300);
}

@media (min-width: 768px) {
    .ew-nav-link {
        padding: 0.5rem 0.75rem;
    }
}

.ew-nav-link .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ew-nav-link .nav-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 2;
    transition: stroke var(--eluway-transition-fast);
}

/* Nav Label - hidden by default, show at 340px (matches lexagate) */
.nav-label {
    display: none;
}

@media (min-width: 340px) {
    .nav-label {
        display: inline;
    }
}

/* Uppercase utility */
.uppercase {
    text-transform: uppercase;
}

/* Hover - gradient text (matches lexagate active style) */
.ew-nav-link:hover {
    font-weight: var(--eluway-font-semibold);
    background: linear-gradient(to right, #a855f7, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ew-nav-link:hover .nav-icon svg {
    stroke: url(#nav-gradient);
}

.dark .ew-nav-link:hover {
    background: linear-gradient(to right, #c084fc, #fb923c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .ew-nav-link:hover .nav-icon svg {
    stroke: url(#nav-gradient-dark);
}

/* Active state - gradient text (lexagate style) */
.ew-nav-link.nav-link-active {
    font-weight: var(--eluway-font-semibold);
    background: linear-gradient(to right, #a855f7, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Active icon - gradient stroke using SVG gradient */
.ew-nav-link.nav-link-active .nav-icon svg {
    stroke: url(#nav-gradient);
}

/* Dark mode active state */
.dark .ew-nav-link.nav-link-active {
    background: linear-gradient(to right, #c084fc, #fb923c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .ew-nav-link.nav-link-active .nav-icon svg {
    stroke: url(#nav-gradient-dark);
}

/* Nav Actions (right side) */
.ew-navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--eluway-space-3);
}

/* Login Button - matches lexagate Button component */
.ew-btn-login {
    height: 2.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    border-radius: var(--eluway-radius-md);
    flex-shrink: 0;
}

/* Right nav utilities - desktop only */
.ew-right-nav {
    display: none;
    align-items: center;
    gap: var(--eluway-space-1);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .ew-right-nav {
        display: flex;
    }
}

/* User Avatar */
.ew-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border-radius: var(--eluway-radius-full);
    transition: background-color var(--eluway-transition-fast);
    flex-shrink: 0;
}

.ew-user-avatar:hover {
    background-color: var(--eluway-surface-100);
}

.dark .ew-user-avatar:hover {
    background-color: var(--eluway-surface-800);
}

.ew-avatar-img {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--eluway-radius-full);
    object-fit: cover;
}

/* ==========================================================================
   5. HERO SECTION (with gradient + noise texture)
   ========================================================================== */

.ew-hero {
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--eluway-space-12) 0;
}

.ew-hero-gradient {
    position: relative;
    overflow: hidden;
    /* The iconic rainbow gradient */
    background-image: linear-gradient(
        to right,
        var(--eluway-gradient-1),
        var(--eluway-gradient-2),
        var(--eluway-gradient-3),
        var(--eluway-gradient-4),
        var(--eluway-gradient-5),
        var(--eluway-gradient-6)
    );
}

/* Noise texture overlay */
.ew-hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../patterns/noise-texture.png');
    background-repeat: repeat;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

/* Dark overlay for text readability */
.ew-hero-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.ew-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.ew-hero-title {
    font-size: var(--eluway-text-3xl);
    font-weight: var(--eluway-font-extrabold);
    color: white;
    margin-bottom: var(--eluway-space-4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .ew-hero-title {
        font-size: var(--eluway-text-4xl);
    }
}

@media (min-width: 1024px) {
    .ew-hero-title {
        font-size: var(--eluway-text-5xl);
    }
}

.ew-hero-subtitle {
    font-size: var(--eluway-text-lg);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--eluway-space-6);
}

/* Hero with icon */
.ew-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: var(--eluway-space-4);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: var(--eluway-radius-2xl);
    color: white;
}

.ew-hero-icon svg {
    width: 2rem;
    height: 2rem;
}

/* Compact hero (for inner pages like /courses) */
.ew-hero-compact {
    min-height: auto;
    padding: var(--eluway-space-8) 0;
}

@media (min-width: 768px) {
    .ew-hero-compact {
        padding: var(--eluway-space-10) 0;
    }
}

/* ==========================================================================
   6. CARDS
   ========================================================================== */

.ew-card {
    position: relative;
    background-color: var(--eluway-bg);
    border: 1px solid var(--eluway-border);
    border-radius: var(--eluway-radius-2xl);
    overflow: hidden;
    box-shadow: var(--eluway-elevation-1);
    transition: all var(--eluway-transition-slow) var(--eluway-ease-default);
}

.ew-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--eluway-elevation-3);
    border-color: var(--eluway-primary-300);
}

.dark .ew-card:hover {
    border-color: var(--eluway-primary-600);
}

/* Gradient accent line on top (hover) */
.ew-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--eluway-primary-500),
        var(--eluway-primary-400),
        var(--eluway-accent-500)
    );
    opacity: 0;
    transition: opacity var(--eluway-transition-base);
    z-index: 10;
}

.ew-card:hover::before {
    opacity: 1;
}

/* Card Image */
.ew-card-img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.ew-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--eluway-transition-slower) var(--eluway-ease-default);
}

.ew-card:hover .ew-card-img img {
    transform: scale(1.05);
}

/* Image overlay gradient */
.ew-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.5) 0%,
        transparent 50%
    );
    pointer-events: none;
}

/* Card Body */
.ew-card-body {
    padding: var(--eluway-space-4);
}

.ew-card-title {
    font-size: var(--eluway-text-base);
    font-weight: var(--eluway-font-semibold);
    line-height: var(--eluway-leading-snug);
    color: var(--eluway-text);
    margin-bottom: var(--eluway-space-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--eluway-transition-base);
}

.ew-card:hover .ew-card-title {
    color: var(--eluway-primary-600);
}

.dark .ew-card:hover .ew-card-title {
    color: var(--eluway-primary-400);
}

.ew-card-text {
    font-size: var(--eluway-text-sm);
    color: var(--eluway-text-secondary);
    line-height: var(--eluway-leading-relaxed);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--eluway-space-3);
}

/* Card Meta */
.ew-card-meta {
    display: flex;
    align-items: center;
    gap: var(--eluway-space-4);
    font-size: var(--eluway-text-sm);
    color: var(--eluway-text-muted);
}

.ew-card-meta-item {
    display: flex;
    align-items: center;
    gap: var(--eluway-space-1);
}

.ew-card-meta-item svg {
    width: 1rem;
    height: 1rem;
}

/* Card Badges (positioned absolutely) */
.ew-card-badges {
    position: absolute;
    top: var(--eluway-space-3);
    left: var(--eluway-space-3);
    right: var(--eluway-space-3);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 5;
}

/* Card Progress Bar */
.ew-card-progress {
    height: 4px;
    background-color: var(--eluway-surface-200);
    border-radius: var(--eluway-radius-full);
    overflow: hidden;
}

.dark .ew-card-progress {
    background-color: var(--eluway-surface-700);
}

.ew-card-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--eluway-primary-500), var(--eluway-accent-500));
    border-radius: var(--eluway-radius-full);
    transition: width var(--eluway-transition-slow);
}

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */

.ew-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--eluway-space-2);
    padding: var(--eluway-space-2) var(--eluway-space-5);
    font-family: var(--eluway-font-sans);
    font-size: var(--eluway-text-sm);
    font-weight: var(--eluway-font-semibold);
    line-height: var(--eluway-leading-normal);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--eluway-radius-xl);
    transition: all var(--eluway-transition-fast) var(--eluway-ease-default);
}

.ew-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3);
}

.ew-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary Button */
.ew-btn-primary {
    background: linear-gradient(to right, var(--eluway-primary-600), var(--eluway-primary-700));
    color: white;
    border-color: transparent;
}

.ew-btn-primary:hover {
    background: linear-gradient(to right, var(--eluway-primary-700), var(--eluway-primary-800));
    box-shadow: var(--eluway-glow-primary);
    transform: translateY(-1px);
}

.ew-btn-primary:active {
    transform: scale(0.98);
}

/* Secondary Button */
.ew-btn-secondary {
    background-color: var(--eluway-bg-secondary);
    color: var(--eluway-text);
    border-color: var(--eluway-border);
}

.ew-btn-secondary:hover {
    background-color: var(--eluway-bg-tertiary);
    border-color: var(--eluway-surface-300);
}

/* Accent Button */
.ew-btn-accent {
    background: linear-gradient(to right, var(--eluway-accent-500), var(--eluway-accent-600));
    color: white;
    border-color: transparent;
}

.ew-btn-accent:hover {
    background: linear-gradient(to right, var(--eluway-accent-600), var(--eluway-accent-700));
    box-shadow: var(--eluway-glow-accent);
    transform: translateY(-1px);
}

/* Ghost Button */
.ew-btn-ghost {
    background: transparent;
    color: var(--eluway-text-secondary);
    border-color: transparent;
}

.ew-btn-ghost:hover {
    color: var(--eluway-text);
    background-color: var(--eluway-surface-100);
}

/* Button Sizes */
.ew-btn-sm {
    padding: var(--eluway-space-1) var(--eluway-space-3);
    font-size: var(--eluway-text-xs);
    border-radius: var(--eluway-radius-lg);
}

.ew-btn-lg {
    padding: var(--eluway-space-3) var(--eluway-space-6);
    font-size: var(--eluway-text-base);
    border-radius: var(--eluway-radius-xl);
}

/* Icon Button */
.ew-btn-icon {
    padding: var(--eluway-space-2);
    border-radius: var(--eluway-radius-lg);
}

.ew-btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ==========================================================================
   8. FORMS
   ========================================================================== */

.ew-form-group {
    margin-bottom: var(--eluway-space-4);
}

.ew-form-label {
    display: block;
    margin-bottom: var(--eluway-space-2);
    font-size: var(--eluway-text-sm);
    font-weight: var(--eluway-font-medium);
    color: var(--eluway-text);
}

.ew-form-input {
    display: block;
    width: 100%;
    padding: var(--eluway-space-2) var(--eluway-space-4);
    font-family: var(--eluway-font-sans);
    font-size: var(--eluway-text-base);
    line-height: var(--eluway-leading-normal);
    color: var(--eluway-text);
    background-color: var(--eluway-bg);
    border: 1px solid var(--eluway-border);
    border-radius: var(--eluway-radius-lg);
    transition: border-color var(--eluway-transition-fast),
                box-shadow var(--eluway-transition-fast);
}

.ew-form-input:focus {
    outline: none;
    border-color: var(--eluway-primary-500);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.ew-form-input::placeholder {
    color: var(--eluway-text-muted);
}

/* ==========================================================================
   9. BADGES & PILLS
   ========================================================================== */

.ew-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--eluway-space-1);
    padding: var(--eluway-space-1) var(--eluway-space-2);
    font-size: var(--eluway-text-xs);
    font-weight: var(--eluway-font-semibold);
    line-height: 1;
    border-radius: var(--eluway-radius-full);
    white-space: nowrap;
}

.ew-badge svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Badge Variants */
.ew-badge-primary {
    background-color: var(--eluway-primary-100);
    color: var(--eluway-primary-700);
}

.dark .ew-badge-primary {
    background-color: rgba(168, 85, 247, 0.2);
    color: var(--eluway-primary-300);
}

.ew-badge-success {
    background: linear-gradient(to right, #22c55e, #14b8a6);
    color: white;
}

.ew-badge-warning {
    background-color: var(--eluway-warning);
    color: white;
}

.ew-badge-accent {
    background: linear-gradient(to right, var(--eluway-accent-500), var(--eluway-accent-600));
    color: white;
}

/* Free badge - emerald gradient */
.ew-badge-free {
    background: linear-gradient(to right, #10b981, #14b8a6);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Price badge - dark */
.ew-badge-price {
    background: linear-gradient(to right, var(--eluway-surface-900), var(--eluway-surface-800));
    color: white;
    padding-left: var(--eluway-space-2);
    padding-right: var(--eluway-space-3);
}

/* Light badge (for enrolled status) */
.ew-badge-light {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--eluway-surface-700);
    backdrop-filter: blur(4px);
}

.dark .ew-badge-light {
    background-color: rgba(39, 39, 42, 0.95);
    color: var(--eluway-surface-200);
}

/* ==========================================================================
   10. UTILITIES
   ========================================================================== */

/* Flexbox */
.ew-flex { display: flex; }
.ew-inline-flex { display: inline-flex; }
.ew-items-center { align-items: center; }
.ew-items-start { align-items: flex-start; }
.ew-items-end { align-items: flex-end; }
.ew-justify-center { justify-content: center; }
.ew-justify-between { justify-content: space-between; }
.ew-justify-end { justify-content: flex-end; }
.ew-flex-wrap { flex-wrap: wrap; }
.ew-flex-col { flex-direction: column; }

/* Grid */
.ew-grid { display: grid; }

.ew-grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.ew-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ew-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ew-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 640px) {
    .ew-sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .ew-md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ew-md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .ew-lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ew-lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .ew-xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Gap */
.ew-gap-1 { gap: var(--eluway-space-1); }
.ew-gap-2 { gap: var(--eluway-space-2); }
.ew-gap-3 { gap: var(--eluway-space-3); }
.ew-gap-4 { gap: var(--eluway-space-4); }
.ew-gap-5 { gap: var(--eluway-space-5); }
.ew-gap-6 { gap: var(--eluway-space-6); }

/* Text */
.ew-text-center { text-align: center; }
.ew-text-left { text-align: left; }
.ew-text-right { text-align: right; }
.ew-text-uppercase { text-transform: uppercase; }
.ew-text-sm { font-size: var(--eluway-text-sm); }
.ew-text-lg { font-size: var(--eluway-text-lg); }
.ew-text-muted { color: var(--eluway-text-muted); }
.ew-text-secondary { color: var(--eluway-text-secondary); }
.ew-text-white { color: white; }

/* Spacing */
.ew-mb-0 { margin-bottom: 0; }
.ew-mb-2 { margin-bottom: var(--eluway-space-2); }
.ew-mb-4 { margin-bottom: var(--eluway-space-4); }
.ew-mb-6 { margin-bottom: var(--eluway-space-6); }
.ew-mb-8 { margin-bottom: var(--eluway-space-8); }
.ew-mt-4 { margin-top: var(--eluway-space-4); }
.ew-mt-6 { margin-top: var(--eluway-space-6); }

/* Display */
.ew-hidden { display: none; }
.ew-block { display: block; }

@media (min-width: 768px) {
    .ew-md\:hidden { display: none; }
    .ew-md\:block { display: block; }
    .ew-md\:flex { display: flex; }
}

/* Position */
.ew-relative { position: relative; }
.ew-absolute { position: absolute; }

/* Overflow */
.ew-overflow-hidden { overflow: hidden; }

/* ==========================================================================
   11. ANIMATIONS
   ========================================================================== */

@keyframes ew-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ew-slide-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ew-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes ew-bounce {
    0%, 100% {
        transform: translateY(-5%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.ew-animate-fade-in {
    animation: ew-fade-in 0.3s ease-out;
}

.ew-animate-slide-up {
    animation: ew-slide-up 0.4s ease-out;
}

.ew-animate-pulse {
    animation: ew-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.ew-animate-bounce {
    animation: ew-bounce 1s infinite;
}

/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */

/* Hide on mobile, show on desktop */
@media (max-width: 767px) {
    .ew-desktop-only {
        display: none !important;
    }
}

/* Show on mobile, hide on desktop */
@media (min-width: 768px) {
    .ew-mobile-only {
        display: none !important;
    }
}

/* ==========================================================================
   13. HERO ACTIONS & CTA
   ========================================================================== */

.ew-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--eluway-space-4);
}

/* White buttons for hero */
.ew-btn-white {
    background-color: white;
    color: var(--eluway-primary-700);
    border-color: white;
}

.ew-btn-white:hover {
    background-color: var(--eluway-surface-50);
    color: var(--eluway-primary-800);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.ew-btn-outline-white {
    background-color: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.ew-btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* ==========================================================================
   14. STATS SECTION
   ========================================================================== */

.ew-section-stats {
    background-color: var(--eluway-bg-secondary);
}

.ew-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--eluway-space-4);
}

@media (min-width: 768px) {
    .ew-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--eluway-space-6);
    }
}

.ew-stat-card {
    text-align: center;
    padding: var(--eluway-space-6);
    background-color: var(--eluway-bg);
    border-radius: var(--eluway-radius-2xl);
    border: 1px solid var(--eluway-border);
    transition: all var(--eluway-transition-base) var(--eluway-ease-default);
}

.ew-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--eluway-shadow-lg);
}

.ew-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: var(--eluway-space-4);
    background: linear-gradient(135deg, var(--eluway-primary-100), var(--eluway-primary-50));
    border-radius: var(--eluway-radius-xl);
    color: var(--eluway-primary-600);
}

.dark .ew-stat-icon {
    background: rgba(168, 85, 247, 0.15);
    color: var(--eluway-primary-400);
}

.ew-stat-value {
    font-size: var(--eluway-text-3xl);
    font-weight: var(--eluway-font-extrabold);
    color: var(--eluway-text);
    margin-bottom: var(--eluway-space-1);
}

.ew-stat-label {
    font-size: var(--eluway-text-sm);
    color: var(--eluway-text-secondary);
}

/* ==========================================================================
   15. SECTION HEADERS
   ========================================================================== */

.ew-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--eluway-space-4);
    margin-bottom: var(--eluway-space-8);
}

.ew-section-header.ew-text-center {
    flex-direction: column;
    text-align: center;
}

.ew-section-title {
    font-size: var(--eluway-text-2xl);
    font-weight: var(--eluway-font-bold);
    color: var(--eluway-text);
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .ew-section-title {
        font-size: var(--eluway-text-3xl);
    }
}

.ew-section-subtitle {
    font-size: var(--eluway-text-lg);
    color: var(--eluway-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   16. COURSE GRID
   ========================================================================== */

.ew-course-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--eluway-space-6);
}

@media (min-width: 640px) {
    .ew-course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ew-course-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Course Card */
.ew-course-card {
    position: relative;
    background-color: var(--eluway-bg);
    border: 1px solid var(--eluway-border);
    border-radius: var(--eluway-radius-2xl);
    overflow: hidden;
    transition: all var(--eluway-transition-base) var(--eluway-ease-default);
}

.ew-course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--eluway-shadow-lg);
    border-color: var(--eluway-primary-300);
}

.dark .ew-course-card:hover {
    border-color: var(--eluway-primary-600);
}

.ew-course-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ew-course-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--eluway-bg-secondary);
}

.ew-course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--eluway-transition-slower) var(--eluway-ease-default);
}

.ew-course-card:hover .ew-course-thumbnail img {
    transform: scale(1.05);
}

.ew-course-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--eluway-text-muted);
}

.ew-course-body {
    padding: var(--eluway-space-4);
}

.ew-course-title {
    font-size: var(--eluway-text-base);
    font-weight: var(--eluway-font-semibold);
    color: var(--eluway-text);
    margin-bottom: var(--eluway-space-2);
    line-height: var(--eluway-leading-snug);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--eluway-transition-fast);
}

.ew-course-card:hover .ew-course-title {
    color: var(--eluway-primary-600);
}

.dark .ew-course-card:hover .ew-course-title {
    color: var(--eluway-primary-400);
}

.ew-course-meta {
    display: flex;
    align-items: center;
    gap: var(--eluway-space-4);
    font-size: var(--eluway-text-sm);
    color: var(--eluway-text-muted);
    margin-bottom: var(--eluway-space-3);
}

.ew-course-lessons,
.ew-course-duration {
    display: flex;
    align-items: center;
    gap: var(--eluway-space-1);
}

.ew-course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--eluway-space-3);
    border-top: 1px solid var(--eluway-border-light);
}

.ew-course-price {
    font-size: var(--eluway-text-lg);
    font-weight: var(--eluway-font-bold);
    color: var(--eluway-text);
}

.ew-course-price-free {
    color: var(--eluway-success);
}

/* ==========================================================================
   17. FEATURES SECTION
   ========================================================================== */

.ew-section-features {
    background-color: var(--eluway-bg-secondary);
}

.ew-features-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--eluway-space-6);
}

@media (min-width: 640px) {
    .ew-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ew-features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ew-feature-card {
    text-align: center;
    padding: var(--eluway-space-6);
    background-color: var(--eluway-bg);
    border: 1px solid var(--eluway-border);
    border-radius: var(--eluway-radius-2xl);
    transition: all var(--eluway-transition-base) var(--eluway-ease-default);
}

.ew-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--eluway-shadow-lg);
    border-color: var(--eluway-primary-200);
}

.ew-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: var(--eluway-space-4);
    background: linear-gradient(135deg, var(--eluway-primary-100), var(--eluway-primary-50));
    border-radius: var(--eluway-radius-2xl);
    color: var(--eluway-primary-600);
}

.dark .ew-feature-icon {
    background: rgba(168, 85, 247, 0.15);
    color: var(--eluway-primary-400);
}

.ew-feature-title {
    font-size: var(--eluway-text-lg);
    font-weight: var(--eluway-font-semibold);
    color: var(--eluway-text);
    margin-bottom: var(--eluway-space-2);
}

.ew-feature-description {
    font-size: var(--eluway-text-sm);
    color: var(--eluway-text-secondary);
    line-height: var(--eluway-leading-relaxed);
    margin-bottom: 0;
}

/* ==========================================================================
   18. CTA SECTION
   ========================================================================== */

.ew-section-cta {
    padding: var(--eluway-space-12) 0;
}

@media (min-width: 768px) {
    .ew-section-cta {
        padding: var(--eluway-space-14) 0;
    }
}

.ew-cta-content {
    position: relative;
    z-index: 2;
}

.ew-cta-title {
    font-size: var(--eluway-text-2xl);
    font-weight: var(--eluway-font-bold);
    color: white;
    margin-bottom: var(--eluway-space-4);
}

@media (min-width: 768px) {
    .ew-cta-title {
        font-size: var(--eluway-text-3xl);
    }
}

.ew-cta-subtitle {
    font-size: var(--eluway-text-lg);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto var(--eluway-space-6);
}

.ew-cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--eluway-space-4);
}

/* ==========================================================================
   19. FOOTER
   ========================================================================== */

.ew-footer {
    background-color: var(--eluway-surface-900);
    color: var(--eluway-surface-300);
    padding: var(--eluway-space-12) 0 var(--eluway-space-6);
}

.dark .ew-footer {
    background-color: var(--eluway-surface-950);
}

.ew-footer-widgets {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--eluway-space-8);
    margin-bottom: var(--eluway-space-8);
}

@media (min-width: 640px) {
    .ew-footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ew-footer-widgets {
        grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    }
}

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

.ew-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--eluway-space-2);
    font-size: var(--eluway-text-xl);
    font-weight: var(--eluway-font-bold);
    color: white;
    text-decoration: none;
    margin-bottom: var(--eluway-space-4);
}

.ew-footer-tagline {
    font-size: var(--eluway-text-sm);
    color: var(--eluway-surface-400);
    margin-bottom: var(--eluway-space-4);
}

.ew-social-links {
    display: flex;
    gap: var(--eluway-space-2);
}

.ew-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--eluway-surface-800);
    border-radius: var(--eluway-radius-lg);
    color: var(--eluway-surface-400);
    transition: all var(--eluway-transition-fast) var(--eluway-ease-default);
}

.ew-social-link:hover {
    background-color: var(--eluway-primary-600);
    color: white;
}

.ew-footer-column h3,
.ew-footer-column .widget-title {
    font-size: var(--eluway-text-sm);
    font-weight: var(--eluway-font-semibold);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--eluway-space-4);
}

.ew-footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ew-footer-column li {
    margin-bottom: var(--eluway-space-2);
}

.ew-footer-column a {
    font-size: var(--eluway-text-sm);
    color: var(--eluway-surface-400);
    transition: color var(--eluway-transition-fast);
}

.ew-footer-column a:hover {
    color: white;
}

.ew-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--eluway-space-4);
    padding-top: var(--eluway-space-6);
    border-top: 1px solid var(--eluway-surface-800);
}

@media (min-width: 768px) {
    .ew-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.ew-footer-copyright {
    font-size: var(--eluway-text-sm);
    color: var(--eluway-surface-500);
}

.ew-footer-nav {
    display: flex;
    gap: var(--eluway-space-6);
}

.ew-footer-nav a {
    font-size: var(--eluway-text-sm);
    color: var(--eluway-surface-400);
    transition: color var(--eluway-transition-fast);
}

.ew-footer-nav a:hover {
    color: white;
}

/* ==========================================================================
   20. EMPTY STATE
   ========================================================================== */

.ew-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--eluway-space-12);
    color: var(--eluway-text-muted);
}

.ew-empty-state svg {
    margin-bottom: var(--eluway-space-4);
    opacity: 0.5;
}

.ew-empty-state p {
    margin: 0;
}

/* ==========================================================================
   21. ICON BUTTONS (Right Nav)
   ========================================================================== */

.ew-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--eluway-radius-lg);
    color: var(--eluway-surface-500);
    cursor: pointer;
    transition: color var(--eluway-transition-fast), background-color var(--eluway-transition-fast);
}

.ew-icon-btn:hover {
    color: var(--eluway-surface-700);
    background-color: var(--eluway-surface-100);
}

.dark .ew-icon-btn {
    color: var(--eluway-surface-400);
}

.dark .ew-icon-btn:hover {
    color: var(--eluway-surface-200);
    background-color: var(--eluway-surface-800);
}

.ew-icon-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Badge count on icon buttons (cart count, notifications) */
.ew-badge-count {
    position: absolute;
    top: -0.125rem;
    right: -0.125rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    font-weight: var(--eluway-font-bold);
    line-height: 1rem;
    text-align: center;
    color: white;
    background: linear-gradient(to right, var(--eluway-primary-500), var(--eluway-accent-500));
    border-radius: var(--eluway-radius-full);
}

/* ==========================================================================
   22. USER DROPDOWN
   ========================================================================== */

.ew-user-dropdown {
    position: relative;
    flex-shrink: 0;
}

.ew-user-trigger {
    display: flex;
    align-items: center;
    gap: var(--eluway-space-2);
    padding: 0.25rem;
    background: transparent;
    border: none;
    border-radius: var(--eluway-radius-full);
    cursor: pointer;
    transition: background-color var(--eluway-transition-fast);
}

.ew-user-trigger:hover {
    background-color: var(--eluway-surface-100);
}

.dark .ew-user-trigger:hover {
    background-color: var(--eluway-surface-800);
}

.ew-user-trigger .ew-avatar-img {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--eluway-radius-full);
    object-fit: cover;
}

/* User name - hidden on mobile, shown on lg+ (matches lexagate) */
.ew-user-name {
    display: none;
    font-size: var(--eluway-text-sm);
    font-weight: var(--eluway-font-medium);
    color: var(--eluway-text);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .ew-user-name {
        display: block;
    }
}

/* Chevron icon */
.ew-chevron {
    display: none;
    color: var(--eluway-surface-400);
    transition: transform var(--eluway-transition-fast);
}

@media (min-width: 1024px) {
    .ew-chevron {
        display: block;
    }
}

.ew-user-dropdown.is-open .ew-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.ew-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--eluway-space-2);
    min-width: 280px;
    background-color: var(--eluway-bg);
    border: 1px solid var(--eluway-border);
    border-radius: var(--eluway-radius-xl);
    box-shadow: var(--eluway-shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--eluway-transition-fast),
                transform var(--eluway-transition-fast),
                visibility var(--eluway-transition-fast);
    z-index: var(--eluway-z-dropdown);
    overflow: hidden;
}

.ew-dropdown-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Header with user info + stats */
.ew-dropdown-header {
    padding: var(--eluway-space-4);
    border-bottom: 1px solid var(--eluway-border);
    background-color: var(--eluway-bg-secondary);
}

.ew-dropdown-user {
    display: flex;
    align-items: center;
    gap: var(--eluway-space-3);
    margin-bottom: var(--eluway-space-3);
}

.ew-dropdown-user .ew-avatar-lg {
    width: 3rem;
    height: 3rem;
    border-radius: var(--eluway-radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.ew-dropdown-user-info {
    min-width: 0;
    flex: 1;
}

.ew-dropdown-name {
    font-size: var(--eluway-text-sm);
    font-weight: var(--eluway-font-semibold);
    color: var(--eluway-text);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ew-dropdown-email {
    font-size: var(--eluway-text-xs);
    color: var(--eluway-text-muted);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Stats badges (streak + keys) */
.ew-dropdown-stats {
    display: flex;
    gap: var(--eluway-space-2);
}

.ew-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--eluway-space-1);
    padding: 0.25rem 0.5rem;
    font-size: var(--eluway-text-xs);
    font-weight: var(--eluway-font-semibold);
    border-radius: var(--eluway-radius-full);
}

.ew-stat-badge svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Streak badge - orange */
.ew-stat-streak {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--eluway-accent-600);
}

.dark .ew-stat-streak {
    background-color: rgba(249, 115, 22, 0.2);
    color: var(--eluway-accent-400);
}

/* Keys badge - purple */
.ew-stat-keys {
    background-color: rgba(168, 85, 247, 0.1);
    color: var(--eluway-primary-600);
}

.dark .ew-stat-keys {
    background-color: rgba(168, 85, 247, 0.2);
    color: var(--eluway-primary-400);
}

/* Mobile-only items in dropdown */
.ew-dropdown-mobile-only {
    display: block;
    padding: var(--eluway-space-2) 0;
    border-bottom: 1px solid var(--eluway-border);
}

@media (min-width: 768px) {
    .ew-dropdown-mobile-only {
        display: none;
    }
}

/* Dropdown items container */
.ew-dropdown-items {
    padding: var(--eluway-space-2) 0;
}

/* Dropdown item */
.ew-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--eluway-space-3);
    width: 100%;
    padding: var(--eluway-space-2) var(--eluway-space-4);
    font-size: var(--eluway-text-sm);
    font-weight: var(--eluway-font-medium);
    color: var(--eluway-text-secondary);
    background: transparent;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--eluway-transition-fast), color var(--eluway-transition-fast);
    text-align: left;
}

.ew-dropdown-item:hover {
    background-color: var(--eluway-surface-100);
    color: var(--eluway-text);
}

.dark .ew-dropdown-item:hover {
    background-color: var(--eluway-surface-800);
}

.ew-dropdown-item svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: var(--eluway-surface-400);
}

.ew-dropdown-item:hover svg {
    color: var(--eluway-primary-500);
}

/* Theme toggle icons */
.ew-dropdown-item.theme-toggle .sun-icon {
    display: block;
}

.ew-dropdown-item.theme-toggle .moon-icon {
    display: none;
}

.dark .ew-dropdown-item.theme-toggle .sun-icon {
    display: none;
}

.dark .ew-dropdown-item.theme-toggle .moon-icon {
    display: block;
}

/* Dropdown footer (logout) */
.ew-dropdown-footer {
    padding: var(--eluway-space-2) 0;
    border-top: 1px solid var(--eluway-border);
}

/* Logout item - red on hover */
.ew-dropdown-item.ew-logout:hover {
    color: var(--eluway-error);
}

.ew-dropdown-item.ew-logout:hover svg {
    color: var(--eluway-error);
}

/* ==========================================================================
   23. NOTIFICATIONS DROPDOWN
   ========================================================================== */

.ew-notifications-dropdown {
    position: relative;
}

.ew-notifications-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--eluway-space-2);
    min-width: 320px;
    background-color: var(--eluway-bg);
    border: 1px solid var(--eluway-border);
    border-radius: var(--eluway-radius-xl);
    box-shadow: var(--eluway-shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--eluway-transition-fast),
                transform var(--eluway-transition-fast),
                visibility var(--eluway-transition-fast);
    z-index: var(--eluway-z-dropdown);
    overflow: hidden;
}

.ew-notifications-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ew-notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--eluway-space-3) var(--eluway-space-4);
    border-bottom: 1px solid var(--eluway-border);
    background-color: var(--eluway-bg-secondary);
}

.ew-notifications-title {
    font-size: var(--eluway-text-sm);
    font-weight: var(--eluway-font-semibold);
    color: var(--eluway-text);
    text-transform: uppercase;
}

.ew-notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--eluway-space-8) var(--eluway-space-4);
    text-align: center;
}

.ew-notifications-empty svg {
    color: var(--eluway-surface-300);
    margin-bottom: var(--eluway-space-3);
}

.dark .ew-notifications-empty svg {
    color: var(--eluway-surface-600);
}

.ew-notifications-empty p {
    font-size: var(--eluway-text-sm);
    color: var(--eluway-text-muted);
    margin: 0;
}
/* ==========================================================================
   SINGLE COURSE PAGE - Lexagate Style
   ========================================================================== */

/* Global SVG Reset - Prevent SVGs from expanding */
.ew-course-detail-page svg {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Page Container */
.ew-course-detail-page {
    min-height: 100vh;
    background: var(--eluway-surface-50, #f8fafc);
}

/* Container */
.ew-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .ew-container {
        padding: 0 2rem;
    }
}

/* Hero Section */
.ew-course-hero {
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.ew-course-detail-page .ew-course-hero-inner {
    display: flex !important;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 0;
}

@media (min-width: 1024px) {
    .ew-course-detail-page .ew-course-hero-inner {
        flex-direction: row !important;
        align-items: stretch;
        gap: 2rem;
        padding: 2rem 0;
    }
}

/* Left: Thumbnail */
.ew-course-hero-left {
    position: relative;
}

@media (min-width: 1024px) {
    .ew-course-hero-left {
        width: 40%;
        flex-shrink: 0;
    }
}

/* Breadcrumbs */
.ew-course-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.ew-course-breadcrumbs a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.ew-course-breadcrumbs a:hover {
    color: #3e64de;
}

.ew-breadcrumb-icon {
    width: 0.75rem;
    height: 0.75rem;
}

.ew-breadcrumb-chevron {
    width: 0.75rem;
    height: 0.75rem;
}

/* Thumbnail */
.ew-course-thumbnail {
    aspect-ratio: 16/9;
    border-radius: 1rem;
    overflow: hidden;
    background: #e5e7eb;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.ew-course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ew-course-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.ew-course-thumbnail-placeholder svg {
    width: 4rem;
    height: 4rem;
}

/* Right: Course Info */
.ew-course-hero-right {
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .ew-course-hero-right {
        flex: 1;
    }
}

.ew-course-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .ew-course-title {
        font-size: 1.75rem;
    }
}

/* Instructor Row */
.ew-course-instructor-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ew-course-instructor-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    overflow: hidden;
}

.ew-course-instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ew-course-instructor-name {
    font-weight: 500;
    color: #374151;
}

.ew-course-meta-sep {
    color: #9ca3af;
}

.ew-course-meta-icon {
    width: 0.75rem;
    height: 0.75rem;
}

/* Tab Toggle */
.ew-course-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ew-course-tab {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    background: #f3f4f6;
    color: #6b7280;
}

.ew-course-tab:hover {
    background: #e5e7eb;
}

.ew-course-tab.active {
    background: #3e64de;
    color: white;
}

.ew-course-tab svg {
    width: 1rem;
    height: 1rem;
}

/* Tab Content */
.ew-course-tab-content {
    flex: 1;
    overflow-y: auto;
}

.ew-course-tab-panel {
    display: none;
    color: #6b7280;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.ew-course-tab-panel.active {
    display: block;
}

.ew-course-tab-panel p {
    margin: 0;
}

/* Objectives Grid */
.ew-objectives-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .ew-objectives-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ew-objective-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.ew-objective-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
}

.ew-objective-icon svg {
    width: 0.75rem;
    height: 0.75rem;
    color: #059669;
}

.ew-objective-item span {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

.ew-no-objectives {
    color: #9ca3af;
    font-style: italic;
}

/* Main Content */
.ew-course-main {
    padding: 2rem 0;
}

.ew-course-detail-page .ew-course-layout {
    display: grid !important;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .ew-course-detail-page .ew-course-layout {
        grid-template-columns: 1fr 22rem !important;
        gap: 2rem;
    }
}

/* Content Card */
.ew-content-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.ew-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ew-content-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.ew-content-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Preview Notice */
.ew-preview-notice {
    background: #eff6ff;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ew-preview-notice svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #3e64de;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.ew-preview-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1d4ed8;
    margin: 0 0 0.25rem;
}

.ew-preview-text {
    font-size: 0.75rem;
    color: #3b82f6;
    margin: 0;
}

/* Modules List */
.ew-modules-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Module */
.ew-module-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ew-module-number {
    width: 2rem;
    height: 2rem;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.ew-module-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.ew-module-info p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
}

/* Lessons List */
.ew-lessons-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 2.75rem;
}

.ew-lesson {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
    background: #f9fafb;
}

.ew-lesson-accessible {
    cursor: pointer;
}

.ew-lesson-accessible:hover {
    background: #f3f4f6;
}

.ew-lesson-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.ew-lesson-completed {
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.5);
}

.ew-lesson-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ew-lesson-icon.completed {
    background: #d1fae5;
}

.ew-lesson-icon.completed svg {
    width: 1rem;
    height: 1rem;
    color: #059669;
}

.ew-lesson-icon.accessible {
    background: #eff6ff;
}

.ew-lesson-icon.accessible svg {
    width: 1rem;
    height: 1rem;
    color: #3e64de;
}

.ew-lesson-icon.locked {
    background: #e5e7eb;
}

.ew-lesson-icon.locked svg {
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

.ew-lesson-content {
    flex: 1;
    min-width: 0;
}

.ew-lesson-content h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ew-lesson-locked .ew-lesson-content h4 {
    color: #6b7280;
}

.ew-lesson-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ew-preview-badge {
    padding: 0.125rem 0.5rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
}

.ew-lesson-duration {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Sidebar */
.ew-course-sidebar {
    order: -1;
}

@media (min-width: 1024px) {
    .ew-course-sidebar {
        order: 0;
    }
}

.ew-sidebar-sticky {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .ew-sidebar-sticky {
        position: sticky;
        top: 6rem;
    }
}

/* Progress Card */
.ew-progress-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.ew-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.ew-progress-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.ew-progress-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #3e64de;
}

.ew-progress-bar {
    width: 100%;
    height: 0.75rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.ew-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #c026d3, #db2777);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.ew-continue-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(90deg, #7c3aed, #c026d3, #db2777, #c026d3, #7c3aed);
    background-size: 200% 100%;
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.3s;
    animation: gradient-shift 3s ease infinite;
    box-shadow: 0 0 20px rgba(192, 38, 211, 0.4);
}

.ew-continue-btn:hover {
    box-shadow: 0 0 30px rgba(192, 38, 211, 0.6);
    color: white;
}

.ew-continue-btn svg {
    width: 1rem;
    height: 1rem;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Purchase Card */
.ew-purchase-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.ew-price-section {
    text-align: center;
    margin-bottom: 1rem;
}

.ew-price-free {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.ew-price {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
}

.ew-enroll-btn {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 0.75rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.ew-enroll-free {
    background: #059669;
    color: white;
}

.ew-enroll-free:hover {
    background: #047857;
    color: white;
}

.ew-card-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 1rem 0;
}

.ew-card-actions {
    display: flex;
    gap: 0.5rem;
}

.ew-share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem;
    background: #f3f4f6;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.ew-share-btn:hover {
    background: #e5e7eb;
}

.ew-share-btn svg {
    width: 1rem;
    height: 1rem;
}

/* Features Card */
.ew-features-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.ew-features-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem;
}

.ew-features-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ew-features-card li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.ew-features-card li svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #3e64de;
    flex-shrink: 0;
}

/* Mobile CTA */
.ew-mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: block;
}

@media (min-width: 1024px) {
    .ew-mobile-cta {
        display: none;
    }
}

.ew-mobile-cta-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ew-mobile-price {
    flex-shrink: 0;
}

.ew-mobile-price .ew-price-free {
    font-size: 1.25rem;
}

.ew-mobile-price .ew-price {
    font-size: 1.25rem;
}

.ew-mobile-form {
    flex: 1;
}

.ew-mobile-enroll-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #059669;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.ew-mobile-enroll-btn:hover {
    background: #047857;
    color: white;
}

.ew-mobile-buy-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #f59e0b;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ew-mobile-buy-btn:hover {
    background: #d97706;
}

.ew-mobile-buy-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.ew-mobile-continue-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(90deg, #7c3aed, #c026d3, #db2777, #c026d3, #7c3aed);
    background-size: 200% 100%;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 9999px;
    text-decoration: none;
    animation: gradient-shift 3s ease infinite;
}

.ew-mobile-continue-btn svg {
    width: 1rem;
    height: 1rem;
}

.ew-mobile-cta-spacer {
    height: 6rem;
    display: block;
}

@media (min-width: 1024px) {
    .ew-mobile-cta-spacer {
        display: none;
    }
}

/* Tutor Add to Cart Override */
.ew-purchase-card .tutor-course-single-btn-group {
    margin: 0;
}

.ew-purchase-card .tutor-btn-primary {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.ew-purchase-card .tutor-btn-primary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
/* ==========================================================================
   FOCUS MODE - Lexagate Style for Eluway LMS Lesson Pages
   ========================================================================== */

/* ==========================================================================
   CSS VARIABLES (Dark Theme)
   ========================================================================== */
:root {
    /* Background Colors */
    --focus-bg-primary: #0a0a0f;
    --focus-bg-secondary: #13131a;
    --focus-bg-tertiary: #1a1a24;
    --focus-bg-elevated: #1f1f2e;

    /* Border Colors */
    --focus-border: #2a2a3c;
    --focus-border-light: #3a3a4c;

    /* Text Colors */
    --focus-text-primary: #ffffff;
    --focus-text-secondary: #a0a0b2;
    --focus-text-muted: #6b6b7d;

    /* Accent Colors */
    --focus-accent: #7c3aed;
    --focus-accent-light: #a855f7;
    --focus-accent-dark: #5b21b6;
    --focus-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);

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

    /* Sizing */
    --focus-header-height: 60px;
    --focus-sidebar-width: 320px;
    --focus-nav-height: 80px;
}

/* ==========================================================================
   BASE RESET FOR FOCUS MODE
   ========================================================================== */
.ew-lms-course-single-content-wrapper {
    background: var(--focus-bg-primary) !important;
    min-height: 100vh;
    display: flex !important;
    flex-direction: row;
}

/* Hide default WordPress elements in focus mode */
body.single-lesson .site-header,
body.single-lesson .site-footer,
body.single-lesson #wpadminbar,
body.single-lesson .eluway-header,
body.single-lesson header.site-header,
body.single-lesson .eluway-footer,
body.single-lesson footer,
body.single-quiz .site-header,
body.single-quiz .site-footer,
body.single-quiz #wpadminbar,
body.single-quiz .eluway-header,
body.single-quiz header.site-header,
body.single-quiz .eluway-footer,
body.single-quiz footer {
    display: none !important;
}

/* Also hide these common header/footer classes */
.ew-lms-course-single-content-wrapper ~ header,
.ew-lms-course-single-content-wrapper ~ footer,
.ew-lms-course-single-content-wrapper + footer {
    display: none !important;
}

/* Reset body margin when admin bar is hidden */
body.single-lesson,
body.single-quiz {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

html {
    margin-top: 0 !important;
}

/* Override light mode for focus mode pages */
body.single-lesson.theme-mode-light,
body.single-quiz.theme-mode-light {
    --ew-lms-bg: var(--focus-bg-primary) !important;
    --ew-lms-color: var(--focus-text-primary) !important;
    background: var(--focus-bg-primary) !important;
    color: var(--focus-text-primary) !important;
}

/* Full viewport focus mode */
body.single-lesson,
body.single-quiz {
    overflow-x: hidden;
}

/* Hide site header and navigation */
body.single-lesson .ew-header,
body.single-lesson .ew-lms-header,
body.single-lesson > header,
body.single-lesson #masthead,
body.single-lesson .navbar,
body.single-lesson .site-navigation,
body.single-quiz .ew-header,
body.single-quiz .ew-lms-header,
body.single-quiz > header,
body.single-quiz #masthead,
body.single-quiz .navbar,
body.single-quiz .site-navigation {
    display: none !important;
}

/* Hide site footer */
body.single-lesson .ew-footer,
body.single-lesson .ew-lms-footer,
body.single-lesson > footer,
body.single-lesson #colophon,
body.single-quiz .ew-footer,
body.single-quiz .ew-lms-footer,
body.single-quiz > footer,
body.single-quiz #colophon {
    display: none !important;
}

/* FORCE hide WP admin bar - highest specificity */
body.single-lesson #wpadminbar,
body.single-quiz #wpadminbar,
html body.admin-bar.single-lesson #wpadminbar,
html body.admin-bar.single-quiz #wpadminbar {
    display: none !important;
    height: 0 !important;
    visibility: hidden !important;
}

body.single-lesson.admin-bar,
body.single-quiz.admin-bar {
    margin-top: 0 !important;
}

html.wp-toolbar body.single-lesson,
html.wp-toolbar body.single-quiz {
    padding-top: 0 !important;
}

/* FORCE hide main header - using exact selectors */
body.single-lesson #masthead,
body.single-lesson .ew-navbar,
body.single-lesson header#masthead.ew-navbar,
body.single-quiz #masthead,
body.single-quiz .ew-navbar,
body.single-quiz header#masthead.ew-navbar {
    display: none !important;
    height: 0 !important;
    visibility: hidden !important;
}

/* FORCE hide footer - using exact selectors */
body.single-lesson #colophon,
body.single-lesson footer#colophon,
body.single-lesson footer.ew-footer,
body.single-lesson .ew-footer,
body.single-quiz #colophon,
body.single-quiz footer#colophon,
body.single-quiz footer.ew-footer,
body.single-quiz .ew-footer {
    display: none !important;
    height: 0 !important;
    visibility: hidden !important;
}

/* Fix the main content wrapper to take full viewport - use very high z-index */
body.single-lesson .ew-lms-course-single-content-wrapper,
body.single-quiz .ew-lms-course-single-content-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    overflow: auto !important;
    background: var(--focus-bg-primary) !important;
}

/* Make sure siblings are not visible */
body.single-lesson .ew-lms-course-single-content-wrapper ~ *,
body.single-quiz .ew-lms-course-single-content-wrapper ~ * {
    display: none !important;
}

/* Hide header and footer by ID - highest specificity */
body.single-lesson > header#masthead,
body.single-lesson > footer#colophon,
body.single-quiz > header#masthead,
body.single-quiz > footer#colophon,
html body.single-lesson header#masthead.ew-navbar,
html body.single-lesson footer#colophon.ew-footer,
html body.single-quiz header#masthead.ew-navbar,
html body.single-quiz footer#colophon.ew-footer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Make main take full viewport and position it */
body.single-lesson #main,
body.single-lesson main#main,
body.single-quiz #main,
body.single-quiz main#main {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================================================
   SIDEBAR STYLES
   ========================================================================== */
body.single-lesson .ew-lms-course-single-sidebar-wrapper,
body.single-quiz .ew-lms-course-single-sidebar-wrapper,
.ew-lms-course-single-sidebar-wrapper.ew-lms-lesson-sidebar {
    width: var(--focus-sidebar-width) !important;
    min-width: var(--focus-sidebar-width) !important;
    max-width: var(--focus-sidebar-width) !important;
    background: var(--focus-bg-secondary) !important;
    border-right: 1px solid var(--focus-border) !important;
    height: 100vh !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    overflow-y: auto !important;
    z-index: 100 !important;
    transition: transform 0.3s ease;
    color: var(--focus-text-primary) !important;
}

/* Sidebar Header */
body.single-lesson .ew-lms-course-single-sidebar-title,
body.single-quiz .ew-lms-course-single-sidebar-title {
    padding: 20px !important;
    border-bottom: 1px solid var(--focus-border) !important;
    background: var(--focus-bg-secondary) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

body.single-lesson .ew-lms-course-single-sidebar-title span,
body.single-quiz .ew-lms-course-single-sidebar-title span {
    color: var(--focus-text-secondary) !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 600 !important;
}

.ew-lms-course-single-sidebar-title .ew-lms-iconic-btn {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--focus-bg-tertiary) !important;
    border: 1px solid var(--focus-border) !important;
    border-radius: 8px !important;
    color: var(--focus-text-secondary) !important;
    transition: all 0.2s ease;
}

.ew-lms-course-single-sidebar-title .ew-lms-iconic-btn:hover {
    background: var(--focus-bg-elevated) !important;
    color: var(--focus-text-primary) !important;
}

/* Course Topics in Sidebar */
.ew-lms-course-topic {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--focus-border) !important;
}

/* Accordion Header (Topic Title) */
.ew-lms-accordion-item-header {
    padding: 16px 20px !important;
    background: var(--focus-bg-secondary) !important;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ew-lms-accordion-item-header:hover {
    background: var(--focus-bg-tertiary) !important;
}

.ew-lms-accordion-item-header.is-active {
    background: var(--focus-bg-tertiary) !important;
}

.ew-lms-course-topic-title {
    color: var(--focus-text-primary) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.ew-lms-course-topic-title-info-icon {
    color: var(--focus-text-muted) !important;
    font-size: 14px !important;
}

.ew-lms-course-topic-summary {
    color: var(--focus-text-muted) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    background: var(--focus-bg-elevated) !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
}

/* Accordion Body (Lessons List) */
.ew-lms-accordion-item-body {
    background: var(--focus-bg-primary) !important;
    padding: 8px 12px !important;
}

/* Lesson Items */
.ew-lms-course-topic-item {
    margin: 4px 0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    transition: all 0.2s ease;
}

.ew-lms-course-topic-item a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 16px !important;
    background: var(--focus-bg-secondary) !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.ew-lms-course-topic-item a:hover {
    background: var(--focus-bg-tertiary) !important;
    border-color: var(--focus-border-light) !important;
}

/* Active Lesson */
.ew-lms-course-topic-item.is-active a {
    background: var(--focus-accent) !important;
    border-color: var(--focus-accent) !important;
}

.ew-lms-course-topic-item.is-active .ew-lms-course-topic-item-icon,
.ew-lms-course-topic-item.is-active .ew-lms-course-topic-item-title {
    color: var(--focus-text-primary) !important;
}

/* Lesson Icon */
.ew-lms-course-topic-item-icon {
    color: var(--focus-text-muted) !important;
    font-size: 16px !important;
    flex-shrink: 0;
}

/* Lesson Title */
.ew-lms-course-topic-item-title {
    color: var(--focus-text-secondary) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* Completion Checkbox */
.ew-lms-course-topic-item .ew-lms-form-check-input {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    border: 2px solid var(--focus-border-light) !important;
    background: transparent !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: default;
    position: relative;
}

.ew-lms-course-topic-item .ew-lms-form-check-input:checked {
    background: var(--focus-success) !important;
    border-color: var(--focus-success) !important;
}

.ew-lms-course-topic-item .ew-lms-form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
#ew-lms-single-entry-content,
.ew-lms-quiz-single-entry-wrap {
    flex: 1 !important;
    margin-left: var(--focus-sidebar-width) !important;
    background: var(--focus-bg-primary) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Force dark background on all content inside main area */
#ew-lms-single-entry-content *,
.ew-lms-quiz-single-entry-wrap *,
.ew-lms-course-topic-single-body,
.ew-lms-course-topic-single-body * {
    background-color: transparent;
}

.ew-lms-course-topic-single-body {
    background: var(--focus-bg-primary) !important;
}

/* Override any white backgrounds */
.ew-lms-course-single-content-wrapper .ew-lms-bg-white,
.ew-lms-course-single-content-wrapper .bg-white,
.ew-lms-course-single-content-wrapper [style*="background: #fff"],
.ew-lms-course-single-content-wrapper [style*="background-color: #fff"],
.ew-lms-course-single-content-wrapper [style*="background: white"],
.ew-lms-course-single-content-wrapper [style*="background-color: white"] {
    background: var(--focus-bg-secondary) !important;
}

/* ==========================================================================
   TOP HEADER BAR
   ========================================================================== */
.ew-lms-course-topic-single-header,
.ew-lms-single-page-top-bar {
    height: var(--focus-header-height) !important;
    background: var(--focus-bg-secondary) !important;
    border-bottom: 1px solid var(--focus-border) !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 24px !important;
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Toggle Button */
.ew-lms-course-topics-sidebar-toggler {
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--focus-bg-tertiary) !important;
    border: 1px solid var(--focus-border) !important;
    border-radius: 10px !important;
    color: var(--focus-text-secondary) !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.ew-lms-course-topics-sidebar-toggler:hover {
    background: var(--focus-bg-elevated) !important;
    color: var(--focus-text-primary) !important;
    border-color: var(--focus-border-light) !important;
}

/* Course Title in Header */
.ew-lms-course-topic-single-header-title {
    color: var(--focus-text-primary) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-left: 16px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

/* Close Button */
.ew-lms-course-topic-single-header .ew-lms-iconic-btn {
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--focus-bg-tertiary) !important;
    border: 1px solid var(--focus-border) !important;
    border-radius: 10px !important;
    color: var(--focus-text-secondary) !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.ew-lms-course-topic-single-header .ew-lms-iconic-btn:hover {
    background: var(--focus-error) !important;
    border-color: var(--focus-error) !important;
    color: var(--focus-text-primary) !important;
}

/* ==========================================================================
   MAIN CONTENT BODY
   ========================================================================== */
.ew-lms-course-topic-single-body {
    flex: 1;
    padding: 40px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Video Player */
.ew-lms-video-player-wrapper {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 40px !important;
    border-radius: 16px !important;
    overflow: hidden;
    background: var(--focus-bg-secondary) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.ew-lms-video-player-wrapper video,
.ew-lms-video-player-wrapper iframe {
    width: 100% !important;
    aspect-ratio: 16/9;
    display: block;
}

.ew-lms-lesson-feature-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.ew-lms-lesson-feature-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Spotlight/Tab Content Area */
.ew-lms-course-spotlight-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Tabs */
.ew-lms-course-spotlight-tab {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 24px !important;
    border-bottom: 1px solid var(--focus-border) !important;
    padding-bottom: 16px !important;
}

.ew-lms-tab-item,
.ew-lms-course-spotlight-tab > * {
    padding: 10px 20px !important;
    background: var(--focus-bg-secondary) !important;
    border: 1px solid var(--focus-border) !important;
    border-radius: 10px !important;
    color: var(--focus-text-secondary) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.ew-lms-tab-item:hover,
.ew-lms-course-spotlight-tab > *:hover {
    background: var(--focus-bg-tertiary) !important;
    color: var(--focus-text-primary) !important;
}

.ew-lms-tab-item.active,
.ew-lms-tab-item.is-active,
.ew-lms-course-spotlight-tab > *.active {
    background: var(--focus-accent) !important;
    border-color: var(--focus-accent) !important;
    color: var(--focus-text-primary) !important;
}

/* Tab Content */
.ew-lms-tab-content,
.ew-lms-course-spotlight-tab-content {
    background: var(--focus-bg-secondary) !important;
    border: 1px solid var(--focus-border) !important;
    border-radius: 16px !important;
    padding: 32px !important;
    color: var(--focus-text-secondary) !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

.ew-lms-tab-content h1,
.ew-lms-tab-content h2,
.ew-lms-tab-content h3,
.ew-lms-tab-content h4 {
    color: var(--focus-text-primary) !important;
    margin-bottom: 16px !important;
}

.ew-lms-tab-content p {
    margin-bottom: 16px !important;
}

.ew-lms-tab-content a {
    color: var(--focus-accent-light) !important;
}

.ew-lms-tab-content a:hover {
    color: var(--focus-accent) !important;
}

/* ==========================================================================
   LESSON NAVIGATION (BOTTOM)
   ========================================================================== */
.ew-lms-lesson-navigation,
.ew-lms-quiz-navigation {
    height: var(--focus-nav-height) !important;
    background: var(--focus-bg-secondary) !important;
    border-top: 1px solid var(--focus-border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 24px !important;
    position: sticky;
    bottom: 0;
}

/* Navigation Buttons */
.ew-lms-btn,
.ew-lms-lesson-navigation a,
.ew-lms-quiz-navigation button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Primary Button */
.ew-lms-btn-primary,
.ew-lms-lesson-navigation .next-lesson,
.ew-lms-btn[type="submit"] {
    background: var(--focus-gradient) !important;
    color: var(--focus-text-primary) !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.ew-lms-btn-primary:hover,
.ew-lms-lesson-navigation .next-lesson:hover {
    opacity: 0.9 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.5);
}

/* Secondary Button */
.ew-lms-btn-secondary,
.ew-lms-lesson-navigation .prev-lesson {
    background: var(--focus-bg-tertiary) !important;
    color: var(--focus-text-secondary) !important;
    border: 1px solid var(--focus-border) !important;
}

.ew-lms-btn-secondary:hover,
.ew-lms-lesson-navigation .prev-lesson:hover {
    background: var(--focus-bg-elevated) !important;
    color: var(--focus-text-primary) !important;
    border-color: var(--focus-border-light) !important;
}

/* Mark Complete Button */
.ew-lms-complete-lesson-btn,
.ew-lms-btn-complete {
    background: var(--focus-success) !important;
    color: var(--focus-text-primary) !important;
    border: none !important;
}

.ew-lms-complete-lesson-btn:hover {
    background: #059669 !important;
}

/* ==========================================================================
   QUIZ SPECIFIC STYLES
   ========================================================================== */
.ew-lms-quiz-wrap {
    background: var(--focus-bg-secondary) !important;
    border: 1px solid var(--focus-border) !important;
    border-radius: 16px !important;
    padding: 32px !important;
    max-width: 800px;
    margin: 0 auto;
}

.ew-lms-quiz-question {
    color: var(--focus-text-primary) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 24px !important;
    line-height: 1.5 !important;
}

/* Quiz Options */
.ew-lms-quiz-answer-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.ew-lms-quiz-answer-item {
    display: flex !important;
    align-items: center !important;
    padding: 16px 20px !important;
    background: var(--focus-bg-tertiary) !important;
    border: 2px solid var(--focus-border) !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ew-lms-quiz-answer-item:hover {
    border-color: var(--focus-accent) !important;
    background: var(--focus-bg-elevated) !important;
}

.ew-lms-quiz-answer-item.selected,
.ew-lms-quiz-answer-item input:checked + label {
    border-color: var(--focus-accent) !important;
    background: rgba(124, 58, 237, 0.15) !important;
}

.ew-lms-quiz-answer-item.correct {
    border-color: var(--focus-success) !important;
    background: rgba(16, 185, 129, 0.15) !important;
}

.ew-lms-quiz-answer-item.incorrect {
    border-color: var(--focus-error) !important;
    background: rgba(239, 68, 68, 0.15) !important;
}

/* Radio/Checkbox styling */
.ew-lms-quiz-answer-item input[type="radio"],
.ew-lms-quiz-answer-item input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    margin-right: 16px !important;
    border: 2px solid var(--focus-border-light) !important;
    background: transparent !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
    flex-shrink: 0;
}

.ew-lms-quiz-answer-item input[type="radio"] {
    border-radius: 50% !important;
}

.ew-lms-quiz-answer-item input[type="checkbox"] {
    border-radius: 6px !important;
}

.ew-lms-quiz-answer-item input:checked {
    background: var(--focus-accent) !important;
    border-color: var(--focus-accent) !important;
}

.ew-lms-quiz-answer-item label {
    color: var(--focus-text-secondary) !important;
    font-size: 15px !important;
    cursor: pointer;
    flex: 1;
}

/* Quiz Feedback */
.ew-lms-quiz-feedback,
.ew-lms-quiz-explanation {
    margin-top: 24px !important;
    padding: 20px 24px !important;
    background: rgba(59, 130, 246, 0.1) !important;
    border-left: 4px solid var(--focus-info) !important;
    border-radius: 0 12px 12px 0 !important;
    color: var(--focus-text-secondary) !important;
}

/* ==========================================================================
   PROGRESS BAR (Add to header)
   ========================================================================== */
.ew-lms-progress-wrap {
    flex: 1;
    margin: 0 24px !important;
    max-width: 400px;
}

.ew-lms-progress-bar {
    height: 6px !important;
    background: var(--focus-bg-tertiary) !important;
    border-radius: 3px !important;
    overflow: hidden;
}

.ew-lms-progress-fill,
.ew-lms-progress-bar > * {
    height: 100% !important;
    background: var(--focus-gradient) !important;
    border-radius: 3px !important;
    transition: width 0.3s ease;
}

.ew-lms-progress-text {
    color: var(--focus-text-muted) !important;
    font-size: 12px !important;
    margin-top: 4px !important;
    text-align: center;
}

/* ==========================================================================
   COMMENTS SECTION
   ========================================================================== */
.ew-lms-comment-wrap,
.ew-lms-actual-comment {
    background: var(--focus-bg-secondary) !important;
    border: 1px solid var(--focus-border) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 16px !important;
}

.ew-lms-comment-wrap.viewing {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3) !important;
    animation: focusPulse 2s infinite !important;
}

@keyframes focusPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.3); }
    50% { box-shadow: 0 0 30px rgba(124, 58, 237, 0.5); }
}

.ew-lms-comment-author {
    color: var(--focus-text-primary) !important;
    font-weight: 600 !important;
}

.ew-lms-comment-content {
    color: var(--focus-text-secondary) !important;
}

.ew-lms-comment-date {
    color: var(--focus-text-muted) !important;
    font-size: 12px !important;
}

/* Comment Form */
.ew-lms-comment-form textarea {
    width: 100% !important;
    background: var(--focus-bg-tertiary) !important;
    border: 1px solid var(--focus-border) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    color: var(--focus-text-primary) !important;
    font-size: 14px !important;
    resize: vertical;
    min-height: 100px;
}

.ew-lms-comment-form textarea:focus {
    outline: none !important;
    border-color: var(--focus-accent) !important;
}

.ew-lms-comment-form textarea::placeholder {
    color: var(--focus-text-muted) !important;
}

/* ==========================================================================
   TOOLTIPS
   ========================================================================== */
.tooltip-wrap {
    position: relative;
}

.tooltip-txt {
    position: absolute;
    background: var(--focus-bg-elevated) !important;
    border: 1px solid var(--focus-border) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    color: var(--focus-text-secondary) !important;
    font-size: 12px !important;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.tooltip-bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
}

.tooltip-wrap:hover .tooltip-txt {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .ew-lms-course-single-sidebar-wrapper {
        transform: translateX(-100%);
    }

    .ew-lms-course-single-sidebar-wrapper.is-open {
        transform: translateX(0);
    }

    #ew-lms-single-entry-content,
    .ew-lms-quiz-single-entry-wrap {
        margin-left: 0 !important;
    }

    .ew-lms-course-topic-single-header-title {
        max-width: 250px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --focus-sidebar-width: 100%;
        --focus-header-height: 56px;
        --focus-nav-height: 70px;
    }

    .ew-lms-course-topic-single-body {
        padding: 20px !important;
    }

    .ew-lms-video-player-wrapper {
        border-radius: 12px !important;
        margin-bottom: 24px !important;
    }

    .ew-lms-tab-content,
    .ew-lms-quiz-wrap {
        padding: 20px !important;
        border-radius: 12px !important;
    }

    .ew-lms-course-topic-single-header-title {
        max-width: 150px;
        font-size: 14px !important;
    }

    .ew-lms-lesson-navigation,
    .ew-lms-quiz-navigation {
        flex-direction: column;
        height: auto !important;
        padding: 16px !important;
        gap: 12px;
    }

    .ew-lms-btn,
    .ew-lms-lesson-navigation a {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ew-lms-course-topic-single-body > * {
    animation: fadeInUp 0.3s ease;
}

/* Loading State */
.ew-lms-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.ew-lms-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--focus-border);
    border-top-color: var(--focus-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   UTILITY OVERRIDES
   ========================================================================== */

/* Force dark backgrounds on all nested elements */
.ew-lms-course-single-content-wrapper *:not(img):not(video):not(iframe) {
    background-color: inherit;
}

/* Remove any light backgrounds */
.ew-lms-course-single-content-wrapper .ew-lms-bg-white,
.ew-lms-course-single-content-wrapper [class*="bg-white"],
.ew-lms-course-single-content-wrapper [style*="background: white"],
.ew-lms-course-single-content-wrapper [style*="background-color: white"] {
    background: var(--focus-bg-secondary) !important;
}

/* Fix text colors */
.ew-lms-course-single-content-wrapper .ew-lms-color-black,
.ew-lms-course-single-content-wrapper [class*="text-dark"] {
    color: var(--focus-text-primary) !important;
}

/* Hide elements not needed in focus mode */
.ew-lms-course-single-content-wrapper .ew-lms-breadcrumb,
.ew-lms-course-single-content-wrapper .ew-lms-share-buttons {
    display: none !important;
}
