/* ==========================================================================
   TEMA HALLOWEEN (solo cabecera) — se activa con la clase .halloween en <body>
   No altera el estilo normal: todo cuelga de .halloween
   Paleta: negro/morado tétrico + naranja calabaza + verde tóxico de acento
   ========================================================================== */
.halloween {
  --hw-orange: #ff7518;   /* naranja calabaza */
  --hw-purple: #6b21a8;   /* morado */
  --hw-purple-2: #3b0764; /* morado profundo */
  --hw-green: #8bc34a;    /* verde tóxico */
  --hw-ink: #0a0510;      /* casi negro violáceo */
}

/* ---- Cabecera tétrica ---- */
.halloween header {
  position: sticky;
  top: 0;
  z-index: 100;
  background:
    radial-gradient(120% 140% at 85% -20%, rgba(255,117,24,.22) 0%, transparent 55%),
    linear-gradient(135deg, var(--hw-ink) 0%, var(--hw-purple-2) 60%, #050208 100%);
  border-bottom: 2px solid var(--hw-orange);
  box-shadow: 0 6px 24px rgba(107,33,168,.45);
  backdrop-filter: blur(10px);
}

/* franja superior degradada naranja-morado (acento) */
.halloween header::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--hw-orange), var(--hw-purple), var(--hw-green), var(--hw-orange));
  background-size: 300% 100%;
  animation: hw-shimmer 6s linear infinite;
  z-index: 3;
}
@keyframes hw-shimmer { to { background-position: 300% 0; } }

/* telaraña decorativa en la esquina superior derecha (dentro del header) */
.halloween header::after {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 80px; height: 80px;
  background:
    repeating-conic-gradient(from 0deg at 100% 0%, rgba(255,255,255,.18) 0deg 1deg, transparent 1deg 30deg),
    repeating-radial-gradient(circle at 100% 0%, transparent 0 12px, rgba(255,255,255,.14) 12px 13px);
  pointer-events: none;
  z-index: 1;
}

/* ---- Marca / logo ---- */
.halloween .brand { position: relative; z-index: 4; color: #fff; }
.halloween .brand-title { color: #fff; text-shadow: 0 2px 10px rgba(255,117,24,.55); }
.halloween .brand-title small { color: var(--hw-orange); letter-spacing: .14em; }

.halloween .crest-wrapper {
  background: radial-gradient(circle at 50% 30%, #1a0f2b, #0a0510);
  border: 1px solid var(--hw-orange);
  box-shadow: 0 0 14px rgba(255,117,24,.6);
}

/* calabaza junto al logo (el murciélago vuela aparte, ver más abajo) */
.halloween .brand::after {
  content: "🎃";
  margin-left: .35rem;
  font-size: 1.15rem;
  filter: drop-shadow(0 0 6px rgba(255,117,24,.7));
}

/* murciélago grande que CRUZA VOLANDO el header de lado a lado */
.halloween .nav-container { position: relative; }
.halloween .nav-container::after {
  content: "🦇";
  position: absolute;
  top: 10%;
  left: 0;
  font-size: 1.9rem;
  pointer-events: none;
  z-index: 5;
  animation: hw-cruza 16s linear infinite, hw-aletea 0.9s ease-in-out infinite;
}
@keyframes hw-cruza {
  0%   { left: -10%; top: 12%; }
  50%  { top: 50%; }
  100% { left: 108%; top: 12%; }
}
@keyframes hw-aletea {
  0%,100% { transform: scaleX(-1) rotate(-8deg); }
  50%     { transform: scaleX(-.85) rotate(8deg); }
}

/* ---- Menú ---- */
.halloween #menu a,
.halloween #menu .dropdown-toggle {
  color: #ece7f5;
}
.halloween #menu a:hover,
.halloween #menu .dropdown-toggle:hover {
  color: var(--hw-orange);
}
.halloween .menu-toggle { color: var(--hw-orange); }

/* desplegables oscuros */
.halloween .dropdown-menu {
  background: linear-gradient(160deg, #140a22, #0a0510);
  border: 1px solid var(--hw-purple);
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
}
.halloween .dropdown-menu a { color: #ddd3ee; }
.halloween .dropdown-menu a:hover { color: var(--hw-orange); background: rgba(255,117,24,.08); }

/* "En directo" con brillo verde tóxico */
.halloween .nav-live { color: var(--hw-green) !important; }
.halloween .nav-live .live-dot { background: var(--hw-green); box-shadow: 0 0 8px var(--hw-green); }

/* botón Inscríbete en naranja calabaza */
.halloween .nav-highlight {
  background: linear-gradient(135deg, var(--hw-orange), #c2410c) !important;
  color: #140a22 !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(255,117,24,.45);
}
.halloween .nav-highlight:hover { filter: brightness(1.08); }


/* ==========================================================================
   ARAÑA COLGANTE (solo con .halloween) — baja colgando de un hilo desde arriba
   y vuelve a subir, en bucle. Overlay fijo, no bloquea clics.
   ========================================================================== */
.halloween .arana-hilo {
  position: fixed;
  top: 0;
  right: 14%;
  width: 2px;
  z-index: 9998;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  animation: hw-arana-baja 7s ease-in-out infinite, hw-arana-mece 3s ease-in-out infinite;
}
/* variantes: distinta posición, longitud de hilo, tamaño y ritmo */
.halloween .arana-hilo.a1 { right: 14%; animation-duration: 7s, 3s;  }
.halloween .arana-hilo.a2 { right: 42%; animation-duration: 9s, 3.6s; }
.halloween .arana-hilo.a3 { left: 22%; right: auto; animation-duration: 6s, 2.6s; }
.halloween .arana-hilo.a4 { left: 8%;  right: auto; animation-duration: 10s, 4s; }
.halloween .arana-hilo.a2::before { height: 170px; }
.halloween .arana-hilo.a3::before { height: 90px; }
.halloween .arana-hilo.a4::before { height: 210px; }
.halloween .arana-hilo.a3::after { font-size: 1.3rem; }
.halloween .arana-hilo.a4::after { font-size: 2rem; }
/* el hilo */
.halloween .arana-hilo::before {
  content: "";
  width: 2px;
  height: 120px;
  background: linear-gradient(to bottom, rgba(255,255,255,.65), rgba(255,255,255,.15));
}
/* la araña al final del hilo */
.halloween .arana-hilo::after {
  content: "🕷️";
  font-size: 1.7rem;
  margin-top: -4px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}

/* baja y sube (longitud del hilo mediante translateY del conjunto) */
@keyframes hw-arana-baja {
  0%   { transform: translateY(-150px); }
  45%  { transform: translateY(40px); }
  55%  { transform: translateY(40px); }
  100% { transform: translateY(-150px); }
}
/* leve balanceo lateral del hilo */
@keyframes hw-arana-mece {
  0%,100% { margin-right: 0; }
  50%     { margin-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .halloween .arana-hilo { animation: none; transform: translateY(10px); }
}


/* Asegura que la cabecera y los desplegables queden POR ENCIMA de los overlays
   decorativos (nieve/araña) para que el menú no quede tapado ni recortado. */
.halloween header { z-index: 10000; }
.halloween .dropdown-menu { z-index: 10001; }


/* Menú móvil (desplegable a pantalla): fondo oscuro para que se lean los textos. */
@media (max-width: 768px) {
  .halloween nav {
    background: linear-gradient(160deg, #140a22 0%, #0a0510 100%);
    border-bottom: 2px solid var(--hw-orange);
  }
  .halloween #menu a,
  .halloween #menu .dropdown-toggle { color: #ece7f5; }
  .halloween #menu a:hover,
  .halloween #menu .dropdown-toggle:hover { color: var(--hw-orange); }
  .halloween .dropdown-menu { border-left-color: var(--hw-orange); background: transparent; }
}
