/* ELEVA by FlexGo Group · estilos */
@font-face { font-family: Manrope; src: url(fuentes/manrope-latin.woff2) format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; src: url(fuentes/manrope-latin-ext.woff2) format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --marino: #09234B; --azul: #0756AC; --cian: #00BCEB; --cian2: #00D2F4;
  --fondo: #F3F7FC; --tarjeta: #FFFFFF; --texto: #142540; --suave: #5B6B84; --borde: #DCE5F0;
  --ok: #128A55; --ok-fondo: #E5F6EE; --mal: #C2384E; --mal-fondo: #FCEBEE; --aviso: #A86A00; --aviso-fondo: #FFF5DF;
  --grad: linear-gradient(120deg, #09234B 0%, #0756AC 45%, #00BCEB 100%);
  --sombra: 0 1px 2px rgba(9,35,75,.06), 0 8px 24px rgba(9,35,75,.07);
  --r: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Manrope, system-ui, -apple-system, Segoe UI, sans-serif; background: var(--fondo); color: var(--texto); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--azul); }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
.oculto { display: none !important; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Barra superior */
.barra { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--borde); }
.barra-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 34px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a, .nav button { text-decoration: none; color: var(--texto); background: none; border: 0; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; }
.nav a:hover, .nav button:hover { background: #EAF1FA; }
.nav a.btn { color: #fff; background: var(--azul); }
.nav a.btn:hover { background: var(--azul); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 18px; font-weight: 700; cursor: pointer; text-decoration: none; background: var(--azul); color: #fff; transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.grande { padding: 14px 22px; font-size: 17px; }
.btn.claro { background: #EAF1FA; color: var(--marino); }
.btn.linea { background: transparent; color: var(--azul); box-shadow: inset 0 0 0 1.5px var(--azul); }
.btn.peligro { background: var(--mal-fondo); color: var(--mal); }
.btn.verde { background: #1FAF5E; }
.btn.chico { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.icono-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--borde); background: #fff; cursor: pointer; color: var(--marino); }
.icono-btn:hover { background: #EAF1FA; }
.icono-btn[disabled] { opacity: .35; cursor: default; }

/* Página */
.pagina { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }
.estrecha { max-width: 760px; }
h1, h2, h3 { color: var(--marino); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4.5vw, 44px); letter-spacing: -.02em; }
h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -.01em; }
h3 { font-size: 18px; }
.suave { color: var(--suave); }
.chico { font-size: 14px; }

/* Portada de inicio */
.heroe { background: var(--grad); color: #fff; border-radius: 26px; padding: clamp(28px, 6vw, 56px); position: relative; overflow: hidden; margin-bottom: 32px; }
.heroe::after { content: ""; position: absolute; right: -80px; top: -80px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); }
.heroe h1 { color: #fff; max-width: 680px; }
.heroe p { font-size: 18px; max-width: 620px; opacity: .93; margin: 0 0 20px; }
.heroe .btn { background: #fff; color: var(--marino); }

/* Tarjetas de curso */
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.tarjeta { background: var(--tarjeta); border-radius: var(--r); box-shadow: var(--sombra); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; border: 1px solid var(--borde); }
a.tarjeta:hover { transform: translateY(-2px); transition: transform .15s; }
.portada { aspect-ratio: 16/9; background: var(--grad); display: grid; place-items: center; overflow: hidden; }
.portada img { width: 100%; height: 100%; object-fit: cover; }
.portada .sin { color: #fff; font-weight: 800; font-size: 22px; padding: 16px; text-align: center; }
.tarjeta-cuerpo { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tarjeta-cuerpo h3 { margin: 0; }
.datos { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--suave); }
.datos span { background: #EEF3F9; padding: 3px 9px; border-radius: 99px; }
.precio { font-size: 22px; font-weight: 800; color: var(--marino); margin-top: auto; }
.caja { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r); box-shadow: var(--sombra); padding: 22px; }
.vacio { text-align: center; padding: 48px 20px; }
.vacio .grande { font-size: 22px; font-weight: 800; color: var(--marino); }
.seccion { margin-top: 44px; }

/* Página del curso */
.curso-cab { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.curso-cab .portada { border-radius: var(--r); box-shadow: var(--sombra); }
.comprar { position: sticky; top: 80px; }
.temario { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.temario li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--borde); border-radius: 12px; }
.temario .tipo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #EAF1FA; color: var(--azul); flex: none; }
.texto-largo { white-space: pre-line; }
.etiqueta { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #EAF1FA; color: var(--azul); }
.etiqueta.ok { background: var(--ok-fondo); color: var(--ok); }
.etiqueta.aviso { background: var(--aviso-fondo); color: var(--aviso); }
.etiqueta.mal { background: var(--mal-fondo); color: var(--mal); }

/* Lector */
.lector { display: grid; grid-template-columns: 290px minmax(0, 1fr) 300px; gap: 20px; max-width: 1400px; margin: 0 auto; padding: 20px 16px 64px; align-items: start; }
.indice { position: sticky; top: 76px; background: #fff; border: 1px solid var(--borde); border-radius: var(--r); padding: 14px; max-height: calc(100vh - 96px); overflow: auto; }
.indice h3 { font-size: 15px; margin: 4px 6px 10px; }
.indice a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--texto); font-size: 14px; }
.indice a:hover { background: #F0F5FB; }
.indice a.actual { background: #E2EDFA; color: var(--marino); font-weight: 700; }
.indice a.bloqueado { color: #9AA7BA; }
.indice .estado { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--borde); display: grid; place-items: center; flex: none; }
.indice .estado.hecho { background: var(--ok); border-color: var(--ok); color: #fff; }
.indice .estado svg { width: 13px; height: 13px; stroke-width: 3; }
.barra-avance { height: 8px; background: #E5ECF5; border-radius: 99px; overflow: hidden; margin: 0 6px 12px; }
.barra-avance i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.contenido { background: #fff; border: 1px solid var(--borde); border-radius: var(--r); padding: clamp(18px, 3vw, 32px); min-height: 60vh; }
.contenido .md { font-size: 17px; }
.contenido .md img { border-radius: 12px; }
.pasos { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--borde); flex-wrap: wrap; }
.figura img { border-radius: 14px; margin: 0 auto; max-height: 70vh; }
.figura figcaption { text-align: center; color: var(--suave); margin-top: 10px; font-size: 15px; }

/* Visor de PDF */
.visor { background: #1B2638; border-radius: 14px; overflow: hidden; }
.visor-lienzo { display: grid; place-items: center; padding: 12px; min-height: 240px; }
.visor-lienzo canvas { max-width: 100%; height: auto !important; border-radius: 6px; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.visor-ctrl { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px; background: #111A28; color: #DCE6F5; font-size: 14px; flex-wrap: wrap; }
.visor-ctrl button { background: #24324A; color: #fff; border: 0; border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 700; }
.visor-ctrl button:hover { background: #2E3F5D; }
.visor-ctrl button[disabled] { opacity: .4; cursor: default; }
.visor:fullscreen { display: flex; flex-direction: column; border-radius: 0; }
.visor:fullscreen .visor-lienzo { flex: 1; }
.visor:fullscreen canvas { max-height: calc(100vh - 80px); width: auto !important; }

/* Video */
.video { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; }
.video img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.video .play { position: relative; width: 84px; height: 84px; border-radius: 50%; background: rgba(9,35,75,.82); display: grid; place-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.4); transition: transform .15s; }
.video button:hover .play { transform: scale(1.08); background: var(--azul); }
.video .play svg { width: 34px; height: 34px; fill: #fff; stroke: none; margin-left: 5px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Examen */
.pregunta { border: 1px solid var(--borde); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.pregunta legend { font-weight: 700; color: var(--marino); padding: 0 6px; font-size: 16px; }
.opcion { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.opcion:hover { background: #F0F5FB; }
.opcion input { margin-top: 4px; accent-color: var(--azul); width: 18px; height: 18px; }
.resultado { text-align: center; padding: 28px 18px; border-radius: 16px; }
.resultado.ok { background: var(--ok-fondo); }
.resultado.mal { background: var(--aviso-fondo); }
.resultado .nota { font-size: 54px; font-weight: 800; line-height: 1; margin: 6px 0; }
.resultado.ok .nota { color: var(--ok); }
.resultado.mal .nota { color: var(--aviso); }

/* Ayuda lateral (fase 2) */
.ayuda { position: sticky; top: 76px; background: #fff; border: 1px solid var(--borde); border-radius: var(--r); padding: 18px; }
.ayuda .icono { width: 44px; height: 44px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; color: #fff; margin-bottom: 10px; }

/* Formularios */
.form { display: grid; gap: 14px; }
label.campo { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
label.campo small { font-weight: 500; color: var(--suave); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], textarea, select {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--borde); border-radius: 12px; background: #fff; font-size: 16px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(7,86,172,.14); }
textarea { min-height: 120px; resize: vertical; }
.casilla { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.casilla input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--azul); flex: none; }
.clave { position: relative; }
.clave input { padding-right: 48px; }
.ojo { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; color: var(--suave); padding: 8px; display: grid; }
.fuerza-barra { height: 7px; background: #E5ECF5; border-radius: 99px; overflow: hidden; }
.fuerza-barra i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.fuerza small { font-size: 13px; font-weight: 600; }
.acceso { max-width: 440px; margin: 20px auto; }
.error { color: var(--mal); font-weight: 600; font-size: 14px; }
.fila { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fila.fin { justify-content: flex-end; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--borde); background: #fff; border-radius: 99px; padding: 8px 16px; cursor: pointer; font-weight: 700; }
.chip.si { border-color: var(--azul); background: #E2EDFA; color: var(--marino); }

/* Texto con formato */
.rico { border: 1.5px solid var(--borde); border-radius: 12px; background: #fff; overflow: hidden; }
.rico:focus-within { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(7,86,172,.14); }
.rico textarea { border: 0; border-radius: 0; min-height: 160px; box-shadow: none !important; }
.rico-barra { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: #F3F7FC; border-bottom: 1px solid var(--borde); }
.rico-barra button { border: 1px solid var(--borde); background: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 14px; color: var(--marino); font-weight: 600; }
.rico-barra button:hover { background: #EAF1FA; }
.rico-barra .rico-vista-btn { margin-left: auto; color: var(--azul); }
.rico-vista { padding: 12px 14px; min-height: 160px; }

/* Estrellas */
.estrellas-elegir { display: flex; gap: 4px; }
.estrellas-elegir button { background: none; border: 0; cursor: pointer; padding: 2px; color: #C9D4E3; }
.estrellas-elegir button.si { color: #F2B01E; }
.estrellas-elegir svg { width: 34px; height: 34px; fill: currentColor; stroke: none; }
.estrellas-txt { color: #F2B01E; letter-spacing: 2px; }
.resena { border-top: 1px solid var(--borde); padding: 12px 0; }

/* Panel */
.panel-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--borde); padding-bottom: 10px; }
.panel-tabs a { text-decoration: none; color: var(--texto); padding: 9px 14px; border-radius: 10px; font-weight: 700; }
.panel-tabs a.si { background: var(--marino); color: #fff; }
.cifras { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.cifra { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 16px; }
.cifra b { display: block; font-size: 28px; color: var(--marino); }
.lista-admin { display: grid; gap: 10px; }
.item-admin { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 12px 14px; flex-wrap: wrap; }
.item-admin .mini { width: 64px; aspect-ratio: 16/9; border-radius: 8px; background: var(--grad); overflow: hidden; flex: none; }
.item-admin .mini img { width: 100%; height: 100%; object-fit: cover; }
.item-admin .crece { flex: 1; min-width: 160px; }
.agregar { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.agregar button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: 14px; border: 2px dashed #B9CBE2; background: #F7FAFE; cursor: pointer; font-weight: 700; color: var(--marino); }
.agregar button:hover { border-color: var(--azul); background: #EAF1FA; }
.agregar svg.i { width: 26px; height: 26px; color: var(--azul); }
.editor-bloque { background: #F7FAFE; border: 1.5px solid #B9CBE2; border-radius: 14px; padding: 16px; display: grid; gap: 12px; width: 100%; }
.pregunta-edit { background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.opcion-edit { display: flex; gap: 8px; align-items: center; }
.opcion-edit input[type=radio] { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.archivos { display: grid; gap: 6px; }
.archivo { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--borde); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.archivo span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subir { display: inline-flex; }
.subir input { display: none; }
.pista { font-size: 13px; color: var(--suave); background: #EEF3F9; border-radius: 10px; padding: 8px 12px; }
.qr { background: #fff; padding: 10px; border-radius: 12px; width: 220px; margin: 10px auto; }

/* Ventana y aviso */
.capa { position: fixed; inset: 0; background: rgba(9,35,75,.5); display: grid; place-items: center; z-index: 60; padding: 16px; }
.ventana { background: #fff; border-radius: 22px; max-width: 480px; width: 100%; padding: 26px; box-shadow: 0 20px 60px rgba(9,35,75,.35); max-height: 90vh; overflow: auto; }
.codigo { font-size: 30px; font-weight: 800; letter-spacing: .12em; color: var(--marino); background: #EAF1FA; border-radius: 12px; padding: 10px; text-align: center; margin: 10px 0; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--marino); color: #fff; padding: 12px 18px; border-radius: 12px; opacity: 0; transition: .25s; z-index: 80; max-width: calc(100% - 32px); font-weight: 600; pointer-events: none; }
#toast.ver { opacity: 1; transform: translate(-50%, 0); }
.demo-aviso { background: #FFF1C9; color: #6E4B00; text-align: center; font-size: 13px; padding: 6px; font-weight: 700; }

/* Pie */
.pie { border-top: 1px solid var(--borde); background: #fff; }
.pie-in { max-width: 1180px; margin: 0 auto; padding: 22px 16px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; color: var(--suave); font-size: 14px; }
.pie a { color: var(--suave); }

.cargando { display: grid; place-items: center; padding: 60px; color: var(--suave); }
.giro { width: 30px; height: 30px; border: 3px solid #D3E0F0; border-top-color: var(--azul); border-radius: 50%; animation: giro .8s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

/* Celular y tableta */
@media (max-width: 1100px) {
  .lector { grid-template-columns: 250px minmax(0, 1fr); }
  .ayuda { grid-column: 1 / -1; position: static; }
}
@media (max-width: 820px) {
  .curso-cab { grid-template-columns: 1fr; }
  .comprar { position: static; }
  .lector { grid-template-columns: 1fr; padding-top: 12px; }
  .indice { position: static; max-height: none; }
  .indice-lista { display: none; }
  .indice.abierto .indice-lista { display: block; }
  .nav .ocultar-cel { display: none; }
  .logo img { height: 28px; }
}
@media (min-width: 821px) { .solo-cel { display: none !important; } }
