/* ============================================================
   VIDEO ACADEMY — Design System
   Mobile-first, colori neutri professionali
   ============================================================ */

:root {
  --color-primary:    #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-secondary:  #1e293b;
  --color-bg:         #f8fafc;
  --color-surface:    #ffffff;
  --color-border:     #e2e8f0;
  --color-text:       #1e293b;
  --color-text-muted: #64748b;
  --color-error:      #dc2626;
  --color-success:    #16a34a;
  --color-warning:    #d97706;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);

  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition:  0.2s ease;
}

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

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

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Layout ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  background: var(--color-secondary);
  color: #fff;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.site-header .brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-user {
  font-size: 0.875rem;
  color: #cbd5e1;
}

/* ── Language switcher ───────────────────────────────────── */
.lang-switcher {
  display: flex;
  gap: 4px;
}

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.75);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lang-btn.active,
.lang-btn:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-color: rgba(255,255,255,.5);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-family);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  width: 100%;
}
.btn-primary:hover { background: var(--color-primary-dark); text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 14px;
  font-size: 0.875rem;
}
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }

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

.btn-sm { padding: 6px 14px; font-size: 0.875rem; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font-family);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.form-input::placeholder { color: #94a3b8; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert-error  { background: #fef2f2; border: 1px solid #fecaca; color: var(--color-error); }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--color-success); }
.alert-info   { background: #eff6ff; border: 1px solid #bfdbfe; color: var(--color-primary); }

/* ── Login page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-header {
  background: var(--color-secondary);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-header .brand { font-size: 1.25rem; font-weight: 700; color: #fff; }

.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
}

.login-card h1 {
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-secondary);
}

.login-card .subtitle {
  color: var(--color-text-muted);
  margin-bottom: 32px;
  font-size: 0.9375rem;
}

.forgot-link {
  display: block;
  text-align: right;
  font-size: 0.875rem;
  margin-top: 8px;
  color: var(--color-text-muted);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-main {
  padding: 40px 20px;
  min-height: calc(100vh - 60px);
}

.dashboard-main h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--color-secondary);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.course-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--color-border);
}

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

.course-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #e2e8f0;
}

.course-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.course-body { padding: 20px; }

.course-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-secondary);
  line-height: 1.4;
}

.course-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-meta {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 16px;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  max-width: 480px;
  margin: 0 auto;
}

.empty-state .icon { font-size: 4rem; margin-bottom: 24px; }
.empty-state h2 { font-size: 1.5rem; margin-bottom: 12px; color: var(--color-secondary); }
.empty-state p  { color: var(--color-text-muted); margin-bottom: 32px; }

/* ── Player ──────────────────────────────────────────────── */
.player-page { min-height: calc(100vh - 60px); }

.player-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px;
}

.player-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  transition: color var(--transition);
}
.player-back:hover { color: var(--color-primary); text-decoration: none; }

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: #000;
  margin-bottom: 32px;
}

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

.player-info h1 {
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-secondary);
}

.player-info p {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 720px;
}

/* ── Spinner ─────────────────────────────────────────────── */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 20px;
  color: var(--color-text-muted);
}

.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── User menu dropdown ──────────────────────────────────── */
.user-menu {
  position: relative;
}

.user-menu-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.9);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  font-family: var(--font-family);
  white-space: nowrap;
}
.user-menu-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); }
.user-menu-btn .chevron { font-size: 0.7rem; transition: transform var(--transition); }
.user-menu-btn.open .chevron { transform: rotate(180deg); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
  display: none;
}
.user-dropdown.open { display: block; }

.user-dropdown a,
.user-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  font-size: 0.9rem;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font-family: var(--font-family);
  transition: background var(--transition);
}
.user-dropdown a:hover,
.user-dropdown button:hover { background: var(--color-bg); text-decoration: none; }
.user-dropdown .dropdown-divider { height: 1px; background: var(--color-border); margin: 4px 0; }
.user-dropdown .dropdown-danger { color: var(--color-error); }

/* ── Course card locked ──────────────────────────────────── */
.course-card.locked {
  opacity: 0.78;
}
.course-card.locked .course-thumb-wrap {
  position: relative;
}
.course-card.locked .lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}
.course-thumb-wrap {
  position: relative;
}

/* ── Card progress bar ───────────────────────────────────── */
.card-progress-wrap {
  height: 4px;
  background: var(--color-border);
  position: relative;
}
.card-progress-bar {
  height: 100%;
  background: var(--color-primary);
  transition: width .4s ease;
  border-radius: 0 4px 4px 0;
}
.card-progress-label {
  position: absolute;
  right: 8px;
  top: -18px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Preview + locked buttons ────────────────────────────── */
.preview-lock-btns {
  display: flex;
  gap: 8px;
}
.preview-lock-btns .btn { flex: 1; }
.btn-preview {
  background: rgba(37,99,235,.08);
  color: var(--color-primary);
  border: 1.5px solid rgba(37,99,235,.25);
}
.btn-preview:hover { background: rgba(37,99,235,.14); text-decoration: none; }
.btn-locked {
  background: var(--color-bg);
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
}
.btn-locked:hover { background: var(--color-border); text-decoration: none; }

/* ── Player progress bar ─────────────────────────────────── */
.player-progress-wrap {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  margin: 0 0 8px;
  position: relative;
}
.player-progress-bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width .5s ease;
}
.player-progress-pct {
  position: absolute;
  right: 0;
  top: -20px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Resume banner ───────────────────────────────────────── */
.resume-banner {
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.2);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 16px;
  transition: opacity .5s;
}

/* ── Profile name grid ───────────────────────────────────── */
.profile-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .profile-name-row { grid-template-columns: 1fr; }
}

/* ── Utility ─────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (min-width: 640px) {
  .login-card { padding: 48px 44px; }
}

@media (max-width: 600px) {
  /* Header compatto */
  .site-header { padding: 0 12px; gap: 8px; }
  .site-header .brand { font-size: 1rem; }
  .lang-switcher { gap: 2px; }
  .lang-btn { padding: 3px 7px; font-size: 0.72rem; }
  .user-menu-btn { padding: 5px 8px; font-size: 0.8rem; gap: 4px; }
  .user-menu-btn .chevron { display: none; }

  /* Griglia corsi */
  .courses-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Pulsanti anteprima/acquista: si impilano */
  .preview-lock-btns { flex-direction: column; gap: 6px; }
  .preview-lock-btns .btn { flex: none; width: 100%; }

  /* Dashboard */
  .dashboard-main { padding: 24px 12px; }
  .dashboard-main h1 { font-size: 1.5rem; margin-bottom: 20px; }

  /* Login / profilo card */
  .login-card { padding: 24px 16px; border-radius: var(--radius-lg); }
  .login-card h1 { font-size: 1.3rem; }

  /* Player */
  .player-container { padding: 16px 12px; }

  /* Dropdown allargato su mobile */
  .user-dropdown { min-width: 160px; }
}

@media (max-width: 400px) {
  .site-header .brand { display: none; }
}

/* ── Certificato ──────────────────────────────────────────── */
.certificate-section { margin-top: 20px; }
.certificate-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1.5px solid #22c55e;
  border-radius: 12px;
  padding: 16px 20px;
}
.certificate-icon { font-size: 2rem; flex-shrink: 0; }
.certificate-text { flex: 1; }
.certificate-text strong { display: block; color: #15803d; font-size: 1rem; }
.certificate-text span { color: #166534; font-size: .875rem; }
.btn-success {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: .9rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.btn-success:hover { background: #16a34a; }

/* ── Materiali corso ───────────────────────────────────────── */
.materials-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e2e8f0; }
.materials-title { font-size: 1rem; font-weight: 600; color: #1e293b; margin-bottom: 12px; }
.materials-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.materials-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #2563eb;
  font-size: .9rem;
  font-weight: 500;
  transition: background .15s;
}
.materials-list li a:hover { background: #eff6ff; border-color: #bfdbfe; }
.materials-list li a::before { content: '📄'; font-size: 1.1rem; }

/* ── Popup completamento ───────────────────────────────────── */
.completion-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.completion-modal.hidden { display: none; }
.completion-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.completion-trophy { font-size: 4rem; margin-bottom: 12px; }
.completion-title { font-size: 1.6rem; font-weight: 700; color: #1e293b; margin: 0 0 6px; }
.completion-subtitle { color: #2563eb; font-weight: 600; margin: 0 0 12px; font-size: .95rem; }
.completion-msg { color: #64748b; font-size: .9rem; margin: 0 0 28px; line-height: 1.6; }
.completion-actions { display: flex; flex-direction: column; gap: 12px; }
.btn-review {
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 13px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-review:hover { background: #d97706; }
.completion-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.completion-close:hover { background: #e2e8f0; }

/* ── FAQ page ──────────────────────────────────────────────── */
.faq-page { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.faq-page h1 { font-size: 1.875rem; font-weight: 700; margin-bottom: 8px; color: #1e293b; }
.faq-intro { color: #64748b; margin-bottom: 40px; }
.faq-item { border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.faq-question {
  width: 100%;
  background: #fff;
  border: none;
  padding: 18px 20px;
  text-align: left;
  font-size: .95rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-question:hover { background: #f8fafc; }
.faq-question .faq-arrow { font-size: .8rem; transition: transform .2s; flex-shrink: 0; }
.faq-question[aria-expanded="true"] .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
  color: #475569;
  font-size: .9rem;
  line-height: 1.7;
}
.faq-answer.open { max-height: 400px; padding: 0 20px 18px; }
.faq-contact-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 28px;
  margin-top: 48px;
  text-align: center;
}
.faq-contact-box h2 { font-size: 1.2rem; color: #1e293b; margin-bottom: 8px; }
.faq-contact-box p { color: #475569; margin-bottom: 16px; }
.faq-contact-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Player layout con sidebar moduli ──────────────────────── */
.player-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  min-height: calc(100vh - 60px);
  align-items: start;
}
.player-main {
  padding: 24px;
  min-width: 0;
}

/* ── Sidebar lezioni ─────────────────────────────────────── */
.lessons-sidebar {
  background: #fff;
  border-left: 1px solid var(--color-border);
  min-height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
}
.lessons-sidebar-header {
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.lessons-sidebar-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.lessons-count {
  font-size: .78rem;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 2px 8px;
  border-radius: 12px;
}
.lessons-list { padding: 8px 0; }

/* ── Singola lezione nella sidebar ──────────────────────── */
.lesson-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .15s, border-color .15s;
}
.lesson-item:hover { background: #f8fafc; }
.lesson-item.active {
  background: #eff6ff;
  border-left-color: var(--color-primary);
}
.lesson-item.completed .lesson-num { background: var(--color-success); color: #fff; }
.lesson-item.pending { opacity: .55; cursor: default; }
.lesson-item.pending:hover { background: transparent; }

.lesson-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}
.lesson-item.active .lesson-num {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.lesson-body { flex: 1; min-width: 0; }
.lesson-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-secondary);
  line-height: 1.4;
  margin-bottom: 4px;
}
.lesson-desc {
  font-size: .78rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lesson-badge {
  font-size: .7rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  margin-top: 6px;
  display: inline-block;
}
.lesson-badge.coming-soon {
  background: #fef3c7;
  color: #92400e;
}
.lesson-badge.done {
  background: #dcfce7;
  color: #15803d;
}
.lesson-args {
  list-style: none;
  margin: 6px 0 4px;
  padding: 0;
}
.lesson-args li {
  font-size: .75rem;
  color: var(--color-text-muted);
  padding: 2px 0 2px 12px;
  position: relative;
  line-height: 1.4;
}
.lesson-args li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* ── Etichetta modulo attivo sopra il video ──────────────── */
.lesson-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .player-layout {
    grid-template-columns: 1fr;
  }
  .lessons-sidebar {
    border-left: none;
    border-top: 1px solid var(--color-border);
    position: static;
    min-height: auto;
    max-height: none;
  }
}

@media (max-width: 600px) {
  .certificate-banner { flex-direction: column; text-align: center; }
  .completion-card { padding: 32px 20px; }
  .completion-trophy { font-size: 3rem; }
  .player-main { padding: 16px; }
}
