/* Temporada navideña del Tour Estudiantil (se carga solo del 1 de diciembre al 6 de enero, ver christmas_active()).
   Decoración sutil y con los colores de la marca: luces naranja/amarillo/cian/rosa (+ rojo y verde), nieve,
   gorro de Santa en el logo y nieve acumulada sobre el pie de página. Nada de esto recibe clics. */

/* ---------- Cinta de bastón de caramelo en el borde superior ---------- */
body.xmas::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 260; pointer-events: none;
  background: repeating-linear-gradient(-45deg, #e8312f 0 10px, #ffffff 10px 20px);
  box-shadow: 0 1px 8px rgba(232, 49, 47, .45);
}

/* ---------- Capas dibujadas por christmas.js ---------- */
#xmasLayers { position: absolute; inset: 0 auto auto 0; width: 0; height: 0; }
.xmas-garland {
  position: fixed; left: 0; right: 0; top: calc(var(--header-h) + var(--quicknav-h) - 1px);
  z-index: 195; height: 0; pointer-events: none;
}
.xmas-garland svg { display: block; width: 100%; overflow: visible; }
.xmas-garland__wire { fill: none; stroke: rgba(210, 220, 235, .55); stroke-width: 1.6; stroke-linecap: round; }
.xmas-garland__cap { fill: #2a2f3a; }
.xb {
  fill: var(--c); filter: drop-shadow(0 0 5px var(--c));
  animation: xmasTwinkle 2.6s ease-in-out infinite; animation-delay: var(--d, 0s);
}
.xmas-snow { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 180; pointer-events: none; }

@keyframes xmasTwinkle {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 7px var(--c)) brightness(1.15); }
  50% { opacity: .42; filter: drop-shadow(0 0 2px var(--c)) brightness(.85); }
}
@keyframes xmasStar {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(.7) rotate(25deg); opacity: .55; }
}

/* ---------- Gorro de Santa en el logo del encabezado y del pie ---------- */
body.xmas .brand { position: relative; }
body.xmas .brand::after,
body.xmas .footer-col--brand::before {
  content: ''; position: absolute; pointer-events: none; z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 56'%3E%3Cpath d='M7 44C9 22 26 5 46 7c-3 6-3 13 1 21 3 6 7 12 9 17z' fill='%23e8312f'/%3E%3Cpath d='M40 9c4 4 7 11 9 19 2 6 5 12 7 17-4-8-9-13-10-21-1-6-3-11-6-15z' fill='%23b81f1f' opacity='.55'/%3E%3Cpath d='M3 43c2-7 9-9 15-7 12 4 29 4 43-1 5 4 3 11-2 13-14 4-34 4-50 0-4-1-6-3-6-5z' fill='%23fff'/%3E%3Ccircle cx='51' cy='9' r='7.5' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45));
}
body.xmas .brand::after { width: 40px; height: 35px; left: -9px; top: -13px; transform: rotate(-16deg); }
body.xmas .footer-col--brand { position: relative; }
body.xmas .footer-col--brand::before { width: 38px; height: 33px; left: -8px; top: -14px; transform: rotate(-16deg); }

/* ---------- Nieve acumulada sobre el pie de página ---------- */
body.xmas .site-footer { position: relative; }
body.xmas .site-footer::before {
  content: ''; position: absolute; left: 0; right: 0; top: -17px; height: 30px; pointer-events: none; z-index: 3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30V16q11-16 22 0t22 0 22 0 22 0 22 0 22 0 22 0 22 0 22 0 22 0V30z' fill='%23eef4ff'/%3E%3C/svg%3E") repeat-x left bottom / 220px 30px;
  filter: drop-shadow(0 -3px 8px rgba(190, 215, 255, .28));
}

/* ---------- Detalle: estrellita que titila junto a los títulos pequeños de sección ---------- */
body.xmas .eyebrow::after {
  content: '✦'; display: inline-block; margin-left: 9px; color: var(--yellow, #F5B01A);
  text-shadow: 0 0 8px rgba(245, 176, 26, .8); animation: xmasStar 2.8s ease-in-out infinite;
}

/* ---------- Mensaje y botón para apagar la decoración ---------- */
.xmas-widget {
  position: fixed; left: 16px; bottom: 20px; z-index: 215;
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 16px;
  background: rgba(18, 21, 27, .9); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px;
  backdrop-filter: blur(10px); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .7);
  font-size: 13px; font-weight: 700; color: var(--white, #fff);
}
.xmas-widget__text { background: linear-gradient(90deg, #ff6b6b, #F5B01A 55%, #19C1F3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.xmas-widget__btn {
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(25, 193, 243, .16); color: #7fdcff; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.xmas-widget__btn:hover { background: rgba(25, 193, 243, .3); transform: rotate(30deg); }
.xmas-widget__btn[aria-pressed="false"] { background: rgba(255, 255, 255, .06); color: var(--text-muted, #9AA1AE); }

@media (max-width: 640px) {
  .xmas-widget { left: 12px; bottom: 18px; padding: 4px; }
  .xmas-widget__text { display: none; }
  body.xmas .brand::after { width: 34px; height: 30px; left: -7px; top: -11px; }
}
@media (prefers-reduced-motion: reduce) {
  .xb { animation: none; }
  body.xmas .eyebrow::after { animation: none; }
}
@media print {
  body.xmas::before, .xmas-garland, .xmas-snow, .xmas-widget, body.xmas .site-footer::before { display: none !important; }
}
