/* Escuela Revélame — prototipo. Tipografía D (Inter Tight + Inter), acento azul del header. */
:root {
  --bg: #F4F4F2;
  --panel: #FFFFFF;
  --ink: #111111;
  --ink-soft: #666;
  --line: #E4E4E0;
  --accent: #182FCE;
  --accent-dark: #101fa0;
  --done: #1F9D6B;
  --night: #0B1119;
  --gold: #C9A24B;
  --gold-soft: #F6EBCF;
  --top: 68px; /* 60 de barra + 8 de franja */
  --side: 340px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: 'Inter Tight', sans-serif; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }

/* ── Barra superior ── */
.top {
  position: sticky; top: 0; z-index: 20;
  height: var(--top);
  display: flex; align-items: center; gap: 18px;
  padding: 0 20px;
  background: var(--night) url('../img/70norte/header-slide-1.jpg') center/cover;
  color: #fff;
  border-bottom: 8px solid #01313F; /* franja del color del banner de la landing */
}
.top-menu { display: none; background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; }
.top-logo img { height: 26px; display: block; }
.top-progress { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; color: #cfd3da; }
.top-progress em { font-style: normal; white-space: nowrap; }
.top-progress .bar { width: 140px; background: rgba(255,255,255,0.18); }
.top-right { display: flex; align-items: center; gap: 14px; position: relative; }
.top-admin { font-size: 13px; font-weight: 600; color: #fff; background: rgba(255,255,255,.12); padding: 7px 12px; border-radius: 8px; }
.top-admin:hover { background: rgba(255,255,255,.2); }
.top-user { border: 0; color: #fff; cursor: pointer; font-family: inherit; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 13px; }


/* ── Comunes ── */
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--done); border-radius: inherit; transition: width .3s; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 13px 22px; font: 600 15px 'Inter', sans-serif; cursor: pointer; transition: background .15s;
}
.btn:hover { background: var(--accent-dark); }
.btn--hecha { background: var(--done); }
.btn--hecha:hover { background: #17805a; }
.check { flex: 0 0 18px; height: 18px; border-radius: 50%; border: 1.5px solid #C8C8C2; display: inline-grid; place-items: center; }
.hecha .check { background: var(--done); border-color: var(--done); }
.hecha .check::after { content: '✓'; color: #fff; font-size: 11px; font-style: normal; font-weight: 700; }

/* ── Panel del curso ── */
.dash-hero { position: relative; background-size: cover; background-position: center; color: #fff; }
.dash-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,8,14,.9) 0%, rgba(5,8,14,.6) 55%, rgba(5,8,14,.25) 100%); }
.dash-hero-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 72px 24px; }
.dash-hero .eyebrow { color: #c4c9d2; }
.dash-hero h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 700; letter-spacing: -0.035em; margin: 6px 0 4px; }
.dash-sub { font-size: 18px; color: #dfe2e8; margin-bottom: 26px; }
.dash-hero-progress { display: flex; align-items: center; gap: 12px; max-width: 420px; font-size: 13px; color: #c4c9d2; margin-bottom: 24px; }
.dash-hero-progress .bar { flex: 1; background: rgba(255,255,255,.2); }

.dash-modulos { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.mod-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.mod-img { aspect-ratio: 16/8; background-size: cover; background-position: center; position: relative; }
.mod-img span { position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 6px; }
.mod-body { padding: 18px 18px 10px; }
.mod-body h2 { font-size: 22px; margin-bottom: 4px; }
.mod-meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.mod-list { list-style: none; margin-top: 12px; }
.mod-list .mod-les { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.mod-list a.mod-les:hover span { color: var(--accent); }
.mod-list span { flex: 1; }
.mod-list small, .side-les small { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }

/* ── Lección ── */
.leccion-layout { display: grid; grid-template-columns: var(--side) 1fr; min-height: calc(100vh - var(--top)); }
.sidebar {
  background: var(--panel); border-right: 1px solid var(--line);
  position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto;
  padding: 18px 0 40px;
}
.side-back { display: block; padding: 0 20px 14px; font-size: 13px; font-weight: 600; color: var(--accent); }
.side-progress { display: flex; align-items: center; gap: 10px; padding: 0 20px 16px; font-size: 12px; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.side-progress .bar { flex: 1; }
.side-mod { border-bottom: 1px solid var(--line); }
.side-mod summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; font: 600 14px 'Inter Tight', sans-serif; }
.side-mod summary::-webkit-details-marker { display: none; }
.side-mod summary small { color: var(--ink-soft); font: 500 12px 'Inter', sans-serif; }
.side-les { display: flex; align-items: center; gap: 10px; padding: 10px 20px 10px 22px; font-size: 13.5px; border-left: 3px solid transparent; }
.side-les span { flex: 1; line-height: 1.35; }
.side-les:hover { background: #F7F7F5; }
.side-les.actual { background: #EEF0FC; border-left-color: var(--accent); font-weight: 600; }

.contenido { min-width: 0; }
.player { background: #000; aspect-ratio: 16/9; max-height: 72vh; width: 100%; }
.player video { width: 100%; height: 100%; display: block; }
.player--vacio { background-size: cover; background-position: center; position: relative; display: grid; place-items: center; }
.player--vacio::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.player--vacio div { position: relative; color: #fff; text-align: center; display: grid; gap: 12px; justify-items: center; font-size: 14px; }
.player--vacio b { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.95); color: #000; display: grid; place-items: center; font-size: 22px; padding-left: 4px; }
.contenido-inner { max-width: 820px; padding: 32px 40px 80px; }
.contenido h1 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; margin: 8px 0 20px; }
.acciones { margin-bottom: 28px; }
.texto { font-size: 16px; line-height: 1.7; color: #2a2a2a; }
.texto p + p { margin-top: 1em; }
.contenido h3 { margin: 32px 0 10px; font-size: 18px; }
.recursos { list-style: none; display: grid; gap: 8px; }
.recursos a { color: var(--accent); font-weight: 500; }
.nav-lecciones { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.nav-lecciones a { display: grid; gap: 4px; font-weight: 600; font-size: 15px; max-width: 48%; }
.nav-lecciones a:hover { color: var(--accent); }
.nav-lecciones small { font-weight: 500; font-size: 12px; color: var(--ink-soft); }
.nav-lecciones .sig { text-align: right; margin-left: auto; }

/* ── Móvil ── */
@media (max-width: 900px) {
  .en-leccion .top-menu { display: block; }
  .top-progress .bar, .top-progress em { display: none; }
  .leccion-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: var(--top); left: 0; bottom: 0; width: min(88vw, var(--side)); height: auto; z-index: 15;
    transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(0,0,0,.25);
  }
  .menu-abierto .sidebar { transform: none; }
  .contenido-inner { padding: 24px 16px 60px; }
  .dash-modulos { grid-template-columns: 1fr; padding: 24px 16px 60px; }
  .dash-hero-inner { padding: 48px 16px; }
}

/* ── Bloqueos ── */
.lock { flex: 0 0 18px; font-style: normal; font-size: 12px; text-align: center; opacity: .7; }
.bloqueada { color: #9a9a95; cursor: not-allowed; }
.side-les.bloqueada:hover { background: none; }
.mod-card--bloqueado .mod-img { filter: grayscale(1) brightness(.75); }
.mod-lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; }
.bloqueo { max-width: 520px; margin: 12vh auto; padding: 0 24px; text-align: center; }
.bloqueo > b { font-size: 40px; display: block; margin-bottom: 12px; }
.bloqueo h1 { font-size: 32px; margin-bottom: 10px; }
.bloqueo p { color: var(--ink-soft); line-height: 1.6; margin-bottom: 24px; }
.bloqueo p a { color: var(--accent); font-weight: 600; }
.sig--bloq { display: grid; gap: 4px; text-align: right; margin-left: auto; color: #9a9a95; font-weight: 600; font-size: 15px; }
.sig--bloq small { font-weight: 500; font-size: 12px; }
.btn:disabled { cursor: default; }
.dash-fin { font: 600 18px 'Inter Tight', sans-serif; color: var(--gold); }

/* ── Lección especial: dorado sobre noche ── */
.mod-card--especial { background: var(--night); color: #fff; border: 1px solid var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,.15); }
.mod-card--especial .mod-img span { background: var(--gold); color: var(--night); }
.mod-card--especial .mod-meta { color: var(--gold); }
.mod-card--especial .mod-list .mod-les { border-top-color: rgba(255,255,255,.12); }
.mod-card--especial .bloqueada { color: rgba(255,255,255,.55); }
.mod-card--especial .check { border-color: var(--gold); }
.mod-card--especial a.mod-les:hover span { color: var(--gold); }
.side-mod--especial { background: var(--night); color: #fff; }
.side-mod--especial summary { color: var(--gold); }
.side-mod--especial .side-les { color: #fff; }
.side-mod--especial .side-les.bloqueada { color: rgba(255,255,255,.5); }
.side-mod--especial .side-les:hover { background: rgba(255,255,255,.06); }
.side-mod--especial .side-les.actual { background: rgba(201,162,75,.18); border-left-color: var(--gold); }
.side-mod--especial .check { border-color: var(--gold); }
.contenido--especial { background: linear-gradient(180deg, var(--gold-soft), var(--bg) 60%); }
.contenido--especial .eyebrow { color: #9a7a2c; }
.contenido--especial .btn { background: var(--gold); color: var(--night); }
.contenido--especial .btn:hover { background: #b38d3b; }
.bloqueo--especial > b { color: var(--gold); }
.bloqueo--especial h1 { color: #9a7a2c; }


.top-menu-user { position: absolute; right: 0; top: 44px; background: #fff; color: var(--ink); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: 12px; display: grid; gap: 10px; min-width: 220px; font-size: 13px; }
.top-menu-user[hidden] { display: none; }
.top-menu-user span { color: var(--ink-soft); word-break: break-all; }
.top-menu-user button { background: var(--bg); border: 0; border-radius: 6px; padding: 9px; font: 600 13px 'Inter', sans-serif; cursor: pointer; text-align: left; }

/* ── Acceso (entrar / crear contraseña) ── */
.cargando { padding: 80px 20px; text-align: center; color: var(--ink-soft); }
.acceso { min-height: calc(100vh - var(--top)); display: grid; place-items: center; padding: 40px 16px;
  background: linear-gradient(rgba(5,8,14,.55), rgba(5,8,14,.75)), url('../img/70norte/hero-3.jpg') center/cover; }
.acceso-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 34px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.acceso-card h1 { font-size: 30px; margin-bottom: 10px; }
.acceso-txt { color: var(--ink-soft); line-height: 1.5; margin-bottom: 18px; font-size: 15px; }
.acceso-card form { display: grid; gap: 14px; margin-top: 14px; }
.acceso-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.acceso-card input { font: 400 15px 'Inter', sans-serif; padding: 12px 13px; border: 1px solid #d6d6d0; border-radius: 8px; }
.acceso-card input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.acceso-card .btn { margin-top: 6px; width: 100%; }
.acceso-error { color: #c0392b; font-size: 14px; min-height: 1em; margin-top: 12px; }
.acceso-ayuda { font-size: 13px; color: var(--ink-soft); margin-top: 18px; line-height: 1.5; }
.acceso-ayuda a { color: var(--accent); }

.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.pronto { color: #b0b0aa; }
.texto a { color: var(--accent); }
.texto ul, .texto ol { padding-left: 1.3em; margin: 1em 0; }
.texto h2, .texto h3 { margin: 1.4em 0 .5em; }
.texto img { max-width: 100%; border-radius: 8px; }
