/* ===========================================================================
   GENZ — Navidad 2026 · Footer
   Lo carga layout/theme.liquid (rama de Navidad). Una capa sobre el footer de
   todo el año (sections/footer.liquid + assets/theme-custom.css «Footer»):
   - Fondo: el mismo cielo nocturno del header, con la luz arriba (del lado de
     la página, como el header la tiene abajo).
   - La línea de la marca pasa a ser el caramelo del header (rayas rojas y
     blancas) y de él cuelga la guirnalda de luces.
   - Partículas: el <canvas> .xmas-sky del header (initSky). La guirnalda y el
     lienzo los agrega assets/theme-navidad.js (initFooter); sin JS queda el
     cielo y el caramelo.
   Mismo foco dorado que el header (--xn-focus).
   ======================================================================== */
.theme-navidad .footer {
  --xn-sky-0: #040a1e;
  --xn-sky-1: #0a1a3d;
  --xn-sky-glow: #17336f;
  --ft-accent: #ffd27a;

  background-color: var(--xn-sky-0);
  background-image:
    radial-gradient(ellipse 85% 120% at 50% 0%, var(--xn-sky-glow) 0%, var(--xn-sky-1) 48%, var(--xn-sky-0) 100%);
  isolation: isolate;
}

/* Partículas: detrás de todo el contenido y sin capturar el puntero. */
.theme-navidad .footer > .xmas-sky {
  display: block;
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: -1;
}

/* Caramelo: igual que el borde inferior del header (theme-navidad.css § 5). */
.theme-navidad .footer > .div-content {
  background-color: #fff;
  background-image:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 45%, rgba(10, 18, 46, 0.16) 100%),
    repeating-linear-gradient(-45deg, #d7192d 0, #d7192d 4.4px, #fff 5px, #fff 8.4px, #d7192d 9px);
  height: 6px;
}

.theme-navidad .footer > .div-content .div-content_item {
  display: none;
}

/* Guirnalda: cuelga del caramelo hacia adentro del footer (decorativa, sin
   capturar el puntero). Mismo cable y lamparitas que la del header. */
.theme-navidad .footer > .xmas-lights {
  --xl-gap: 32px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='8' viewBox='0 0 32 8'%3E%3Cpath d='M0 .6Q16 9.4 32 .6' fill='none' stroke='%23264434' stroke-opacity='.7' stroke-width='1'/%3E%3C/svg%3E") repeat-x 0 0 / var(--xl-gap) 8px;
  display: flex;
  height: 20px;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 6px;
  z-index: 1;
}

.theme-navidad .footer > .xmas-lights i {
  animation: xmas-light-sway 3.6s ease-in-out infinite alternate;
  flex: 0 0 var(--xl-gap);
  height: 100%;
  position: relative;
  transform-origin: 50% 5px;
}

.theme-navidad .footer > .xmas-lights b {
  background: radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0) 38%), var(--xl-c, #f5b82e);
  border-radius: 45% 45% 50% 50% / 38% 38% 62% 62%;
  height: 8px;
  left: 50%;
  margin-left: -2.5px;
  position: absolute;
  top: 7px;
  width: 5px;
}

.theme-navidad .footer > .xmas-lights b::before {
  background: #2b3a33;
  border-radius: 1px;
  content: '';
  height: 3px;
  left: 1px;
  position: absolute;
  top: -2px;
  width: 3px;
}

.theme-navidad .footer > .xmas-lights b::after {
  animation: xmas-light-twinkle 2.8s ease-in-out infinite;
  background: radial-gradient(closest-side, var(--xl-c, #f5b82e), transparent);
  border-radius: 50%;
  content: '';
  inset: -4px -5px -3px;
  opacity: 0.45;
  position: absolute;
  z-index: -1;
}

.theme-navidad .footer > .xmas-lights i:nth-child(5n + 1) { --xl-c: #e8333f; }
.theme-navidad .footer > .xmas-lights i:nth-child(5n + 2) { --xl-c: #f5b82e; }
.theme-navidad .footer > .xmas-lights i:nth-child(5n + 3) { --xl-c: #1fae5b; }
.theme-navidad .footer > .xmas-lights i:nth-child(5n + 4) { --xl-c: #2b8ce6; }
.theme-navidad .footer > .xmas-lights i:nth-child(5n + 5) { --xl-c: #dd2c7b; }

.theme-navidad .footer > .xmas-lights i:nth-child(3n + 2) { animation-delay: -1.2s; animation-duration: 4.2s; }
.theme-navidad .footer > .xmas-lights i:nth-child(3n + 3) { animation-delay: -2.5s; animation-duration: 3.1s; }
.theme-navidad .footer > .xmas-lights i:nth-child(4n + 2) b::after { animation-delay: -0.9s; animation-duration: 3.4s; }
.theme-navidad .footer > .xmas-lights i:nth-child(4n + 3) b::after { animation-delay: -1.8s; animation-duration: 2.3s; }
.theme-navidad .footer > .xmas-lights i:nth-child(4n + 4) b::after { animation-delay: -2.6s; animation-duration: 3.9s; }

/* Solo las lamparitas que entran en pantalla (32px cada una). */
@media (max-width: 1920px) {
  .theme-navidad .footer > .xmas-lights i:nth-child(n + 62) { display: none; }
}

@media (max-width: 1440px) {
  .theme-navidad .footer > .xmas-lights i:nth-child(n + 47) { display: none; }
}

@media (max-width: 1024px) {
  .theme-navidad .footer > .xmas-lights i:nth-child(n + 34) { display: none; }
}

@media (max-width: 767px) {
  .theme-navidad .footer > .xmas-lights i:nth-child(n + 26) { display: none; }
}

@media (max-width: 480px) {
  .theme-navidad .footer > .xmas-lights i:nth-child(n + 17) { display: none; }
}

/* Botones de la app sobre el cielo: el vidrio un poco más oscuro, como los
   del header. */
.theme-navidad .footer .footer-app {
  background: rgba(4, 10, 30, 0.45);
}

.theme-navidad .footer .footer-app:hover,
.theme-navidad .footer .footer-app:focus-visible {
  background: rgba(4, 10, 30, 0.62);
}

/* Movimiento reducido: luces quietas, con un brillo intermedio fijo (el cielo
   queda quieto, ver theme-navidad.js). */
@media (prefers-reduced-motion: reduce) {
  .theme-navidad .footer > .xmas-lights i,
  .theme-navidad .footer > .xmas-lights b::after {
    animation: none;
  }

  .theme-navidad .footer > .xmas-lights b::after {
    opacity: 0.55;
  }
}
