/* ==========================================================================
   Lalla - Public Website Scoped Design System (v0.15)
   Modern EdTech & SaaS Aesthetic - Scoped to .public-page / .pub-*
   ========================================================================== */

:root {
    --pub-bg: #f8fafc;
    --pub-surface: #ffffff;
    --pub-surface-alt: #f1f5f9;
    --pub-border: #e2e8f0;
    --pub-border-subtle: #edf2f7;
    --pub-text-main: #0f172a;
    --pub-text-muted: #64748b;
    --pub-text-light: #94a3b8;
    --pub-primary: #4f46e5;
    --pub-primary-hover: #4338ca;
    --pub-primary-light: #eef2ff;
    --pub-secondary: #0ea5e9;
    --pub-accent: #8b5cf6;
    --pub-accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
    --pub-hero-gradient: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.15), transparent 70%);
    --pub-card-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
    --pub-card-hover-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.16);
    --pub-radius-sm: 8px;
    --pub-radius-md: 14px;
    --pub-radius-lg: 20px;
    --pub-radius-full: 9999px;
}

/* Base resets inside public pages */
.public-page {
    background-color: var(--pub-bg);
    color: var(--pub-text-main);
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.public-page a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* --------------------------------------------------------------------------
   Public Navigation Header
   -------------------------------------------------------------------------- */
.pub-navbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--pub-border);
    transition: all 0.25s ease;
}

.pub-nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pub-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pub-text-main);
    letter-spacing: -0.02em;
}

.pub-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--pub-accent-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.pub-brand-badge {
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--pub-primary-light);
    color: var(--pub-primary);
    padding: 2px 7px;
    border-radius: var(--pub-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 2px;
}

.pub-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pub-nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pub-text-muted);
    padding: 6px 0;
    position: relative;
    transition: color 0.2s;
}

.pub-nav-link:hover,
.pub-nav-link.active {
    color: var(--pub-primary);
}

.pub-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--pub-primary);
    border-radius: 2px;
}

.pub-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Button Variants */
.pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--pub-radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.pub-btn-ghost {
    background: transparent;
    color: var(--pub-text-muted);
}
.pub-btn-ghost:hover {
    color: var(--pub-text-main);
    background: var(--pub-surface-alt);
}

.pub-btn-outline {
    background: #ffffff;
    border-color: var(--pub-border);
    color: var(--pub-text-main);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.pub-btn-outline:hover {
    border-color: var(--pub-primary);
    color: var(--pub-primary);
    background: #fafafa;
    transform: translateY(-1px);
}

.pub-btn-primary {
    background: var(--pub-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}
.pub-btn-primary:hover {
    background: var(--pub-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.38);
}

.pub-btn-gradient {
    background: var(--pub-accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.28);
}
.pub-btn-gradient:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.38);
}

.pub-btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: 16px;
}

.pub-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--pub-border);
    padding: 8px 12px;
    border-radius: var(--pub-radius-sm);
    font-size: 1.3rem;
    color: var(--pub-text-main);
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.pub-hero {
    position: relative;
    padding: 80px 24px 60px;
    max-width: 1240px;
    margin: 0 auto;
    text-align: center;
    background: var(--pub-hero-gradient);
}

.pub-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--pub-primary-light);
    color: var(--pub-primary);
    border: 1px solid #c7d2fe;
    padding: 6px 16px;
    border-radius: var(--pub-radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.pub-hero-title {
    font-size: 3.4rem;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: var(--pub-text-main);
    max-width: 900px;
    margin: 0 auto 20px;
}

.pub-hero-title .gradient-text {
    background: var(--pub-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pub-hero-subtitle {
    font-size: 1.22rem;
    color: var(--pub-text-muted);
    max-width: 720px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

.pub-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

/* Trust / Stats Bar */
.pub-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    padding: 24px 32px;
    background: #ffffff;
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-lg);
    box-shadow: var(--pub-card-shadow);
    max-width: 860px;
    margin: 0 auto 64px;
    flex-wrap: wrap;
}

.pub-stat-item {
    text-align: center;
}
.pub-stat-val {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--pub-primary);
    line-height: 1.2;
}
.pub-stat-lbl {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pub-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Studio Live Preview Mockup Card
   -------------------------------------------------------------------------- */
.pub-preview-wrap {
    max-width: 1040px;
    margin: 0 auto 90px;
    padding: 0 16px;
}

.pub-preview-window {
    background: #ffffff;
    border: 1.5px solid var(--pub-border);
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(79, 70, 229, 0.05);
    overflow: hidden;
    text-align: left;
}

.pub-window-bar {
    background: #f8fafc;
    border-bottom: 1px solid var(--pub-border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pub-window-dots {
    display: flex;
    gap: 8px;
}
.pub-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.pub-dot-red { background: #ef4444; }
.pub-dot-yellow { background: #f59e0b; }
.pub-dot-green { background: #10b981; }

.pub-window-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--pub-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pub-window-body {
    padding: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.pub-mock-player {
    background: #ffffff;
    border: 1px solid #e0e7ff;
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.05);
}

.pub-mock-track {
    display: flex;
    align-items: center;
    gap: 14px;
}
.pub-mock-cover {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--pub-accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.pub-mock-info h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}
.pub-mock-info span {
    font-size: 0.8rem;
    color: var(--pub-text-muted);
}

.pub-mock-karaoke-box {
    background: #fdfefe;
    border: 1px solid var(--pub-border);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 20px;
}

.pub-mock-sentence {
    font-size: 1.28rem;
    font-weight: 600;
    line-height: 1.65;
    color: #334155;
    margin-bottom: 14px;
}

.pub-mock-word-active {
    background: #ede9fe;
    color: #6d28d9;
    padding: 3px 8px;
    border-radius: 6px;
    border-bottom: 2.5px solid #7c3aed;
    font-weight: 700;
}

.pub-mock-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pub-mock-chip {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.76rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 4px 8px;
    border-radius: 6px;
}
.pub-mock-chip.active {
    background: #7c3aed;
    color: #ffffff;
    border-color: #7c3aed;
}

.pub-mock-tools-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.pub-mock-tool-tag {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.pub-mock-tool-tag.featured {
    background: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

/* --------------------------------------------------------------------------
   Curriculum / Content Areas
   -------------------------------------------------------------------------- */
.pub-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 60px 24px;
}

.pub-section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
}

.pub-section-tag {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--pub-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    display: inline-block;
}

.pub-section-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--pub-text-main);
    letter-spacing: -0.025em;
    margin-bottom: 14px;
}

.pub-section-desc {
    font-size: 1.08rem;
    color: var(--pub-text-muted);
}

.pub-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.pub-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.pub-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
}

/* Track Card */
.pub-track-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-lg);
    padding: 28px;
    box-shadow: var(--pub-card-shadow);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.pub-track-card:hover {
    transform: translateY(-4px);
    border-color: var(--pub-primary);
    box-shadow: var(--pub-card-hover-shadow);
}

.pub-track-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.pub-track-title {
    font-size: 1.3rem;
    font-weight: 750;
    margin-bottom: 10px;
}

.pub-track-desc {
    font-size: 0.92rem;
    color: var(--pub-text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.pub-track-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--pub-border-subtle);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--pub-text-muted);
}

/* --------------------------------------------------------------------------
   Feature Cards
   -------------------------------------------------------------------------- */
.pub-feature-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-lg);
    padding: 32px 28px;
    box-shadow: var(--pub-card-shadow);
    transition: all 0.25s ease;
}
.pub-feature-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-3px);
}

.pub-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--pub-primary-light);
    color: var(--pub-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    margin-bottom: 20px;
}

.pub-feature-title {
    font-size: 1.22rem;
    font-weight: 750;
    margin-bottom: 10px;
}

.pub-feature-desc {
    font-size: 0.92rem;
    color: var(--pub-text-muted);
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Methodology / How It Works
   -------------------------------------------------------------------------- */
.pub-step-card {
    display: flex;
    gap: 20px;
    background: #ffffff;
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-lg);
    padding: 24px;
    box-shadow: var(--pub-card-shadow);
}
.pub-step-num {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--pub-accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    flex-shrink: 0;
}
.pub-step-content h4 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 750;
}
.pub-step-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--pub-text-muted);
}

/* --------------------------------------------------------------------------
   Pricing Cards
   -------------------------------------------------------------------------- */
.pub-pricing-card {
    background: #ffffff;
    border: 1px solid var(--pub-border);
    border-radius: 22px;
    padding: 36px 30px;
    box-shadow: var(--pub-card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.25s ease;
}
.pub-pricing-card.featured {
    border: 2px solid var(--pub-primary);
    box-shadow: 0 20px 45px -12px rgba(79, 70, 229, 0.2);
    transform: scale(1.02);
}
.pub-pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pub-primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 14px;
    border-radius: var(--pub-radius-full);
}
.pub-pricing-header {
    margin-bottom: 24px;
}
.pub-plan-name {
    font-size: 1.25rem;
    font-weight: 750;
    margin-bottom: 6px;
}
.pub-plan-desc {
    font-size: 0.88rem;
    color: var(--pub-text-muted);
}
.pub-plan-price {
    font-size: 2.8rem;
    font-weight: 850;
    color: var(--pub-text-main);
    margin: 16px 0;
}
.pub-plan-price span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pub-text-muted);
}
.pub-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    flex-grow: 1;
}
.pub-plan-features li {
    font-size: 0.92rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
}
.pub-plan-features li i {
    color: #10b981;
    font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   CTA Banner
   -------------------------------------------------------------------------- */
.pub-cta-banner {
    max-width: 1240px;
    margin: 40px auto 80px;
    padding: 0 24px;
}
.pub-cta-box {
    background: var(--pub-accent-gradient);
    border-radius: 28px;
    padding: 60px 40px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 20px 50px -10px rgba(79, 70, 229, 0.4);
}
.pub-cta-box h2 {
    font-size: 2.5rem;
    font-weight: 850;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
}
.pub-cta-box p {
    font-size: 1.15rem;
    opacity: 0.92;
    max-width: 620px;
    margin: 0 auto 32px;
}

/* --------------------------------------------------------------------------
   Public Lesson Preview Page
   -------------------------------------------------------------------------- */
.pub-preview-hero {
    background: #ffffff;
    border-bottom: 1px solid var(--pub-border);
    padding: 48px 24px;
}
.pub-preview-inner {
    max-width: 980px;
    margin: 0 auto;
}
.pub-preview-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.pub-preview-title {
    font-size: 2.2rem;
    font-weight: 850;
    margin-bottom: 12px;
}
.pub-preview-desc {
    font-size: 1.05rem;
    color: var(--pub-text-muted);
    margin-bottom: 24px;
}

.pub-preview-player-card {
    background: #f8fafc;
    border: 1px solid var(--pub-border);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 36px;
}

.pub-preview-transcript-box {
    background: #ffffff;
    border: 1px solid var(--pub-border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--pub-card-shadow);
    margin-bottom: 40px;
}

.pub-preview-sentence-row {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}
.pub-preview-sentence-row:hover,
.pub-preview-sentence-row.playing {
    background: #f8fafc;
    border-left-color: var(--pub-primary);
}

.pub-locked-gate {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, #ffffff 80%);
    border: 1.5px dashed #c7d2fe;
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    margin-top: 20px;
}
.pub-locked-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--pub-primary);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

/* --------------------------------------------------------------------------
   Explore Catalog Filter & Grid
   -------------------------------------------------------------------------- */
.pub-explore-toolbar {
    background: #ffffff;
    border: 1px solid var(--pub-border);
    border-radius: 18px;
    padding: 16px 20px;
    margin-bottom: 32px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.pub-search-input {
    flex-grow: 1;
    min-width: 260px;
    border: 1px solid var(--pub-border);
    border-radius: 12px;
    padding: 10px 16px 10px 42px;
    font-size: 0.92rem;
}
.pub-cat-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.pub-cat-pill {
    padding: 8px 16px;
    border-radius: var(--pub-radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid var(--pub-border);
    color: var(--pub-text-muted);
    transition: all 0.2s ease;
}
.pub-cat-pill:hover,
.pub-cat-pill.active {
    background: var(--pub-primary);
    color: #ffffff;
    border-color: var(--pub-primary);
}

.pub-lesson-card {
    background: #ffffff;
    border: 1px solid var(--pub-border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--pub-card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
}
.pub-lesson-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--pub-card-hover-shadow);
    border-color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   Comprehensive Persian Public Footer (Pattern matching home.html)
   -------------------------------------------------------------------------- */
.pub-footer,
.site-footer {
    background: #ffffff !important;
    border-top: 1px solid #e7ecf5 !important;
    padding: 68px 0 32px !important;
    color: #5d6b82 !important;
    font-size: 13.5px !important;
    line-height: 1.8 !important;
    position: relative !important;
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

.site-footer *,
.pub-footer * {
    box-sizing: border-box;
}

.pub-footer .wrap,
.site-footer .wrap,
.pub-footer-container {
    width: min(1240px, calc(100% - 40px)) !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.pub-footer .footer-top,
.site-footer .footer-top,
.pub-footer-grid {
    display: grid !important;
    grid-template-columns: 1.8fr 1.15fr 1.15fr 1fr !important;
    gap: 45px !important;
    margin-bottom: 48px !important;
}

.pub-footer .footer-col h4,
.site-footer .footer-col h4,
.pub-footer-col h4,
.pub-footer-col h5 {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #121829 !important;
    margin: 0 0 20px !important;
    position: relative !important;
    display: inline-block !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    line-height: 1.4 !important;
}

.pub-footer .footer-col h4::after,
.site-footer .footer-col h4::after,
.pub-footer-col h4::after,
.pub-footer-col h5::after {
    content: '' !important;
    position: absolute !important;
    bottom: -6px !important;
    right: 0 !important;
    left: auto !important;
    width: 24px !important;
    height: 2.5px !important;
    background: linear-gradient(90deg, #6042f4, #16b9e7) !important;
    border-radius: 99px !important;
}

.pub-footer .brand-col .footer-brand,
.site-footer .brand-col .footer-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;
    margin-bottom: 18px !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    font-size: 23px !important;
    direction: ltr !important;
    color: #10172d !important;
    transition: transform .2s ease !important;
}

.pub-footer .brand-col .footer-brand span,
.site-footer .brand-col .footer-brand span {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
    font-weight: 900 !important;
    font-size: 23px !important;
    color: #10172d !important;
    letter-spacing: -0.3px !important;
}

.pub-footer .brand-col .footer-brand:hover .logo,
.site-footer .brand-col .footer-brand:hover .logo {
    transform: scale(1.06) !important;
}

.pub-footer .footer-desc,
.site-footer .footer-desc {
    font-size: 13px !important;
    color: #65738e !important;
    line-height: 1.85 !important;
    margin: 0 0 20px !important;
    max-width: 360px !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

.pub-footer .footer-badges,
.site-footer .footer-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
}

.pub-footer .fbadge,
.site-footer .fbadge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: #f4f6fc !important;
    border: 1px solid #e3e8f3 !important;
    color: #485672 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    transition: all .2s ease !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    line-height: 1.6 !important;
}

.pub-footer .fbadge i,
.site-footer .fbadge i {
    color: #6042f4 !important;
    font-size: 12px !important;
}

.pub-footer .fbadge:hover,
.site-footer .fbadge:hover {
    background: #eef1ff !important;
    border-color: #cbd4ff !important;
    color: #5534ec !important;
    transform: translateY(-1px) !important;
}

.pub-footer .footer-links,
.site-footer .footer-links,
.pub-footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 11px !important;
}

.pub-footer .footer-links li,
.site-footer .footer-links li,
.pub-footer-links li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pub-footer .footer-links li a,
.site-footer .footer-links li a,
.pub-footer-links li a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #5f6d86 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all .2s ease !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    direction: rtl !important;
}

.pub-footer .footer-links li a i,
.site-footer .footer-links li a i,
.pub-footer-links li a i {
    font-size: 13px !important;
    color: #9aa5be !important;
    transition: all .2s ease !important;
}

.pub-footer .footer-links li a:hover,
.site-footer .footer-links li a:hover,
.pub-footer-links li a:hover {
    color: #5534ec !important;
    transform: translateX(-4px) !important;
}

.pub-footer .footer-links li a:hover i,
.site-footer .footer-links li a:hover i,
.pub-footer-links li a:hover i {
    color: #5534ec !important;
}

.pub-footer .footer-bottom,
.site-footer .footer-bottom,
.pub-footer-bottom {
    padding-top: 26px !important;
    border-top: 1px solid #edf1f8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    font-size: 12.5px !important;
    color: #79869f !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

.pub-footer .footer-copy,
.site-footer .footer-copy {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

.pub-footer .footer-copy strong,
.site-footer .footer-copy strong {
    color: #313b52 !important;
}

.pub-footer .footer-bottom-links,
.site-footer .footer-bottom-links {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

.pub-footer .footer-bottom-links a,
.site-footer .footer-bottom-links a,
.pub-footer-bottom a {
    color: #65748f !important;
    text-decoration: none !important;
    transition: color .2s !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

.pub-footer .footer-bottom-links a:hover,
.site-footer .footer-bottom-links a:hover,
.pub-footer-bottom a:hover {
    color: #5534ec !important;
}

.pub-footer .footer-bottom-links .sep,
.site-footer .footer-bottom-links .sep {
    color: #c9d2e3 !important;
}

@media (max-width: 980px) {
    .pub-footer .footer-top,
    .site-footer .footer-top,
    .pub-footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 36px !important;
    }
}

@media (max-width: 580px) {
    .pub-footer .footer-top,
    .site-footer .footer-top,
    .pub-footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }
    .pub-footer .footer-bottom,
    .site-footer .footer-bottom,
    .pub-footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        justify-content: center !important;
    }
}

/* --------------------------------------------------------------------------
   Authenticated User Pill & Dropdown in Public Navbar
   -------------------------------------------------------------------------- */
.ws-profile-dropdown-wrap {
    position: relative;
}

.ws-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 14px 4px 4px !important;
    background: #ffffff !important;
    border: 1px solid var(--pub-border) !important;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ws-user-pill:hover,
.ws-user-pill[aria-expanded="true"] {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}
.ws-user-pill::after {
    display: none !important;
}
.ws-user-pill .ws-pill-chevron {
    transition: transform 0.2s ease;
}
.ws-user-pill[aria-expanded="true"] .ws-pill-chevron {
    transform: rotate(180deg);
}

.ws-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.ws-user-dropdown {
    width: 300px;
    min-width: 290px;
    border-radius: 16px !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.12), 0 10px 15px -5px rgba(15, 23, 42, 0.06) !important;
    padding: 0 !important;
    margin-top: 10px !important;
    animation: wsDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    background: #ffffff;
    overflow: hidden;
}

@keyframes wsDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ws-dropdown-header {
    padding: 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #f1f5f9;
}

.ws-user-avatar-lg {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
    flex-shrink: 0;
}

.ws-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: #16a34a;
    font-weight: 600;
    background: #dcfce7;
    padding: 1px 7px;
    border-radius: 9999px;
}

.ws-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.ws-dropdown-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 6px 12px 4px 12px;
}

.ws-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    text-decoration: none;
}
.ws-dropdown-item:hover,
.ws-dropdown-item:focus {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateX(2px);
}

.ws-dropdown-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.ws-dropdown-item:hover .ws-dropdown-icon {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ws-dropdown-title {
    font-size: 0.85rem;
    line-height: 1.2;
}

.ws-dropdown-logout:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}
.ws-dropdown-logout .ws-dropdown-icon {
    background: #fef2f2;
}
.ws-dropdown-logout:hover .ws-dropdown-icon {
    background: #fee2e2;
}

.text-indigo { color: #4f46e5 !important; }
.text-purple { color: #9333ea !important; }

/* ==========================================================================
   Lalla - Modern SaaS Explore Page Design System
   Matches Reference: Sticky Header, Curriculum Sidebar, 3-Col Lesson Grid
   ========================================================================== */

.explore-body-mode {
    background-color: #f8fafc !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.explore-body-mode .pub-nav-container {
    max-width: 1720px;
    padding: 14px 28px;
}

/* --- Top Header --- */
.explore-top-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.explore-header-left {
    display: flex;
    align-items: center;
    min-width: 220px;
}

.explore-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.explore-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.explore-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.explore-brand-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: #0f172a;
    letter-spacing: -0.3px;
}

.explore-brand-subtitle {
    font-size: 0.68rem;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.explore-header-center {
    flex: 1;
    max-width: 540px;
    margin: 0 24px;
}

.explore-search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.explore-search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}

.explore-search-input {
    width: 100%;
    height: 40px;
    padding: 0 54px 0 38px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.84rem;
    color: #0f172a;
    transition: all 0.2s ease;
}

.explore-search-input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.explore-search-shortcut {
    position: absolute;
    right: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.70rem;
    color: #64748b;
    font-weight: 600;
    pointer-events: none;
}

.explore-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.explore-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
}

.explore-icon-btn:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.explore-notification-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2563eb;
    border: 1.5px solid #fff;
}

/* --- Layout Container --- */
.explore-layout {
    display: flex;
    flex: 1;
    max-width: 1720px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 28px 48px;
    gap: 32px;
}

/* --- Left Curriculum Sidebar --- */
.explore-sidebar {
    width: 340px;
    flex-shrink: 0;
    position: sticky;
    top: 84px;
    height: fit-content;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 4px;
}

.curriculum-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: 0.2px;
}

.sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    margin-bottom: 14px;
}

.sidebar-library-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pill-total-lessons {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
}

/* Selected Navigation Card */
.sidebar-selected-card {
    background: #eff6ff;
    border: 2.5px solid #2563eb;
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    margin-bottom: 14px;
}

.sidebar-selected-card:hover {
    background: #e8f2ff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.selected-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.selected-card-info {
    flex: 1;
    margin: 0 12px;
}

.selected-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.selected-card-desc {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.2;
}

.selected-card-badge {
    background: #2563eb;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 9999px;
    flex-shrink: 0;
}

/* Quick Filter Field & Actions */
.sidebar-filter-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.sidebar-search-box {
    position: relative;
    flex: 1;
}

.sidebar-search-box input {
    width: 100%;
    height: 36px;
    padding: 0 10px 0 32px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.78rem;
    color: #0f172a;
    transition: all 0.15s ease;
}

.sidebar-search-box input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.sidebar-search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.8rem;
    pointer-events: none;
}

.sidebar-btn-square {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 8px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.sidebar-btn-square:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Purple Section Container: LISTENING */
.sidebar-purple-box {
    background: #faf5ff;
    border: 1.5px solid #e9d5ff;
    border-radius: 18px;
    padding: 14px;
}

.purple-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

.purple-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7c3aed;
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.5px;
}

.purple-box-badge {
    background: #ede9fe;
    color: #7c3aed;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
}

.purple-box-chevron {
    color: #7c3aed;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.purple-box-chevron.collapsed {
    transform: rotate(180deg);
}

/* =======================================================
   Multi-Theme Root Section Blocks (Explore Sidebar Option 2)
   ======================================================= */
.sidebar-section-box {
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 12px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

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

.sidebar-section-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Theme Purple (🎯 Exam Practice) */
.sidebar-section-box.theme-purple {
    background: #faf5ff;
    border: 1.5px solid #e9d5ff;
}
.sidebar-section-box.theme-purple:hover {
    border-color: #d8b4fe;
}
.sidebar-section-box.theme-purple .section-box-title { color: #7c3aed; }
.sidebar-section-box.theme-purple .section-box-badge { background: #ede9fe; color: #7c3aed; }
.sidebar-section-box.theme-purple .section-box-chevron { color: #7c3aed; }
.sidebar-section-box.theme-purple .section-box-icon-box { background: #f3e8ff; color: #7c3aed; }
.sidebar-section-box.theme-purple.active-root {
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.3), 0 4px 12px rgba(124, 58, 237, 0.12);
}

/* Theme Blue (🎧 Podcasts) */
.sidebar-section-box.theme-blue {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
}
.sidebar-section-box.theme-blue:hover {
    border-color: #7dd3fc;
}
.sidebar-section-box.theme-blue .section-box-title { color: #0284c7; }
.sidebar-section-box.theme-blue .section-box-badge { background: #e0f2fe; color: #0284c7; }
.sidebar-section-box.theme-blue .section-box-chevron { color: #0284c7; }
.sidebar-section-box.theme-blue .section-box-icon-box { background: #e0f2fe; color: #0284c7; }
.sidebar-section-box.theme-blue.active-root {
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.3), 0 4px 12px rgba(2, 132, 199, 0.12);
}

/* Theme Emerald (📚 Academic Listening) */
.sidebar-section-box.theme-emerald {
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
}
.sidebar-section-box.theme-emerald:hover {
    border-color: #6ee7b7;
}
.sidebar-section-box.theme-emerald .section-box-title { color: #059669; }
.sidebar-section-box.theme-emerald .section-box-badge { background: #d1fae5; color: #059669; }
.sidebar-section-box.theme-emerald .section-box-chevron { color: #059669; }
.sidebar-section-box.theme-emerald .section-box-icon-box { background: #d1fae5; color: #059669; }
.sidebar-section-box.theme-emerald.active-root {
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.3), 0 4px 12px rgba(5, 150, 105, 0.12);
}

/* Theme Amber / Warm (General English) */
.sidebar-section-box.theme-amber {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
}
.sidebar-section-box.theme-amber:hover {
    border-color: #fcd34d;
}
.sidebar-section-box.theme-amber .section-box-title { color: #d97706; }
.sidebar-section-box.theme-amber .section-box-badge { background: #fef3c7; color: #d97706; }
.sidebar-section-box.theme-amber .section-box-chevron { color: #d97706; }
.sidebar-section-box.theme-amber .section-box-icon-box { background: #fef3c7; color: #d97706; }
.sidebar-section-box.theme-amber.active-root {
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.3), 0 4px 12px rgba(217, 119, 6, 0.12);
}

/* Section Box Header */
.section-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 8px;
    transition: opacity 0.15s ease;
}

.section-box-header.no-children {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-box-header:hover {
    opacity: 0.88;
}

.section-box-title {
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.2px;
}

.section-box-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.section-box-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
}

.section-box-chevron {
    font-size: 0.78rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.section-box-chevron.collapsed {
    transform: rotate(-90deg);
}

.section-box-chevron-btn {
    background: transparent;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.section-box-chevron-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Category Rows inside Container */
.curriculum-row {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.curriculum-row:last-child {
    margin-bottom: 0;
}

.curriculum-row:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

.curriculum-row.active {
    border-color: #7c3aed;
    background: #fdfaff;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.12);
}

.row-icon-box {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.row-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #1e293b;
    margin-left: 10px;
}

.row-count {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 9999px;
}

.row-chevron {
    color: #94a3b8;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.row-chevron.expanded,
.subtrack-chevron.expanded {
    transform: rotate(90deg);
    color: #7c3aed;
}

/* Tree Toggle Button */
.tree-toggle-btn {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.tree-toggle-btn:hover {
    background: #ede9fe;
    color: #7c3aed;
}

.subtrack-spacer {
    width: 14px;
    display: inline-block;
    flex-shrink: 0;
}

.subtrack-icon {
    font-size: 0.82rem;
    color: #6366f1;
    flex-shrink: 0;
}

/* Expandable Nested Subtracks */
.subtracks-wrapper {
    margin: -4px 0 8px 12px;
    padding-left: 10px;
    border-left: 2px dashed #e9d5ff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.subtracks-wrapper.level-children-1 {
    margin: 2px 0 8px 10px;
    padding-left: 10px;
    border-left: 2px dashed #e9d5ff;
    gap: 5px;
}

.subtracks-wrapper.level-children-2 {
    margin: 2px 0 6px 8px;
    padding-left: 8px;
    border-left: 1.5px dashed #f3e8ff;
    gap: 4px;
}

.subtracks-wrapper.level-children-3 {
    margin: 2px 0 4px 6px;
    padding-left: 6px;
    border-left: 1px dashed #ede9fe;
    gap: 3px;
}

.subtrack-item {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s ease;
    user-select: none;
}

.subtrack-item.level-2 {
    padding: 6px 8px;
    font-size: 0.79rem;
    border-radius: 8px;
}

.subtrack-item.level-3 {
    padding: 5px 8px;
    font-size: 0.75rem;
    background: #fdfcff;
    border-radius: 7px;
}

.subtrack-item:hover {
    border-color: #c084fc;
    background: #faf5ff;
    transform: translateX(2px);
}

.subtrack-item.active {
    border-color: #7c3aed !important;
    background: #f5f3ff !important;
    box-shadow: 0 0 0 1.5px rgba(124, 58, 237, 0.2) !important;
}

.subtrack-item.active .subtrack-title {
    color: #6d28d9 !important;
    font-weight: 700 !important;
}

.subtrack-item.active .subtrack-count {
    background: #ede9fe !important;
    color: #7c3aed !important;
    font-weight: 700 !important;
}

.subtrack-chevron {
    color: #94a3b8;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

/* --- Main Content Area --- */
.explore-main {
    flex: 1;
    min-width: 0;
}

.explore-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.80rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 12px;
}

.breadcrumb-root {
    cursor: pointer;
    transition: color 0.15s ease;
}

.breadcrumb-root:hover {
    color: #2563eb;
}

.breadcrumb-separator {
    color: #cbd5e1;
    font-size: 0.70rem;
}

.breadcrumb-active {
    color: #0f172a;
    font-weight: 600;
}

.library-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.library-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.library-heading-icon {
    font-size: 2.2rem;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.library-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.2;
}

.library-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    margin: 4px 0 0 0;
}

.library-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.library-search-bar {
    width: 320px;
    max-width: 360px;
}

.library-search-bar .explore-search-input {
    height: 38px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.82rem;
    padding: 0 46px 0 32px;
}

.library-search-bar .explore-search-icon {
    left: 10px;
    font-size: 0.8rem;
}

.library-search-bar .explore-search-shortcut {
    right: 8px;
    padding: 2px 6px;
    font-size: 0.68rem;
}

.sort-label {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.sort-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sort-dropdown-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.view-toggle {
    display: inline-flex;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.view-btn {
    width: 38px;
    height: 38px;
    background: #ffffff;
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.15s ease;
}

.view-btn:first-child {
    border-right: 1px solid #e2e8f0;
}

.view-btn.active {
    background: #2563eb;
    color: #ffffff;
}

/* Filter Pills Row */
.filter-pills-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-pills-container {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0;
}

.filter-pills-container::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.cat-pill:hover {
    border-color: #cbd5e1;
    color: #0f172a;
    background: #f8fafc;
}

.cat-pill.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.more-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.more-filters-btn:hover {
    border-color: #cbd5e1;
    color: #0f172a;
    background: #f8fafc;
}

/* --- Lesson Cards Grid --- */
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.lesson-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
}

.lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.card-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.card-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #059669;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
}

.card-menu-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.95rem;
    padding: 0 4px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
}

.card-menu-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.card-body-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.card-thumb {
    width: 82px;
    height: 82px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}

.card-text-area {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding-top: 10px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.card-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-study {
    flex: 1;
    height: 36px;
    border: 1px solid #bfdbfe;
    background: #ffffff;
    color: #2563eb;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-study:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.btn-practice {
    flex: 1;
    height: 36px;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    transition: all 0.15s ease;
}

.btn-practice:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    color: #ffffff;
}

/* List View Layout */
.lesson-grid.list-view {
    grid-template-columns: 1fr;
    gap: 12px;
}

.lesson-grid.list-view .lesson-card {
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
}

.lesson-grid.list-view .card-top-bar {
    margin-bottom: 0;
    order: 2;
    margin-left: auto;
    margin-right: 16px;
    gap: 8px;
}

.lesson-grid.list-view .card-body-row {
    flex: 1;
    align-items: center;
}

.lesson-grid.list-view .card-thumb {
    width: 54px;
    height: 54px;
}

.lesson-grid.list-view .card-meta-row {
    margin-top: 0;
    padding-top: 0;
    order: 3;
    margin-right: 16px;
}

.lesson-grid.list-view .card-actions-row {
    margin-top: 0;
    order: 4;
    min-width: 190px;
}

/* Empty State */
.explore-empty-state {
    grid-column: 1 / -1;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1280px) {
    .explore-sidebar {
        width: 300px;
    }
    .lesson-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .explore-layout {
        flex-direction: column;
        padding: 16px;
        gap: 20px;
    }
    
    /* Off-canvas style for sidebar on mobile/tablet */
    .explore-sidebar {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        bottom: 0;
        width: 320px;
        background: #ffffff;
        z-index: 1045;
        padding: 20px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
        max-height: calc(100vh - 64px);
    }
    
    .explore-sidebar.show-drawer {
        display: block;
    }
    
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        top: 64px;
        background: rgba(15, 23, 42, 0.4);
        z-index: 1044;
        display: none;
    }
    
    .sidebar-backdrop.show-drawer {
        display: block;
    }
    
    .explore-header-center {
        margin: 0 12px;
    }
    
    .lesson-grid {
        grid-template-columns: 1fr;
    }
}

