/* Diseño Navidad — reglas bajo html[data-tema="navidad"].
   Luces (cabecera), gorro, acebo y campanas; nieve y escena en el carrusel. */
html[data-tema="navidad"] {
  --nv-u: clamp(4px, 0.8vw, 12px);
  --nv-paso: 44px;
}

/* ── Serie de luces ─────────────────────────────────────────────────────── */
html[data-tema="navidad"] .nv-luces {
  position: relative;
  height: 0;
  z-index: 1052;
  pointer-events: none;
}

html[data-tema="navidad"] .nv-luces__cable {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

html[data-tema="navidad"] .nv-luces__defs {
  position: absolute;
  width: 0;
  height: 0;
}

html[data-tema="navidad"] .nv-luces__cable i {
  position: relative;
  flex: 0 0 var(--nv-paso);
  width: var(--nv-paso);
  height: 36px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 22' preserveAspectRatio='none'%3E%3Cpath d='M0 3C9 9 14 12 22 12C30 12 35 9 44 3' fill='none' stroke='%2314401f' stroke-width='2.8' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M0 3C9 9 14 12 22 12C30 12 35 9 44 3' fill='none' stroke='%2352a064' stroke-width='1.1' stroke-dasharray='1.4 2.2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 22px no-repeat;
  --c: #ff3b3b;
  --ret: 0s;
}

html[data-tema="navidad"] .nv-bombillo {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 11px;
  height: 25px;
  margin-left: -5.5px;
  overflow: visible;
}

html[data-tema="navidad"] .nv-bombillo--luz {
  filter: drop-shadow(0 0 2px var(--c)) drop-shadow(0 0 6px var(--c));
  animation: nv-parpadeo 2.4s ease-in-out infinite;
  animation-delay: var(--ret);
}

html[data-tema="navidad"] .nv-luces__cable i:nth-child(5n+1) { --c: #ff2a2a; }
html[data-tema="navidad"] .nv-luces__cable i:nth-child(5n+2) { --c: #ffc928; }
html[data-tema="navidad"] .nv-luces__cable i:nth-child(5n+3) { --c: #2fd35a; }
html[data-tema="navidad"] .nv-luces__cable i:nth-child(5n+4) { --c: #3b9bff; }
html[data-tema="navidad"] .nv-luces__cable i:nth-child(5n+5) { --c: #ff5fa8; }
html[data-tema="navidad"] .nv-luces__cable i:nth-child(3n+2) { --ret: -0.8s; }
html[data-tema="navidad"] .nv-luces__cable i:nth-child(3n+3) { --ret: -1.6s; }

@keyframes nv-parpadeo {
  0%, 30% { opacity: 1; }
  42%, 68% { opacity: 0; }
  80%, 100% { opacity: 1; }
}

html[data-tema="navidad"] .nv-campanas {
  position: absolute;
  top: -2px;
  left: 50%;
  width: clamp(70px, 8vw, 112px);
  transform: translateX(-50%);
}

html[data-tema="navidad"] .nv-acebo {
  position: absolute;
  top: -4px;
  width: clamp(54px, 6vw, 88px);
}

html[data-tema="navidad"] .nv-acebo--izquierdo { left: 4px; }
html[data-tema="navidad"] .nv-acebo--derecho { right: 4px; transform: scaleX(-1); }

html[data-tema="navidad"] .site-header {
  padding-top: 28px;
}

/* ── Gorro navideño sobre el logo ───────────────────────────────────────── */
html[data-tema="navidad"] .site-header__brand {
  position: relative;
  margin-left: 18px;
}

html[data-tema="navidad"] .site-header__brand::before {
  content: "";
  position: absolute;
  top: 42%;
  left: 8%;
  z-index: 2;
  width: 27.5%;
  aspect-ratio: 520 / 325;
  background: url("../../img/temas/navidad/gorro.077f3eb21edc.webp") center / contain no-repeat;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
  transform: translate(-50%, -50%) rotate(-22deg);
  pointer-events: none;
}

@media (min-width: 992px) {
  html[data-tema="navidad"] .site-header__brand {
    margin-left: 44px;
  }
}

/* ── Nieve y escena en el carrusel ──────────────────────────────────────── */
html[data-tema="navidad"] .nv-slider {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}

html[data-tema="navidad"] .nv-copo {
  position: absolute;
  top: -8%;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  background: url("../../img/temas/navidad/copo.1c0e073ff129.svg") center / contain no-repeat;
  opacity: 0.85;
  animation: nv-nieve var(--d) linear infinite;
  animation-delay: var(--r);
}

html[data-tema="navidad"] .nv-copo:nth-child(1)  { --x: 4%;  --s: 18px; --d: 13s; --r: -2s; }
html[data-tema="navidad"] .nv-copo:nth-child(2)  { --x: 12%; --s: 10px; --d: 9s;  --r: -6s; }
html[data-tema="navidad"] .nv-copo:nth-child(3)  { --x: 21%; --s: 24px; --d: 15s; --r: -9s; }
html[data-tema="navidad"] .nv-copo:nth-child(4)  { --x: 30%; --s: 12px; --d: 10s; --r: -1s; }
html[data-tema="navidad"] .nv-copo:nth-child(5)  { --x: 39%; --s: 16px; --d: 12s; --r: -7s; }
html[data-tema="navidad"] .nv-copo:nth-child(6)  { --x: 48%; --s: 9px;  --d: 8s;  --r: -4s; }
html[data-tema="navidad"] .nv-copo:nth-child(7)  { --x: 57%; --s: 22px; --d: 14s; --r: -11s; }
html[data-tema="navidad"] .nv-copo:nth-child(8)  { --x: 66%; --s: 11px; --d: 9s;  --r: -3s; }
html[data-tema="navidad"] .nv-copo:nth-child(9)  { --x: 74%; --s: 17px; --d: 12s; --r: -8s; }
html[data-tema="navidad"] .nv-copo:nth-child(10) { --x: 83%; --s: 13px; --d: 10s; --r: -5s; }
html[data-tema="navidad"] .nv-copo:nth-child(11) { --x: 91%; --s: 21px; --d: 14s; --r: -10s; }
html[data-tema="navidad"] .nv-copo:nth-child(12) { --x: 97%; --s: 10px; --d: 8s;  --r: -2s; }

@keyframes nv-nieve {
  0%   { top: -8%;  transform: translateX(0) rotate(0deg); }
  50%  { top: 50%;  transform: translateX(18px) rotate(180deg); }
  100% { top: 100%; transform: translateX(-6px) rotate(360deg); }
}

html[data-tema="navidad"] .nv-suelo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 1;
  height: clamp(24px, 4.4vw, 64px);
  background: url("../../img/temas/navidad/nieve-suelo.25477bbb6539.svg") 0 0 / 100% 100% no-repeat;
}

html[data-tema="navidad"] .nv-grupo {
  position: absolute;
  bottom: calc(var(--nv-u) * 0.5);
  z-index: 2;
  display: flex;
  align-items: flex-end;
}

html[data-tema="navidad"] .nv-grupo--izquierdo { left: 1.5%; }
html[data-tema="navidad"] .nv-grupo--derecho { right: 1.5%; }

html[data-tema="navidad"] .nv-grupo img {
  width: auto;
  flex: none;
}

html[data-tema="navidad"] .nv-pino--alto { height: calc(var(--nv-u) * 17); }
html[data-tema="navidad"] .nv-pino--bajo { height: calc(var(--nv-u) * 11); margin-left: calc(var(--nv-u) * -2); }
html[data-tema="navidad"] .nv-muneco { height: calc(var(--nv-u) * 14); margin-left: calc(var(--nv-u) * 0.5); }
html[data-tema="navidad"] .nv-regalos { height: calc(var(--nv-u) * 5); margin-left: calc(var(--nv-u) * -0.5); }
html[data-tema="navidad"] .nv-reno { height: calc(var(--nv-u) * 11); margin-left: calc(var(--nv-u) * 0.5); }
html[data-tema="navidad"] .nv-grupo--derecho .nv-pino--bajo { margin-left: calc(var(--nv-u) * 0.5); margin-right: calc(var(--nv-u) * -2); }

@media (max-width: 767.98px) {
  html[data-tema="navidad"] .nv-acebo { display: none; }
  html[data-tema="navidad"] .nv-pino--bajo,
  html[data-tema="navidad"] .nv-grupo--derecho .nv-regalos { display: none; }
}

@media (max-width: 575.98px) {
  html[data-tema="navidad"] .nv-copo:nth-child(n+7) { display: none; }
  html[data-tema="navidad"] { --nv-paso: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-tema="navidad"] .nv-bombillo--luz { animation: none; opacity: 1; }
  html[data-tema="navidad"] .nv-copo { animation: none; top: var(--x); }
}

@media print {
  html[data-tema="navidad"] .nv-luces,
  html[data-tema="navidad"] .nv-slider { display: none; }
  html[data-tema="navidad"] .site-header__brand::before { display: none; }
}
