/* =========================================================
   Decoración de Navidad de toda la web.
   Solo se aplica con html.tema-navidad (lo pone navidad-tema.js
   hasta la fecha de fin que hay en ese archivo).
   ========================================================= */

/* Guirnalda de luces colgando de la cabecera */
.tema-guirnalda { position: absolute; top: 100%; left: 0; right: 0; height: 34px; overflow: hidden; pointer-events: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='22'%3E%3Cpath d='M0 2 Q40 24 80 2' fill='none' stroke='%238a7a5f' stroke-width='2'/%3E%3C/svg%3E") repeat-x 0 0 / 80px 22px; }
.tema-guirnalda i { justify-self: center; margin-top: 12px; width: 9px; height: 14px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; position: relative;
  background: var(--luz); box-shadow: 0 0 8px 2px var(--luz); animation: tema-brillo 2.4s ease-in-out infinite; }
.tema-guirnalda i::before { content: ""; position: absolute; top: -3px; left: 1.5px; width: 6px; height: 4px; border-radius: 2px; background: #4a443d; }
.tema-guirnalda i:nth-child(4n+1) { --luz: #f6e7c1; }
.tema-guirnalda i:nth-child(4n+2) { --luz: #e0384b; animation-delay: -.6s; }
.tema-guirnalda i:nth-child(4n+3) { --luz: #f2c14e; animation-delay: -1.2s; }
.tema-guirnalda i:nth-child(4n+4) { --luz: #4fb37a; animation-delay: -1.8s; }
@keyframes tema-brillo { 0%, 100% { opacity: 1; } 50% { opacity: .4; box-shadow: 0 0 3px 1px var(--luz); } }

/* Nieve suave por toda la página (no molesta al leer ni al pulsar) */
.tema-nieve { position: fixed; inset: 0; z-index: 45; overflow: hidden; pointer-events: none; }
.tema-nieve i { position: absolute; top: -2rem; left: var(--x); font-size: var(--t); font-style: normal; color: #fff; text-shadow: 0 0 3px rgba(92,21,32,.55); opacity: 0;
  animation: tema-copo var(--d) linear var(--r) infinite; }
.tema-nieve i::before { content: "❄"; }
@keyframes tema-copo {
  0%   { transform: translate(0, 0) rotate(0); opacity: 0; }
  10%  { opacity: .8; }
  50%  { transform: translate(20px, 50vh) rotate(180deg); }
  90%  { opacity: .8; }
  100% { transform: translate(-14px, 104vh) rotate(360deg); opacity: 0; }
}

/* Gorro de Papá Noel en el logo */
.tema-navidad .nav__logo { position: relative; }
.tema-gorro { position: absolute; left: -11px; top: -11px; width: 27px; height: 23px; pointer-events: none; transform: rotate(-14deg); }

/* Acebo en las esquinas de la portada de cada página */
.tema-acebo { position: absolute; bottom: 1rem; width: clamp(64px, 9vw, 104px); height: auto; pointer-events: none; z-index: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.45)); }
.tema-acebo--izq { left: 1rem; }
.tema-acebo--der { right: 1rem; transform: scaleX(-1); }

/* La rayita de los títulos pasa a ser una ramita de acebo */
.tema-navidad .etiqueta::before { width: 26px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74 56'%3E%3Cpath d='M8 30 q10-14 26-10 q-4 4 0 8 q-6 2-4 8 q-12 4-22-6z' fill='%232f7d4a'/%3E%3Cpath d='M30 14 q14-8 28 2 q-5 3-2 8 q-6 0-6 7 q-14-2-20-17z' fill='%233c9460'/%3E%3Ccircle cx='34' cy='30' r='6' fill='%23d42a3c'/%3E%3Ccircle cx='43' cy='35' r='5.5' fill='%23c41f31'/%3E%3Ccircle cx='36' cy='40' r='5' fill='%23e0384b'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Franja del aviso de arriba con un toque dorado */
.tema-navidad .aviso { border-bottom: 1px solid #c9a35c; }

/* Felicitación al final de la página */
.tema-felicitacion { display: flex; align-items: center; justify-content: center; gap: .9rem; padding: 0 0 1.6rem; font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: 1.15rem; color: #e9dcc5; text-align: center; }
.tema-felicitacion svg { flex: none; width: 40px; height: 30px; }
.tema-felicitacion svg:last-child { transform: scaleX(-1); }
.tema-navidad footer { border-top: 4px solid #7b1e2b; box-shadow: inset 0 3px 0 #2f7d4a; }

@media (max-width: 760px) {
  .tema-nieve i:nth-child(n+9) { display: none; }
  .tema-gorro { left: -9px; top: -10px; width: 23px; height: 20px; }
  .tema-felicitacion { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tema-nieve { display: none; }
  .tema-guirnalda i { animation: none; }
}
@media print {
  .tema-guirnalda, .tema-nieve, .tema-acebo, .tema-gorro, .tema-felicitacion { display: none; }
}
