/* Vitrinas (Mis cursos, Recursos, Guías), menú de ocho secciones y menú «Más» del teléfono. */

/* Menú lateral: una sola marca que se desliza hasta la sección activa (antes, cada enlace tenía la suya). */
.lateral { overflow-y: auto; }
#menu { position: relative; }
.menu a[aria-current="page"]::before { display: none; }
.menu-ind { position: absolute; left: -14px; top: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--lateral-texto); pointer-events: none;
  transition: transform var(--m-normal-t) var(--m-normal), height var(--m-normal-t) var(--m-normal), opacity .2s; }
:root[data-tema="oscuro"] .menu-ind { background: var(--rojo); }
.menu a { transition: background .15s, color .15s, padding-left var(--m-agil-t) var(--m-agil); }
.menu a:hover:not([aria-current]) { padding-left: 16px; }
@media (max-height: 820px) { .menu a { padding-top: 8px; padding-bottom: 8px; } .marca { padding-bottom: 16px; } }

/* Teléfono: cuatro destinos y «Más». */
.abajo-tel button { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--texto-2); border: 0; background: none; padding: 4px 0; border-radius: 8px; }
.abajo-tel button[aria-expanded="true"] { color: var(--rojo); font-weight: 600; }
.mas-hoja { position: fixed; z-index: 27; left: 10px; right: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); display: grid; gap: 2px; padding: 10px;
  background: var(--panel); border: 1px solid var(--borde); border-radius: 18px; box-shadow: 0 -10px 40px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); }
:root[data-tema="claro"] .mas-hoja { background: rgba(255,252,246,.97); }
:root[data-tema="oscuro"] .mas-hoja { background: rgba(16,16,18,.96); }
.mas-hoja[hidden] { display: none; }
.mas-hoja p { margin: 2px 8px 6px; font-size: 11px; color: var(--texto-2); letter-spacing: .06em; }
.mas-hoja a { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 10px; color: var(--texto); text-decoration: none; font-weight: 500; }
.mas-hoja a[aria-current="page"] { background: var(--rojo-suave); color: var(--rojo); }
@media (min-width: 861px) { .mas-hoja { display: none !important; } }

/* Tarjetas */
.vitrina { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tarjeta { display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none;
  transition: transform var(--m-agil-t) var(--m-agil), box-shadow .2s, border-color .2s; }
.tarjeta[hidden] { display: none; }
a.tarjeta:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.10); }
a.tarjeta:hover .portada svg { transform: scale(1.04); }
.portada { position: relative; aspect-ratio: 16 / 9; color: var(--c); background: color-mix(in srgb, var(--c) 9%, var(--panel)); overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--c) 18%, transparent); }
.portada svg { position: absolute; inset: 10% 8% 6% 30%; width: 62%; height: 84%; transition: transform var(--m-normal-t) var(--m-normal); }
.portada .p-num { position: absolute; left: 16px; top: 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.vista-cursos .portada .p-num { font-size: 34px; letter-spacing: -.03em; top: 10px; }
:root[data-tema="oscuro"] .portada { background: color-mix(in srgb, var(--c) 18%, #0d0d0d); color: color-mix(in srgb, var(--c) 55%, #fff); }
/* Portadas con imagen (Flow): la imagen llena el marco; el número va en blanco sobre una sombra suave arriba a la
   izquierda y una raya fina abajo lleva el color de la tarjeta. Igual en claro y en oscuro. */
.portada.con-img, :root[data-tema="oscuro"] .portada.con-img { background: #0b0b0c; color: #fff; border-bottom: 3px solid var(--c); }
.portada.con-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--m-normal-t) var(--m-normal); }
a.tarjeta:hover .portada.con-img img { transform: scale(1.04); }
.portada.con-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(0,0,0,.6), transparent 45%); pointer-events: none; }
.portada.con-img .p-num, .portada.con-img .hecho-lab { z-index: 1; }
.portada.con-img .p-num { color: #fff; }
.t-cuerpo { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.t-eti { font: 500 11px 'IBM Plex Mono', monospace; color: var(--texto-2); letter-spacing: .03em; }
.tarjeta h2 { margin: 2px 0 0; font-size: 17px; line-height: 1.3; }
.tarjeta p { margin: 0; font-size: 14px; color: var(--texto-2); }
.t-pie { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--texto-2); }
.t-pie .pista { flex: 1; min-width: 80px; height: 6px; }
.t-pie .pista b { transition: none; }
.estado-r { font: 600 11px 'IBM Plex Mono', monospace; padding: 2px 8px; border-radius: 999px; }
.estado-r.en-línea { background: color-mix(in srgb, var(--verde) 14%, transparent); color: var(--verde); }
.estado-r.muestra { background: var(--rojo-suave); color: var(--rojo); }
.estado-r.pendiente { background: rgba(127,127,127,.14); color: var(--texto-2); }
.etq { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--borde); }
.tarjeta.sin-enlace { opacity: .78; }
.buscador-cat { min-width: 260px; background: var(--panel); }

/* EVA en vertical: portadas 9:16; el video se abre en una ventana encima de la página (videos-eva.js) */
.reels { margin-bottom: 28px; }
.reels-cab h2 { margin: 0; font-size: 20px; }
.reels-cab p { margin: 2px 0 12px; color: var(--texto-2); font-size: 14px; }
.reels-fila { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 220px)); gap: 16px; }
.reel { position: relative; display: block; aspect-ratio: 9 / 16; padding: 0; border: 1px solid var(--borde); border-radius: 14px; overflow: hidden;
  background: #0b0b0c; color: #fff; text-align: left; cursor: pointer; transition: transform var(--m-agil-t) var(--m-agil), box-shadow .2s; }
.reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--m-normal-t) var(--m-normal); }
.reel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(0,0,0,.9) 68%, #000); pointer-events: none; }
button.reel:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.18); }
button.reel:hover img { transform: scale(1.04); }
.reel:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }
.reel-play { position: absolute; left: 50%; top: 46%; translate: -50% -50%; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.reel-pie { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; display: grid; gap: 4px; }
.reel-pie b { font-size: 16px; line-height: 1.25; }
.reel-eti { font-size: 11px; letter-spacing: .1em; color: #6fdbd4; }
.reel.titulada::after { background: linear-gradient(180deg, transparent 80%, rgba(0,0,0,.85)); }
.reel.titulada .reel-play { top: auto; left: auto; right: 12px; bottom: 10px; translate: none; width: 42px; height: 42px; }
.reel.titulada .reel-pie { right: 62px; }
@media (max-width: 860px) {
  .reel.titulada .reel-play { right: 8px; bottom: 8px; width: 34px; height: 34px; }
  .reel.titulada .reel-pie { left: 10px; right: 46px; bottom: 16px; }
  .reel.titulada .reel-eti { font-size: 10px; letter-spacing: .02em; white-space: nowrap; }
}
.reel.pronto { border-style: dashed; background: var(--suave); color: var(--texto-2); cursor: default; }
.reel.pronto::after { display: none; }
.reel.pronto .reel-eti { color: var(--texto-2); }
.reel-modal { background: rgba(0,0,0,.84); }
.reel-caja { position: relative; display: grid; grid-template-columns: auto 300px; gap: 28px; align-items: end; }
.reel-marco { height: min(86vh, 860px); aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #000; }
.reel-marco iframe { display: block; width: 100%; height: 100%; border: 0; }
.reel-texto { color: #fff; padding-bottom: 12px; }
.reel-texto h2 { margin: 6px 0 8px; font-size: 24px; line-height: 1.2; }
.reel-texto p { margin: 0 0 14px; color: #c9c9c9; font-size: 15px; }
.reel-texto a { color: #6fdbd4; font-weight: 600; text-decoration: none; }
.reel-caja .cerrar { position: absolute; top: -6px; right: -6px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.6); color: #fff; font-size: 24px; line-height: 1; }

/* Guías, protocolos y tutoriales: la tarjeta se abre en su lugar */
.guia-t .btn { align-self: flex-start; margin-top: 10px; height: 36px; }
.guia-t.abierta { grid-column: span 2; }
.g-pasos ol { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.g-pasos li::marker { color: var(--rojo); font-weight: 700; }
.g-ir { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linea, var(--borde)); font-size: 13px; }
.g-ir a { color: var(--rojo); font-weight: 600; text-decoration: none; }
.g-copiar { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--borde); background: none; border-radius: 8px; padding: 5px 10px; font-size: 13px; }

/* Novedades */
.novedades a { color: inherit; text-decoration: none; display: block; }
.novedades .nov-eti { font-size: 11px; color: var(--texto-2); font-weight: 400; letter-spacing: .03em; }
.novedades .nov-muestra { border-left-style: dashed; border-left-color: var(--borde); opacity: .8; }

@media (max-width: 860px) {
  .vitrina { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .guia-t.abierta { grid-column: auto; }
  .buscador-cat { min-width: 0; width: 100%; }
  .titulo .acciones .buscador-cat { flex: 1; }
  .portada { aspect-ratio: 16 / 7; }
  /* EVA en vertical: dos columnas y un solo «Próximamente»; el video ocupa toda la pantalla */
  .reels-fila { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .reel.pronto ~ .reel.pronto { display: none; }
  .reel-modal { padding: 0; }
  .reel-caja { width: 100%; height: 100dvh; grid-template-columns: 1fr; gap: 0; }
  .reel-marco { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
  .reel-texto { display: none; }
  .reel-caja .cerrar { top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 2; }
}
