/* alphaLearning/module.css */

/* Real Inter weights (the Light file alone made every bold synthesized) */
@font-face { font-family: 'Inter'; font-weight: 300; font-display: swap; src: url('../paquetesDescargados/Inter/static/Inter_18pt-Light.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../paquetesDescargados/Inter/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('../paquetesDescargados/Inter/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../paquetesDescargados/Inter/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('../paquetesDescargados/Inter/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800 950; font-display: swap; src: url('../paquetesDescargados/Inter/inter-latin-800-normal.woff2') format('woff2'); }

*{ margin:0; padding:0; box-sizing:border-box; font-family:'Inter'; }
html, body{ background: rgb(255,252,255); }

:root{
  --color-azul-oscuro:#285260;
  --color-azul-medio:#548C92;
  --color-arena:#AB9072;

  --brand: var(--color-azul-medio);
  --brand-2: var(--color-azul-oscuro);
  --brand-soft: rgba(84,140,146,0.12);
  --border: rgba(0,0,0,0.08);

  --level-beginner-bg: #E7F6EE;
  --level-beginner-text: #1E7A46;
  --level-beginner-border: #B7E4C7;

  --level-intermediate-bg: #FFF4E5;
  --level-intermediate-text: #B26A00;
  --level-intermediate-border: #FFD8A8;

  --level-advanced-bg: #F3E8FF;
  --level-advanced-text: #7B2CBF;
  --level-advanced-border: #D0B3FF;
}

a{ text-decoration:none; color:inherit; }

/* ===== TOPBAR (igual que tu style) ===== */
.topbar{
  position: sticky; top:0; z-index:3000;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.container{ width:100%; }
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 24px; gap:16px;
  max-width: 1200px; margin: 0 auto;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand-logo{
  width:34px; height:34px; border-radius:10px;
  border:1px solid var(--border);
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}
.brand-name{ font-weight:700; letter-spacing:-0.02em; color:#1c1c1c; }

.af-nav{ display:flex; gap:14px; align-items:center; justify-content:center; flex:1 1 auto; }
.af-nav__link{
  color: rgba(26,26,26,0.70);
  font-size:14px; font-weight:600;
  padding:8px 10px; border-radius:12px;
  transition: background .2s ease, color .2s ease;
}
.af-nav__link:hover{ background: rgba(0,0,0,0.04); color: rgba(26,26,26,0.92); }
.af-nav__link.is-active{
  background: var(--brand-soft);
  color: var(--brand-2);
  border: 1px solid rgba(84,140,146,0.35);
}
.af-nav-toggle{ display:none; background:none; border:1px solid var(--border); border-radius:10px; padding:8px 10px; cursor:pointer; }
.af-nav-toggle i{ font-size:16px; color:rgba(26,26,26,0.75); }

.af-nav-mobile{
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 16px; right: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.12);
  padding: 10px;
  z-index: 4000;
}
.af-nav-mobile .af-nav__link{ display:block; padding:12px 12px; border-radius:12px; }
.topbar.is-open .af-nav-mobile{ display:block; }
.topbar.is-open .af-nav-toggle{ border-color: rgba(84,140,146,0.35); }

/* Auth */
.contenedorBotonLogin{ display:flex; align-items:center; gap:10px; flex: 0 0 auto; }
.botonesAuth{ display:flex; align-items:center; gap:10px; }
.botonLogin, .botonSignin{
  padding:8px 16px; border-radius:20px; font-size:14px; font-weight:500;
  border:2px solid var(--brand); cursor:pointer; transition: all .3s ease; line-height:1;
}
.botonLogin{ background: var(--brand); color:#fff; }
.botonLogin:hover{ background: var(--brand-2); border-color: var(--brand-2); }
.botonSignin{ background: transparent; color: var(--brand); }
.botonSignin:hover{ background: var(--brand); color:#fff; }

.perfilUsuario{
  display:none; align-items:center; gap:8px;
  padding:4px 8px; border-radius:10px;
  background:#f8f9fa; box-shadow:0 1px 4px rgba(0,0,0,0.08); cursor:pointer;
}
.perfilUsuario:hover{ background:#e6f0f2; box-shadow:0 2px 8px rgba(0,0,0,0.12); }
.perfilCirculo{
  width:32px; height:32px; border-radius:50%;
  background: var(--brand); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:700;
}
.nombreUsuario{ font-size:13px; font-weight:500; color:#333; white-space:nowrap; }

@media (max-width:700px){
  .af-nav{ display:none; }
  .af-nav-toggle{ display:inline-flex; }
  .brand-name{ display:none; }
}

/* ===== PAGE ===== */
.m-main{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px 50px;
}

.m-breadcrumb{
  display:flex; align-items:center; gap:10px;
  padding: 10px 2px 14px;
  color: rgba(26,26,26,0.70);
  font-weight: 700;
  font-size: 13px;
}
.m-crumb{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}
.m-crumb:hover{ background: rgba(0,0,0,0.02); }
.m-sep{ opacity:0.6; }
.m-crumb-muted{ opacity:0.85; }

/* Hero */
.m-hero{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.m-hero__left{
  background: transparent;                 /* sin caja */
  border: none;                            /* sin borde */
  border-radius: 0;
  padding: 6px 2px 14px;                   /* más editorial */
  box-shadow: none;                        /* 🔥 adiós 3D */
}

/* Un separador suave abajo (en vez de caja) */
.m-hero{
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.m-title{ margin-top: 6px; }
.m-sub{ max-width: 860px; } /* se ve más premium */

.m-pillrow{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.m-pill{
  display:inline-flex; align-items:center;
  padding: 8px 10px; border-radius:999px;
  background: rgba(84,140,146,0.10);
  color: var(--brand-2);
  font-weight: 900; font-size: 12.5px;
}
.m-level{
  display:inline-flex; align-items:center;
  padding: 8px 10px; border-radius:999px;
  font-weight: 900; font-size: 12.5px;
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
}
.m-title{
  margin-top: 10px;
  font-size: 34px;
  letter-spacing: -0.03em;
  color: var(--color-azul-medio);
  font-weight: 900;
}
.m-sub{
  margin-top: 8px;
  color: rgba(26,26,26,0.65);
  font-weight: 650;
  line-height: 1.45;
  font-size: 14px;
}
.m-meta{
  display:flex; gap: 14px; flex-wrap:wrap;
  margin-top: 12px;
  color: rgba(26,26,26,0.70);
  font-weight: 700;
  font-size: 13px;
}
.m-meta__item{ display:inline-flex; gap:8px; align-items:center; }



/* Layout: sidebar + player */
.m-layout{
  display:grid;
  grid-template-columns: 340px 1fr;
  gap: 14px;
}

.m-sidebar{
  background:#fff; border:1px solid var(--border); border-radius:18px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.08);
  overflow:hidden;
  display:flex;
  flex-direction: column;
  min-height: 520px;
}
.m-sidebar__head{
  padding: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.m-sidebar__title{
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(26,26,26,0.88);
  margin-bottom: 10px;
}
.m-sidebar__search{
  display:flex; align-items:center; gap:10px;
  border:1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.92);
  border-radius: 14px;
  padding: 10px 12px;
  color: rgba(26,26,26,0.65);
}
.m-sidebar__search input{
  border:none; outline:none; width:100%;
  background: transparent;
  font-weight: 700;
  font-size: 13px;
  color: rgba(26,26,26,0.85);
}

.m-meta__level{
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12.5px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(84,140,146,0.12);
  color: var(--brand-2);
}

/* ===== Level color variants ===== */
.m-level--beginner,
.m-meta__level--beginner {
  background: var(--level-beginner-bg);
  color: var(--level-beginner-text);
  border-color: var(--level-beginner-border);
}

.m-level--intermediate,
.m-meta__level--intermediate {
  background: var(--level-intermediate-bg);
  color: var(--level-intermediate-text);
  border-color: var(--level-intermediate-border);
}

.m-level--advanced,
.m-meta__level--advanced {
  background: var(--level-advanced-bg);
  color: var(--level-advanced-text);
  border-color: var(--level-advanced-border);
}

/* lessons list */
.m-lessons{
  padding: 10px;
  overflow:auto;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.m-lesson{
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  border-radius: 14px;
  padding: 10px 10px;
  cursor:pointer;
  display:flex;
  gap:10px;
  align-items:flex-start;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.m-lesson:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.08);
  border-color: rgba(84,140,146,0.28);
}
.m-lesson.is-active{
  background: rgba(84,140,146,0.10);
  border-color: rgba(84,140,146,0.30);
}
.m-lesson__num{
  width: 30px; height:30px;
  border-radius: 10px;
  display:grid; place-items:center;
  background: rgba(84,140,146,0.12);
  color: var(--brand-2);
  font-weight: 900;
  flex: 0 0 auto;
}
.m-lesson__body{ min-width:0; }
.m-lesson__title{
  font-weight: 900;
  color: rgba(26,26,26,0.88);
  font-size: 13.5px;
  line-height: 1.2;
}
.m-lesson__meta{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(26,26,26,0.60);
  font-weight: 700;
}

/* Lesson subtitle (concept) + case tag */
.m-lesson-sub{
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.m-lesson-sub__concept{
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-2);
}
.m-case-tag{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 3px 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--brand-2);
  background: var(--brand-soft);
  border: 1px solid rgba(84,140,146,0.25);
  white-space: nowrap;
}
.m-case-tag__logos{
  display: inline-flex;
}
.m-case-tag__logos > * + *{
  margin-left: -5px;  /* overlap logos when a case has several companies */
}
.m-case-logo{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(84,140,146,0.25);
  box-sizing: border-box;
  flex-shrink: 0;
}
.m-case-logo--initial{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  color: #fff;
  background: var(--brand-2);
  border-color: transparent;
}
.m-lesson-sub--player{
  margin-top: 6px;
}
.m-lesson-sub--player .m-case-tag{
  font-size: 12px;
  padding: 3px 4px 3px 10px;
}
.m-lesson-sub--player .m-case-logo{
  width: 20px;
  height: 20px;
}
.m-lesson-sub--player .m-case-logo--initial{
  font-size: 11px;
}
.m-lesson-sub--player .m-lesson-sub__concept{
  font-size: 13.5px;
}
.m-lesson.m-lesson--locked .m-lesson-sub{
  opacity: 0.55;
}

/* Player */
.m-player{
  background:#fff; border:1px solid var(--border); border-radius:18px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}
.m-player__frame {
  background: #000;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  overflow: hidden;
}

.m-player__frame iframe,
.m-player__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Quiz mode: frame grows, pushes info down naturally */
.m-player--quiz {
  overflow: visible;
}
.m-player--quiz .m-player__frame {
  height: auto;
  overflow: visible;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.m-player__info{
  padding: 14px 14px 0;
}
.m-h2{
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: rgba(26,26,26,0.90);
}
.m-desc{
  margin-top: 8px;
  color: rgba(26,26,26,0.65);
  font-weight: 650;
  line-height: 1.45;
  font-size: 14px;
}

.m-actions{
  margin-top: 14px;
  padding: 0 14px 14px;
  display:flex;
  justify-content: space-between;
  gap: 10px;
}
.m-btn{
  border: 2px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  border-radius: 14px;
  padding: 10px 12px;
  cursor:pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.m-btn:hover{ transform: translateY(-1px); background: var(--brand-2); border-color: var(--brand-2); }

.m-btn--ghost{
  background: #fff;
  color: var(--brand-2);
  border-color: rgba(0,0,0,0.10);
}
.m-btn--ghost:hover{
  background: rgba(0,0,0,0.03);
  border-color: rgba(84,140,146,0.35);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 980px){
  .m-hero{ grid-template-columns: 1fr; }
  .m-layout{ grid-template-columns: 1fr; }
  .m-sidebar{ min-height: auto; order: 2; }
  .m-player{ min-height: auto; order: 1; }
  .m-player__frame { aspect-ratio: 16 / 9; height: auto; }
}
@media (max-width: 520px){
  .m-main{ padding: 14px 14px 40px; }
  .m-title{ font-size: 26px; }
}

/* ===== Quiz lesson item (sidebar) ===== */
.m-lesson--quiz {
  background: rgba(171, 144, 114, 0.07);
  border-color: rgba(171, 144, 114, 0.30);
}
.m-lesson--quiz:hover {
  border-color: rgba(171, 144, 114, 0.50);
  box-shadow: 0 14px 34px rgba(171, 144, 114, 0.12);
}
.m-lesson--quiz.is-active {
  background: rgba(171, 144, 114, 0.13);
  border-color: rgba(171, 144, 114, 0.45);
}
.m-lesson__num--quiz {
  background: rgba(171, 144, 114, 0.18);
  color: #7a5c3a;
}

/* ===== Final quiz: card in the player (before starting / after passing) ===== */
.m-quizcard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 30px;
  min-height: 360px;
  justify-content: center;
  background:
    radial-gradient(900px 300px at 100% 0%, rgba(84,140,146,0.10), transparent 60%),
    #fff;
}
.m-quizcard__kicker,
.m-exam__kicker {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-arena);
}
.m-quizcard__title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--brand-2);
  line-height: 1.2;
}
.m-quizcard__rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 6px;
}
.m-quizcard__rules li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(26,26,26,0.72);
  line-height: 1.45;
}
.m-quizcard__rules li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--brand);
}
.m-quizcard__rules b { color: rgba(26,26,26,0.9); font-weight: 900; }
.m-quizcard__last,
.m-quizcard__score {
  font-size: 13px;
  font-weight: 800;
  color: rgba(26,26,26,0.5);
}
.m-quizcard__start { align-self: flex-start; padding-inline: 22px; }
.m-quizcard__cert {
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.m-quizcard__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Final quiz: full-screen exam ===== */
body.m-exam-open { overflow: hidden; }
body.m-exam-open .ait-fab,
body.m-exam-open .topbar { display: none; }
.m-exam {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  background: rgb(255,252,255);
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2,.8,.2,1);
}
.m-exam.is-in { opacity: 1; transform: none; }
.m-exam__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.m-exam__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--brand-2);
  font-size: 15px;
}
.m-exam__brand img { width: 30px; height: 30px; object-fit: contain; }
.m-exam__module {
  font-size: 13px;
  font-weight: 800;
  color: rgba(26,26,26,0.5);
  text-align: right;
}
.m-exam__body {
  flex: 1;
  overflow: auto;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 48px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
@keyframes mExamIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.m-exam__body.is-swapping > * { animation: mExamIn .38s cubic-bezier(.2,.8,.2,1) both; }
.m-exam__body.is-swapping > *:nth-child(2) { animation-delay: .05s; }
.m-exam__body.is-swapping > *:nth-child(3) { animation-delay: .1s; }
.m-exam__body.is-swapping > *:nth-child(4) { animation-delay: .15s; }

.m-exam__progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: rgba(26,26,26,0.5);
}
.m-exam__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.07);
  overflow: hidden;
}
.m-exam__track > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-azul-medio), var(--color-azul-oscuro));
  transition: width .4s ease;
}
.m-exam__q {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: rgba(26,26,26,0.9);
}
.m-exam__table {
  flex: 0 0 auto;
  margin: -6px 0 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.m-exam__table figcaption {
  padding: 10px 16px;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-2);
  background: rgba(84,140,146,0.08);
  border-bottom: 1px solid var(--border);
}
.m-exam__table table { width: 100%; border-collapse: collapse; }
.m-exam__table th, .m-exam__table td {
  padding: 9px 16px;
  font-size: 14.5px;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.m-exam__table tr:first-child th, .m-exam__table tr:first-child td { border-top: 0; }
.m-exam__table th { text-align: left; font-weight: 600; color: rgba(26,26,26,0.72); }
.m-exam__table td { text-align: right; font-weight: 800; color: rgba(26,26,26,0.9); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-exam__missed {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(26,26,26,0.55);
}
.m-exam__missed span { width: 100%; }
.m-exam__missed b {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(171,144,114,0.16);
  color: #7a5c3a;
  font-weight: 800;
}
.m-exam__options { display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; }
.m-exam__opt {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: #fff;
  border: 1.5px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(26,26,26,0.82);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.m-exam__opt:hover { transform: translateY(-1px); border-color: rgba(84,140,146,0.45); }
.m-exam__letter {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 900;
  background: rgba(84,140,146,0.12);
  color: var(--brand-2);
  transition: background .15s ease, color .15s ease;
}
.m-exam__opt.is-picked {
  border-color: var(--brand);
  background: rgba(84,140,146,0.07);
  box-shadow: 0 0 0 3px rgba(84,140,146,0.15);
}
.m-exam__opt.is-picked .m-exam__letter { background: var(--brand-2); color: #fff; }
/* "select all that apply": square checkboxes instead of letters */
.m-exam__hint {
  margin-top: -12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--color-arena);
}
.m-exam__options--multi .m-exam__letter { font-size: 0; border-radius: 7px; width: 24px; height: 24px; margin: 3px; border: 1.5px solid rgba(84,140,146,0.45); background: #fff; }
.m-exam__options--multi .m-exam__opt.is-picked .m-exam__letter { background: var(--brand-2); border-color: var(--brand-2); }
.m-exam__options--multi .m-exam__opt.is-picked .m-exam__letter::after { content: "✓"; font-size: 14px; color: #fff; }
.m-exam__nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }
.m-exam__nav--center { justify-content: center; flex-wrap: wrap; }
.m-exam__nav .m-btn:disabled { opacity: .4; cursor: not-allowed; }

.m-exam__result, .m-exam__cert {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin: auto 0;
}
.m-exam__big {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--brand-2);
  line-height: 1;
}
.m-exam__msg {
  max-width: 480px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(26,26,26,0.7);
}
.m-exam__nameform { display: flex; gap: 8px; width: min(460px, 100%); margin-top: 6px; }
.m-exam__name {
  flex: 1;
  min-width: 0;
  border: 1.5px solid rgba(0,0,0,0.14);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 700;
  outline: none;
}
.m-exam__name:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(84,140,146,0.15); }
.m-exam__canvas {
  width: min(900px, 100%);
  height: auto;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.16);
}
.m-exam__body:has(.m-exam__cert) { width: min(980px, 100%); }

@media (max-width: 560px) {
  .m-exam__head { padding: 12px 16px; }
  .m-exam__module { display: none; }
  .m-exam__body { padding: 28px 16px; }
  .m-exam__nameform { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .m-exam { transition: none; }
  .m-exam__body.is-swapping > * { animation: none; }
}

/* =============================================
   ANIMACIONES DE ENTRADA — MODULE PAGE
   Se activan al añadir .m-ready al body
   ============================================= */

@keyframes mFadeUp {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Ocultar antes de animar */
.m-breadcrumb,
.m-hero,
.m-sidebar,
.m-player {
  opacity: 0;
}

/* Breadcrumb */
body.m-ready .m-breadcrumb {
  animation: mFadeUp 0.45s ease both;
  animation-delay: 0.05s;
}

/* Hero (título, nivel, meta) */
body.m-ready .m-hero {
  animation: mFadeUp 0.50s ease both;
  animation-delay: 0.18s;
}

/* Sidebar */
body.m-ready .m-sidebar {
  animation: mFadeUp 0.50s ease both;
  animation-delay: 0.32s;
}

/* Player */
body.m-ready .m-player {
  animation: mFadeUp 0.50s ease both;
  animation-delay: 0.44s;
}

/* ===== MODULE PROGRESS BAR ===== */
.m-progress {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 480px;
}
.m-progress__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.m-progress__label {
  font-size: 12.5px;
  font-weight: 800;
  color: rgba(26,26,26,0.55);
  display: flex;
  align-items: center;
  gap: 6px;
}
.m-progress__label i {
  color: var(--brand);
  font-size: 11px;
}
.m-progress__pct {
  font-size: 13px;
  font-weight: 900;
  color: var(--brand-2);
  letter-spacing: -0.01em;
}
.m-progress__track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.07);
  overflow: hidden;
}
.m-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-azul-medio), var(--color-azul-oscuro));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.m-progress__sub {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(26,26,26,0.40);
}

/* ===== Completed lesson in sidebar ===== */
.m-lesson.is-done .m-lesson__num {
  background: rgba(30,122,70,0.12);
  color: #1E7A46;
}

/* ===== Locked lesson in sidebar ===== */
.m-lesson.m-lesson--locked {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}
.m-lesson.m-lesson--locked .m-lesson__num {
  background: rgba(0,0,0,0.06);
  color: rgba(26,26,26,0.35);
}
.m-lesson.m-lesson--locked .m-lesson__title {
  color: rgba(26,26,26,0.45);
}
.m-lesson__num {
  position: relative;
}
/* ===== Lesson thumbnails in the sidebar ===== */
.m-lesson.has-thumb{ align-items: center; }
.m-lesson__thumb{
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #0f2a33;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}
.m-lesson__thumb img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease, filter .25s ease;
}
.m-lesson:hover .m-lesson__thumb img{ transform: scale(1.05); }
.m-lesson.m-lesson--locked .m-lesson__thumb img{ filter: grayscale(1) brightness(0.85); }
.m-lesson__num--badge{
  position: absolute;
  top: 5px; left: 5px;
  width: 22px; height: 22px;
  border-radius: 7px;
  font-size: 11px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.m-lesson.m-lesson--locked .m-lesson__num--badge{ background: rgba(255,255,255,0.85); }
.m-lesson.is-done .m-lesson__num--badge{ background: #fff; }
.m-lesson__len{
  position: absolute;
  right: 5px; bottom: 7px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.m-lesson__bar{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,0.35);
}
.m-lesson__bar > span{
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width .6s ease;
}
.m-lesson.is-done .m-lesson__bar > span{ background: #1E7A46; }
.m-lesson__done{ color: #1E7A46; }
.m-lesson__done i{ font-size: 10px; margin-right: 2px; }
.m-lesson__resume{ color: var(--brand-2); }

/* Lesson just completed: the check pops */
@keyframes mDonePop{
  0%   { transform: scale(0.4); }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.m-lesson.just-done .m-lesson__num{ animation: mDonePop .55s cubic-bezier(.3,1.6,.5,1) both; }

/* ===== Lesson change: the player slides out and the next one in ===== */
@keyframes mOutLeft  { to { opacity: 0; transform: translateX(-28px) scale(.985); } }
@keyframes mOutRight { to { opacity: 0; transform: translateX(28px)  scale(.985); } }
@keyframes mInRight  { from { opacity: 0; transform: translateX(28px)  scale(.985); } to { opacity: 1; transform: none; } }
@keyframes mInLeft   { from { opacity: 0; transform: translateX(-28px) scale(.985); } to { opacity: 1; transform: none; } }
.m-player.is-leaving.to-left  .m-player__frame,
.m-player.is-leaving.to-left  .m-player__info { animation: mOutLeft .22s ease-in both; }
.m-player.is-leaving.to-right .m-player__frame,
.m-player.is-leaving.to-right .m-player__info { animation: mOutRight .22s ease-in both; }
.m-player.is-entering.from-right .m-player__frame,
.m-player.is-entering.from-right .m-player__info { animation: mInRight .4s cubic-bezier(.2,.8,.2,1) both; }
.m-player.is-entering.from-left  .m-player__frame,
.m-player.is-entering.from-left  .m-player__info { animation: mInLeft .4s cubic-bezier(.2,.8,.2,1) both; }
.m-player.is-entering .m-player__info { animation-delay: .06s; }

/* ===== Up next (over the player when a video ends) ===== */
.m-upnext{
  position: absolute; inset: 0;
  z-index: 30;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(8,24,30,0);
  backdrop-filter: blur(0);
  transition: background .35s ease, backdrop-filter .35s ease;
}
.m-upnext.is-in{ background: rgba(8,24,30,0.72); backdrop-filter: blur(6px); }
.m-upnext__card{
  width: min(440px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateY(16px) scale(.97);
  transition: opacity .35s ease .05s, transform .45s cubic-bezier(.2,.8,.2,1) .05s;
}
.m-upnext.is-in .m-upnext__card{ opacity: 1; transform: none; }
.m-upnext__kicker{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
}
.m-upnext__row{ display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.m-upnext__thumb{
  width: 132px; aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  flex: 0 0 auto;
}
.m-upnext__title{ font-weight: 900; font-size: 16px; line-height: 1.25; color: rgba(26,26,26,0.9); }
.m-upnext__sub{ margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--brand-2); }
.m-upnext__actions{ display: flex; gap: 8px; margin-top: 16px; }
.m-upnext__go{ display: inline-flex; align-items: center; gap: 8px; }
.m-upnext__ring{ width: 18px; height: 18px; transform: rotate(-90deg); }
.m-upnext__ring circle{ fill: none; stroke: rgba(255,255,255,0.35); stroke-width: 4; }
.m-upnext__ring .m-upnext__ring-fill{
  stroke: #fff;
  stroke-dasharray: 94.25;
  stroke-dashoffset: 94.25;
  animation: mRing linear forwards;
}
@keyframes mRing{ to { stroke-dashoffset: 0; } }
@media (max-width: 560px){
  .m-upnext__thumb{ display: none; }
  .m-lesson__thumb{ width: 96px; }
}

@media (prefers-reduced-motion: reduce){
  .m-lesson__thumb img,
  .m-lesson__bar > span,
  .m-upnext, .m-upnext__card{ transition: none; }
  .m-lesson.just-done .m-lesson__num,
  .m-upnext__ring .m-upnext__ring-fill{ animation: none; }
}

/* =============================================
   COMPACT LAYOUT (oct 2026): the video first
   ============================================= */
.m-main { padding-top: 14px; }

/* header: one row — back · titles · progress · lessons toggle */
.m-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.m-hero .m-crumb {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  padding: 0;
  justify-content: center;
  box-shadow: none;
  color: var(--brand-2);
}
.m-hero__titles { flex: 1 1 auto; min-width: 0; }
.m-hero .m-meta { margin-top: 0; gap: 12px; font-size: 12.5px; font-weight: 600; color: rgba(26,26,26,0.58); }
.m-hero .m-meta__level { padding: 2px 10px; font-size: 11.5px; }
.m-hero .m-title {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-hero .m-sub { display: none; }
.m-hero .m-progress { flex: 0 0 220px; margin-top: 0; gap: 6px; }
.m-hero .m-progress__sub { font-size: 12px; font-weight: 600; color: rgba(26,26,26,0.5); }
.m-hero .m-progress__pct { font-size: 12.5px; }
.m-hero .m-progress__track { height: 6px; }
.m-lessons-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.m-lessons-toggle:hover { border-color: rgba(84,140,146,0.35); background: rgba(84,140,146,0.05); }

/* layout: the list is as tall as the player and scrolls inside; it can slide away */
.m-layout {
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: stretch;
  transition: grid-template-columns .35s cubic-bezier(.2,.8,.2,1), gap .35s ease;
}
.m-sidebar {
  min-height: 0;
  contain: size;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: opacity .25s ease;
}
.m-layout.is-lessons-closed { grid-template-columns: 0 minmax(0, 1fr); gap: 0; }
.m-layout.is-lessons-closed .m-sidebar { opacity: 0; pointer-events: none; border-width: 0; }
.m-player { min-height: 0; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.m-sidebar__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font: inherit;
  text-align: left;
  cursor: default;
}
.m-sidebar__title { margin: 0; font-size: 14px; font-weight: 800; }
.m-sidebar__count { margin-left: auto; font-size: 12px; font-weight: 600; color: rgba(26,26,26,0.5); }
.m-sidebar__chev { display: none; }
.m-lessons { flex: 1 1 auto; min-height: 0; padding: 8px; gap: 6px; }

/* lesson rows: title + status; the concept/case line lives under the player */
.m-lesson { padding: 8px; gap: 10px; border-radius: 12px; }
.m-lesson .m-lesson-sub { display: none; }
.m-lesson__thumb { width: 92px; border-radius: 8px; }
.m-lesson__title { font-size: 13px; font-weight: 700; line-height: 1.3; }
.m-lesson__meta { margin-top: 4px; font-size: 11.5px; font-weight: 600; }
.m-lesson__num--badge { width: 20px; height: 20px; top: 4px; left: 4px; font-size: 10px; }
.m-lesson__len { font-size: 10px; bottom: 6px; right: 4px; }

/* under the player: compact title, two lines of description, Prev/Next on the side */
.m-player__info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title actions" "sub actions" "desc actions";
  column-gap: 20px;
  align-items: start;
  padding: 14px 18px 16px;
}
.m-player__info .m-h2 { grid-area: title; font-size: 18px; font-weight: 800; }
.m-player__info .m-lesson-sub--player { grid-area: sub; margin-top: 6px; }
.m-player__info .m-desc {
  grid-area: desc;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.m-player__info .m-actions { grid-area: actions; margin: 0; padding: 0; align-self: center; }
.m-actions .m-btn { padding: 9px 14px; font-size: 13.5px; font-weight: 700; border-radius: 12px; }

/* phone / tablet: video first, short header, lessons as a closed accordion */
@media (max-width: 980px) {
  .m-hero { flex-wrap: wrap; gap: 10px 12px; padding-bottom: 12px; margin-bottom: 12px; }
  .m-hero__titles { flex: 1 1 calc(100% - 60px); }
  .m-hero .m-title { font-size: 19px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .m-hero .m-progress { flex: 1 1 100%; }
  .m-lessons-toggle { display: none; }
  .m-layout, .m-layout.is-lessons-closed { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .m-sidebar { contain: none; order: 2; opacity: 1 !important; pointer-events: auto !important; border-width: 1px !important; }
  .m-sidebar__head { cursor: pointer; }
  .m-sidebar__chev { display: inline-block; font-size: 12px; color: rgba(26,26,26,0.45); transition: transform .25s ease; }
  .m-layout.is-lessons-closed .m-sidebar__chev { transform: rotate(-90deg); }
  .m-layout.is-lessons-closed .m-lessons { display: none; }
  .m-layout.is-lessons-closed .m-sidebar__head { border-bottom: 0; }
  .m-player__info { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "sub" "desc" "actions"; padding: 12px 14px 14px; }
  .m-player__info .m-h2 { font-size: 16.5px; }
  .m-player__info .m-actions { margin-top: 12px; justify-content: space-between; }
}
@media (max-width: 520px) {
  .m-main { padding: 10px 12px 32px; }
  .m-hero .m-meta { gap: 10px; font-size: 12px; }
}

/* Video edge to edge: no border inside the 16:9 box (it made the iframe 1px short of 16:9 and
   Bunny pillarboxed it in black), a light backdrop instead of black, and the player 1px oversized
   so sub-pixel rounding never shows a hairline. */
.m-player__frame { border-bottom: 0; background: #eef3f4; }
.m-player:not(.m-player--quiz) .m-player__frame iframe,
.m-player:not(.m-player--quiz) .m-player__frame video {
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
}
.m-player__info { border-top: 1px solid rgba(0,0,0,0.06); }

/* === Premium gold profile pill (same as the rest of the site) === */
.perfilUsuario.is-premium {
  background: linear-gradient(135deg, rgba(182,138,58,0.13), rgba(210,178,95,0.06));
  border-color: rgba(182,138,58,0.38);
  box-shadow: 0 2px 10px rgba(182,138,58,0.15);
}
.perfilUsuario.is-premium:hover {
  background: linear-gradient(135deg, rgba(182,138,58,0.20), rgba(210,178,95,0.10));
}
.perfilUsuario.is-premium .perfilCirculo {
  background: linear-gradient(135deg, #B68A3A, #D2B25F);
  box-shadow: 0 0 0 2px rgba(182,138,58,0.22);
}
.perfilUsuario.is-premium .nombreUsuario { color: #8A6423; }
