/* ===========================================
   DISCOVER LA - CSS Design System
   Modern "Golden Hour" Color Palette
   =========================================== */

/* ============ CSS Variables ============ */
:root {
    /* Primary Colors - Deep Slate Blues */
    --primary-900: #0f172a;
    --primary-800: #1e293b;
    --primary-700: #334155;
    --primary-600: #475569;
    --primary-500: #64748b;
    --primary-400: #94a3b8;
    --primary-300: #cbd5e1;
    --primary-200: #e2e8f0;
    --primary-100: #f1f5f9;

    /* Accent Colors - Warm Sunset Coral/Terracotta */
    --accent-600: #c2410c;
    --accent-500: #ea580c;
    --accent-400: #f97316;
    --accent-300: #fb923c;
    --accent-200: #fed7aa;
    --accent-100: #fff7ed;

    /* Secondary - Warm Gold */
    --gold-600: #b45309;
    --gold-500: #d97706;
    --gold-400: #f59e0b;
    --gold-300: #fbbf24;
    --gold-200: #fde68a;
    --gold-100: #fef9c3;

    /* Success - Teal (more sophisticated than green) */
    --teal-700: #0f766e;
    --teal-600: #0d9488;
    --teal-500: #14b8a6;
    --teal-400: #2dd4bf;
    --teal-200: #99f6e4;
    --teal-100: #ccfbf1;

    /* Background - Warm Neutrals */
    --bg-warm: #faf8f5;
    --bg-cream: #fdfcfa;
    --bg-sand: #f5f3ef;

    /* Legacy mappings for compatibility */
    --ocean-deep: var(--primary-800);
    --ocean-mid: var(--primary-600);
    --ocean-light: var(--primary-200);
    --ocean-pale: var(--primary-100);
    --sun-bright: var(--gold-400);
    --sun-orange: var(--accent-500);
    --sun-yellow: var(--gold-300);
    --sun-pale: var(--gold-100);
    --palm-dark: var(--teal-700);
    --palm-mid: var(--teal-600);
    --palm-light: var(--teal-400);
    --sand-warm: var(--gold-500);
    --sand-light: var(--bg-cream);
    --hollywood-red: #b91c1c;
    --hollywood-pink: #db2777;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-100: #f8fafc;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Text Colors - High contrast on warm backgrounds */
    --text-primary: #1a1a1a;
    --text-secondary: #404040;
    --text-muted: #737373;

    /* Status Colors */
    --success: var(--teal-700);
    --success-light: var(--teal-100);
    --warning: var(--accent-500);
    --warning-light: var(--accent-100);
    --error: #b91c1c;
    --error-light: #fee2e2;

    /* Typography - Modern, clean fonts */
    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes - Slightly larger for readability */
    --text-xs: 0.8125rem;
    --text-sm: 0.9375rem;
    --text-base: 1.125rem;
    --text-lg: 1.3125rem;
    --text-xl: 1.5rem;
    --text-2xl: 1.875rem;
    --text-3xl: 2.375rem;
    --text-4xl: 3rem;

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

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows - Warmer tones */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.06);
    --shadow-glow: 0 0 24px rgba(249, 115, 22, 0.25);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Layout */
    --header-height: 70px;
    --max-width: 1200px;
    --content-width: 800px;
}

/* ============ Reset & Base ============ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--text-primary);
    background: var(--bg-warm);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

select {
    font-family: inherit;
}

/* ============ Typography ============ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

h1 { font-size: var(--text-3xl); font-weight: 800; }
h2 { font-size: var(--text-2xl); font-weight: 700; }
h3 { font-size: var(--text-xl); font-weight: 700; }
h4 { font-size: var(--text-lg); font-weight: 600; }

p {
    margin-bottom: var(--space-5);
    color: var(--text-primary);
}

/* ============ App Container ============ */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============ Header ============ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--primary-900);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    box-shadow: var(--shadow-lg);
}

.back-button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--white);
    font-size: var(--text-base);
    font-weight: 600;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.back-button:hover {
    background: rgba(255,255,255,0.2);
}

.back-button.hidden {
    visibility: hidden;
    pointer-events: none;
}

.app-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-progress {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.progress-text {
    font-weight: 700;
    font-size: var(--text-lg);
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.3);
    stroke-width: 4;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--accent-400);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 100.53;
    stroke-dashoffset: 100.53;
    transition: stroke-dashoffset var(--transition-slow);
}

/* ============ Main Content ============ */
.main-content {
    flex: 1;
    padding: var(--space-6);
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
}

/* ============ Views ============ */
.view {
    display: none;
    animation: fadeIn var(--transition-base);
}

.view.active {
    display: block;
}

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

/* ============ Home View ============ */
.welcome-banner {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    display: flex;
    gap: var(--space-8);
    align-items: center;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.welcome-content {
    flex: 1;
}

.welcome-content h2 {
    color: var(--primary-900);
    margin-bottom: var(--space-4);
    font-size: var(--text-3xl);
}

.welcome-content p {
    font-size: var(--text-lg);
    color: var(--gray-600);
    margin-bottom: var(--space-6);
}

.welcome-image {
    flex: 0 0 300px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.welcome-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Progress Bar */
.overall-progress {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.progress-bar-container {
    flex: 1;
    height: 12px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--teal-600) 0%, var(--teal-400) 100%);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-label {
    font-weight: 700;
    color: var(--teal-700);
    font-size: var(--text-sm);
    white-space: nowrap;
}

/* Continue Learning Section */
.continue-learning {
    margin-bottom: var(--space-8);
}

.continue-learning.hidden {
    display: none;
}

.continue-heading {
    color: var(--primary-800);
    margin-bottom: var(--space-4);
    font-size: var(--text-xl);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.continue-heading::before {
    content: '▶';
    font-size: var(--text-base);
}

.continue-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-6);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid var(--accent-200);
}

.continue-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-400);
}

.continue-card .session-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    flex-shrink: 0;
}

.continue-card .continue-info {
    flex: 1;
}

.continue-card .continue-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.continue-card .continue-subtitle {
    color: var(--gray-600);
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
}

.continue-card .continue-status {
    font-size: var(--text-sm);
    color: var(--accent-600);
    font-weight: 600;
}

.continue-card .continue-cta {
    background: var(--accent-500);
    color: var(--white);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: background var(--transition-fast);
}

.continue-card:hover .continue-cta {
    background: var(--accent-600);
}

/* Sessions Grid */
.sessions-heading {
    color: var(--gray-700);
    margin-bottom: var(--space-6);
    font-size: var(--text-xl);
}

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
}

/* Session Card */
.session-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 200px;
}

/* Background image for session cards */
.card-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: transform var(--transition-slow);
}

.session-card:hover .card-bg-image {
    transform: scale(1.05);
}

/* Dark gradient overlay for text readability */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.75) 100%
    );
    z-index: 1;
}

/* Ensure all card content is above the overlay */
.card-status,
.card-header,
.card-footer {
    position: relative;
    z-index: 2;
}

.session-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gray-300);
    transition: background var(--transition-base);
    z-index: 3;
}

.session-card:hover:not(.locked) {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Card States */
.session-card.completed::before {
    background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
}

.session-card.current::before {
    background: linear-gradient(90deg, var(--accent-500), var(--accent-300));
}

.session-card.current {
    box-shadow: var(--shadow-glow);
}

.session-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.session-card.locked::before {
    background: var(--gray-400);
}

/* Card Content */
.card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.session-number {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.session-card.completed .session-number {
    background: rgba(20, 184, 166, 0.4);
    border-color: var(--teal-400);
    color: var(--white);
}

.session-card.current .session-number {
    background: rgba(249, 115, 22, 0.4);
    border-color: var(--accent-300);
    color: var(--white);
}

.card-title-area {
    flex: 1;
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-1);
    color: var(--white);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.card-subtitle {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.card-status {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
}

.status-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon.completed {
    background: var(--success);
    color: var(--white);
}

.status-icon.locked {
    background: var(--gray-400);
    color: var(--white);
}

.status-icon svg {
    width: 16px;
    height: 16px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
}

.card-time {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.card-cta {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--accent-300);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.session-card.completed .card-cta {
    color: var(--teal-300);
}

/* Quiz Score Display on Completed Cards */
.card-score {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--teal-300);
    font-weight: 600;
}

.card-score .score-icon {
    font-size: var(--text-base);
}

.card-score .score-value {
    background: rgba(20, 184, 166, 0.3);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    color: var(--white);
}

.session-card.locked .card-cta {
    color: rgba(255, 255, 255, 0.5);
}

/* ============ Session View ============ */
.session-view {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* Session Hero Image */
.session-hero {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-lg);
}

.session-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.session-hero:hover .session-hero-image {
    transform: scale(1.03);
}

.session-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-8) var(--space-6) var(--space-6);
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: var(--white);
}

.session-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-500), var(--accent-300));
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.session-hero-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--white);
    margin: 0 0 var(--space-2) 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.session-hero-subtitle {
    font-size: var(--text-base);
    color: rgba(255,255,255,0.9);
    margin: 0;
}

/* Hero image skeleton loader */
.session-hero-skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        var(--gray-200) 0%,
        var(--gray-100) 20%,
        var(--gray-200) 40%,
        var(--gray-200) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@media (max-width: 768px) {
    .session-hero {
        height: 220px;
        border-radius: var(--radius-lg);
    }

    .session-hero-title {
        font-size: var(--text-xl);
    }

    .session-hero-overlay {
        padding: var(--space-6) var(--space-4) var(--space-4);
    }
}

@media (max-width: 480px) {
    .session-hero {
        height: 180px;
    }

    .session-hero-badge {
        width: 40px;
        height: 40px;
        font-size: var(--text-lg);
    }

    .session-hero-title {
        font-size: var(--text-lg);
    }
}

.session-header {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
    padding: var(--space-6);
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.session-badge {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    background: var(--primary-900);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    flex-shrink: 0;
}

.session-title {
    font-size: var(--text-2xl);
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.session-subtitle {
    color: var(--gray-500);
    font-size: var(--text-base);
    margin: 0;
}

/* TTS Controls */
.tts-controls {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}

.tts-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary-900);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.tts-btn:hover {
    background: var(--primary-700);
    transform: scale(1.05);
}

.tts-btn .hidden {
    display: none;
}

.speed-controls {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.speed-select {
    padding: var(--space-2) var(--space-3);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: var(--white);
    cursor: pointer;
}

.speed-select:focus {
    outline: none;
    border-color: var(--accent-500);
}

.tts-status {
    margin-left: auto;
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.keyboard-hint {
    display: none;
    font-size: var(--text-xs);
    color: var(--gray-400);
    align-items: center;
    gap: var(--space-2);
}

@media (min-width: 769px) {
    .keyboard-hint {
        display: flex;
    }
}

.keyboard-hint kbd {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    font-family: monospace;
    font-size: var(--text-xs);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Session Content */
.session-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-10) var(--space-8);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-6);
    border: 1px solid var(--gray-200);
}

.content-section {
    margin-bottom: var(--space-8);
}

.content-section:last-child {
    margin-bottom: 0;
}

.section-heading {
    color: var(--primary-900);
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 3px solid var(--primary-200);
}

.section-heading .icon {
    font-size: var(--text-2xl);
}

.content-paragraph {
    font-size: var(--text-lg);
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    letter-spacing: -0.01em;
    /* Remove max-width to allow text to flow around floated images */
}

.content-paragraph.highlight {
    background: var(--sun-pale);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
}

/* Ensure text flows nicely around floated images */
.content-section {
    overflow: hidden; /* Contain floats */
}

/* ============ Inline Images - Modern Magazine Layout ============ */

/* Base inline image styles */
.inline-image {
    position: relative;
    margin: var(--space-6) 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--gray-100);
}

.inline-image img {
    width: 100%;
    display: block;
    transition: transform var(--transition-slow);
}

.inline-image:hover img {
    transform: scale(1.02);
}

.inline-image__caption {
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4));
    color: var(--white);
    font-size: var(--text-sm);
    font-weight: 500;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(0);
    transition: transform var(--transition-base), background var(--transition-base);
}

.inline-image:hover .inline-image__caption {
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.5));
}

/* Subtle border accent on images */
.inline-image::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 3px solid transparent;
    background: linear-gradient(135deg, var(--accent-300), var(--gold-400)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 3;
    pointer-events: none;
}

.inline-image:hover::before {
    opacity: 1;
}

/* Featured Image - Full width, prominent */
.inline-image--featured {
    margin: var(--space-8) 0;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
}

.inline-image--featured img {
    height: 320px;
    object-fit: cover;
}

.inline-image--featured .inline-image__caption {
    font-size: var(--text-base);
    padding: var(--space-4) var(--space-5);
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 80%, transparent 100%);
}

/* Full Width Image */
.inline-image--full {
    margin: var(--space-6) 0;
}

.inline-image--full img {
    height: 280px;
    object-fit: cover;
}

/* Float Right Image */
.inline-image--float-right,
.inline-image--right {
    float: right;
    width: 45%;
    max-width: 380px;
    margin: var(--space-2) 0 var(--space-4) var(--space-6);
    shape-outside: margin-box;
}

.inline-image--float-right img,
.inline-image--right img {
    height: 220px;
    object-fit: cover;
}

/* Float Left Image */
.inline-image--float-left,
.inline-image--left {
    float: left;
    width: 45%;
    max-width: 380px;
    margin: var(--space-2) var(--space-6) var(--space-4) 0;
    shape-outside: margin-box;
}

.inline-image--float-left img,
.inline-image--left img {
    height: 220px;
    object-fit: cover;
}

/* Clear floats after content sections */
.content-section::after {
    content: '';
    display: table;
    clear: both;
}

/* ============ Scroll Reveal Animations ============ */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Different reveal animations for variety */
.inline-image--float-right.reveal-on-scroll,
.inline-image--right.reveal-on-scroll {
    transform: translateX(40px);
}

.inline-image--float-right.revealed,
.inline-image--right.revealed {
    transform: translateX(0);
}

.inline-image--float-left.reveal-on-scroll,
.inline-image--left.reveal-on-scroll {
    transform: translateX(-40px);
}

.inline-image--float-left.revealed,
.inline-image--left.revealed {
    transform: translateX(0);
}

.inline-image--featured.reveal-on-scroll {
    transform: translateY(40px) scale(0.98);
}

.inline-image--featured.revealed {
    transform: translateY(0) scale(1);
}

/* Fact box reveal */
.fact-box.reveal-on-scroll {
    transform: translateX(-20px);
}

.fact-box.revealed {
    transform: translateX(0);
}

/* ============ Image Gallery - Enhanced (End Gallery) ============ */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-5);
    margin: var(--space-8) 0;
    clear: both;
}

.image-gallery.end-gallery {
    margin-top: var(--space-10);
    padding-top: var(--space-6);
    border-top: 2px solid var(--gray-200);
}

.gallery-item {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    background: var(--gray-100);
}

.gallery-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform var(--transition-slow), filter var(--transition-base);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
    opacity: 0.8;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4);
    color: var(--white);
    font-size: var(--text-sm);
    font-weight: 600;
    z-index: 2;
    transform: translateY(4px);
    transition: transform var(--transition-base);
}

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

/* Single featured image (first image in gallery) */
.image-gallery.featured .gallery-item:first-child {
    grid-column: 1 / -1;
}

.image-gallery.featured .gallery-item:first-child img {
    height: 320px;
}

/* ============ Responsive Inline Images ============ */
@media (max-width: 900px) {
    .inline-image--float-right,
    .inline-image--right,
    .inline-image--float-left,
    .inline-image--left {
        width: 50%;
        max-width: 320px;
    }

    .inline-image--float-right img,
    .inline-image--right img,
    .inline-image--float-left img,
    .inline-image--left img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    /* On tablet and below, convert floats to full-width blocks */
    .inline-image--float-right,
    .inline-image--right,
    .inline-image--float-left,
    .inline-image--left {
        float: none;
        width: 100%;
        max-width: none;
        margin: var(--space-5) 0;
    }

    .inline-image--float-right img,
    .inline-image--right img,
    .inline-image--float-left img,
    .inline-image--left img {
        height: 220px;
    }

    .inline-image--featured img {
        height: 260px;
    }

    .inline-image--full img {
        height: 220px;
    }

    .image-gallery {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .gallery-item img {
        height: 200px;
    }

    .image-gallery.featured .gallery-item:first-child img {
        height: 240px;
    }

    /* Simplify reveal animations on mobile */
    .reveal-on-scroll,
    .inline-image--float-right.reveal-on-scroll,
    .inline-image--right.reveal-on-scroll,
    .inline-image--float-left.reveal-on-scroll,
    .inline-image--left.reveal-on-scroll,
    .inline-image--featured.reveal-on-scroll {
        transform: translateY(20px);
    }

    .revealed,
    .inline-image--float-right.revealed,
    .inline-image--right.revealed,
    .inline-image--float-left.revealed,
    .inline-image--left.revealed,
    .inline-image--featured.revealed {
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .inline-image--featured img {
        height: 200px;
    }

    .inline-image--full img,
    .inline-image--float-right img,
    .inline-image--right img,
    .inline-image--float-left img,
    .inline-image--left img {
        height: 180px;
    }

    .gallery-item img {
        height: 180px;
    }

    .image-gallery.featured .gallery-item:first-child img {
        height: 200px;
    }

    .inline-image__caption {
        font-size: var(--text-xs);
        padding: var(--space-2) var(--space-3);
    }
}

/* Image Loading Skeleton */
.image-skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Did You Know Box */
.fact-box {
    background: var(--gold-100);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    margin: var(--space-6) 0;
    cursor: pointer;
    transition: all var(--transition-base);
    border-left: 4px solid var(--gold-500);
}

.fact-box:hover {
    transform: translateX(4px);
}

.fact-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    letter-spacing: -0.01em;
    color: var(--gray-800);
}

.fact-header .icon {
    font-size: var(--text-xl);
}

.fact-content {
    margin-top: var(--space-3);
    font-size: var(--text-base);
    color: var(--gray-700);
    display: none;
}

.fact-box.expanded .fact-content {
    display: block;
    animation: fadeIn var(--transition-fast);
}

.fact-toggle {
    margin-left: auto;
    transition: transform var(--transition-fast);
}

.fact-box.expanded .fact-toggle {
    transform: rotate(180deg);
}

/* ============ Quiz Section ============ */
.quiz-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-6);
}

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

.quiz-header h3 {
    color: var(--primary-900);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}

.quiz-header p {
    color: var(--gray-500);
    margin: 0;
}

/* Quiz Question */
.quiz-question {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 2px solid var(--gray-200);
}

.quiz-question:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.question-number {
    display: inline-block;
    background: var(--primary-100);
    color: var(--primary-700);
    font-family: var(--font-display);
    font-weight: 700;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.question-text {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-4);
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.answer-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--text-base);
}

.answer-option:hover:not(.selected):not(.correct):not(.incorrect) {
    background: var(--primary-100);
    border-color: var(--primary-400);
}

.answer-option.selected {
    background: var(--accent-100);
    border-color: var(--accent-500);
}

.answer-option.correct {
    background: var(--teal-100);
    border-color: var(--teal-600);
}

.answer-option.incorrect {
    background: var(--error-light);
    border-color: var(--error);
}

.answer-option.correct .option-letter {
    background: var(--teal-600);
    color: var(--white);
}

.option-letter {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--gray-600);
    flex-shrink: 0;
}

.answer-option.correct .option-letter {
    background: var(--success);
    color: var(--white);
}

.answer-option.incorrect .option-letter {
    background: var(--error);
    color: var(--white);
}

.option-text {
    flex: 1;
}

.answer-feedback {
    margin-top: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    display: none;
}

.answer-feedback.show {
    display: block;
    animation: fadeIn var(--transition-fast);
}

.answer-feedback.correct {
    background: var(--success-light);
    color: var(--success);
}

.answer-feedback.incorrect {
    background: var(--error-light);
    color: var(--error);
}

/* Quiz Results */
.quiz-results {
    text-align: center;
    padding: var(--space-8);
    background: linear-gradient(135deg, var(--teal-100), var(--teal-200));
    border-radius: var(--radius-xl);
    margin-top: var(--space-6);
}

.quiz-results.hidden {
    display: none;
}

.results-score {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--teal-700);
    margin-bottom: var(--space-2);
}

.results-message {
    font-size: var(--text-xl);
    color: var(--gray-700);
    margin: 0;
}

/* ============ Session Footer ============ */
.session-footer {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--primary-900);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-800);
    border: 2px solid var(--primary-300);
}

.btn-secondary:hover {
    background: var(--primary-100);
    border-color: var(--primary-400);
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn.hidden {
    display: none;
}

/* ============ Celebration Overlay ============ */
.celebration-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-6);
}

.celebration-overlay.hidden {
    display: none;
}

.celebration-content {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    text-align: center;
    max-width: 480px;
    width: 100%;
    position: relative;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.celebration-badge {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--gold-400), var(--accent-500));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    animation: pulse 1s ease infinite;
}

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

.celebration-badge .star {
    font-size: 40px;
}

.celebration-content h2 {
    color: var(--primary-900);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}

.celebration-content p {
    color: var(--gray-600);
    font-size: var(--text-lg);
    margin-bottom: var(--space-6);
}

.celebration-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--teal-700);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.celebration-content .btn {
    margin-bottom: var(--space-3);
    width: 100%;
}

/* Confetti */
.confetti-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(500%) rotate(720deg);
        opacity: 0;
    }
}

/* ============ Footer ============ */
.app-footer {
    text-align: center;
    padding: var(--space-6);
    color: var(--gray-500);
    font-size: var(--text-sm);
}

/* ============ Utility Classes ============ */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============ Responsive Design ============ */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .app-header {
        padding: 0 var(--space-4);
    }

    .app-title {
        font-size: var(--text-xl);
    }

    .back-button span {
        display: none;
    }

    .main-content {
        padding: var(--space-4);
    }

    .welcome-banner {
        flex-direction: column;
        padding: var(--space-6);
    }

    .welcome-image {
        flex: none;
        width: 100%;
    }

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

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

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

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

    .session-content {
        padding: var(--space-5);
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }

    .celebration-stats {
        flex-direction: column;
        gap: var(--space-4);
    }

    .tts-controls {
        flex-wrap: wrap;
    }

    .tts-status {
        width: 100%;
        margin-left: 0;
        margin-top: var(--space-2);
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: var(--text-2xl); }
    h2 { font-size: var(--text-xl); }
    h3 { font-size: var(--text-lg); }

    .session-badge {
        width: 48px;
        height: 48px;
        font-size: var(--text-xl);
    }

    .answer-option {
        padding: var(--space-3);
    }

    .btn-large {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-base);
    }
}

/* ============ Sentence Highlighting (Phase 2) ============ */
.sentence {
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
    border-radius: var(--radius-sm);
    padding: 2px 0;
    cursor: pointer;
}

.sentence:hover {
    background-color: rgba(249, 115, 22, 0.08);
}

.sentence.highlight {
    background-color: var(--accent-100);
    box-shadow: 0 0 0 4px var(--accent-100);
    animation: pulse-highlight 0.5s ease;
}

@keyframes pulse-highlight {
    0% {
        box-shadow: 0 0 0 0px var(--accent-400);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.2);
    }
    100% {
        box-shadow: 0 0 0 4px var(--accent-100);
    }
}

/* ============ Image Skeleton (Phase 2) ============ */
.gallery-item {
    position: relative;
    min-height: 240px;
}

.image-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        var(--gray-200) 0%,
        var(--gray-100) 20%,
        var(--gray-200) 40%,
        var(--gray-200) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-skeleton::after {
    content: '';
    width: 48px;
    height: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23adb5bd' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.5;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============ Enhanced Accessibility (Phase 2) ============ */
/* Focus visible for keyboard navigation */
.session-card:focus-visible,
.answer-option:focus-visible,
.fact-box:focus-visible,
.btn:focus-visible,
.tts-btn:focus-visible {
    outline: 3px solid var(--accent-500);
    outline-offset: 2px;
}

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

    .sentence.highlight {
        animation: none;
        box-shadow: 0 0 0 4px var(--sun-pale);
    }

    .confetti {
        display: none;
    }

    /* Disable scroll reveal animations */
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }

    .inline-image--float-right.reveal-on-scroll,
    .inline-image--right.reveal-on-scroll,
    .inline-image--float-left.reveal-on-scroll,
    .inline-image--left.reveal-on-scroll,
    .inline-image--featured.reveal-on-scroll,
    .fact-box.reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .session-card {
        border: 2px solid var(--gray-800);
    }

    .answer-option {
        border: 2px solid var(--gray-700);
    }

    .sentence.highlight {
        background-color: yellow;
        color: black;
    }
}

/* ============ Image Lightbox ============ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    animation: fadeIn var(--transition-base);
}

.lightbox-overlay.hidden {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    margin-top: var(--space-4);
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-base);
    text-align: center;
    max-width: 600px;
}

/* Make images clickable for lightbox */
.inline-image img,
.gallery-item img {
    cursor: zoom-in;
}

/* ============ Print Styles ============ */
@media print {
    .app-header,
    .tts-controls,
    .quiz-section,
    .session-footer,
    .celebration-overlay {
        display: none;
    }

    .session-content {
        box-shadow: none;
        padding: 0;
    }

    .sentence {
        background: none !important;
        box-shadow: none !important;
    }
}

/* ============ Map Toggle Button ============ */
.map-toggle-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.map-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.map-toggle-btn svg {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .map-btn-text {
        display: none;
    }

    .map-toggle-btn {
        padding: var(--space-2);
    }
}

/* ============ Map View ============ */
.map-view {
    max-width: var(--max-width);
    margin: 0 auto;
}

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

.map-header h2 {
    color: var(--primary-900);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}

.map-header p {
    color: var(--gray-600);
    font-size: var(--text-base);
    margin: 0;
}

.map-header #map-unlock-count {
    font-weight: 700;
    color: var(--teal-700);
}

.map-container {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.leaflet-map {
    height: 500px;
    width: 100%;
    z-index: 1;
}

@media (max-width: 768px) {
    .leaflet-map {
        height: 400px;
    }
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: var(--space-4);
    left: var(--space-4);
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-md);
    max-width: 200px;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.map-legend h4 {
    font-size: var(--text-sm);
    color: var(--gray-700);
    margin-bottom: var(--space-3);
    font-family: var(--font-display);
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--gray-600);
}

.legend-item.completed {
    color: var(--palm-dark);
    font-weight: 600;
}

.legend-item.locked {
    color: var(--gray-400);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.legend-dot.completed {
    background: var(--teal-500);
}

.legend-dot.locked {
    background: var(--gray-300);
}

@media (max-width: 600px) {
    .map-legend {
        position: relative;
        bottom: auto;
        left: auto;
        max-width: none;
        margin-top: var(--space-4);
        max-height: none;
    }
}

.map-instructions {
    text-align: center;
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--primary-100);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-400);
}

.map-instructions p {
    margin: 0;
    color: var(--gray-700);
    font-size: var(--text-sm);
}

/* Custom Leaflet Popup Styles */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: var(--radius-xl);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    width: 300px !important;
}

.popup-content {
    font-family: var(--font-body);
}

.popup-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.popup-content:hover .popup-image {
    transform: scale(1.02);
}

.popup-body {
    padding: var(--space-4);
}

.popup-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.popup-icon {
    font-size: var(--text-xl);
}

.popup-name {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.popup-description {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.5;
    margin: 0 0 var(--space-3) 0;
}

.popup-session-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: var(--primary-700);
    background: var(--primary-100);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-weight: 600;
}

.popup-locked {
    text-align: center;
    padding: var(--space-6);
}

.popup-locked-icon {
    font-size: 32px;
    margin-bottom: var(--space-2);
}

.popup-locked-text {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin: 0;
}

/* Custom Map Markers */
.custom-marker-container {
    background: transparent !important;
    border: none !important;
}

.custom-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 3px solid white;
    transition: transform var(--transition-fast);
    cursor: pointer;
}

.custom-marker:hover {
    transform: scale(1.2);
    z-index: 1000 !important;
}

.custom-marker.locked {
    background: var(--gray-400) !important;
    filter: grayscale(100%);
    opacity: 0.6;
}

/* Leaflet popup overrides */
.leaflet-popup-content-wrapper {
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 300px !important;
}

.leaflet-popup-tip {
    background: white;
}

/* ============ Video Section ============ */
.video-section {
    margin: var(--space-8) 0;
    padding: var(--space-6);
    background: linear-gradient(135deg, var(--ocean-pale) 0%, var(--sun-pale) 100%);
    border-radius: var(--radius-xl);
    border: 2px solid var(--ocean-light);
}

.video-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.video-section-header h3 {
    font-size: var(--text-lg);
    color: var(--ocean-deep);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.video-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
}

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

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: var(--gray-200);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.video-card:hover .video-play-overlay {
    opacity: 1;
}

.video-play-btn {
    width: 64px;
    height: 64px;
    background: var(--hollywood-red);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-fast);
}

.video-card:hover .video-play-btn {
    transform: scale(1.1);
}

.video-info {
    padding: var(--space-4);
}

.video-title {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 var(--space-2) 0;
    line-height: 1.3;
}

.video-description {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin: 0;
    line-height: 1.4;
}

.video-duration {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: var(--gray-400);
    margin-top: var(--space-2);
}

/* Video Modal */
.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.video-modal.hidden {
    display: none;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: black;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    color: white;
    font-size: var(--text-2xl);
    padding: var(--space-2);
    cursor: pointer;
    z-index: 10;
}

.video-modal-close:hover {
    color: var(--sun-bright);
}

.video-iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
}

.video-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============ Home Map Teaser ============ */
.map-teaser {
    background: var(--primary-900);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: var(--space-6);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.map-teaser:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.map-teaser-icon {
    flex-shrink: 0;
    color: var(--accent-300);
}

.map-teaser-content {
    flex: 1;
}

.map-teaser-content h3 {
    color: var(--white);
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.map-teaser-content p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: var(--text-base);
}

.map-teaser-stats {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-3);
}

.map-teaser-stat {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
}

.map-teaser-stat strong {
    color: var(--accent-300);
}

.map-teaser-cta {
    background: var(--accent-500);
    color: var(--white);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.map-teaser:hover .map-teaser-cta {
    background: var(--accent-400);
}

@media (max-width: 768px) {
    .map-teaser {
        flex-direction: column;
        text-align: center;
    }

    .map-teaser-stats {
        justify-content: center;
    }

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