/* Estilos específicos HistoriaCripto */
.reveal .slides section img {
  max-height: 55vh !important;
  object-fit: contain;
  display: block;
  margin: 0.4rem auto 0.6rem;
}
.reveal .slides section p,
.reveal .slides section li {
  line-height: 1.2;
}
.reveal ul { margin-top: 0.4rem; }
.reveal h2 { font-size: 2.6rem !important; margin-bottom: 0.6rem !important; }
.reveal h3 { font-size: 1.9rem !important; margin-bottom: 0.6rem !important; }
.reveal figure figcaption {
  font-size: 0.7rem;
  text-align: center;
  opacity: 0.75;
  margin-top: -0.4rem;
}
.reveal .footer {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: var(--hc-footer-h) !important;
  z-index: 60 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0 0.45rem !important;
  font-size: 0.65em !important;
  color: #ff79c6 !important;
  background: rgba(40, 42, 54, 0.95);
  text-align: center;
  padding: 0.5em 0;
  border-top: 2px solid #bd93f9;
  font-weight: bold;
  letter-spacing: 0.03em;
}
.reveal .footer a {
  color: #bd93f9 !important;
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}
.reveal .footer a:hover {
  color: #50fa7b !important;
  text-shadow: 0 0 8px #50fa7b;
}
.reveal .slides {
  padding-bottom: calc(var(--hc-footer-h) + 2rem) !important;
}
.reveal .slides section {
  box-sizing: border-box;
  padding-bottom: 1rem !important;
  min-height: 100%;
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.45;
  padding: 0 4vw;
}

/* ===================== */
/* Centrado vertical     */
/* ===================== */
.center-vert,
section.center-vert {
  justify-content: center !important;
  min-height: calc(100vh - var(--hc-footer-h) - 1.5rem) !important;
}

/* Asegurar que listas dentro de .center-vert no peguen el footer */
.center-vert ul:last-child,
.center-vert p:last-child {
  margin-bottom: 0.4rem !important;
}
/* ===================== */
/* Número de diapositiva */
/* ===================== */
.reveal .slide-number {
  bottom: calc(var(--hc-footer-h) + 10px) !important;
  z-index: 70 !important;
}

/* Enlaces con animación (unificado Bios&UEFI) */
.reveal a {
  position: relative;
  color: #2b00ff;
  text-decoration: none;
}
.reveal a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: #00aaff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease-in-out;
}
.reveal a:hover::after {
  transform: scaleX(1);
}

/* ===================== */
/* Último elemento       */
/* ===================== */
.reveal .slides section ul:last-child,
.reveal .slides section p:last-child {
  margin-bottom: 0.3rem !important;
}

/* Scroll de emergencia (si scrollable) */
.reveal .slides section[data-scrollable],
.reveal .slides section.scrollable {
  overflow-y: auto !important;
  padding-bottom: calc(var(--hc-footer-h) + 7vh) !important;
}

/* ===================== */
/* Footer y anti-solape  */
/* ===================== */
:root {
  --hc-footer-h: 3.2rem;
}

.reveal .footer {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: var(--hc-footer-h) !important;
  z-index: 60 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0 0.45rem !important;
  font-size: 0.65em !important;
  color: #ff79c6 !important;
  background: rgba(40, 42, 54, 0.95);
  text-align: center;
  padding: 0.5em 0;
  border-top: 2px solid #bd93f9;
  font-weight: bold;
  letter-spacing: 0.03em;
}

/* Reserva de espacio en todas las slides (sin forzar flex) */
.reveal .slides section {
  box-sizing: border-box;
  padding-bottom: calc(var(--hc-footer-h) + 5vh) !important;
  min-height: 100%;
  display: block; /* elimina el flex forzado */
}

/* Secciones centradas: flex column que ocupa la ventana menos el footer */
.reveal .slides section.center-vert {
  display: block !important;
  padding-top: 1rem !important;
  padding-bottom: calc(var(--hc-footer-h) + 1.2rem) !important;
}

/* Listas dentro de center-vert: ancho legible y alineación a la izquierda */
.reveal .slides section.center-vert ul,
.reveal .slides section.center-vert p {
  width: min(82%, 720px);
  text-align: left;
  margin: 0 auto;
}

/* Imágenes en secciones centradas: altura controlada */
.reveal .slides section.center-vert img {
  max-height: 60vh !important; /* margen suficiente respecto al footer */
}

/* ===================== */
/* Número de diapositiva */
/* ===================== */
.reveal .slide-number {
  bottom: calc(var(--hc-footer-h) + 10px) !important;
  z-index: 70 !important;
}

/* ===================== */
/* Enlaces animados      */
/* ===================== */
.reveal a {
  position: relative;
  color: #2b00ff;
  text-decoration: none;
}
.reveal a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: #00aaff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease-in-out;
}
.reveal a:hover::after {
  transform: scaleX(1);
}

/* ===================== */
/* Último elemento       */
/* ===================== */
.reveal .slides section ul:last-child,
.reveal .slides section p:last-child {
  margin-bottom: 0.3rem !important;
}

/* Scroll de emergencia (si scrollable) */
.reveal .slides section[data-scrollable],
.reveal .slides section.scrollable {
  overflow-y: auto !important;
  padding-bottom: calc(var(--hc-footer-h) + 7vh) !important;
}

/* Override para secciones centradas: menos padding inferior, altura completa sin empujar hacia el footer */
.reveal .slides section.center-vert {
  padding-bottom: calc(var(--hc-footer-h) + 1.2rem) !important;
  padding-top: 1.2rem !important;
  min-height: calc(100vh - var(--hc-footer-h)) !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Contenedor vertical (.vc) dentro de .center-vert: ocupa espacio disponible y centra contenido real */
.reveal .slides section.center-vert .vc {
  margin-top: auto;
  margin-bottom: auto;
  width: 100%;
}

/* Imágenes dentro de .center-vert: menor altura para asegurar separación del footer */
.reveal .slides section.center-vert img {
  max-height: 46vh !important;
}

/* Último bloque dentro de .vc: pequeña separación con footer */
.reveal .slides section.center-vert .vc ul:last-child,
.reveal .slides section.center-vert .vc p:last-child {
  margin-bottom: 0.3rem !important;
}

/* Estilos para dos columnas */
.two-col {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.2rem;
  margin: 0 auto;
  max-width: 1120px;
}

.two-col figure {
  flex: 1 1 46%;
  min-width: 280px;
  margin: 0;
  text-align: center;
}

.two-col figure img {
  width: auto;
  max-height: 48vh;
  display: block;
  margin: 0 auto;
}

.two-col__body {
  flex: 1 1 44%;
  min-width: 260px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.two-col__body ul {
  margin: 0;
  padding-left: 1.2rem;
}

@media (max-width: 900px) {
  .two-col {
    flex-direction: column;
    align-items: stretch;
  }
  .two-col figure,
  .two-col__body {
    flex-basis: 100%;
  }
}

/* Nueva tabla estilo dividido */
table.split {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto 0.5rem;
}

table.split td {
  vertical-align: middle;
  padding: 0 1.2rem;
}

table.split td.split-img {
  width: 52%;
}

table.split td.split-text {
  font-size: 1.5rem;
  line-height: 1.35;
}

table.split td.split-text li + li {
  margin-top: 0.25rem;
}

table.split td.split-img img {
  max-height: 48vh;
  width: auto;
  display: block;
  margin: 0 auto;
}

@media (max-width: 900px) {
  table.split,
  table.split tr,
  table.split td {
    display: block;
    width: 100%;
  }
  table.split td {
    padding: 0.4rem 0;
  }
}

.reveal .slides section.split-slide {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  min-height: calc(100vh - var(--hc-footer-h) - 1rem);
}

.reveal .slides section.split-slide,
.reveal .slides section.split-slide > .slide-scrollable,
.reveal .slides section.split-slide > .scrollable {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
  min-height: calc(100vh - var(--hc-footer-h) - 1.2rem);
}

.reveal .slides section.split-slide h3 {
  margin-bottom: 1.4rem !important;
}

.reveal .slides section.split-slide table.split {
  margin: 0 !important;
}

/* Estilos para tablas con scroll interno */
.reveal .slides section[data-scrollable] {
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - var(--hc-footer-h)) !important;
}

.reveal .slides section[data-scrollable] > div {
  flex: 1 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 0 1rem !important;
  box-sizing: border-box;
}

.reveal .slides section[data-scrollable] > div > *:last-child {
  margin-bottom: 0 !important;
}

/* Ajustes para tablas dentro de slides con scroll */
.reveal .slides section.split-slide[data-scrollable] {
  padding-bottom: calc(var(--hc-footer-h) + 1rem) !important;
}

.reveal .slides section.split-slide[data-scrollable] > div {
  padding-bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  height: 100% !important;
  box-sizing: border-box;
}

.reveal .slides section.split-slide[data-scrollable] table.split {
  margin-bottom: 0 !important;
  width: 100% !important;
}

.reveal .slides section.split-slide[data-scrollable] table.split td {
  padding: 0.4rem 0.8rem !important;
  width: auto !important;
  display: table-cell !important;
  vertical-align: middle !important;
}

.reveal .slides section.split-slide[data-scrollable] table.split td.split-img {
  width: 50% !important;
  max-width: 200px;
}

.reveal .slides section.split-slide[data-scrollable] table.split td.split-text {
  width: 50% !important;
  max-width: 300px;
}

.reveal .slides section.split-slide[data-scrollable] img {
  max-height: 40vh !important;
  width: auto !important;
  display: block;
  margin: 0 auto;
}

/* Reubicar botón de menú */
.reveal .slide-menu-button {
  position: fixed !important;
  left: 1.2rem !important;
  bottom: calc(var(--hc-footer-h) + 0.8rem) !important;
  z-index: 90 !important;
  pointer-events: auto !important;
}

/* Estilos para diapositivas con código */
.reveal .slides section.code-slide pre {
  max-height: none !important;
  overflow: visible !important;
  width: 100%;
}

.reveal .slides section.code-slide .sourceCode,
.reveal .slides section.code-slide pre {
  max-height: none !important;
  overflow: visible !important;
  width: 100%;
}

.reveal .slides section.code-slide pre code {
  white-space: pre-wrap !important;
  word-break: break-word;
  font-size: 0.95rem;
}

/* Nuevos estilos para fondo futurista y leyenda */
.reveal .slides section.futuristic-bg {
  position: relative;
  color: #f4f7ff;
  text-align: center;
  justify-content: center;
  align-items: center;
  padding: 0 6vw;
  overflow: hidden;
}

.reveal .slides section.futuristic-bg::before,
.reveal .slides section.futuristic-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.reveal .slides section.futuristic-bg::before {
  background: radial-gradient(ellipse at top, rgba(96,162,255,0.55), transparent 60%),
              radial-gradient(ellipse at bottom, rgba(41,17,73,0.65), transparent 55%),
              linear-gradient(130deg, #101530, #1c1f3f 45%, #0e1228 100%);
  animation: bg-pulse 22s ease-in-out infinite alternate;
}

.reveal .slides section.futuristic-bg::after {
  background: repeating-linear-gradient(135deg, transparent 0, transparent 18px, rgba(255,255,255,0.04) 18px, rgba(255,255,255,0.04) 36px);
  mix-blend-mode: screen;
  opacity: 0.45;
  animation: grid-slide 14s linear infinite;
}

.splash-caption {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.35;
  max-width: 760px;
  margin: 0 auto;
  font-weight: 400;
  letter-spacing: 0.02em;
}

@keyframes bg-pulse {
  0% { transform: scale(1); filter: hue-rotate(0deg); }
  100% { transform: scale(1.08); filter: hue-rotate(22deg); }
}

@keyframes grid-slide {
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-80px, -80px, 0); }
}

.reveal .slides mjx-container {
  font-size: 1.05em;
  color: inherit;
}

.reveal .controls {
  display: flex !important;
  color: #000 !important;
  opacity: 1 !important;
}

.reveal .slides .katex {
  font-size: 1.05em;
  color: inherit;
}

mjx-container {
  display: inline-block !important;
  overflow: visible !important;
  color: inherit !important;
  font-size: 1.1em !important;
  background: none !important;
  z-index: 10 !important;
}
mjx-container > svg {
  max-width: 100% !important;
  height: auto !important;
}
