/* === ESTILOS NAVIDEÑOS === */

/* Animación de caída de nieve */
@keyframes snowfall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes rotate-slow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes glow-pulse {
  0%, 100% {
    text-shadow: 0 0 10px #ff0000, 0 0 20px #00ff00;
  }
  50% {
    text-shadow: 0 0 20px #ff0000, 0 0 30px #00ff00, 0 0 40px #ffff00;
  }
}

@keyframes pop-in {
  0% {
    transform: scale(0) translateY(50px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes slide-down {
  0% {
    transform: translateY(-30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Nieve de fondo */
.snowflake {
  position: fixed;
  top: -10vh;
  z-index: 1;
  user-select: none;
  cursor: default;
  color: #fff;
  font-size: 1em;
  font-family: Arial, sans-serif;
  text-shadow: 0 0 5px #fff;
  animation: snowfall linear infinite;
}

/* Christmas background using provided image */
body.christmas-mode {
  /* Layered background: subtle overlay gradient on top of the photo */
  background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.15)), url('uploads/fondo_nav.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  width: 100%;
  /* Use a lower stacking context so modal and snowflakes remain above */
  position: relative;
  z-index: 0;
}

html.christmas-mode {
  height: 100%;
  width: 100%;
}

/* keep subtle decorative radial highlights on top of the photo (non-blocking) */
body.christmas-mode::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,0,0,0.06) 0%, transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(0,255,0,0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Mobile: use different background image optimized for mobile screens */
@media (max-width: 768px) {
  body.christmas-mode {
    background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.15)), url('uploads/nav_celu.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    min-height: 100vh;
  }
  html.christmas-mode {
    height: 100%;
  }
}

/* Modal Popup Navideño */
.christmas-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fade-in 0.5s ease-in-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.christmas-popup {
  background: linear-gradient(135deg, #c41e3a 0%, #165b33 50%, #c41e3a 100%);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5), 
              inset 0 0 30px rgba(255, 255, 255, 0.1);
  border: 3px solid #ffd700;
  animation: pop-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.christmas-popup::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.05) 10px,
    rgba(255, 255, 255, 0.05) 20px
  );
  animation: slide-down 3s linear infinite;
}

.christmas-popup-content {
  position: relative;
  z-index: 1;
}

.christmas-tree {
  font-size: 80px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.ornament {
  display: inline-block;
  font-size: 30px;
  margin: 0 5px;
  animation: rotate-slow 4s linear infinite;
}

.christmas-title {
  font-size: 32px;
  font-weight: 900;
  color: #ffd700;
  margin: 20px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 
               0 0 15px rgba(255, 215, 0, 0.5);
  animation: glow-pulse 2s ease-in-out infinite;
  font-family: 'Arial Black', sans-serif;
  letter-spacing: 2px;
}

.christmas-text {
  font-size: 18px;
  color: #fff;
  margin: 15px 0;
  line-height: 1.6;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: 500;
}

.christmas-signature {
  font-size: 16px;
  color: #ffd700;
  margin-top: 20px;
  font-style: italic;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #ffd700;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c41e3a;
  font-weight: bold;
  transition: all 0.3s ease;
  z-index: 2;
}

.close-btn:hover {
  transform: scale(1.1) rotate(90deg);
  background: #fff;
}

/* Decoraciones navideñas en navbar */
.navbar.christmas-navbar {
  background: linear-gradient(90deg, #c41e3a 0%, #165b33 50%, #c41e3a 100%) !important;
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.4);
  position: relative;
}

.navbar.christmas-navbar::before,
.navbar.christmas-navbar::after {
  content: '🎄';
  position: absolute;
  font-size: 24px;
  top: 50%;
  transform: translateY(-50%);
  animation: float 3s ease-in-out infinite;
}

.navbar.christmas-navbar::before {
  left: 20px;
}

.navbar.christmas-navbar::after {
  right: 20px;
  content: '🎄';
}

/* Decoración de luces en enlaces */
.nav-link.christmas-link {
  color: #fff !important;
  position: relative;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-link.christmas-link:hover {
  text-shadow: 0 0 10px #ffd700, 0 0 20px #c41e3a;
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
  .christmas-popup {
    padding: 30px 20px;
    max-width: 90%;
  }

  .christmas-title {
    font-size: 24px;
  }

  .christmas-tree {
    font-size: 60px;
  }

  .christmas-text {
    font-size: 16px;
  }
}

/* Red theme variant for testing/alternate style */
.christmas-popup.red-theme {
  background: linear-gradient(135deg, #b30000 0%, #8b0000 50%, #b30000 100%);
  border-color: #ffdede;
  box-shadow: 0 10px 60px rgba(179, 0, 0, 0.6), inset 0 0 40px rgba(255, 255, 255, 0.03);
}
.christmas-popup.red-theme .christmas-title {
  color: #fff1f1;
  text-shadow: 0 0 12px rgba(255, 200, 200, 0.6);
}
.christmas-popup.red-theme .ornament {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
