/* =========================================================
   Temas especiales (Gestor > Web > Temas especiales)
   El granate y el escudo no cambian nunca.
   - Temas con colores (8M, octubre rosa): cambian el acento (--oro), franja y línea bajo el menú.
   - Navidad: conserva los colores del club y pone adornos (copos cayendo, guirnalda de luces
     bajo el menú y nieve sobre los bloques y el pie).
   ========================================================= */

/* Franja con el mensaje del tema, encima del menú (se va al bajar; el menú se queda fijo). */
.tema-franja { background: var(--tema-franja, var(--azul)); color: #fff; font-size: 15px; font-weight: 600; line-height: 1.35; }
.tema-franja__inner { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; text-align: center; }
.tema-franja__dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--oro); box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.tema-franja a { color: #fff; text-decoration: underline; text-decoration-color: var(--oro); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tema-franja a:hover { color: #fff; text-decoration-color: #fff; }
.tema--adornos .tema-franja__dot { width: auto; height: auto; background: none; box-shadow: none; color: var(--oro); font-size: 16px; line-height: 1; }
.tema--adornos .tema-franja__dot::before { content: '\2605'; }

/* Línea del color del tema bajo el menú (solo temas que cambian los colores). */
body.tema--colores .nav { box-shadow: 0 4px 0 var(--oro); }

/* ---------- Navidad: guirnalda de luces colgando bajo el menú ---------- */
.tema-guirnalda {
  position: absolute; left: 0; right: 0; bottom: -18px; height: 22px; pointer-events: none; z-index: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='22' viewBox='0 0 72 22'%3E%3Cpath d='M0 1 Q6 9 12 9 Q18 9 24 1 Q30 9 36 9 Q42 9 48 1 Q54 9 60 9 Q66 9 72 1' fill='none' stroke='%232A1A1E' stroke-width='1.6'/%3E%3Crect x='10.4' y='8' width='3.2' height='3' rx='.6' fill='%232A1A1E'/%3E%3Cellipse cx='12' cy='15' rx='3.4' ry='4.6' fill='%23F2B33D'/%3E%3Crect x='34.4' y='8' width='3.2' height='3' rx='.6' fill='%232A1A1E'/%3E%3Cellipse cx='36' cy='15' rx='3.4' ry='4.6' fill='%23FFFFFF'/%3E%3Crect x='58.4' y='8' width='3.2' height='3' rx='.6' fill='%232A1A1E'/%3E%3Cellipse cx='60' cy='15' rx='3.4' ry='4.6' fill='%23FF5A6E'/%3E%3C/svg%3E") repeat-x 0 0 / 72px 22px;
  filter: drop-shadow(0 0 3px rgba(255, 214, 120, .55));
  animation: tema-luces 2.4s steps(3) infinite;
}
@keyframes tema-luces { to { background-position: 72px 0; } }

/* ---------- Navidad: nieve sobre los bloques destacados, la ficha de la cabecera y el pie ---------- */
.tema--adornos .promo-card { position: relative; overflow: hidden; }
.tema--adornos .tile::before,
.tema--adornos .promo-card::before,
.tema--adornos .footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 16px; z-index: 2; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16' viewBox='0 0 120 16'%3E%3Cpath d='M0 0 H120 V6 Q112 14 102 8 Q92 15 82 7 Q70 15 58 8 Q46 14 36 7 Q24 15 14 8 Q6 13 0 6 Z' fill='%23FFFFFF'/%3E%3Cpath d='M120 6 Q112 14 102 8 Q92 15 82 7 Q70 15 58 8 Q46 14 36 7 Q24 15 14 8 Q6 13 0 6' fill='none' stroke='%2313213F' stroke-opacity='.12' stroke-width='1'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 16px;
}
.tema--adornos .tile--blanco::before { filter: drop-shadow(0 1px 0 rgba(19, 33, 63, .08)); }

/* ---------- Copos cayendo por toda la página (no tapan los clics) ---------- */
.tema-nieve { position: fixed; inset: 0; z-index: 55; pointer-events: none; overflow: hidden; }
.tema-nieve span {
  position: absolute; top: -40px; left: var(--x); font-size: var(--s); line-height: 1; color: #fff; opacity: var(--o);
  text-shadow: 0 0 3px rgba(19, 33, 63, .45);
  animation: tema-cae var(--d) linear var(--w) infinite; will-change: transform;
}
@keyframes tema-cae {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%  { transform: translate3d(var(--sx), 55vh, 0) rotate(180deg); }
  100% { transform: translate3d(0, calc(100vh + 60px), 0) rotate(360deg); }
}

/* Granito: el complemento se ve aunque cambie de cara. */
.granito-svg .gs-tema { display: inline; }

/* Aviso de vista previa (solo con el enlace firmado del gestor). */
.tema-vista { position: sticky; top: 0; z-index: 60; background: #FFF4DA; color: #6E4A00; font-weight: 700; font-size: 14px; text-align: center; padding: 8px 16px; }

@media (max-width: 640px) {
  .tema-franja { font-size: 14px; }
  .tema-franja__dot { display: none; }
  .tema-nieve span:nth-child(n+17) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tema-guirnalda { animation: none; }
  .tema-nieve { display: none; }
}
