/* ============================================================
   LESSONS OVERVIEW PAGE — lesson cards, level anchors
   ============================================================ */

.lessons-page {
  margin-top: var(--nav-height);
  min-height: 100vh;
}

/* ── Hero ── */
.lessons-hero {
  padding: var(--space-16) 0 var(--space-12);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.lessons-hero__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  background: var(--color-accent-dim);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid rgba(49, 120, 198, 0.2);
  margin-bottom: var(--space-4);
}

.lessons-hero__title {
  font-size: var(--text-5xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.lessons-hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto var(--space-8);
}

.lessons-hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
}

.lessons-hero__stat {
  text-align: center;
}

.lessons-hero__stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-text);
}

.lessons-hero__stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

.lessons-hero__stat-divider {
  width: 1px;
  height: 36px;
  background: var(--color-border);
}

/* ── Level Sections ── */
.lessons-body {
  padding: var(--space-16) 0 var(--space-24);
}

.level-section {
  margin-bottom: var(--space-16);
  scroll-margin-top: calc(var(--nav-height) + var(--space-6));
}

.level-section__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.level-section__number {
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1;
  color: var(--color-text-subtle);
  opacity: 0.4;
}

.level-section--beginner     .level-section__number { color: var(--color-beginner); opacity: 1; }
.level-section--intermediate .level-section__number { color: var(--color-intermediate); opacity: 1; }
.level-section--advanced     .level-section__number { color: var(--color-advanced); opacity: 1; }

.level-section__info {
  flex: 1;
}

.level-section__title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.level-section__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.level-section__badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-mono);
}

.level-section--beginner     .level-section__badge { background: var(--color-beginner-dim);     color: var(--color-beginner); }
.level-section--intermediate .level-section__badge { background: var(--color-intermediate-dim); color: var(--color-intermediate); }
.level-section--advanced     .level-section__badge { background: var(--color-advanced-dim);     color: var(--color-advanced); }

/* ── Lesson Cards Grid ── */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
}

.lesson-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-decoration: none;
  transition: all var(--transition-base);
  overflow: hidden;
  cursor: pointer;
}

.lesson-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.level-section--beginner     .lesson-card::after { background: var(--color-beginner); }
.level-section--intermediate .lesson-card::after { background: var(--color-intermediate); }
.level-section--advanced     .lesson-card::after { background: var(--color-advanced); }

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

.lesson-card:hover::after {
  opacity: 1;
}

.lesson-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.lesson-card__number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-subtle);
  background: var(--color-bg-elevated);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

.lesson-card__check {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  font-size: 11px;
  font-weight: 700;
  color: transparent;
}

.lesson-card--done .lesson-card__check {
  background: var(--color-beginner);
  border-color: var(--color-beginner);
  color: white;
}

.lesson-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
  line-height: 1.25;
}

.lesson-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
  margin: 0;
}

.lesson-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.lesson-card__time {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  font-family: var(--font-mono);
}

.lesson-card__arrow {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.lesson-card:hover .lesson-card__arrow {
  transform: translateX(4px);
  color: var(--color-accent-light);
}

/* Progress strip at top of page */
.page-progress-strip {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
}

.page-progress-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.page-progress-strip__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.page-progress-strip__bar {
  flex: 1;
  max-width: 320px;
  height: 5px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.page-progress-strip__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

.page-progress-strip__reset {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  cursor: pointer;
  font-family: var(--font-mono);
  background: none;
  border: none;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.page-progress-strip__reset:hover {
  color: var(--color-advanced);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .lessons-hero__title {
    font-size: var(--text-4xl);
  }

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

  .level-section__header {
    flex-wrap: wrap;
  }

  .lessons-hero__stats {
    gap: var(--space-5);
  }

  .page-progress-strip__bar {
    max-width: 120px;
  }
}
