/* HMCDRS Homepage V3.3
   1. Franja violeta identica en ambos temas.
   2. Vidrio translucido exclusivamente en fichas (con/sin scroll).
   Sin modificaciones a los estilos interiores de fichas, lectores o Series. */
:root, html.site-dark { --hm-v32-top: #a992ee; }
#globalHeader.hm-v3-global-header .hm-v3-topline,
html.site-dark #globalHeader.hm-v3-global-header .hm-v3-topline {
  background: #a992ee;
  color: #ffffff;
}
/* En las fichas mantenemos la transparencia incluso si el header esta marcado is-scrolled.
   La ligera mezcla lavanda/celeste recupera el lenguaje visual de la ficha. */
body.hm-v3-ficha-page #globalHeader.hm-v3-global-header .hm-v3-header-main,
body.hm-v3-ficha-page #globalHeader.hm-v3-global-header.is-scrolled .hm-v3-header-main {
  background: linear-gradient(105deg, rgba(239,234,252,.58), rgba(232,243,254,.48));
  border-bottom-color: rgba(255,255,255,.48);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: 0 5px 20px rgba(43,39,83,.055);
}
html.site-dark body.hm-v3-ficha-page #globalHeader.hm-v3-global-header .hm-v3-header-main,
html.site-dark body.hm-v3-ficha-page #globalHeader.hm-v3-global-header.is-scrolled .hm-v3-header-main {
  background: linear-gradient(105deg, rgba(20,22,38,.60), rgba(24,34,53,.52));
  border-bottom-color: rgba(220,220,248,.12);
  -webkit-backdrop-filter: blur(20px) saturate(1.22);
  backdrop-filter: blur(20px) saturate(1.22);
  box-shadow: 0 5px 21px rgba(0,0,0,.14);
}

/* ================================================================
   HMCDRS V3.4: el header vuelve al flujo de pagina.
   Desaparece al desplazarse. Solo las pestañas de la ficha quedan
   adhesivas en el borde superior, sin solaparse con el header.
   ================================================================ */
#globalHeader.hm-v3-global-header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100%;
}
/* Al no estar fijo el header, ya no se necesita reservar su altura. */
.hm-v3-home { padding-top: 24px !important; }
#hmc-series-v22 { padding-top: 24px !important; }
body.hm-v3-ficha-page .hmc-ficha { padding-top: 0 !important; }
body.hm-v3-ficha-page .hmc-ficha .fi-hero { padding-top: 20px !important; }
/* La barra de capitulos puede seguir visible, ahora sin header pegado. */
body.hm-v3-ficha-page .hmc-ficha #tabs-anchor {
  top: 0 !important;
  scroll-margin-top: 8px !important;
}
/* Controles adhesivos del directorio Series ajustados al nuevo layout. */
#hmc-series-v22 .desk\:hidden.sticky,
#hmc-series-v22 .desk\:block.sticky { top: 0 !important; }
#hmc-series-v22 #catalog-top { scroll-margin-top: 12px !important; }

/* ===================================================================
   HMCDRS V3.5 - Glass real sobre la portada de la FICHA.

   El encabezado V3.4 permanece en el flujo de pagina (no es sticky).
   Solo en fichas, extendemos el hero REAL por detras de la fila del
   encabezado. No se clona el degradado ni se altera el cuerpo de la
   portada; por eso el color se adapta a la imagen de cada serie.
   Compensamos exactamente los pixeles del solapamiento en la seccion
   del hero: el breadcrumb, las acciones y las pestañas NO se mueven.
   =================================================================== */
body.hm-v3-ficha-page { --hm-v35-glass-depth: 71px; }
body.hm-v3-ficha-page #appRoot {
  position: relative;
  z-index: 0;
  margin-top: calc(-1 * var(--hm-v35-glass-depth));
}
body.hm-v3-ficha-page #appRoot > .hmc-ficha > section:first-child {
  padding-top: var(--hm-v35-glass-depth);
}
/* Header encima del hero extendido, pero sin comportamiento fijo. */
body.hm-v3-ficha-page #globalHeader.hm-v3-global-header {
  position: relative !important;
  z-index: 40 !important;
}
/* Matiz sutil sobre la portada verdadera: NO sobre el fondo body. */
body.hm-v3-ficha-page #globalHeader.hm-v3-global-header .hm-v3-header-main,
body.hm-v3-ficha-page #globalHeader.hm-v3-global-header.is-scrolled .hm-v3-header-main {
  background: linear-gradient(100deg, rgba(250,246,255,.50), rgba(240,247,255,.40));
  border-bottom-color: rgba(255,255,255,.26);
  box-shadow: none;
  -webkit-backdrop-filter: blur(20px) saturate(1.20);
  backdrop-filter: blur(20px) saturate(1.20);
}
html.site-dark body.hm-v3-ficha-page #globalHeader.hm-v3-global-header .hm-v3-header-main,
html.site-dark body.hm-v3-ficha-page #globalHeader.hm-v3-global-header.is-scrolled .hm-v3-header-main {
  background: linear-gradient(105deg, rgba(23,19,35,.28), rgba(17,24,42,.26));
  border-bottom-color: rgba(255,255,255,.06);
  box-shadow: none;
}
@media (max-width:660px) {
  body.hm-v3-ficha-page { --hm-v35-glass-depth: 62px; }
}
