:root {
  --azul-noche: #020715;
  --azul-profundo: #071329;
  --azul-panel: rgba(6, 17, 36, 0.82);
  --azul-boton: rgba(8, 30, 64, 0.74);
  --azul-boton-2: rgba(11, 48, 93, 0.84);
  --azul-luz: #70b8ff;
  --azul-hielo: #d7ecff;
  --texto-principal: #edf7ff;
  --texto-suave: #a8c7e5;
  --borde-suave: rgba(132, 194, 255, 0.24);
  --sombra-azul: 0 0 28px rgba(63, 150, 255, 0.25);
  --radio-grande: 24px;
  --radio-medio: 16px;
  --ancho-maximo: 1680px;
  --tamano-lector: 1.24rem;
  --interlineado-lector: 1.72;
  --margen-lector: 9vw;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--azul-noche);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--texto-principal);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 16% 14%, rgba(47, 124, 210, 0.28), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(33, 76, 145, 0.2), transparent 29%),
    linear-gradient(145deg, #01030b 0%, #071326 48%, #020614 100%);
  overflow-x: hidden;
}

.fondo-azul {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(122, 187, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 187, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
}

.pagina {
  width: min(96vw, var(--ancho-maximo));
  margin: 0 auto;
  padding: clamp(12px, 2vw, 28px) 0 92px;
}

.cabecera {
  position: relative;
  width: 100%;
  margin: 0 auto clamp(18px, 3vw, 34px);
}

.imagen-principal {
  display: block;
  width: 100%;
  height: auto;
  max-height: 42vh;
  object-fit: contain;
  border-radius: clamp(14px, 1.8vw, 28px);
  border: 1px solid rgba(155, 209, 255, 0.22);
  box-shadow:
    0 20px 80px rgba(0, 0, 0, 0.58),
    0 0 34px rgba(75, 157, 255, 0.18);
}

.panel {
  position: relative;
  padding: clamp(18px, 2.8vw, 34px);
  border: 1px solid var(--borde-suave);
  border-radius: var(--radio-grande);
  background:
    linear-gradient(180deg, rgba(9, 22, 46, 0.84), rgba(3, 8, 20, 0.88)),
    radial-gradient(circle at top left, rgba(76, 164, 255, 0.16), transparent 42%);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.panel-superior {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(18px, 2.6vw, 30px);
}

.etiqueta {
  margin: 0 0 6px;
  color: var(--azul-luz);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(0.76rem, 1.1vw, 0.92rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--texto-principal);
  font-size: clamp(1.6rem, 3vw, 3.15rem);
  font-weight: 500;
  letter-spacing: 0.045em;
  text-shadow: 0 0 22px rgba(120, 190, 255, 0.22);
}

.boton-sonido,
.boton-volver,
.boton-grande,
.boton-tema {
  border: 1px solid var(--borde-suave);
  color: var(--texto-principal);
  background: var(--azul-boton);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.boton-sonido {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.88rem;
  color: var(--azul-hielo);
}

.boton-sonido:hover,
.boton-volver:hover,
.boton-grande:hover,
.boton-tema:hover {
  transform: translateY(-2px);
  border-color: rgba(149, 213, 255, 0.62);
  background: var(--azul-boton-2);
  box-shadow: var(--sombra-azul), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.boton-sonido:active,
.boton-volver:active,
.boton-grande:active,
.boton-tema:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 0 12px rgba(115, 186, 255, 0.24);
}

.sonido-desactivado {
  opacity: 0.72;
}

.contenedor-botones {
  width: 100%;
}

.contenedor-inicio,
.contenedor-menu {
  display: grid;
  grid-template-columns: repeat(var(--columnas-preferentes), minmax(250px, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.contenedor-secciones {
  display: grid;
  gap: clamp(18px, 2.4vw, 28px);
}

.seccion-menu {
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(148, 204, 255, 0.2);
  border-radius: var(--radio-medio);
  background:
    linear-gradient(180deg, rgba(12, 28, 56, 0.6), rgba(3, 10, 24, 0.68)),
    radial-gradient(circle at top right, rgba(89, 163, 255, 0.11), transparent 45%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.titulo-seccion-menu {
  margin: 0 0 16px;
  color: var(--azul-hielo);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.grupo-botones-seccion {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.seccion-sin-botones {
  margin: 0;
  color: rgba(205, 229, 255, 0.62);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.94rem;
  line-height: 1.5;
}

.boton-grande {
  position: relative;
  min-height: clamp(108px, 13vw, 154px);
  padding: clamp(18px, 2.4vw, 28px);
  overflow: hidden;
  border-radius: var(--radio-medio);
  text-align: left;
  isolation: isolate;
}

.boton-grande::before,
.boton-tema::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, transparent 0%, rgba(142, 211, 255, 0.12) 38%, transparent 64%),
    radial-gradient(circle at top right, rgba(88, 169, 255, 0.18), transparent 46%);
  opacity: 0;
  transform: translateX(-16%);
  transition: opacity 220ms ease, transform 220ms ease;
}

.boton-grande:hover::before,
.boton-tema:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.texto-boton-grande {
  display: block;
  font-size: clamp(1.15rem, 2vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(122, 190, 255, 0.18);
}

.descripcion-boton {
  display: block;
  max-width: 58ch;
  margin-top: 12px;
  color: var(--texto-suave);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(0.86rem, 1.18vw, 1rem);
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.boton-tema {
  position: relative;
  min-height: 68px;
  padding: 16px 18px;
  overflow: hidden;
  border-radius: 14px;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(0.96rem, 1.25vw, 1.08rem);
  line-height: 1.25;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  isolation: isolate;
}


.zona-videos-inicio {
  grid-column: 1 / -1;
  margin-top: clamp(10px, 1.6vw, 22px);
  padding: clamp(16px, 2.2vw, 24px);
  border: 1px solid rgba(148, 204, 255, 0.18);
  border-radius: var(--radio-medio);
  background:
    linear-gradient(180deg, rgba(10, 24, 50, 0.48), rgba(3, 9, 22, 0.58)),
    radial-gradient(circle at top left, rgba(111, 181, 255, 0.1), transparent 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.titulo-videos-inicio {
  margin: 0 0 16px;
  color: var(--azul-hielo);
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rejilla-videos-inicio {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2vw, 24px);
  align-items: flex-start;
}

.tarjeta-video-tema {
  flex: 0 1 min(720px, 100%);
  max-width: 52%;
  min-width: min(420px, 100%);
  padding: clamp(12px, 1.6vw, 18px);
  border: 1px solid rgba(154, 211, 255, 0.2);
  border-radius: 18px;
  background: rgba(4, 13, 30, 0.56);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.titulo-video-tema {
  margin: 0 0 12px;
  color: var(--texto-principal);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.marco-video-tema {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #020715;
  border: 1px solid rgba(150, 210, 255, 0.18);
}

.boton-miniatura-video {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #020715;
  cursor: pointer;
  overflow: hidden;
}

.boton-miniatura-video img,
.iframe-video-tema {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.boton-miniatura-video img {
  object-fit: cover;
  transform: scale(1.01);
  filter: saturate(0.95) contrast(1.02) brightness(0.82);
  transition: transform 220ms ease, filter 220ms ease;
}

.boton-miniatura-video:hover img {
  transform: scale(1.05);
  filter: saturate(1.05) contrast(1.08) brightness(0.94);
}

.icono-play-video {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: clamp(56px, 6vw, 76px);
  height: clamp(56px, 6vw, 76px);
  border-radius: 50%;
  color: #edf7ff;
  background: rgba(4, 16, 35, 0.68);
  border: 1px solid rgba(191, 228, 255, 0.42);
  box-shadow: 0 0 28px rgba(85, 170, 255, 0.32);
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  transform: translate(-50%, -50%);
  padding-left: 0.13em;
  backdrop-filter: blur(6px);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.boton-miniatura-video:hover .icono-play-video {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(12, 54, 105, 0.78);
  box-shadow: 0 0 38px rgba(112, 184, 255, 0.45);
}

.enlace-youtube-tema {
  display: inline-flex;
  margin-top: 12px;
  color: var(--azul-hielo);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid rgba(215, 236, 255, 0.38);
}

.enlace-youtube-tema:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.85);
}


.barra-inferior {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 14px 16px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 3, 10, 0.72));
}

.boton-volver {
  pointer-events: auto;
  min-width: 148px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--azul-hielo);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.boton-principal {
  min-width: 190px;
}

.volver-inicio {
  opacity: 0.72;
}

.aviso-js {
  max-width: 820px;
  margin: 18px auto;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(5, 14, 30, 0.92);
  color: var(--azul-hielo);
  text-align: center;
}

.lector {
  position: fixed;
  inset: 0;
  z-index: 100;
  color: #1a1713;
  background-color: #fbf7ee;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.54)),
    var(--fondo-lector);
  background-size: cover;
  background-position: center;
  overflow-y: auto;
  overflow-x: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.lector.oculto {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lector-texto {
  width: 100%;
  min-height: 100vh;
  padding: clamp(28px, 6vw, 92px) var(--margen-lector) clamp(70px, 8vw, 120px);
  font-size: var(--tamano-lector);
  line-height: var(--interlineado-lector);
  outline: none;
}

.fuente-sans .lector-texto {
  font-family: "Segoe UI", "Atkinson Hyperlegible", Arial, sans-serif;
}

.fuente-serif .lector-texto {
  font-family: Georgia, "Times New Roman", serif;
}

.fuente-antigua .lector-texto {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

.titulo-lector {
  margin: 0 0 0.8em;
  font-size: clamp(2rem, 4.2vw, 4.4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #16130f;
  text-wrap: balance;
}

.subtitulo-lector {
  margin: -0.6em 0 2.2em;
  color: rgba(32, 28, 21, 0.68);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(0.88rem, 1.2vw, 1rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bloque-titulo-principal,
.bloque-titulo-medio,
.bloque-titulo-normal {
  clear: both;
  color: #15120e;
  line-height: 1.25;
  text-wrap: balance;
}

.bloque-titulo-principal {
  margin: 1.1em 0 0.75em;
  font-size: clamp(1.75rem, 3vw, 3.25rem);
  font-weight: 800;
}

.bloque-titulo-medio {
  margin: 1.35em 0 0.65em;
  font-size: clamp(1.38rem, 2.1vw, 2.2rem);
  font-weight: 800;
}

.bloque-titulo-normal {
  margin: 1.25em 0 0.55em;
  font-size: clamp(1.18rem, 1.65vw, 1.62rem);
  font-weight: 800;
}

.parrafo-lector {
  margin: 0 0 1.05em;
  color: #272018;
  text-wrap: pretty;
}

.lector-texto p,
.lector-texto li,
.parrafo-lector,
.columna-poema-texto,
.columna-poema-texto .parrafo-lector {
  line-height: var(--interlineado-lector);
}

.texto-destacado {
  font-size: 1.16em;
  font-weight: 800;
}

.subrayado {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  font-style: italic;
}

.cursiva {
  font-style: italic;
}

.texto-resaltado {
  padding: 0.05em 0.22em;
  border-radius: 0.25em;
  background: rgba(255, 225, 112, 0.42);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.texto-color {
  font-weight: 650;
}

.color-rojo { color: #a62822; }
.color-azul { color: #225fa8; }
.color-amarillo { color: #8a6500; }
.color-naranja { color: #b65c12; }
.color-verde { color: #2d6f3a; }
.color-morado { color: #7445a6; }

.oculto-interactivo {
  display: inline;
}

.boton-oculto-mostrar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.85em;
  margin: 0 0.14em;
  padding: 0.18em 0.7em;
  border: 1px solid rgba(78, 106, 133, 0.34);
  border-radius: 999px;
  color: #17304a;
  background: rgba(236, 246, 255, 0.88);
  box-shadow: 0 0.25em 0.9em rgba(63, 100, 135, 0.12);
  cursor: pointer;
  font: inherit;
  font-size: 0.82em;
  line-height: 1.1;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.boton-oculto-mostrar:hover {
  transform: translateY(-1px);
  background: rgba(216, 236, 255, 0.98);
  box-shadow: 0 0.35em 1.1em rgba(63, 100, 135, 0.18);
}

.contenido-oculto-interactivo {
  display: inline;
}

.boton-oculto-cerrar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  margin-left: 0.36em;
  padding: 0;
  border: 1px solid rgba(103, 72, 62, 0.22);
  border-radius: 50%;
  color: #5b2d24;
  background: rgba(255, 235, 226, 0.82);
  cursor: pointer;
  font: inherit;
  font-size: 0.74em;
  line-height: 1;
  vertical-align: 0.08em;
}

.boton-oculto-cerrar:hover {
  background: rgba(255, 218, 204, 0.96);
}

.separador-lector {
  clear: both;
  width: min(420px, 52%);
  margin: 2.2em auto;
  border: 0;
  border-top: 1px solid rgba(46, 39, 30, 0.22);
}

.imagen-banner-lector {
  display: block;
  clear: both;
  width: min(100%, 1500px);
  margin: 0 auto 2.2em;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(35, 26, 16, 0.18);
}

.imagen-total-lector {
  display: block !important;
  float: none !important;
  clear: both !important;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 1.8em auto 2.2em;
  border-radius: 20px;
  box-shadow: 0 20px 54px rgba(35, 26, 16, 0.16);
}

.imagen-total-lector + .imagen-total-lector {
  margin-top: 2.4em;
}

.imagen-flotante-lector {
  float: left;
  width: min(33vw, 430px);
  max-width: 42%;
  height: auto;
  margin: 0.35em clamp(22px, 3vw, 42px) 1.2em 0;
  border-radius: 20px;
  box-shadow: 0 20px 54px rgba(35, 26, 16, 0.18);
}

.sin-imagenes .imagen-banner-lector,
.sin-imagenes .imagen-total-lector,
.sin-imagenes .imagen-flotante-lector {
  display: none !important;
}

.maquetacion-poema {
  clear: both;
  display: grid;
  grid-template-columns: minmax(240px, min(33vw, 430px)) minmax(260px, 1fr);
  gap: clamp(22px, 3vw, 42px);
  align-items: start;
  margin: 0.35em 0 1.2em;
}

.columna-poema-imagen {
  min-width: 0;
}

.columna-poema-texto {
  min-width: 0;
}

.maquetacion-poema .imagen-flotante-lector {
  float: none;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.modo-poema .parrafo-lector {
  margin-bottom: 1.35em;
}

.modo-poema .columna-poema-texto .parrafo-lector {
  text-wrap: auto;
}

.sin-imagenes .maquetacion-poema .columna-poema-imagen {
  min-height: 1px;
}

.sin-imagenes .maquetacion-poema .columna-poema-imagen .imagen-flotante-lector {
  display: none !important;
}

.lector-control-zona {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 120;
  width: 78px;
  height: 100vh;
  pointer-events: auto;
}

.tirador-lector {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 16px;
  height: 96px;
  padding: 0;
  border: 1px solid rgba(41, 92, 137, 0.26);
  border-radius: 999px;
  background: rgba(31, 71, 101, 0.22);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.tirador-lector:hover {
  opacity: 0.95;
  background: rgba(31, 71, 101, 0.34);
  transform: translateY(-50%) scaleX(1.12);
}

.panel-controles-lector {
  position: absolute;
  top: 50%;
  right: 26px;
  display: grid;
  gap: 9px;
  min-width: 172px;
  padding: 12px;
  border: 1px solid rgba(36, 72, 111, 0.22);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.82);
  box-shadow: 0 20px 55px rgba(30, 24, 18, 0.18);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translate(125%, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.lector-control-zona:hover .panel-controles-lector,
.lector-control-zona.abierto .panel-controles-lector {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.boton-control-lector {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(37, 78, 120, 0.22);
  border-radius: 999px;
  color: #16283a;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.boton-control-lector:hover {
  transform: translateY(-1px);
  background: rgba(236, 247, 255, 0.92);
  box-shadow: 0 0 18px rgba(70, 137, 196, 0.25);
}

.boton-salir-lector {
  color: #3b1c20;
  background: rgba(255, 238, 232, 0.86);
}

@media (max-width: 980px) {
  .imagen-principal {
    max-height: none;
  }

  .contenedor-inicio,
  .contenedor-menu {
    grid-template-columns: 1fr;
  }

  .tarjeta-video-tema {
    max-width: 100%;
  }

  .lector-texto {
    padding-right: var(--margen-lector);
    padding-left: var(--margen-lector);
  }

  .imagen-flotante-lector {
    width: min(44vw, 360px);
    max-width: 48%;
  }
}

@media (max-width: 680px) {
  .pagina {
    width: min(94vw, var(--ancho-maximo));
    padding-bottom: 100px;
  }

  .panel-superior {
    flex-direction: column;
  }

  .boton-grande {
    min-height: 96px;
  }

  .barra-inferior {
    gap: 8px;
    padding-inline: 8px;
  }

  .boton-volver {
    min-width: auto;
    font-size: 0.78rem;
    padding-inline: 12px;
  }

  .lector-texto {
    padding: 24px var(--margen-lector) 80px var(--margen-lector);
    font-size: calc(var(--tamano-lector) * 0.94);
  }

  .imagen-flotante-lector {
    float: none;
    display: block;
    width: min(100%, 440px);
    max-width: 100%;
    margin: 0.5em auto 1.2em;
  }

  .maquetacion-poema {
    grid-template-columns: minmax(120px, 36vw) minmax(150px, 1fr);
    gap: clamp(12px, 3vw, 22px);
  }

  .panel-controles-lector {
    right: 24px;
  }
}
