/* ═══════════════════════════════════════════════════════════
   learntoread.css  —  lesson list page
   Scoped under .ltr-page. Same design tokens as quiz/lesson.
   ═══════════════════════════════════════════════════════════ */

.ltr-page *, .ltr-page *::before, .ltr-page *::after {
  box-sizing: border-box;
}

.ltr-page {
  --ltr-primary:    #42a642;
  --ltr-primary-lt: #eaf6ea;
  --ltr-primary-dk: #2d7a2d;
  --ltr-border:     #d8edd8;
  --ltr-shadow:     0 4px 24px rgba(60,120,60,0.09);
  --ltr-shadow-lg:  0 8px 40px rgba(60,120,60,0.13);
  --ltr-text:       #1a2e1a;
  --ltr-muted:      #6a826a;
  --ltr-card:       #ffffff;
  --ltr-locked-bg:  #f8f9fa;
  --ltr-locked-bd:  #e2e8f0;
  --ltr-locked-txt: #94a3b8;
  --ltr-radius:     18px;

  --ltr-font-head: 'Lexend', sans-serif;
  --ltr-font-body: 'Lexend', sans-serif;
  --ltr-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ltr-ease-out:    cubic-bezier(0.22, 1, 0.36, 1);

  font-family: var(--ltr-font-body);
  color: var(--ltr-text);
  margin-left:  calc(-1 * var(--bs-gutter-x, 12px));
  margin-right: calc(-1 * var(--bs-gutter-x, 12px));
  padding: 0 0 64px;
}

/* ─── Hero ──────────────────────────────────────────────── */
.ltr-hero {
  background: var(--ltr-primary-lt);
  border-bottom: 2px solid var(--ltr-border);
  padding: 40px 24px 36px;
}

.ltr-hero-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ltr-hero-text { flex: 1; min-width: 0; }

.ltr-hero-video { flex-shrink: 0; }

@media (max-width: 560px) {
  .ltr-hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

.ltr-eyebrow {
  font-family: var(--ltr-font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ltr-primary);
  margin: 0 0 8px;
}

.ltr-title {
  font-family: var(--ltr-font-head);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 600;
  color: var(--ltr-text);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 10px;
}

.ltr-subtitle {
  font-size: 0.97rem;
  color: var(--ltr-muted);
  margin: 0;
  line-height: 1.6;
}

/* ─── List ──────────────────────────────────────────────── */
.ltr-list {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* ─── Card ──────────────────────────────────────────────── */
.ltr-card {
  display: flex;
  align-items: stretch;
  border-radius: var(--ltr-radius);
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
  animation: ltrCardIn 0.4s var(--ltr-ease-out) both;
}

.ltr-card:nth-child(1) { animation-delay: 0.04s; }
.ltr-card:nth-child(2) { animation-delay: 0.09s; }
.ltr-card:nth-child(3) { animation-delay: 0.14s; }
.ltr-card:nth-child(4) { animation-delay: 0.19s; }
.ltr-card:nth-child(5) { animation-delay: 0.24s; }
.ltr-card:nth-child(6) { animation-delay: 0.29s; }
.ltr-card:nth-child(7) { animation-delay: 0.34s; }
.ltr-card:nth-child(8) { animation-delay: 0.39s; }

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

/* ── Stats row ───────────────────────────────────────────── */
.ltr-stats-row {
  display: flex;
  gap: 16px;
  margin: 24px 0 24px;
  flex-wrap: wrap;
}

.ltr-stat-card {
  flex: 1;
  min-width: 130px;
  background: #fff;
  border: 1.5px solid #d8edd8;
  border-radius: 16px;
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 12px rgba(60,120,60,0.07);
}

.ltr-donut-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.ltr-donut { width: 90px; height: 90px; }

.ltr-donut-bg {
  fill: none;
  stroke: #eaf6ea;
  stroke-width: 10;
}

.ltr-donut-arc {
  fill: none;
  stroke: #42a642;
  stroke-width: 10;
  stroke-linecap: round;
}

.ltr-donut-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 1.1;
}

.ltr-donut-num {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a2e1a;
}

.ltr-donut-den {
  font-size: 0.7rem;
  font-weight: 500;
  color: #6a826a;
}

.ltr-stat-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6a826a;
  text-align: center;
  margin: 0;
}

@media (max-width: 480px) {
  .ltr-stats-row { gap: 10px; }
  .ltr-stat-card { padding: 14px 10px 12px; min-width: 100px; }
  .ltr-donut-wrap, .ltr-donut { width: 72px; height: 72px; }
  .ltr-donut-num { font-size: 1.1rem; }
}

/* ── Signed-out CTA ──────────────────────────────────────── */
.ltr-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  background: linear-gradient(135deg, #eaf6ea 0%, #dcf5dc 100%);
  border: 1.5px solid #c8e6c8;
  border-radius: 18px;
  padding: 28px 24px;
}

.ltr-cta--top { margin: 24px 0 24px; }
.ltr-cta--bottom { margin-top: 18px; }

.ltr-cta-text {
  font-size: 1.02rem;
  font-weight: 500;
  color: #1a2e1a;
  margin: 0;
  max-width: 460px;
  line-height: 1.5;
}

.btn-ltr-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  background: #42a642;
  color: #fff;
  font-family: 'Lexend', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 99px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(66,166,66,0.30);
  transition: background 0.18s, transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

.btn-ltr-cta:hover {
  background: #2d7a2d;
  transform: translateY(-2px);
  color: #fff;
}

/* ── Unlocked card ── */
.ltr-card--unlocked {
  background: var(--ltr-card);
  border: 1.5px solid var(--ltr-border);
  box-shadow: var(--ltr-shadow);
  transition: box-shadow 0.2s, transform 0.2s var(--ltr-ease-spring);
}

.ltr-card--unlocked:hover {
  box-shadow: var(--ltr-shadow-lg);
  transform: translateY(-2px);
}

/* ── Locked card ── */
.ltr-card--locked {
  background: var(--ltr-locked-bg);
  border: 1.5px solid var(--ltr-locked-bd);
  box-shadow: none;
}

/* ── Left colour strip ── */
.ltr-strip {
  width: 6px;
  flex-shrink: 0;
}

.ltr-card--unlocked .ltr-strip { background: #f59e0b; }
.ltr-card--locked   .ltr-strip { background: var(--ltr-locked-txt); opacity: 0.4; }
.ltr-card--unlocked.ltr-card--mastered   .ltr-strip { background: var(--ltr-primary); }
.ltr-card--unlocked.ltr-card--completed  .ltr-strip { background: linear-gradient(180deg, #2d7a2d, #1a5e1a); }

/* ─── Card body ─────────────────────────────────────────── */
.ltr-body {
  flex: 1;
  padding: 20px 20px 20px 22px;
  min-width: 0;
}

.ltr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ── Identity (number + lock icon + text) ── */
.ltr-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ltr-num-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ltr-num {
  font-family: var(--ltr-font-head);
  font-size: 1.1rem;
  font-weight: 600;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ltr-card--unlocked .ltr-num {
  background: var(--ltr-primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(66,166,66,0.30);
}

.ltr-card--locked .ltr-num {
  background: var(--ltr-locked-bd);
  color: var(--ltr-locked-txt);
}

.ltr-lock-icon { font-size: 0.85rem; }

.ltr-text { min-width: 0; }

.ltr-name {
  display: block;
  font-family: var(--ltr-font-head);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.ltr-card--unlocked .ltr-name { color: var(--ltr-text); }
.ltr-card--locked   .ltr-name { color: var(--ltr-locked-txt); }

.ltr-desc {
  font-size: 0.88rem;
  color: var(--ltr-muted);
  margin: 4px 0 0;
  line-height: 1.5;
}

.ltr-card--locked .ltr-desc { color: var(--ltr-locked-txt); }

/* ── Completed card (mastered + every level mastered) ── */
.ltr-card--completed {
  background: linear-gradient(135deg, #eaf6ea 0%, #dcf5dc 100%);
  border-color: #42a642;
}

.ltr-card--completed .ltr-strip {
  background: linear-gradient(180deg, #2d7a2d, #1a5e1a);
}

.ltr-card--completed .ltr-num {
  background: linear-gradient(135deg, #2d7a2d, #1a5e1a);
  color: #fff;
  border-color: #2d7a2d;
}

.ltr-mastered-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ltr-primary-lt);
  color: var(--ltr-primary-dk);
  border: 1.5px solid var(--ltr-border);
  border-radius: 99px;
  padding: 4px 12px;
  font-family: var(--ltr-font-head);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.ltr-mastered-badge--completed {
  background: #fff;
  color: #1a5e1a;
  border: 1.5px solid #42a642;
}
  border-color: var(--ltr-primary);
  background: linear-gradient(135deg, var(--ltr-primary-lt) 0%, #ffffff 60%);
}

.ltr-card--mastered .ltr-strip {
  background: var(--ltr-primary);
}

.ltr-card--mastered .ltr-num {
  background: var(--ltr-primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(66,166,66,0.30);
}

.ltr-action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-ltr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 99px;
  padding: 10px 22px;
  font-family: var(--ltr-font-head);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform 0.2s var(--ltr-ease-spring), box-shadow 0.18s, background 0.18s;
}

.btn-ltr--unlocked {
  background: var(--ltr-primary);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(66,166,66,0.30);
}

.btn-ltr--unlocked:hover {
  background: var(--ltr-primary-dk);
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(66,166,66,0.38);
}

.btn-ltr-arrow {
  transition: transform 0.2s var(--ltr-ease-spring);
}

.btn-ltr--unlocked:hover .btn-ltr-arrow {
  transform: translateX(3px);
}

.btn-ltr--locked {
  background: var(--ltr-locked-bd);
  color: var(--ltr-locked-txt) !important;
  cursor: not-allowed;
  font-size: 0.85rem;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 520px) {
  .ltr-hero { padding: 28px 18px 24px; }
  .ltr-list { padding: 24px 16px 0; }
  .ltr-body { padding: 16px 14px 16px 16px; }
  .ltr-top  { gap: 10px; }
  .btn-ltr  { padding: 9px 16px; font-size: 0.84rem; }
  .ltr-num  { width: 32px; height: 32px; font-size: 0.95rem; }
}

/* ─── Video trigger button ──────────────────────────────── */
.vid-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 22px;
  background: #fff;
  color: var(--ltr-primary-dk);
  border: 2px solid var(--ltr-border);
  border-radius: 99px;
  font-family: var(--ltr-font-head);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s,
              transform 0.2s var(--ltr-ease-spring), box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(60,120,60,0.10);
}

.vid-trigger:hover {
  background: var(--ltr-primary-lt);
  border-color: var(--ltr-primary);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(60,120,60,0.18);
}

.vid-trigger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ltr-primary);
  color: #fff;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* ─── Video overlay (shared markup, same styles) ─────────── */
.vid-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 10, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.vid-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.vid-panel {
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  max-width: 860px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  transform: scale(0.94) translateY(16px);
  transition: transform 0.32s cubic-bezier(0.34,1.56,0.64,1);
}

.vid-overlay--open .vid-panel {
  transform: scale(1) translateY(0);
}

.vid-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
}

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

.vid-frame-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.vid-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 500px) {
  .vid-overlay { padding: 16px; align-items: flex-end; }
  .vid-panel { border-radius: 16px 16px 0 0; max-width: 100%; }
}
