/* ═══════════ Navidad — Clínica Alejandría ═══════════
   Paleta sobria: azul noche, dorado champaña y marfil.
   Todo es decorativo: no recibe clics (salvo el enlace, el trineo y el botón). */

:root {
  --nav-noche: #0c1a31;
  --nav-noche-2: #16305a;
  --nav-oro: #c9a86a;
  --nav-oro-claro: #f3e3b5;
  --nav-oro-oscuro: #a9813a;
  --nav-marfil: #fffdf8;
  --nav-serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
}

/* ── Nieve ── */
.navidad-nieve {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ── Franja "Felices fiestas" (arriba del encabezado) ── */
.navidad-franja {
  position: relative;
  z-index: 60;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background:
    radial-gradient(ellipse 60% 140% at 50% 0%, rgba(201, 168, 106, .16), transparent 70%),
    linear-gradient(90deg, var(--nav-noche), var(--nav-noche-2) 50%, var(--nav-noche));
  border-bottom: 1px solid rgba(201, 168, 106, .55);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
}
.navidad-franja p {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  line-height: 1;
}
.navidad-franja .nf-titulo {
  font-family: var(--nav-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 21px;
  letter-spacing: .01em;
  background: linear-gradient(100deg, #b98f45 0%, #f6e6bd 22%, #d8b46b 40%, #fff4d6 50%, #c9a35a 62%, #f3e3b5 80%, #b98f45 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: nav-brillo-texto 7s ease-in-out infinite;
}
.navidad-franja .nf-sep { display: inline-flex; width: 9px; color: var(--nav-oro); opacity: .85; }
.navidad-franja .nf-sep svg { width: 100%; height: auto; display: block; }
.navidad-franja .nf-texto {
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(243, 227, 181, .82);
}
.navidad-franja a {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(201, 168, 106, .7);
  border-radius: 999px;
  transition: background .25s, color .25s;
}
.navidad-franja a:hover,
.navidad-franja a:focus-visible { background: var(--nav-oro); color: var(--nav-noche); }
@keyframes nav-brillo-texto {
  0%, 100% { background-position: 100% 0; }
  50%      { background-position: 0 0; }
}

/* Estrellitas que titilan en la franja */
.nf-estrellas { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.nf-estrellas i {
  position: absolute;
  display: block;
  color: var(--nav-oro-claro);
  opacity: .15;
  transform: translate(-50%, -50%) scale(.6);
  animation: nav-titila 4.2s ease-in-out infinite;
}
.nf-estrellas svg { width: 100%; height: auto; display: block; }
@keyframes nav-titila {
  0%, 100% { opacity: .12; transform: translate(-50%, -50%) scale(.5); }
  50%      { opacity: .9;  transform: translate(-50%, -50%) scale(1); }
}

/* Esferas colgantes (solo en pantallas grandes, a la derecha) */
.navidad-esferas {
  position: absolute;
  top: 100%;
  right: max(18px, 2.2vw);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}
.navidad-esferas .esfera {
  display: block;
  transform-origin: 50% 0;
  animation: nav-mece 6s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 6px rgba(12, 26, 49, .18));
}
.navidad-esferas svg { display: block; }
@keyframes nav-mece {
  from { transform: rotate(-3.5deg); }
  to   { transform: rotate(3.5deg); }
}
@media (max-width: 1299px) { .navidad-esferas { display: none; } }

@media (max-width: 767px) {
  .navidad-franja { height: 36px; }
  .navidad-franja p { gap: 10px; }
  .navidad-franja .nf-titulo { font-size: 18px; }
  .navidad-franja .nf-sep, .navidad-franja .nf-texto { display: none; }
  .navidad-franja a { font-size: 9.5px; letter-spacing: .12em; padding: 5px 11px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .navidad-franja .nf-texto { display: none; }
}

/* ── Destello dorado en el logo ── */
.navidad-logo { position: relative; display: inline-block; }
.navidad-brillo {
  position: absolute;
  left: -9px;
  top: -8px;
  width: 16px;
  color: var(--nav-oro);
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(233, 196, 120, .8));
  animation: nav-destella 3.6s ease-in-out infinite;
}
.navidad-brillo.b2 { left: auto; right: -2px; top: auto; bottom: 18%; width: 10px; animation-delay: -1.8s; }
.navidad-brillo svg { width: 100%; height: auto; display: block; }
@keyframes nav-destella {
  0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); }
  45%, 55% { opacity: 1; transform: scale(1) rotate(45deg); }
}

/* ── Trineo dorado de Papá Noel ── */
.navidad-trineo {
  position: fixed;
  left: 0;
  top: 16vh;
  width: 270px;
  z-index: 1001;
  cursor: pointer;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.navidad-trineo .vuelo { animation: nav-flota 2.2s ease-in-out infinite alternate; }
.navidad-trineo svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(246, 220, 160, .55)) drop-shadow(0 6px 10px rgba(12, 26, 49, .22));
}
.navidad-trineo .patas-adelante,
.navidad-trineo .patas-atras { transform-box: fill-box; animation: nav-galope .55s ease-in-out infinite alternate; }
.navidad-trineo .patas-adelante { transform-origin: 0% 0%; }
.navidad-trineo .patas-atras { transform-origin: 100% 0%; animation-direction: alternate-reverse; }
@keyframes nav-flota  { from { transform: translateY(-4px); } to { transform: translateY(5px); } }
@keyframes nav-galope { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@media (max-width: 767px) { .navidad-trineo { width: 175px; } }

/* Estela de polvo de estrellas */
.navidad-polvo {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  background: radial-gradient(circle, #fffaf0 0%, #f1d595 45%, rgba(214, 177, 100, 0) 72%);
  animation: nav-polvo 2.2s ease-out forwards;
}
.navidad-polvo.estrella { background: none; border-radius: 0; color: #f3dca4; filter: drop-shadow(0 0 3px rgba(246, 220, 160, .9)); }
.navidad-polvo.estrella svg { width: 100%; height: 100%; display: block; }
@keyframes nav-polvo {
  0%   { opacity: 0; transform: translate(0, 0) scale(.6); }
  12%  { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, -30px), var(--dy, 30px)) scale(.25) rotate(60deg); }
}

/* ── Mensaje al tocar el trineo ── */
.navidad-mensaje {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 160%);
  width: min(92vw, 400px);
  z-index: 1002;
  text-align: center;
  background: var(--nav-marfil);
  color: #2a2a2a;
  border-radius: 16px;
  padding: 30px 28px 26px;
  box-shadow: 0 24px 60px rgba(12, 26, 49, .25), 0 0 0 1px rgba(201, 168, 106, .45);
  font-family: "Poppins", system-ui, sans-serif;
  transition: transform .55s cubic-bezier(.2, .8, .25, 1);
}
.navidad-mensaje::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(201, 168, 106, .35);
  border-radius: 11px;
  pointer-events: none;
}
.navidad-mensaje.visible { transform: translate(-50%, 0); }
.navidad-mensaje .nm-estrella { display: block; width: 18px; margin: 0 auto 8px; color: var(--nav-oro); }
.navidad-mensaje .nm-estrella svg { width: 100%; height: auto; display: block; }
.navidad-mensaje strong {
  display: block;
  font-family: var(--nav-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  color: var(--nav-noche-2);
  margin-bottom: 10px;
}
.navidad-mensaje p { margin: 0 auto 18px; max-width: 300px; font-size: .9rem; line-height: 1.6; color: #5b5b5b; }
.navidad-mensaje a {
  position: relative;
  display: inline-block;
  background: var(--nav-noche-2);
  color: var(--nav-oro-claro);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .25s;
}
.navidad-mensaje a:hover { background: var(--nav-noche); color: #fff; }
.navidad-mensaje button {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #a39684;
  cursor: pointer;
  padding: 4px;
}

/* ── Botón para pausar / activar ── */
.navidad-boton {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1001;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 253, 248, .94);
  color: var(--nav-oro-oscuro);
  border: 1px solid rgba(201, 168, 106, .75);
  box-shadow: 0 6px 18px rgba(12, 26, 49, .16);
  transition: transform .2s, color .2s, border-color .2s;
}
.navidad-boton:hover { transform: scale(1.06); }
.navidad-boton:focus-visible { outline: 2px solid var(--nav-oro); outline-offset: 3px; }
.navidad-boton svg { width: 20px; height: 20px; }
.navidad-boton[aria-pressed="false"] { color: #a7a7a7; border-color: #d8d8d8; }

/* Pausado o movimiento reducido: todo quieto */
.navidad-quieta .navidad-franja .nf-titulo,
.navidad-quieta .nf-estrellas i,
.navidad-quieta .navidad-esferas .esfera,
.navidad-quieta .navidad-brillo { animation: none; }
.navidad-quieta .nf-estrellas i { opacity: .5; transform: translate(-50%, -50%) scale(.8); }
.navidad-quieta .navidad-brillo { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .navidad-franja .nf-titulo, .nf-estrellas i, .navidad-esferas .esfera, .navidad-brillo,
  .navidad-trineo .vuelo, .navidad-trineo .patas-adelante, .navidad-trineo .patas-atras { animation: none; }
  .nf-estrellas i { opacity: .5; transform: translate(-50%, -50%) scale(.8); }
  .navidad-brillo { opacity: 0; }
}
