/* ═══════════════════════════════════════════════════
   Dives Pater Learning Academy — LMS Design System
   ═══════════════════════════════════════════════════ */

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

:root {
    --navy: #003366;
    --accent: #1F5AA3;
    --blue-mid: #4472C4;
    --blue-light: #C8D4E0;
    --gold: #C9A84C;
    --gold-pale: #F5EFDD;
    --gray-dark: #333333;
    --gray-mid: #666666;
    --gray-light: #999999;
    --bg: #F4F7FB;
    --white: #FFFFFF;
    --success: #2E7D32;
    --warning: #F57C00;
    --danger: #C62828;
    --radius: 14px;
    --shadow: 0 4px 24px rgba(0,51,102, 0.08);
    --shadow-hover: 0 8px 32px rgba(0,51,102, 0.14);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--gray-dark);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--navy); }

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

/* ─── Topbar ─── */

.topbar {
    height: 72px;
    background: var(--white);
    border-bottom: 1px solid var(--blue-light);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 2px 12px rgba(26, 26, 26, 0.04);
}

.topbar .logo { height: 48px; }

.topbar-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 1; min-width: 0; }

.swiss-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
    padding-left: 12px;
    border-left: 1px solid var(--blue-light);
}

.swiss-flag {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.swiss-text {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-light);
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-mid);
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-links a:hover { background: var(--bg); color: var(--navy); }
.nav-links a.active { color: var(--accent); font-weight: 600; }

.user-menu { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-mid);
}

.btn-logout {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-light);
    padding: 6px 14px;
    border: 1px solid var(--blue-light);
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-logout:hover { border-color: var(--accent); color: var(--accent); }

.btn-back-to-site {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-mid);
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-back-to-site:hover { color: var(--navy); background: var(--bg); }
.btn-back-to-site svg { stroke: currentColor; }

.mobile-only-link { display: none; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--navy);
    width: 32px;
    height: 32px;
}

/* ─── Hero ─── */

.hero {
    position: relative;
    overflow: hidden;
}

.hero-cover {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(26,26,26,0.88) 0%, rgba(26,26,26,0.65) 50%, rgba(26,26,26,0.15) 100%);
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 640px;
    padding: 0 64px;
    color: var(--white);
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

.hero-label::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--gold);
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero h1 em { font-style: normal; color: var(--gold); }

.hero p {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 24px;
}

.hero-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

/* ─── Buttons ─── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--white);
    color: var(--accent);
    border: 1px solid var(--blue-light);
}

.btn-secondary:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.public-topbar-action {
    padding: 10px 18px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.btn-hero {
    background: var(--white);
    color: var(--navy);
    font-weight: 700;
    padding: 16px 36px;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    color: var(--navy);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #1B5E20;
    color: var(--white);
}

/* ─── Section Layout ─── */

.section {
    padding: 64px 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-white {
    background: var(--white);
    border-top: 1px solid var(--blue-light);
    border-bottom: 1px solid var(--blue-light);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-label::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--accent);
}

.section h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
}

.section p.subtitle {
    font-size: 1.05rem;
    color: var(--gray-mid);
    max-width: 600px;
    margin-bottom: 40px;
}

/* ─── Card Grid ─── */

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

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid var(--blue-light);
    border-left: 4px solid;
    border-image: linear-gradient(to bottom, var(--navy), var(--blue-mid)) 1;
    transition: all 0.25s;
    box-shadow: var(--shadow);
}

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

.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 16px;
}

.card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.card-text {
    font-size: 0.9rem;
    color: var(--gray-mid);
    line-height: 1.7;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--gray-light);
}

.card-meta svg { width: 14px; height: 14px; }

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--blue-light);
}

/* ─── Progress Bar ─── */

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--blue-light);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--blue-mid));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 4px;
}

/* ─── Login / Register ─── */

.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #F5EFDD 0%, #EDE2C5 100%);
    min-height: 100vh;
}

.auth-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 16px 48px rgba(26, 26, 26, 0.2);
}

.auth-logo {
    display: block;
    height: 56px;
    margin: 0 auto 32px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--gray-mid);
    text-align: center;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    border: 1px solid var(--blue-light);
    border-radius: 8px;
    color: var(--gray-dark);
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31,90,163, 0.1);
}

.survey-page {
    position: relative;
}

.survey-page::before {
    content: '';
    position: absolute;
    top: 18px;
    right: 32px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(68, 114, 196, 0.12) 0%, rgba(68, 114, 196, 0) 72%);
    pointer-events: none;
}

.survey-form {
    background:
        radial-gradient(circle at top right, rgba(68, 114, 196, 0.08) 0%, rgba(68, 114, 196, 0) 28%),
        linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(244,247,251,0.98) 100%);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid rgba(200, 212, 224, 0.95);
    box-shadow: 0 16px 40px rgba(26, 26, 26, 0.1);
}

.survey-helper {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    margin-bottom: 24px;
    border-radius: 16px;
    border: 1px solid rgba(68, 114, 196, 0.16);
    background: linear-gradient(135deg, rgba(68, 114, 196, 0.08) 0%, rgba(255,255,255,0.95) 100%);
}

.survey-helper strong {
    color: var(--navy);
    font-size: 0.88rem;
}

.survey-helper span {
    color: var(--gray-mid);
    font-size: 0.92rem;
}

.survey-question-card {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid rgba(200, 212, 224, 0.95);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(250,252,255,1) 100%);
    box-shadow: 0 10px 24px rgba(26, 26, 26, 0.05);
    border-top: 3px solid rgba(68, 114, 196, 0.24);
}

.survey-question-head {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.survey-question-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.survey-question-kicker::before {
    content: '';
    width: 18px;
    height: 2px;
    background: var(--accent);
    border-radius: 999px;
}

.survey-question-label {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--navy);
}

.survey-option {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(200, 212, 224, 0.95);
    border-radius: 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,250,253,1) 100%);
    position: relative;
    overflow: hidden;
}

.survey-option::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, rgba(68, 114, 196, 0.05), rgba(68, 114, 196, 0.18));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.survey-option:hover {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(235,242,250,0.95) 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(26, 26, 26, 0.06);
}

.survey-option:has(.survey-option-input:checked) {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(225,236,249,0.98) 100%);
    box-shadow: 0 12px 24px rgba(68, 114, 196, 0.12);
}

.survey-option:hover::after,
.survey-option:has(.survey-option-input:checked)::after {
    opacity: 1;
}

.survey-option-input {
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    justify-self: center;
    align-self: center;
    accent-color: var(--accent);
}

.survey-option-body {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.survey-option-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(68, 114, 196, 0.18), rgba(68, 114, 196, 0.05));
    color: var(--navy);
    font-size: 0.86rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid rgba(68, 114, 196, 0.08);
}

.survey-option-text {
    color: var(--gray-dark);
    font-weight: 600;
    line-height: 1.45;
}

.survey-option:has(.survey-option-input:checked) .survey-option-index {
    background: linear-gradient(135deg, var(--accent), var(--blue-mid));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(68, 114, 196, 0.18);
}

.survey-option:has(.survey-option-input:checked) .survey-option-text {
    color: var(--navy);
}

.survey-option-checkbox {
    grid-template-columns: 24px minmax(0, 1fr);
}

.survey-submit-row {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 8px;
}

.form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 8px;
    box-shadow: 0 6px 18px rgba(201,168,76, 0.45);
    text-align: center;
}

.form-btn:hover {
    background: #C9BC92;
    color: var(--navy);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(201,168,76, 0.55);
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--gray-mid);
}

.auth-switch a { font-weight: 600; }

.auth-back-to-site {
    text-align: center;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--blue-light);
    font-size: 0.8rem;
}

.auth-back-to-site a { color: var(--gray-light); font-weight: 500; }
.auth-back-to-site a:hover { color: var(--accent); }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.alert-error {
    background: #FFEBEE;
    color: var(--danger);
    border: 1px solid #FFCDD2;
}

.alert-success {
    background: #E8F5E9;
    color: var(--success);
    border: 1px solid #C8E6C9;
}

/* ─── Course Presentation ─── */

.course-header {
    padding: 48px 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.course-info {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

.course-description {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--gray-mid);
}

.course-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid var(--blue-light);
    box-shadow: var(--shadow);
    position: sticky;
    top: 96px;
}

.course-sidebar .detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--blue-light);
    font-size: 0.85rem;
    color: var(--gray-mid);
}

.course-sidebar .detail-row:last-child { border-bottom: none; }

.course-sidebar .detail-row svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.course-sidebar .detail-label {
    font-weight: 600;
    color: var(--gray-dark);
}

/* ─── Lesson Page (sidebar + content) ─── */

.lesson-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: calc(100vh - 72px);
}

.lesson-sidebar {
    background: var(--white);
    border-right: 1px solid var(--blue-light);
    padding: 24px 0;
    overflow-y: auto;
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
}

.sidebar-header {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--blue-light);
    margin-bottom: 8px;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.sidebar-progress {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
}

.lesson-nav { list-style: none; }

.lesson-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 0.85rem;
    color: var(--gray-mid);
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.lesson-nav li a:hover {
    background: var(--bg);
    color: var(--navy);
}

.lesson-nav li a.active {
    background: var(--bg);
    color: var(--accent);
    font-weight: 600;
    border-left-color: var(--accent);
}

.lesson-nav li a.completed {
    color: var(--success);
}

.lesson-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--blue-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.module-header {
    padding: 16px 20px 6px;
    list-style: none;
}

.module-header span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}

.lesson-check.done {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

/* ─── Module Section (v2 — accordion indipendente) ─── */

.module-section {
    list-style: none;
    border-bottom: 1px solid var(--blue-light);
}

.module-section:last-of-type {
    border-bottom: none;
}

.module-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: 0;
    border-left: 3px solid transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: var(--navy);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.module-toggle:hover {
    background: var(--bg);
}

.module-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.module-section.active > .module-toggle {
    border-left-color: var(--accent);
    background: var(--bg);
}

.module-toggle-title {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--navy);
    line-height: 1.4;
}

.module-toggle-meta {
    font-size: 0.7rem;
    color: var(--gray-light);
    font-weight: 500;
    white-space: nowrap;
}

.module-toggle-chevron {
    color: var(--gray-light);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.module-toggle[aria-expanded="true"] .module-toggle-chevron {
    transform: rotate(180deg);
}

.module-body {
    padding-bottom: 6px;
}

.module-body[hidden] {
    display: none;
}

.module-lessons {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Lezioni dentro l'accordion: indentazione coerente sotto l'header del modulo.
   Eredita il resto da .lesson-nav li a già definito sopra. */
.module-lessons li a,
.module-quiz-item a {
    padding-left: 28px;
}

/* Stati voce "Test del modulo" */
.module-quiz-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    padding-right: 20px;
    padding-bottom: 12px;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
    transition: background 0.18s ease, color 0.18s ease;
}

.module-quiz-passed a {
    color: var(--success);
    font-weight: 500;
}

.module-quiz-passed a:hover {
    background: var(--bg);
}

.module-quiz-available a {
    color: var(--accent);
    font-weight: 600;
}

.module-quiz-available a:hover {
    background: var(--bg);
    border-left-color: var(--accent);
}

.module-quiz-locked a {
    color: var(--gray-light);
    cursor: not-allowed;
}

/* Quiz finale corso */
.final-quiz-item {
    list-style: none;
    border-top: 1px solid var(--blue-light);
    margin-top: 8px;
    padding-top: 4px;
}

.final-quiz-item.unlocked a {
    border-left: 3px solid transparent;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.final-quiz-item.unlocked a:hover {
    background: var(--bg);
    border-left-color: var(--accent);
}

.final-quiz-locked-box {
    padding: 6px 20px 14px;
    color: var(--gray-mid);
}

.final-quiz-locked-box ul li {
    line-height: 1.65;
}

/* Mobile (sidebar in cima allo stack): moduli compatti, niente meta */
@media (max-width: 768px) {
    .module-toggle {
        padding: 12px 16px;
    }
    .module-lessons li a,
    .module-quiz-item a {
        padding-left: 24px;
    }
    .module-toggle-meta {
        display: none;
    }
}

.lesson-content {
    padding: 48px 64px;
    max-width: 840px;
}

.lesson-content h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.lesson-content .lesson-meta {
    font-size: 0.8rem;
    color: var(--gray-light);
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--blue-light);
}

.lesson-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
    margin: 32px 0 12px;
}

.lesson-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin: 24px 0 8px;
}

.lesson-content p {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--gray-mid);
    margin-bottom: 16px;
}

.lesson-content ul, .lesson-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.lesson-content li {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--gray-mid);
    margin-bottom: 8px;
}

.lesson-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 16px 24px;
    margin: 24px 0;
    background: rgba(31,90,163, 0.04);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--gray-mid);
}

.lesson-content .key-point {
    background: var(--bg);
    border-left: 4px solid var(--navy);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 20px 24px;
    margin: 24px 0;
}

.lesson-content .key-point strong {
    color: var(--navy);
}

.lesson-nav-bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--blue-light);
}

/* ─── Video Container ─── */

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 24px 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

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

/* ─── Quiz ─── */

.quiz-container {
    max-width: 740px;
    margin: 0 auto;
    padding: 48px 32px;
}

.quiz-header {
    text-align: center;
    margin-bottom: 40px;
}

.quiz-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.quiz-header p {
    color: var(--gray-mid);
}

.quiz-question {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    border: 1px solid var(--blue-light);
    box-shadow: var(--shadow);
}

.quiz-question .q-number {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.quiz-question .q-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 16px;
    line-height: 1.5;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid var(--blue-light);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.quiz-option:hover { border-color: var(--accent); background: rgba(31,90,163, 0.03); }

.quiz-option input[type="radio"] {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
}

.quiz-option.correct {
    border-color: var(--success);
    background: #E8F5E9;
}

.quiz-option.wrong {
    border-color: var(--danger);
    background: #FFEBEE;
}

.quiz-result {
    text-align: center;
    padding: 48px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.quiz-score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--navy);
}

.quiz-score.pass { color: var(--success); }
.quiz-score.fail { color: var(--danger); }

/* ─── Student Data Form (Quiz) ─── */

.student-data-form {
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px 32px;
    border: 1px solid var(--blue-light);
    box-shadow: var(--shadow);
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 6px;
}

.form-row input {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    border: 1px solid var(--blue-light);
    border-radius: 8px;
    color: var(--gray-dark);
    transition: border-color 0.2s;
    outline: none;
}

.form-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31,90,163, 0.1);
}

/* ─── Footer ─── */

.footer {
    background: var(--navy);
    margin-top: auto;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 48px;
    max-width: 1060px;
    margin: 0 auto;
    padding: 52px 32px;
}

.footer-logo {
    height: 44px;
    filter: brightness(0) invert(1) opacity(0.82);
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

.footer-col-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 16px;
}

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

.footer-nav ul li { margin-bottom: 10px; }

.footer-nav ul li a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
}

.footer-nav ul li a:hover { color: var(--white); }

.footer-contact {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact a:hover { color: var(--white); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1060px;
    margin: 0 auto;
    padding: 20px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a:hover { color: var(--white); }

/* ─── Empty States ─── */

.empty-state {
    text-align: center;
    padding: 64px 32px;
    color: var(--gray-light);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    color: var(--blue-light);
}

/* ─── Responsive ─── */

@media (max-width: 760px) {
    .topbar { padding: 0 16px; }
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--blue-light);
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    }
    .nav-links.open { display: flex; }
    .user-menu { display: none; }
    .mobile-only-link { display: block; border-top: 1px solid var(--blue-light); margin-top: 8px; padding-top: 8px; }
    .mobile-only-link:nth-of-type(n+2) { border-top: none; margin-top: 0; padding-top: 0; }
    .swiss-text { display: none; }
    .swiss-badge { padding-left: 8px; border-left: none; }

    .hero-content { padding: 0 24px; }
    .hero-cover { height: 300px; }

    .section { padding: 40px 20px; }

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

    .course-info { grid-template-columns: 1fr; }
    .course-sidebar { position: static; }

    .lesson-layout { grid-template-columns: 1fr; }
    .lesson-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--blue-light);
    }
    .lesson-content { padding: 32px 20px; }

    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
