/*
Theme Name: Qualom
Author: David Baños Abril
Description: Tema personalizado para Qualom
Version: 1.0
Text Domain: qualom
Domain Path: /languages
*/
@font-face {
  font-family: "LM Roman Math";
  src: url("/wp-content/themes/mi-tema/assets/fonts/latinmodern-math.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LM Roman Bold";
  src: url("/wp-content/themes/mi-tema/assets/fonts/lmroman12-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LM Roman Caps";
  src: url("/wp-content/themes/mi-tema/assets/fonts/lmromancaps10-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   0) RESET + BASE (evita gutters y define fondo global)
   ========================================================= */

/* Reset mínimo */
html, body {
  margin: 0;
  padding: 0;
}
html {
  background: #000000;
}
body {
  background: transparent;
}

body:not(.home) {
  background: radial-gradient(circle at 15% 20%, #0a2236 0%, #02070c 62%, #000000 100%);
}

/* Legal pages */
.site-main--legal {
  color: var(--qualom-white);
  padding: clamp(3rem, 7vw, 6rem) 1.5rem;
}

.legal-policy {
  width: min(100%, 58rem);
  margin: 0 auto;
  font-size: 1rem;
}

.legal-policy__header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(250, 249, 246, 0.25);
}

.legal-policy h1,
.legal-policy h2,
.legal-policy h3 {
  color: var(--qualom-white);
}

.legal-policy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4rem);
}

.legal-policy h2 {
  margin: 2.75rem 0 0.8rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.legal-policy h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.15rem;
}

.legal-policy p,
.legal-policy li {
  color: rgba(250, 249, 246, 0.88);
}

.legal-policy a {
  color: #8fd3f4;
  text-underline-offset: 0.16em;
}

.legal-policy__updated {
  margin: 0.5rem 0 0;
  color: rgba(250, 249, 246, 0.7);
  font-size: 0.9rem;
}

.legal-policy__table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid rgba(250, 249, 246, 0.2);
  border-radius: 0.35rem;
}

.legal-policy table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
}

.legal-policy th,
.legal-policy td {
  padding: 0.85rem;
  border-bottom: 1px solid rgba(250, 249, 246, 0.16);
  text-align: left;
  vertical-align: top;
}

.legal-policy th {
  background: rgba(102, 155, 188, 0.18);
  color: var(--qualom-white);
}

.legal-policy td {
  color: rgba(250, 249, 246, 0.88);
}

/* Contact page */
.site-main--contact {
  color: var(--qualom-white);
  display: grid;
  min-height: calc(100dvh - 12rem);
  padding: clamp(1rem, 3vh, 2.25rem) 1.5rem;
}

.contact-page {
  display: grid;
  grid-template-columns: minmax(15rem, 0.78fr) minmax(25rem, 1.22fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  width: min(100%, 66rem);
  margin: 0 auto;
  align-items: center;
}

.contact-page__header {
  max-width: 42rem;
  margin: 0;
}

.contact-page__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--qualom-accent);
  font-family: var(--font-alt);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-page h1 {
  margin: 0;
  color: var(--qualom-white);
  font-family: "Montserrat", var(--font-body);
  font-weight: 600;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.contact-page__header > p:not(.contact-page__eyebrow) {
  margin: 0.8rem 0 0;
  color: rgba(250, 249, 246, 0.86);
  font-size: 0.94rem;
  line-height: 1.5;
}

.contact-page__direct-email {
  margin-top: 0.9rem !important;
  font-size: 0.84rem !important;
}

.contact-page a {
  color: #8fd3f4;
  text-underline-offset: 0.16em;
}

.contact-page__form-shell {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(250, 249, 246, 0.22);
  border-radius: 0.45rem;
  background: linear-gradient(140deg, rgba(102, 155, 188, 0.15), rgba(3, 13, 22, 0.35));
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.18);
}

.contact-form__field {
  margin: 0;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.contact-form__field:nth-of-type(4),
.contact-form__privacy,
.contact-form__submit {
  grid-column: 1 / -1;
}

.contact-form label {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: var(--qualom-white);
  font-weight: 600;
  font-size: 0.84rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 0.58rem 0.7rem;
  border: 1px solid rgba(250, 249, 246, 0.35);
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.22);
  color: var(--qualom-white);
  font: inherit;
}

.contact-form textarea {
  min-height: 6.4rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #8fd3f4;
  outline: 2px solid rgba(143, 211, 244, 0.35);
  outline-offset: 2px;
}

.contact-form__privacy {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.25rem 0 0;
  color: rgba(250, 249, 246, 0.82);
  font-size: 0.78rem;
  line-height: 1.4;
}

.contact-form__privacy input {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0.28rem 0 0;
}

.contact-form__privacy label {
  margin: 0;
  color: inherit;
  font-weight: 400;
}

.contact-form__submit {
  justify-self: start;
  padding: 0.62rem 1rem;
  border: 1px solid var(--qualom-accent);
  border-radius: 0.25rem;
  background: var(--qualom-accent);
  color: #06131c;
  cursor: pointer;
  font: 600 0.84rem var(--font-body);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.contact-form__submit:hover,
.contact-form__submit:focus-visible {
  border-color: #8fd3f4;
  background: #8fd3f4;
  transform: translateY(-1px);
}

.contact-page__notice {
  grid-column: 1 / -1;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
}

.contact-page__notice--success {
  border: 1px solid rgba(139, 214, 168, 0.7);
  background: rgba(47, 119, 73, 0.25);
}

.contact-page__notice--error {
  border: 1px solid rgba(247, 156, 156, 0.75);
  background: rgba(145, 43, 43, 0.25);
}

.contact-form__field--honeypot {
  position: absolute;
  left: -9999px;
}

@media (max-width: 760px) {
  .site-main--contact {
    display: block;
    min-height: 0;
    padding: 2rem 1.25rem 3rem;
  }

  .contact-page {
    display: block;
  }

  .contact-page__header {
    margin-bottom: 1.5rem;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-form__field,
  .contact-form__privacy,
  .contact-form__submit {
    grid-column: auto;
  }
}

.site-header,
.site-main,
.site-footer{
  position: relative;
}

/* Modelo de caja consistente */
*, *::before, *::after { box-sizing: border-box; }

/* =========================================================
   1) VARIABLES DE DISEÑO (colores + tipografías)
   ========================================================= */

:root{
  /* Paleta base */
  --qualom-black: #000000;
  --qualom-white: #FAF9F6;

  /* Accent (subrayados / bordes hover, etc.) */
  --qualom-accent: #669bbc; /* EDITA: sepia pergamino */
  --qualom-hover-border: #5EEAD4; /* EDITA: color borde hover botones */

  /* Tipografías globales */
  --font-title: "Source Serif 4", serif; /* títulos */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; /* cuerpo */
  --font-hero: "Cormorant Garamond", serif; /* EDITA: lead del hero */
  --font-alt: "Vollkorn", serif;            /* EDITA: botones / textos alternativos */
}

/* =========================================================
   2) TIPOGRAFÍA GLOBAL
   ========================================================= */

body{
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

/* Títulos generales */
h1, h2, h3, h4, h5, h6,
.site-title,
.chapter__title{
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Metadatos */
.chapter__meta,
.taxonomy-description{
  font-family: var(--font-title);
  font-weight: 400;
}

/* =========================================================
   3) CAPÍTULOS "section_nav" (visibilidad + full-bleed)
   ========================================================= */

/* Fallback (sin JS): mostrar solo la primera sección */
article[data-chapter-type="section_nav"] .chapter-section { display: none; }
article[data-chapter-type="section_nav"] .chapter-section:first-of-type { display: block; }

/* Con JS: mostrar solo la sección activa */
article[data-chapter-type="section_nav"] .chapter-section.is-active { display: block; }
article[data-chapter-type="section_nav"] .chapter-section:not(.is-active) { display: none; }

/* Evita scroll horizontal accidental en capítulos con secciones */
article[data-chapter-type="section_nav"] { overflow-x: hidden; }

/* Full-bleed: la sección ocupa 100vw y se centra respecto al viewport */
article[data-chapter-type="section_nav"] .chapter-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);  
  padding: 2rem 1.5rem; /* EDITA: padding interno de cada sección */
}

/* =========================================================
   4) HEADER HOME (landing) — grid 5 columnas + separadores
   ========================================================= */

/* Header */
.site-header--home{
  width: 100%;
  margin: 0;
  background: transparent;
  color: var(--qualom-white);
}

/* Contenedor: 5 columnas (actualmente iguales)
   EDITA: si quieres 18-18-28-18-18 vuelve a:
   grid-template-columns: 18fr 18fr 28fr 18fr 18fr;
*/
.home-header__inner{
  width: 100%;
  display: grid;
  grid-template-columns: 20fr 20fr 20fr 20fr 20fr;
  align-items: center;  
  padding: 1rem 6rem; /* EDITA: padding lateral del header */
  gap: 0;
}

/* Colocación de bloques */
.home-nav--left  { grid-column: 1 / span 2; grid-row: 1; }
.home-brand      { grid-column: 3; grid-row: 1; }
.home-nav--right { grid-column: 4 / span 2; grid-row: 1; }

/* Nav relativo: permite colocar el punto central sin ocupar espacio */
.home-nav{
  position: relative;
  width: 100%;
}

/* Punto blanco entre los dos enlaces de cada lado */
.home-nav--left::after,
.home-nav--right::after{
  content: "•";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -55%);
  color: var(--qualom-white);
  pointer-events: none;
}

/* Menú (2 columnas dentro de cada nav) */
.home-menu{
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-menu--2cols{
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  align-items: center;
}

.home-menu__item{
  display: flex;
  justify-content: center; /* centra el enlace dentro de su “sección” */
}

/* Link: mayúsculas + subrayado animado desde el centro */
.home-menu__link{
  color: var(--qualom-white);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;  
  font-size: 0.8rem; /* EDITA: tamaño del texto del menú */
  position: relative;
  display: inline-block;
  padding: 0.2rem 0;
}

/* Subrayado animado (EDITA: grosor, ancho, offset, velocidad) */
.home-menu__link::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.35rem;
  width: 110%;
  height: 2px;
  background: var(--qualom-accent);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.home-menu__link:hover::after,
.home-menu__link:focus-visible::after{
  transform: translateX(-50%) scaleX(1);
}

/* Marca central: puntos a ambos lados */
.home-brand{
  text-align: center;
  justify-self: center;
  position: relative; /* necesario para ::before/::after */
}

/* Puntos laterales junto a la columna central */
.home-brand::before,
.home-brand::after{
  content: "•";
  position: absolute;
  top: 50%;
  transform: translateY(-55%);
  color: var(--qualom-white);
  pointer-events: none;
}

/* EDITA: distancia de los puntos al bloque central */
.home-brand::before{ left: -1.2rem; }
.home-brand::after { right: -1.2rem; }

/* Imagen central */
.home-brand__img{
  display: block;
  height: auto;
  width: auto;
  max-width: 30%; /* EDITA: tamaño del logo */
  margin: 0 auto;
}

/* Título bajo el logo */
.home-brand__title{
  width: clamp(90px, 10vw, 140px); /* EDITA: “ancho” del título */
  margin: 0.6rem auto 0;
  color: var(--qualom-white);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 1rem; /* EDITA: tamaño título */
  line-height: 1.1;
  font-family: var(--font-title); /* EDITA: fuente del título bajo logo */
  font-weight: 600;
}

/* =========================================================
   5) HOME CONTENT (hero + sección con imagen + botones)
   ========================================================= */

/* ---------- 5.0 TÍTULO CENTRAL HOME ---------- */
.home-title{
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(50vh - 40px);
  background: transparent;
}

.home-title__box{
  display: block;
  border: 2px solid #fff;
  background: #000;
  padding: 1.25rem 2rem;
  color: inherit;
  text-decoration: none;
  text-align: center;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.home-title__box:hover,
.home-title__box:focus-visible{
  border-color: var(--qualom-hover-border);
  box-shadow: 0 0 24px rgba(94, 234, 212, 0.18);
  transform: translateY(-2px);
}

.home-title__box:focus-visible{
  outline: 2px solid var(--qualom-hover-border);
  outline-offset: 4px;
}

.home-title__sub,
.home-title__main{
  margin: 0;
  font-family: var(--font-hero);
  color: #fff;
  letter-spacing: 0.04em;
}

.home-title__sub{
  font-weight: 500;
  font-size: clamp(0.85rem, 1.1vw, 1.1rem);
  margin-bottom: 0.15rem;
}

.home-title__main{
  font-weight: 600;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.15;
}

@media (max-width: 640px){
  body.home{
    overflow-x: hidden;
  }

  .site-header--home{
    min-width: 0;
  }

  .home-header__inner{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 1.1rem 1rem 0;
  }

  .home-brand{
    order: 1;
    width: min(100%, 8rem);
  }

  .home-brand__img{
    width: 2.25rem;
    max-width: none;
  }

  .home-brand__title{
    width: auto;
    margin-top: 0.35rem;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
  }

  .home-nav{
    min-width: 0;
  }

  .home-nav--left{
    order: 2;
    margin-top: 0.85rem;
  }

  .home-nav--right{
    order: 3;
  }

  .home-nav--left::after,
  .home-nav--right::after,
  .home-brand::before,
  .home-brand::after{
    content: none;
  }

  .home-menu--2cols{
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .home-menu__item{
    min-width: 0;
  }

  .home-menu__link{
    max-width: 100%;
    padding: 0.3rem 0.65rem;
    font-size: 0.76rem;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .site-main--home,
  .home-title{
    width: 100%;
    min-width: 0;
  }

  .home-title{
    min-height: clamp(14rem, 42svh, 19rem);
    margin-top: 0;
    padding: 1.5rem 1rem;
  }

  .home-title__box{
    width: min(100%, 20rem);
    min-width: 0;
    padding: 1rem 0.85rem;
  }

  .home-title__main{
    font-size: clamp(1.15rem, 6vw, 1.45rem);
  }
}

/* ---------- 5.1 HERO (texto superior) ---------- */
.home-hero{
  position: relative;
  background: transparent;       /* lo pediste transparente */
  color: var(--qualom-white);

  /* NOTA: margin:-16rem es agresivo.
     EDITA aquí si quieres “arrastrar” menos o hacerlo con padding/transform */
  margin: -16rem;

  /* EDITA: padding del bloque hero */
  padding: 0rem 6rem 0rem 0rem;

  z-index: 2;
}

.home-hero__inner{
  /* EDITA: ancho del texto del hero */
  max-width: 560px;

  /* Pegado a la derecha: left auto */
  margin: 0rem 15rem 0 auto;

  text-align: right;
}

/* Párrafo 1 (lead) */
.home-hero__lead{
  margin: 0;
  font-family: var(--font-hero); /* Cormorant (según tu CSS actual) */
  font-weight: 600;

  /* EDITA: tamaño del lead */
  font-size: clamp(1.4rem, 1.2vw, 2.2rem);

  letter-spacing: 0.02em;
  line-height: 1.25;
}

/* Párrafo 2 (sublead) */
.home-hero__sublead{
  margin: 1.25rem 0 0;
  font-family: var(--font-body);
  font-weight: 400;

  /* EDITA: tamaño del sublead */
  font-size: clamp(1rem, 1.1vw, 1.2rem);

  line-height: 1.6;
  opacity: 0.95; /* EDITA: contraste */
}

/* ---------- 5.2 SECCIÓN con fondo imagen (ID 118) ---------- */
.home-links{
  position: relative;  
  width: 100vw; /* Full-bleed */
  overflow: hidden; /* evita scroll horizontal si algo se sale */
  padding-top: 6em;  /* EDITA: separación respecto a lo anterior */
  background-color: transparent;
  z-index: 0;
}

/* Contenedor de la imagen de fondo */
.home-links__bg{
  position: absolute;
  inset: 0;
}

/* Imagen de fondo
   IMPORTANTE: ahora mismo tienes object-fit: cover (recorta).
   Si quieres "NO recortar laterales", cambia a:
   object-fit: contain;
*/
.home-links__bg-img{
  width: 100%;
  height: 100%;
  display: block;

  /* EDITA: comportamiento de ajuste */
  object-fit: cover;
  object-position: center;
}

/* Contenido sobre la imagen */
.home-links__inner{
  position: relative;
  z-index: 1;  
  min-height: 520px; /* EDITA: altura mínima de la sección */
  display: grid;
  grid-template-columns: 20% 80%; /* izquierda 20%, derecha 80% */
  gap: 2.25rem;  
  padding: 3rem 6rem; /* EDITA: padding del contenido sobre la imagen */
  align-items: start;
}

/* Columna izquierda: botones */
.home-links__nav{
  display: flex;
  flex-direction: column;  
  gap: 0.85rem; /* EDITA: espacio entre botones */  
  padding: 0rem 3rem; /* EDITA: padding lateral de la columna */
}

/* Botón (enlaces) */
.home-btn{
  text-decoration: none !important;
  background: transparent;          /* EDITA: fondo (transparente) */
  font-family: var(--font-alt);
  font-weight: 600;
  text-transform: uppercase;   /* MAYÚSCULAS */
  color: var(--qualom-white);       /* EDITA: color texto */
  border: 0;                        /* sin borde */
  border-radius: 999px;             /* puedes mantenerlo aunque sea transparente */
  padding: 0.85rem 0.25rem;         /* EDITA: “aire” (horizontal pequeño) */
  justify-content: flex-start;      /* opcional: alinea texto a la izquierda */
  text-shadow: 0 2px 10px rgba(0,0,0,0.55); /* Sombra de texto (EDITA aquí) */
  position: relative;               /* necesario para el subrayado */
  transform: none;                  /* quitamos el desplazamiento anterior */
  transition: color 180ms ease;     /* suave */
}

/* Subrayado: no ocupa espacio (evita que se desplacen botones) */
.home-btn::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.2rem;                   /* EDITA: distancia del subrayado al texto */
  width: 100%;
  height: 2px;                      /* EDITA: grosor subrayado */
  background: var(--qualom-hover-border); /* EDITA: color subrayado */
  transform: scaleX(0);
  transform-origin: left;           /* CLAVE: crece desde la izquierda */
  transition: transform 200ms ease;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(99, 179, 203, 0.35); /* EDITA: sombra del subrayado */
}

/* Hover/focus: aparece subrayado */
.home-btn:hover::after,
.home-btn:focus-visible::after{
  transform: scaleX(1);
}

/* (Opcional) Hover: ligera variación de color del texto */
.home-btn:hover,
.home-btn:focus-visible{
  color: var(--qualom-white);
}

/* Columna derecha */
.home-links__content{
  color: var(--qualom-white);
}

/* Título y texto de la columna derecha */
.home-links__title{
  margin: 0 0 0.75rem;
  font-family: var(--font-title);
  font-weight: 700;  
  font-size: 2rem; /* EDITA: tamaño del título */
}

.home-links__text{
  margin: 0;
  font-family: var(--font-body);  
  font-size: 1.05rem; /* EDITA: tamaño del texto */
  line-height: 1.6;  
  max-width: 62ch; /* EDITA: ancho de lectura */
}

/* Responsive */
@media (max-width: 900px){
  .home-links__inner{ grid-template-columns: 1fr; }
}

/* =========================================================
   6) FOOTER HOME (transparente + estilo de enlaces)
   ========================================================= */

body.home .site-footer{
  background: transparent;

  /* EDITA: tamaño del texto del footer */
  font-size: 12px;

  /* EDITA: “arrastre” (en tu CSS actual es positivo; si quieres subirlo, usa negativo) */
  margin-top: 14rem;

  position: relative;
  z-index: 2;
}

/* Enlaces del footer: gris, sin subrayado */
body.home .site-footer a{
  color: #8c8c8b; /* EDITA: gris */
  text-decoration: none;
}

body.home .site-footer a:hover,
body.home .site-footer a:focus-visible{
  color: var(--qualom-white);
  text-decoration: none;
}


/* =========================================================
   HEADER DEFAULT (resto de la web)
   - Full width
   - Contenido pegado a la izquierda con padding
   ========================================================= */

.site-header--default{
  width: 100%;
  margin: 0;
  padding: 0;  
  background: transparent;
  color: white;
}

.header-default__inner{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem 2.5rem;  /* EDITA: padding lateral del header default */
  gap: 0.9rem; /* EDITA: separación entre icono y texto */
}

/* Link del logo */
.header-default__logo{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Imagen del logo */
.header-default__img{
  display: block;
  height: auto;
  width: 60px; /* EDITA: tamaño del icono */
  max-width: 60px;
}

/* Título */
.header-default__title{
  font-family: var(--font-title); /* CLAVE: variable pedida */
  font-weight: 700; 
  font-size: 1.2rem;  /* EDITA: tamaño del título */
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

/* =========================================================
   PAGE SERIES: grid de navegación de series
   ========================================================= */

.site-main--series{  
  background: transparent;
  color: #0B0B0B;
  min-height: 100vh;  
  padding: 3rem 2.5rem; /* EDITA: padding general */
}

/* Header de la página de series (dentro de main) */
.series-page__header{
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.series-page__title{
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.02em;
}

.series-page__description{
  margin-top: 0.75rem;
  max-width: 70ch;
  opacity: 0.9;
}

/* Grid centrado: máximo 4 columnas */
.series-grid{
  max-width: 1200px; /* EDITA: ancho máximo del grid */
  margin: 0 auto;
  display: grid;
  gap: 2rem;         /* EDITA: separación entre celdas */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Forzar máximo 4 columnas cuando haya espacio */
@media (min-width: 1200px){
  .series-grid{
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Link contenedor */
.series-card__link{
  display: block;
  color: inherit;
  text-decoration: none;
}

/* =========================
   Imagen 4:3 + hover underline
   ========================= */

.series-card__media{
  position: relative;
  overflow: hidden;  
  border-radius: 0px;   /* EDITA: radio de la imagen */
  aspect-ratio: 4 / 3;  /* Importante para 4:3 */
  background: #dee6e6;  /* Fondo si tarda en cargar */
}

/* Imagen real / placeholder: cubre el 4:3 */
.series-card__img,
.series-card__img--placeholder{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* EDITA: si no quieres recorte, cambia a contain */
}

/* Hover: borde inferior animado (no desplaza layout) */
.series-card__media::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;                 /* EDITA: grosor del borde */
  background: var(--qualom-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

/* Activación hover/focus */
.series-card__link:hover .series-card__media::after,
.series-card__link:focus-visible .series-card__media::after{
  transform: scaleX(1);
}

/* =========================
   Metadatos + separador alineado
   ========================= */

/* Metas: bloque de altura fija para que el separador quede alineado en todas las celdas */
.series-card__meta{   
  min-height: 110px; /* EDITA: fija esta altura para alinear el separador entre filas */
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.series-card__name,
.series-card__chapters{
  text-align: left;
}

/* Nombre */
.series-card__name{
  font-family: "Montserrat", var(--font-body);
  font-weight: 500;
  letter-spacing: 0em;
  text-transform: uppercase;  
  font-size: 0.95rem; /* EDITA: tamaño */
}

/* Capítulos */
.series-card__chapters{
  font-family: var(--font-body);
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Aviso centrado (solo si no está finalizada) */
.series-card__status{
  margin-top: 0.2rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0em;
  text-transform: uppercase; 
  color: #446d94;  /* EDITA: tono del aviso */
}

/* Separador gris: siempre a la misma altura gracias a min-height en meta */
.series-card__separator{
  height: 1px;
  background: #aeaba7; /* EDITA: gris separador */
  width: 100%;
}

/* Variante atlas para la pagina general de series */
.site-main--series-hub{
  background: transparent;
  color: #fdf0d5;
}

.site-main--series-hub .series-page__title{
  color: #fdf0d5;
  font-family: "Montserrat", var(--font-body);
}

.site-main--series-hub .series-page__description{
  color: rgba(253, 240, 213, 0.84);
}

/* Cinco tarjetas conservan la altura del lienzo: al estrecharse, las
   animaciones se recortan lateralmente en lugar de reducir su escala. */
.site-main--series-hub .series-grid{
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.site-main--series-hub .series-card__media{
  border: 1px solid rgba(102, 155, 188, 0.38);
  background: rgba(7, 20, 32, 0.7);
}

.site-main--series-hub .series-card__meta{
  color: #fdf0d5;
  min-height: 76px;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  gap: 0.22rem;
}

.site-main--series-hub .series-card__name{
  color: #fdf0d5;
  font-size: 0.78rem;
  line-height: 1.15;
  letter-spacing: 0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-main--series-hub .series-card__chapters{
  color: rgba(253, 240, 213, 0.76);
  font-size: 0.68rem;
}

.site-main--series-hub .series-card__status{
  margin-top: 0.1rem;
  font-size: 0.62rem;
}

@media (min-width: 1200px){
  .site-main--series-hub .series-grid{
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .site-main--series-hub .series-card__media{
    height: 200px;
    aspect-ratio: auto;
  }
}

.site-main--series-hub .series-card__separator{
  background: rgba(102, 155, 188, 0.42);
}

/* Variante atlas para pagina dedicada de serie (taxonomy serie) */
.site-main--serie-hub{
  background: transparent;
  color: #fdf0d5;
}

.site-main--serie-hub .serie-title,
.site-main--serie-hub .serie-description,
.site-main--serie-hub .serie-header-meta,
.site-main--serie-hub .serie-chapter__title,
.site-main--serie-hub .serie-chapter__meta{
  color: #fdf0d5;
}

.site-main--serie-hub .serie-timeline::before{
  background: rgba(102, 155, 188, 0.48);
}

.site-main--serie-hub .serie-node{
  border-color: #669bbc;
  background: rgba(7, 20, 32, 0.92);
}

.site-main--serie-hub .serie-node__num{
  color: #fdf0d5;
}

.site-main--serie-hub .serie-chapter__card{
  border: 1px solid rgba(102, 155, 188, 0.42);
  background: rgba(6, 18, 29, 0.88);
  color: #fdf0d5;
  box-shadow:
    inset 0 0 0 1px rgba(102, 155, 188, 0.2),
    inset 0 0 12px rgba(0, 0, 0, 0.28),
    inset 0 0 20px rgba(5, 67, 94, 0.2);
}

.site-main--serie-hub .serie-chapter__author{
  color: #669bbc;
}


/* =========================================================
   TAXONOMY SERIE: timeline de capítulos
   (mantiene estilo general de la página de series)
   ========================================================= */

.site-main--serie{
  background: transparent;
  color: #0B0B0B;
  min-height: 100vh;
  padding: 3rem 2.5rem; /* EDITA: padding general */
}

/* Header de la serie */
.serie-header{
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.serie-title{
  margin: 0;
  font-family: var(--font-title); /* STIX */
  letter-spacing: 0.02em;
}

.serie-description{
  margin-top: 0.75rem;
  max-width: 70ch;
  opacity: 0.9;
}

/* ===== Timeline ===== */

/* EDITA: tamaño del nodo y separación */
:root{
  --tl-node: 44px;     /* diámetro del nodo */
  --tl-gap: 18px;      /* espacio nodo -> texto */
  --tl-line: #0B0B0B;  /* color base línea */
}

.serie-timeline{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  position: relative;
}

/* Línea vertical del timeline */
.serie-timeline::before{
  content: "";
  position: absolute;
  left: calc(var(--tl-node) / 2);
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--tl-line);
  opacity: 0.22; /* EDITA: intensidad de línea */
}

/* Cada capítulo: grid nodo + contenido */
.serie-chapter{
  display: grid;
  grid-template-columns: var(--tl-node) 1fr;
  column-gap: var(--tl-gap);
  position: relative;
  padding: 0.75rem 0 1.25rem; /* EDITA: aire vertical entre items */
  transform:translateX(2px);
}

/* Nodo circular: borde negro, interior color fondo (no relleno extra) */
.serie-node{
  width: var(--tl-node);
  height: var(--tl-node);
  border: 4px solid #0B0B0B;   /* CLAVE: borde negro */
  border-radius: 999px;
  background: #FAF9F6;         /* CLAVE: interior = fondo página */
  display: grid;
  place-items: center;
  z-index: 1;                  /* sobre la línea */
}

/* Número dentro del nodo */
.serie-node__num{
  font-family: var(--font-body); /* STIX */
  font-weight: 700;
  font-size: 0.9rem; /* EDITA: tamaño número */
  letter-spacing: 0.02em;
}

/* Título */
.serie-chapter__title{
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  color: inherit;
  text-decoration: none !important;
  position: relative;
}

/* Subrayado con grosor constante (sin scaleX) */
.serie-chapter__title::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 2px;                      /* EDITA: grosor */
  background: var(--qualom-accent); /* EDITA: color */
  pointer-events: none;  
  clip-path: inset(0 100% 0 0); /* Oculto al inicio: recortado desde la derecha */
  transition: clip-path 220ms ease;
  will-change: clip-path;
}

.serie-chapter__title:hover::after,
.serie-chapter__title:focus-visible::after{
  clip-path: inset(0 0 0 0);
}

/* Metadatos: debajo con ligero sangrado */
.serie-chapter__meta{
  margin-top: 0.35rem;
  margin-left: 0.15rem; /* EDITA: “sangrado” */
  font-family: var(--font-body);
  font-size: 0.85rem;   /* EDITA: tamaño meta */
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.serie-meta__sep{
  opacity: 0.65;
}

/* Separador sutil entre items (opcional) */
.serie-chapter:not(:last-child){
  border-bottom: 1px solid rgba(11,11,11,0.12); /* EDITA: separador */
}

/* Responsive */
@media (max-width: 900px){
  :root{ --tl-node: 38px; }
  .site-main--serie{ padding: 2.25rem 1.5rem; }
}

/* =========================================================
   OVERRIDES ACUMULADOS
   ========================================================= */

/* ---------- Footer global ---------- */
.site-footer{
  background: transparent;
  color: #FFFFFF;
  padding: 2.25rem 2.5rem;
}

.footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 40% 30% 30%;
  gap: 2rem;
}

.footer-col--brand{
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 0.9rem;
}

.footer-col--main,
.footer-col--legal{
  padding-top: 2.5rem;
}

.footer-brand{
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand__img{
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.footer-brand__title{
  font-family: var(--font-title);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-description{
  margin: 0;
  max-width: 45ch;
  font-family: var(--font-hero);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.9;
}

.footer-description p{
  margin: 0;
}

.footer-description cite{
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.85em;
  opacity: 0.85;
}

.footer-copy{
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.78;
}

.footer-social{ min-height: 28px; }

.footer-menu{
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-menu a{
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-menu a:hover,
.footer-menu a:focus-visible{
  color: #CFCFCF;
}

body.home .site-footer{
  background: transparent;
  margin-top: 0;
  padding-bottom: 1rem;
  clear: both;
}

/* ---------- Header default ---------- */
.site-header--default{
  background: transparent;
  color: #FFFFFF;
}

.header-default__inner{
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1.2rem;
}

.header-default__brand{
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.header-default__center{
  --header-default-menu-gap: 1.8rem;
  position: relative;
  justify-self: center;
  width: max-content;
  max-width: 100%;
  padding: 0.55rem calc(var(--header-default-menu-gap) / 4);
}

.header-default__center::before,
.header-default__center::after{
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: rgba(255,255,255,0.55);
}

.header-default__center::before{ left: 0; }
.header-default__center::after{ right: 0; }

.header-default-menu{
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: var(--header-default-menu-gap);
}

.header-default-menu__text{
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
}

.header-default-menu a{
  color: #FFFFFF;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.15rem;
}

.header-default-menu a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.12rem;
  width: 100%;
  height: 2px;
  background: var(--qualom-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.header-default-menu a:hover::after,
.header-default-menu a:focus-visible::after{
  transform: scaleX(1);
}

.header-default-menu__item.is-current .header-default-menu__text{
  color: #8C8C8B;
}

.header-default__search{
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-default__search-wrap{
  position: relative;
}

.header-default__search-toggle{
  display: none;
  list-style: none;
}

.header-default__search-toggle::-webkit-details-marker{
  display: none;
}

.header-default__search-input{
  width: 200px;
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: 999px;
  background: #000000;
  color: #FFFFFF;
  padding: 0.4rem 0.8rem;
}

.header-default__search-input::placeholder{
  color: rgba(255,255,255,0.75);
}

.header-default__search-btn{
  border: 0;
  background: transparent;
  color: #FFFFFF;
  padding: 0;
  cursor: pointer;
}

.header-default__search-icon{
  display: block;
  font-size: 1rem;
  line-height: 1;
}

/* Utilidad de accesibilidad: texto solo para lectores de pantalla */
.screen-reader-text{
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}

/* ---------- Selector de idioma ---------- */
.lang-switcher{
  display: inline-flex;
  align-items: center;
}

.lang-switcher__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.lang-switcher__item{
  display: inline-flex;
  align-items: center;
}

.lang-switcher__item + .lang-switcher__item{
  padding-left: 0.55rem;
  border-left: 1px solid rgba(255,255,255,0.45);
}

.lang-switcher__link{
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  line-height: 1;
  transition: color 200ms ease, opacity 200ms ease;
}

a.lang-switcher__link:hover,
a.lang-switcher__link:focus-visible{
  color: #FFFFFF;
}

.lang-switcher__item--active .lang-switcher__link{
  color: #FFFFFF;
  font-weight: 700;
  cursor: default;
}

.lang-switcher__item--no-translation .lang-switcher__link{
  opacity: 0.55;
}

/* Variante en el header de la landing: esquina superior derecha */
.site-header--home{
  position: relative;
}

.site-header--home .lang-switcher{
  position: absolute;
  top: 1rem;
  right: 2rem;
  z-index: 2;
}

@media (max-width: 640px){
  .site-header--home .lang-switcher{
    top: 0.35rem;
    right: 0.65rem;
  }

  .site-header--home .lang-switcher__link{
    min-height: 2.75rem;
    padding-inline: 0.15rem;
  }
}

@media (max-width: 640px){
  .site-header--default{
    overflow-x: clip;
  }

  .header-default__inner{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.45rem 0.35rem;
    width: 100%;
    min-width: 0;
    padding: 0.75rem 1rem 0.9rem;
  }

  .header-default__brand{
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    gap: 0.55rem;
  }

  .header-default__img{
    width: 2.25rem;
    max-width: 2.25rem;
  }

  .header-default__title{
    min-width: 0;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
  }

  .site-header--default .lang-switcher{
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .site-header--default .lang-switcher__link{
    min-height: 2.75rem;
    padding-inline: 0.15rem;
  }

  .header-default__center{
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  .header-default__center::before,
  .header-default__center::after{
    content: none;
  }

  .header-default-menu{
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 0;
  }

  .header-default-menu__item{
    min-width: 0;
    text-align: center;
  }

  .header-default-menu a,
  .header-default-menu__text{
    max-width: 100%;
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .header-default__search-wrap{
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    z-index: 4;
  }

  .header-default__search-toggle{
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    color: #FFFFFF;
    cursor: pointer;
  }

  .header-default__search-toggle:focus-visible{
    outline: 2px solid var(--qualom-accent);
    outline-offset: 2px;
  }

  .header-default__search-disclosure:not([open]) + .header-default__search{
    display: none;
  }

  .header-default__search{
    position: absolute;
    top: calc(100% + 0.35rem);
    right: -4.15rem;
    width: min(18rem, calc(100vw - 2rem));
    padding: 0.5rem;
    border: 1px solid rgba(255,255,255,0.35);
    background: #000000;
    box-shadow: 0 0.75rem 2rem rgba(0,0,0,0.45);
  }

  .header-default__search-input{
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .header-default__search-btn{
    display: grid;
    flex: 0 0 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
  }

  .site-main--series-hub{
    min-width: 0;
    padding: 2rem 1rem 3rem;
  }

  .site-main--series-hub .series-page__header{
    margin-bottom: 1.25rem;
  }

  .site-main--series-hub .series-page__title{
    font-size: clamp(1.45rem, 8vw, 1.8rem);
  }

  .site-main--series-hub .series-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 0.75rem;
    width: 100%;
    min-width: 0;
  }

  .site-main--series-hub .series-card{
    min-width: 0;
  }

  .site-main--series-hub .series-card__media{
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .site-main--series-hub .series-card__meta{
    min-height: 5.4rem;
    padding: 0.5rem 0 0.45rem;
    gap: 0.18rem;
  }

  .site-main--series-hub .series-card__name{
    display: -webkit-box;
    min-height: 2.3em;
    font-size: 0.66rem;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .site-main--series-hub .series-card__chapters{
    font-size: 0.61rem;
    line-height: 1.25;
  }

  .site-main--series-hub .series-card__status{
    margin-top: 0.08rem;
    font-size: 0.55rem;
    line-height: 1.2;
  }
}

/* ---------- Single post ---------- */
article[data-chapter-type="section_nav"] .chapter-section {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background:#ffffff;
}

article[data-chapter-type="section_nav"] .chapter-section .wp-block-columns {
  margin: 0;
  gap: 2rem;
}

article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:first-child {
  flex-basis: 46% !important;
  font-size: 0.9em;
  padding: 0rem 3rem 3rem;
  min-height: 60px;
  color: #3c3c3e;
}

article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:first-child h2 {
  color: #222324;
}

article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:first-child strong {
  color: #222324;
}

article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:last-child {
  flex-basis: 54% !important;
  font-size: 0.8em;
  color: #979ea7;
  padding: 2.5rem;
  min-height: 60px;
}

/* Fondo por defecto: solo si Gutenberg no ha definido fondo para el bloque */
article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:last-child:not(.has-background):not([class*="-background-color"]):not([style*="background"]) {
  background-image: radial-gradient(circle at 15% 20%, #0a2236 0%, #02070c 62%, #000000 100%);
  background-color: transparent;
}

/* Si WordPress asigna color de fondo (clases has-*-background-color), se elimina el degradado */
article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:last-child.has-background,
article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:last-child[class*="-background-color"] {
  background-image: none !important;
}

/* Tipografia base para texto de animaciones en la columna derecha de section_nav.
 * Se excluye MathJax (mjx-container) para no interferir con su renderizado. */
article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:last-child .ml_animation,
article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:last-child .ml_animation :not(mjx-container):not(mjx-container *) {
  font-family: "LM Roman Math", "Times New Roman", serif !important;
}

.site-main--chapter{
  background: transparent;
  color: #0B0B0B;
  min-height: 100vh;
  padding: 3rem 3rem;
  font-family: "Montserrat", var(--font-body);
  font-weight: 500;
}

/* ---------- Single post section_nav: fondo oscuro solo para este tipo ---------- */
.site-main--chapter:has(> article[data-chapter-type="section_nav"]) {
  background: transparent;
  color: #fdf0d5;
}

article:not([data-chapter-type="section_nav"]) .chapter-body--default .chapter-main-col{
  background: #FFFFFF;
  color: #0B0B0B;
}

/* Texto de chapter-top en claro, sin pisar colores explicitos no negros. */
article[data-chapter-type="section_nav"] .chapter-top {
  color: #fdf0d5;
}

article[data-chapter-type="section_nav"] .chapter-top .chapter-title,
article[data-chapter-type="section_nav"] .chapter-top .chapter-meta-row,
article[data-chapter-type="section_nav"] .chapter-top .chapter-excerpt {
  color: inherit;
  font-family: "Montserrat", var(--font-body);
}

article[data-chapter-type="section_nav"] .chapter-top .chapter-nav-link {
  color: #fdf0d5;
  border-color: #669bbc;
  border-width: 1px;
  font-family: "Montserrat", var(--font-body);
}

.site-main--chapter h1,
.site-main--chapter h2,
.site-main--chapter h3,
.site-main--chapter h4,
.site-main--chapter h5,
.site-main--chapter h6,
.site-main--chapter p,
.site-main--chapter li,
.site-main--chapter a,
.site-main--chapter button,
.site-main--chapter span{
  font-family: "Montserrat", var(--font-body);
  font-weight: 500;
}

.chapter--single{
  max-width: none;
  width: 100%;
  margin: 0;
}

.chapter--single.chapter--section_nav{
  margin: 0;
}

.chapter-top{ margin-bottom: 1.5rem; }
.chapter-title-wrap{ margin-bottom: 0.9rem; }
.chapter-title{ margin: 0; letter-spacing: 0.02em; }

.chapter-top-main{
  min-width: 0;
}

.chapter-top--with-media{
  display: grid;
  grid-template-columns: minmax(0, 62%) minmax(240px, 38%);
  gap: 1.25rem;
  align-items: start;
}

.chapter-header-main{
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
}

.chapter-title-media{
  flex-shrink: 0;
}

.chapter-title-thumb{
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
}

.chapter-top-media{
  min-width: 0;
  align-self: start;
}

.chapter-top-media-image{
  width: 100%;
  max-height: clamp(180px, 26vw, 320px);
  overflow: hidden;
}

.chapter-top-image{
  width: 100%;
  height: auto;
  max-height: clamp(180px, 26vw, 320px);
  object-fit: contain; /* garantiza que siempre quepa en alto */
  object-position: left top;
  display: block;
}

.chapter-top-media-description{
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  color: #6d6d6d;
  text-align: left;
  font-family: "Inter", var(--font-body);
  font-weight: 500;
}

.chapter-header-text{
  min-width: 0;
}

.chapter-header--with-algorithm-insights{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  gap: 1rem 6rem;
  align-items: center;
}

.chapter-header--with-algorithm-insights .chapter-header-main,
.chapter-header--with-algorithm-insights .chapter-meta,
.chapter-header--with-algorithm-insights .chapter-excerpt{
  grid-column: 1;
  padding-right: 1.2rem;
}

.chapter-header--with-algorithm-insights .chapter-excerpt{
  max-width: none;
  min-width: 0;
}

.chapter-algorithm-insights{
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  gap: 0.5rem;
  padding-top: 0.65rem;
}

.chapter-algorithm-insights__column{
  padding: 0;
  border: 0;
  background: transparent;
}

.chapter-algorithm-insights__title{
  display: none;
}

.chapter-algorithm-insights__list{
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.32rem;
}

.chapter-algorithm-insights__item{
  font-family: "Inter", var(--font-body);
  font-size: 0.8rem;
  line-height: 1.42;
}

.chapter-algorithm-insights__column--strengths .chapter-algorithm-insights__item{
  color: #5f8f67;
}

.chapter-algorithm-insights__column--weaknesses .chapter-algorithm-insights__item{
  color: #de2459;
}

.chapter-tags{
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chapter-tag-link{
  color: var(--qualom-accent);
  text-decoration: none;
  font-family: "Inter", var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.08rem;
}

.chapter-tag-link:hover,
.chapter-tag-link:focus-visible{
  color: var(--qualom-accent);
}

.chapter-tag-link::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.08rem;
  width: 100%;
  height: 2px;
  background: var(--qualom-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.chapter-tag-link:hover::after,
.chapter-tag-link:focus-visible::after{
  transform: scaleX(1);
}

.chapter-meta{
  margin-top: 0.4rem;
}

.chapter-meta-author{
  margin: 0;
  color: var(--qualom-hover-border);
  font-size: 0.84rem;
  font-family: "Inter", var(--font-body);
  font-weight: 500;
}

.chapter-meta-row{
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #0B0B0B;
  font-family: "Inter", var(--font-body);
  font-weight: 500;
}

.chapter-meta-sep{
  opacity: 0.75;
}

.chapter-excerpt{
  margin: 0.45rem 0 0;
  font-family: "Inter", var(--font-body);
  font-weight: 500;
  font-style: italic;
  color: #0B0B0B;
  min-width: 58%;
  max-width: 72%;
}

.chapter-nav{
  --chapter-nav-gap: 0.9rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--chapter-nav-gap);
  width: 100%;
}

.chapter-nav-side{
  min-width: 0;
  display: flex;
  align-items: center;
}

.chapter-nav-side--prev{
  grid-column: 1;
  justify-content: flex-start;
}

.chapter-nav-index{
  grid-column: 2;
  justify-self: center;
}

.chapter-nav-side--next{
  grid-column: 3;
  justify-content: flex-end;
}

.chapter-nav-link{
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.78rem;
  border: 3px solid #FFFFFF;
  background: #2f2f2f;
  padding: 0.35rem 0.7rem;
  box-shadow: none;
}

.chapter-nav-link--index{ border-radius: 0; }
.chapter-nav-link--side{ border-radius: 999px; }

.chapter-nav-link.is-placeholder{
  visibility: hidden;
  min-width: 7rem;
}

.chapter-nav-line{
  height: 1px;
  background: #3f3f3f;
  flex: 1;
}

.chapter-nav-line--prev{
  margin-left: 0.55rem;
}

.chapter-nav-line--next{
  margin-right: 0.55rem;
}

.chapter-nav-link.is-placeholder + .chapter-nav-line{
  display: none;
}

.chapter-nav-side--prev .chapter-nav-link.is-placeholder,
.chapter-nav-side--next .chapter-nav-link.is-placeholder{
  min-width: 7rem;
}

.chapter-nav-side--prev .chapter-nav-link.is-placeholder ~ .chapter-nav-line,
.chapter-nav-side--next .chapter-nav-link.is-placeholder ~ .chapter-nav-line{
  display: none;
}

.chapter--single.chapter--default .chapter-top,
.chapter--single.chapter--default .chapter-top--with-media{
  color: #fdf0d5;
}

.chapter--single.chapter--default .chapter-title,
.chapter--single.chapter--default .chapter-excerpt,
.chapter--single.chapter--default .chapter-meta-row{
  color: #fdf0d5;
  font-family: "Montserrat", var(--font-body);
}

.chapter--single.chapter--default .chapter-meta-author{
  color: var(--qualom-hover-border);
  font-family: "Montserrat", var(--font-body);
}

.chapter--single.chapter--default .chapter-top-media-description{
  color: rgba(253, 240, 213, 0.72);
}

.chapter--single.chapter--default .chapter-nav-wrap .chapter-nav-link{
  color: #fdf0d5;
  border: 1px solid #669bbc;
  background: #2f2f2f;
  font-family: "Montserrat", var(--font-body);
}

.chapter--single.chapter--default .chapter-nav-wrap .chapter-nav-line{
  background: #3f3f3f;
}

.chapter-content .chapter-nav-wrap{
  margin-top: 2.4rem;
}

@media (max-width: 900px){
  .chapter-nav{
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .chapter-nav-side--prev,
  .chapter-nav-side--next{
    display: none;
  }

  .chapter-nav-index{
    justify-self: start;
  }

  .chapter-top--with-media{
    grid-template-columns: 1fr;
  }

  .chapter-excerpt{
    min-width: 0;
    max-width: 100%;
  }

  .chapter-header--with-algorithm-insights{
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .chapter-algorithm-insights{
    grid-column: 1;
    grid-row: auto;
  }

  .chapter-top-media-image{
    max-height: clamp(160px, 52vw, 260px);
  }

  article[data-chapter-type="section_nav"] .chapter-section .wp-block-columns {
    flex-direction: column;
  }

  article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:first-child,
  article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:last-child {
    flex-basis: auto !important;
  }
}

.chapter-body--default{
  display: grid;
  grid-template-columns: minmax(0, 70%) minmax(0, 30%);
  gap: 1.5rem;
}

.chapter-content,
.chapter-sections{
  border: 1px solid rgba(11,11,11,0.12);
  background: #FFFFFF;
  color: #0B0B0B;
  font-family: "Inter", var(--font-body);
  font-weight: 500;
}

.chapter-content{
  padding: 0.625rem 2.5rem 2.5rem;
}

.chapter-sections{
  padding: 0;
  border: 0;
}

.chapter-content p,
.chapter-content li,
.chapter-content a,
.chapter-content span,
.chapter-sections p,
.chapter-sections li,
.chapter-sections a,
.chapter-sections span{
  font-family: "Inter", var(--font-body);
  font-weight: 500;
}

.chapter-content p,
.chapter-sections p{
  font-weight: 400;
}

.chapter-content figcaption,
.chapter-sections figcaption{
  font-family: "Inter", var(--font-body);
  font-weight: 300;
  font-size: 0.92em;
}

.chapter-content .chapter-image-description,
.chapter-sections .chapter-image-description{
  margin: 0.35rem 0 0.9rem;
  font-family: "Inter", var(--font-body);
  font-size: 0.78rem;
  color: #6d6d6d;
}

.chapter-content h2,
.chapter-sections h2{
  position: relative;
  margin-top: 2.2rem;
}

.chapter-content h2::before,
.chapter-sections h2::before{
  content: var(--chapter-name);
  display: block;
  margin-bottom: 0.6rem;
  padding: 0.18rem 0.7rem;
  text-align: center;
  color: var(--qualom-accent);
  font-family: "Inter", var(--font-body);
  font-weight: 600;
  font-size: 0.4em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  background:
    linear-gradient(var(--qualom-accent), var(--qualom-accent)) left center /
      max(0px, calc(((100% - ((var(--chapter-name-ch, 18) * 1.25ch) + 3rem)) / 2) * 0.72)) 1px no-repeat,
    linear-gradient(var(--qualom-accent), var(--qualom-accent)) right center /
      max(0px, calc(((100% - ((var(--chapter-name-ch, 18) * 1.25ch) + 3rem)) / 2) * 0.72)) 1px no-repeat;
}

.chapter-content h2,
.chapter-sections h2{
  font-weight: 800;
}

.chapter-content h3,
.chapter-sections h3{
  font-weight: 700;
}

article[data-chapter-type="section_nav"] .chapter-body{
  display: block;
}

.chapter-sections-nav{
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 3; /* por encima del bloque de secciones */
}

article[data-chapter-type="section_nav"] .chapter-sections{
  position: relative;
  z-index: 1;
  margin-top: -1.9rem; /* elevamos aún más el bloque */
  padding-top: 0;
}

.section-nav-prev,
.section-nav-next{
  background: rgba(7, 20, 32, 0.9);
  color: #fdf0d5;
  border: 1px solid #669bbc;
  padding: 0.3rem 0.82rem;
  cursor: pointer;
  text-transform: uppercase;
  font-family: "Montserrat", var(--font-body);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  transition: border-color 220ms ease, background-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.section-nav-prev:hover,
.section-nav-next:hover,
.section-nav-prev:focus-visible,
.section-nav-next:focus-visible{
  border-color: #fdf0d5;
  background: rgba(10, 34, 54, 0.92);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(102, 155, 188, 0.28);
}

.chapter-related{
  margin-top: 1rem;
}

.chapter-sections-footer-grid{
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

article[data-chapter-type="section_nav"] .chapter-sections-footer-grid{
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(102, 155, 188, 0.35);
  background: linear-gradient(180deg, rgba(10, 34, 54, 0.9) 0%, rgba(2, 7, 12, 0.92) 100%);
}

.chapter-sections-footer-col{
  min-width: 0;
}

article[data-chapter-type="section_nav"] .chapter-sections-footer-col{
  border: 1px solid rgba(253, 240, 213, 0.16);
  background: rgba(7, 20, 32, 0.72);
  padding: 0.8rem;
}

.chapter-sections-footer-col--related .chapter-related{
  margin-top: 0;
}

.chapter-sections-footer-col--annex .chapter-annexes{
  margin-top: 0;
}

.chapter-side-col .chapter-annexes{
  margin-top: 1rem;
}

.chapter--single.chapter--default .chapter-side-col .related-title{
  color: #fdf0d5;
  font-family: "Montserrat", var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chapter--single.chapter--default .chapter-side-col .related-title::after{
  background: rgba(102, 155, 188, 0.5);
}

.chapter--single.chapter--default .chapter-side-col .related-card{
  border: 1px solid rgba(102, 155, 188, 0.38);
  background: rgba(6, 18, 29, 0.86);
  color: #fdf0d5;
  box-shadow:
    inset 0 0 0 1px rgba(102, 155, 188, 0.2),
    inset 0 0 10px rgba(0, 0, 0, 0.26);
}

.chapter--single.chapter--default .chapter-side-col .related-card-serie{
  color: #669bbc;
}

.chapter--single.chapter--default .chapter-side-col .related-card-meta{
  color: rgba(253, 240, 213, 0.74);
}

.chapter-related a{
  color: #0B0B0B;
}

.related-title{
  position: relative;
  padding-bottom: 0.45rem;
  margin-bottom: 0.75rem;
}

article[data-chapter-type="section_nav"] .related-title{
  color: #fdf0d5;
  font-family: "Montserrat", var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.related-title::after{
  content: "";
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0;
  height: 1px;
  background: rgba(11,11,11,0.45);
}

article[data-chapter-type="section_nav"] .related-title::after{
  background: rgba(102, 155, 188, 0.5);
}

.related-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.related-item{
  margin: 0;
}

.related-card{
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
  border: 3px solid #FFFFFF;
  background: transparent;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.9),
    inset 0 0 10px rgba(11,11,11,0.10),
    inset 0 0 18px rgba(5,67,94,0.10);
  padding: 0.55rem 0.7rem;
  text-decoration: none;
  color: #0B0B0B;
}

article[data-chapter-type="section_nav"] .related-card{
  border: 1px solid rgba(102, 155, 188, 0.35);
  background: rgba(3, 13, 22, 0.8);
  box-shadow:
    inset 0 0 0 1px rgba(102, 155, 188, 0.18),
    inset 0 0 12px rgba(0, 0, 0, 0.28);
  color: #fdf0d5;
}

.related-card-media{
  display: block;
}

.related-card-thumb{
  width: 58px;
  height: 58px;
  object-fit: cover;
  display: block;
}

.related-card-thumb--placeholder{
  background: #d8d8d8;
}

.related-card-content{
  min-width: 0;
}

.related-card-title{
  display: block;
  font-family: "Montserrat", var(--font-body);
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.3;
}

.related-card-serie{
  display: block;
  margin-top: 0.18rem;
  color: var(--qualom-accent);
  font-family: "Inter", var(--font-body);
  font-weight: 600;
  font-size: 0.74rem;
  text-decoration: none;
}

article[data-chapter-type="section_nav"] .related-card-serie{
  color: #669bbc;
}

.related-card-meta{
  margin-top: 0.28rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "Inter", var(--font-body);
  font-size: 0.74rem;
  color: rgba(11,11,11,0.85);
}

article[data-chapter-type="section_nav"] .related-card-meta{
  color: rgba(253, 240, 213, 0.74);
}

.related-card-sep{
  opacity: 0.7;
}

/* ---------- Timeline de serie (tarjetas) ---------- */
.site-main--serie{
  background: #FAF9F6;
  color: #0B0B0B;
  font-family: "Montserrat", var(--font-body);
  font-weight: 500;
}

/* Fuerza degradado en la plantilla dedicada de serie */
.site-main--serie.site-main--serie-hub{
  background: radial-gradient(circle at 15% 20%, #0a2236 0%, #02070c 62%, #000000 100%);
  color: #fdf0d5;
}

:root{
  --tl-line: #0B0B0B;
}

.serie-node{
  border-color: #0B0B0B;
  background: #FAF9F6;
}

.serie-node__num{
  color: #0B0B0B;
  font-family: "Inter", var(--font-body);
}

.site-main--serie .serie-description,
.site-main--serie .serie-chapter__meta{
  font-family: "Inter", var(--font-body);
}

.site-main--serie .serie-title{
  text-transform: uppercase;
  font-family: "Montserrat", var(--font-body);
}

.site-main--serie .serie-header-meta{
  margin: 0.4rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Inter", var(--font-body);
  font-size: 0.82rem;
}

.site-main--serie .serie-header-meta__sep{
  opacity: 0.7;
}

.serie-chapter{
  align-items: center;
  padding: 0.65rem 0;
  transform: none;
}

.serie-chapter__body{
  min-width: 0;
  display: flex;
}

.serie-chapter__card{
  width: min(100%, 50%);
  min-width: 360px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  color: #0B0B0B;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border: 4px solid #FFFFFF;
  background: #FAF9F6;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.95),
    inset 0 0 12px rgba(11,11,11,0.10),
    inset 0 0 22px rgba(5,67,94,0.14);
  padding: 0.5rem;
  transition: box-shadow 220ms ease;
}

.serie-chapter__card::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 14px rgba(8, 19, 24, 0.32),
    inset 0 0 28px rgba(5, 67, 94, 0.24);
  opacity: 0.68;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='2.4' numOctaves='5' seed='11' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncA type='gamma' amplitude='1' exponent='1.55' offset='0'/></feComponentTransfer></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='2.4' numOctaves='5' seed='11' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncA type='gamma' amplitude='1' exponent='1.55' offset='0'/></feComponentTransfer></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
  -webkit-mask-size: 120px 120px;
  mask-size: 120px 120px;
}

.serie-chapter__media{
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #dee6e6;
}

.serie-chapter__img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.serie-chapter__img--placeholder{
  background: #d6d6d6;
}

.serie-chapter__title{
  margin: 0;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.25;
}

.serie-chapter__author{
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  color: var(--qualom-hover-border);
}

.serie-chapter__meta{
  margin-top: 0.45rem;
  font-size: 0.75rem;
  display: flex;
  gap: 0.38rem;
  white-space: nowrap;
}

/* Sustituye subrayado por borde tostado en toda la tarjeta */
.site-main--serie .serie-chapter__title::after{
  display: none;
}

.site-main--serie .serie-chapter__card:hover,
.site-main--serie .serie-chapter__card:focus-visible{
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.95),
    inset 0 0 12px rgba(11,11,11,0.10),
    inset 0 0 22px rgba(5,67,94,0.14),
    inset 0 0 0 2px var(--qualom-accent);
}

/* ---------- Archivo de etiqueta ---------- */
.site-main--tag{
  min-height: 100vh;
  padding: 3rem 2.5rem;
  background: radial-gradient(circle at 15% 20%, #0a2236 0%, #02070c 62%, #000000 100%);
  color: #fdf0d5;
}

.tag-header,
.tag-articles,
.site-main--tag .navigation,
.tag-empty{
  width: min(100%, 1200px);
  margin-inline: auto;
}

.tag-header{
  margin-bottom: 2rem;
}

.tag-header__eyebrow{
  margin: 0 0 0.35rem;
  color: #669bbc;
  font-family: "Inter", var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag-title{
  margin: 0;
  color: #fdf0d5;
  font-family: "Montserrat", var(--font-body);
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tag-header__meta,
.tag-description{
  color: rgba(253, 240, 213, 0.76);
  font-family: "Inter", var(--font-body);
}

.tag-header__meta{
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
}

.tag-description{
  max-width: 70ch;
  margin-top: 0.8rem;
}

.tag-description > :first-child{
  margin-top: 0;
}

.tag-description > :last-child{
  margin-bottom: 0;
}

.tag-articles{
  display: grid;
  gap: 0.85rem;
}

.tag-article{
  width: min(100%, 680px);
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(102, 155, 188, 0.42);
  background: rgba(6, 18, 29, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(102, 155, 188, 0.2),
    inset 0 0 12px rgba(0, 0, 0, 0.28),
    inset 0 0 20px rgba(5, 67, 94, 0.2);
  padding: 0.6rem;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.tag-article:hover,
.tag-article:focus-within{
  border-color: rgba(253, 240, 213, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(253, 240, 213, 0.18),
    inset 0 0 16px rgba(5, 67, 94, 0.35);
  transform: translateX(3px);
}

.tag-article__media{
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(102, 155, 188, 0.16);
}

.tag-article__img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 260ms ease;
}

.tag-article:hover .tag-article__img{
  transform: scale(1.035);
}

.tag-article__img--placeholder{
  background:
    linear-gradient(135deg, rgba(102, 155, 188, 0.26), rgba(5, 67, 94, 0.1)),
    #071520;
}

.tag-article__content{
  min-width: 0;
  padding: 0.15rem 0.35rem 0.15rem 0;
}

.tag-article__serie{
  display: inline-block;
  position: relative;
  z-index: 1;
  margin-bottom: 0.3rem;
  color: #669bbc;
  font-family: "Inter", var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.tag-article__serie:hover,
.tag-article__serie:focus-visible{
  color: #fdf0d5;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.tag-article__title{
  margin: 0;
  font-family: "Montserrat", var(--font-body);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  line-height: 1.25;
}

.tag-article__title a{
  color: #fdf0d5;
  text-decoration: none;
}

.tag-article__title a::after{
  content: "";
  position: absolute;
  inset: 0;
}

.tag-article__title a:focus-visible{
  outline: 2px solid #fdf0d5;
  outline-offset: 3px;
}

.tag-article__author,
.tag-article__meta{
  font-family: "Inter", var(--font-body);
  font-size: 0.74rem;
}

.tag-article__author{
  margin: 0.35rem 0 0;
  color: #8ab5cf;
}

.tag-article__meta{
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.38rem;
  color: rgba(253, 240, 213, 0.72);
}

.tag-article__meta-sep{
  opacity: 0.65;
}

.site-main--tag .navigation{
  margin-top: 2rem;
  color: #fdf0d5;
}

.site-main--tag .nav-links{
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.site-main--tag .page-numbers{
  min-width: 2rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(102, 155, 188, 0.42);
  color: #fdf0d5;
  text-align: center;
  text-decoration: none;
}

.site-main--tag .page-numbers.current,
.site-main--tag .page-numbers:hover,
.site-main--tag .page-numbers:focus-visible{
  border-color: #669bbc;
  background: rgba(102, 155, 188, 0.18);
}

@media (max-width: 600px){
  .site-main--tag{
    padding: 2.25rem 1rem;
  }

  .tag-article{
    grid-template-columns: 5.25rem minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    padding: 0;
  }

  .tag-article__media{
    min-height: 5.5rem;
    aspect-ratio: auto;
  }

  .tag-article__content{
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.4rem 0.5rem;
  }

  .tag-article__serie,
  .tag-article__title{
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    text-wrap: balance;
  }

  .tag-article__serie{
    margin-bottom: 0.18rem;
    font-size: 0.58rem;
    line-height: 1.2;
  }

  .tag-article__title{
    font-size: 0.72rem;
    line-height: 1.18;
  }

  .tag-article__author{
    margin-top: 0.18rem;
    font-size: 0.62rem;
    line-height: 1.25;
  }

  .tag-article__meta{
    flex-wrap: wrap;
    gap: 0.05rem 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.58rem;
    line-height: 1.2;
  }
}

.search .series-card__name,
.search .series-card__chapters{
  margin: 0;
}

.search .series-card__author{
  color: var(--qualom-hover-border);
}

@media (min-width: 641px) and (max-width: 980px){
  .header-default__inner{
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .header-default__search-input{
    width: min(70vw, 280px);
  }
}

@media (max-width: 900px){
  .site-footer{
    padding: 1.8rem 1.5rem;
  }

  .footer-inner{
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-col--main,
  .footer-col--legal{
    padding-top: 0;
  }

  .site-main--chapter{
    padding: 2.25rem 2rem;
  }

  .chapter-body--default{
    grid-template-columns: 1fr;
  }

  .chapter-sections-footer-grid{
    grid-template-columns: 1fr;
  }

  .serie-chapter__card{
    width: 100%;
    min-width: 0;
    grid-template-columns: 84px minmax(0, 1fr);
  }
}

@media (max-width: 640px){
  .site-main--serie.site-main--serie-hub{
    padding: 2rem 1rem 3rem;
  }

  .site-main--serie .serie-header{
    margin-bottom: 1.35rem;
  }

  .site-main--serie .serie-title{
    font-size: clamp(1.35rem, 7.25vw, 1.75rem);
    line-height: 1.08;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    text-wrap: balance;
  }

  .site-main--serie .serie-header-meta{
    flex-wrap: wrap;
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .site-main--serie .serie-timeline{
    --tl-node: 34px;
    --tl-gap: 0.65rem;
  }

  .site-main--serie .serie-chapter{
    grid-template-columns: var(--tl-node) minmax(0, 1fr);
    column-gap: var(--tl-gap);
    padding: 0.45rem 0;
  }

  .site-main--serie .serie-node{
    border-width: 3px;
  }

  .site-main--serie .serie-node__num{
    font-size: 0.72rem;
  }

  .site-main--serie .serie-chapter__card{
    width: 100%;
    min-width: 0;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    padding: 0;
    border-width: 1px;
  }

  .site-main--serie .serie-chapter__media{
    min-height: 5.5rem;
    aspect-ratio: auto;
  }

  .site-main--serie .serie-chapter__content{
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.4rem 0.5rem;
  }

  .site-main--serie .serie-chapter__title{
    font-size: 0.76rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
  }

  .site-main--serie .serie-chapter__author{
    margin-top: 0.18rem;
    font-size: 0.64rem;
    line-height: 1.25;
  }

  .site-main--serie .serie-chapter__meta{
    flex-wrap: wrap;
    gap: 0.05rem 0.25rem;
    margin: 0.28rem 0 0;
    font-size: 0.6rem;
    line-height: 1.2;
    white-space: normal;
  }
}

@media (max-width: 640px){
  .site-main--chapter{
    overflow-x: clip;
    padding: 0.75rem 1rem 2.5rem;
  }

  article[data-chapter-type="section_nav"] .chapter-top{
    margin-bottom: 0.45rem;
  }

  .chapter--single.chapter--default .chapter-top{
    margin-bottom: 1rem;
  }

  .chapter--single .chapter-title-wrap{
    margin-bottom: 0.85rem;
  }

  .chapter--single .chapter-title{
    font-size: clamp(1.55rem, 7.5vw, 1.8rem);
    line-height: 1.08;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    text-wrap: balance;
  }

  .chapter--single .chapter-tags{
    margin-top: 0.3rem;
    gap: 0.3rem;
  }

  .chapter--single .chapter-tag-link{
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .chapter--single .chapter-meta{
    margin-top: 0.3rem;
  }

  .chapter--single .chapter-meta-author{
    font-size: 0.74rem;
    line-height: 1.3;
  }

  .chapter--single .chapter-meta-row{
    flex-wrap: wrap;
    gap: 0.15rem 0.35rem;
    font-size: 0.68rem;
    line-height: 1.3;
  }

  .chapter--single .chapter-excerpt{
    margin-top: 0.4rem;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .site-main--chapter .chapter-nav{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
  }

  .site-main--chapter .chapter-nav-side{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .site-main--chapter .chapter-nav-side:has(.is-placeholder){
    display: none;
  }

  .site-main--chapter .chapter-nav-index{
    align-self: center;
  }

  .site-main--chapter .chapter-nav-link{
    max-width: calc(100% - 2rem);
    padding: 0.28rem 0.55rem;
    font-size: 0.65rem;
    line-height: 1.2;
    text-align: center;
  }

  .site-main--chapter .chapter-nav-line{
    flex: 0 0 auto;
    width: 1px;
    height: 1.15rem;
    margin: 0;
  }

  .chapter--single.chapter--default .chapter-body--default,
  .chapter--single.chapter--default .chapter-main-col,
  .chapter--single.chapter--default .chapter-side-col{
    min-width: 0;
    width: 100%;
  }

  .chapter--single.chapter--default .chapter-content{
    width: calc(100% + 2rem);
    margin-right: -1rem;
    margin-left: -1rem;
    padding: 1.5rem 1.5rem 1.75rem;
  }

  .chapter--single.chapter--default .chapter-content p,
  .chapter--single.chapter--default .chapter-content li{
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .chapter--single.chapter--default .chapter-side-col .related-card,
  .chapter--single.chapter--default .chapter-side-col .related-card-content{
    min-width: 0;
    width: 100%;
  }

  article[data-chapter-type="section_nav"] .chapter-sections-footer-grid,
  article[data-chapter-type="section_nav"] .chapter-sections-footer-col--related{
    padding: 0;
    border: 0;
    background: transparent;
  }

  .chapter--single .chapter-related:not(.chapter-annexes) .related-list{
    gap: 0.55rem;
  }

  .chapter--single .chapter-related:not(.chapter-annexes) .related-card{
    width: 100%;
    min-width: 0;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(102, 155, 188, 0.42);
    background: rgba(6, 18, 29, 0.88);
    color: #fdf0d5;
    box-shadow:
      inset 0 0 0 1px rgba(102, 155, 188, 0.2),
      inset 0 0 12px rgba(0, 0, 0, 0.28),
      inset 0 0 20px rgba(5, 67, 94, 0.2);
  }

  .chapter--single .chapter-related:not(.chapter-annexes) .related-card-media{
    min-height: 5.5rem;
    overflow: hidden;
  }

  .chapter--single .chapter-related:not(.chapter-annexes) .related-card-thumb{
    width: 100%;
    height: 100%;
    min-height: 5.5rem;
    object-fit: cover;
  }

  .chapter--single .chapter-related:not(.chapter-annexes) .related-card-content{
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.4rem 0.5rem;
  }

  .chapter--single .chapter-related:not(.chapter-annexes) .related-card-title,
  .chapter--single .chapter-related:not(.chapter-annexes) .related-card-serie{
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    text-wrap: balance;
  }

  .chapter--single .chapter-related:not(.chapter-annexes) .related-card-title{
    font-size: 0.72rem;
    line-height: 1.18;
  }

  .chapter--single .chapter-related:not(.chapter-annexes) .related-card-serie{
    margin-top: 0.18rem;
    color: #669bbc;
    font-size: 0.58rem;
    line-height: 1.2;
  }

  .chapter--single .chapter-related:not(.chapter-annexes) .related-card-meta{
    flex-wrap: wrap;
    gap: 0.05rem 0.25rem;
    margin-top: 0.25rem;
    color: rgba(253, 240, 213, 0.74);
    font-size: 0.58rem;
    line-height: 1.2;
  }

  article[data-chapter-type="section_nav"] .chapter-body--section-nav,
  article[data-chapter-type="section_nav"] .chapter-main-col{
    min-width: 0;
    width: 100%;
  }

  article[data-chapter-type="section_nav"] .chapter-body--section-nav{
    margin-top: 1rem;
  }

  article[data-chapter-type="section_nav"] .chapter-sections-nav{
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
  }

  article[data-chapter-type="section_nav"] .section-nav-prev:disabled,
  article[data-chapter-type="section_nav"] .section-nav-next:disabled{
    display: none;
  }

  article[data-chapter-type="section_nav"] .section-nav-prev{
    grid-column: 1;
    justify-self: start;
    text-align: left;
  }

  article[data-chapter-type="section_nav"] .section-nav-next{
    grid-column: 2;
    justify-self: end;
    text-align: right;
  }

  article[data-chapter-type="section_nav"] .section-nav-prev,
  article[data-chapter-type="section_nav"] .section-nav-next{
    max-width: none;
    padding: 0.25rem 0.3rem;
    font-size: 0.6rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  article[data-chapter-type="section_nav"] .chapter-sections{
    width: calc(100% + 2rem);
    margin-top: 0;
    margin-right: -1rem;
    margin-left: -1rem;
  }

  article[data-chapter-type="section_nav"] .chapter-section .wp-block-columns{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
    gap: 0;
  }

  article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:first-child,
  article[data-chapter-type="section_nav"] .chapter-section .wp-block-column:last-child{
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 1.5rem 1.5rem 1.75rem;
  }

  article[data-chapter-type="section_nav"] .chapter-section .wp-block-math{
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  article[data-chapter-type="section_nav"] .chapter-section .ml_animation,
  article[data-chapter-type="section_nav"] .chapter-section .ml_animation > .wp-block-group__inner-container,
  article[data-chapter-type="section_nav"] .chapter-section .ml_animation .ml-block,
  article[data-chapter-type="section_nav"] .chapter-section .ml_animation .grafica{
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  article[data-chapter-type="section_nav"] .chapter-section .al-multiplicacion-matrices .grafica{
    overflow: hidden;
  }

  article[data-chapter-type="section_nav"] .chapter-section .al-multiplicacion-matrices .grafica > div:first-child{
    margin-left: 0 !important;
    transform: translate(0.35rem, 0.7rem) !important;
  }

  article[data-chapter-type="section_nav"] .chapter-section .al-multiplicacion-matrices .grafica > div:first-child > div:first-child{
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.2rem !important;
  }

  article[data-chapter-type="section_nav"] .chapter-section .al-multiplicacion-matrices .grafica > div:first-child > div:first-child > span{
    display: none;
  }

  article[data-chapter-type="section_nav"] .chapter-section .al-multiplicacion-matrices .grafica > div:first-child > button{
    align-self: flex-start;
    padding: 0.35rem 0.65rem !important;
    font-size: 0.68rem !important;
  }

  article[data-chapter-type="section_nav"] .chapter-section .al-multiplicacion-matrices .grafica > svg{
    max-width: 100%;
  }

  article[data-chapter-type="section_nav"] .chapter-sections p,
  article[data-chapter-type="section_nav"] .chapter-sections li{
    font-size: 0.82rem;
    line-height: 1.45;
  }
}
