/* styles/animations.css */

/* Animaciones básicas */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes snowfall {
  0% {
    transform: translateY(-100px) translateX(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(20px) rotate(360deg);
    opacity: 0.3;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes sway {
  0%, 100% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(15px);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Contenedor de partículas de hielo/nieve */
.ice-particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 9999; /* Valor extremadamente alto */
  overflow: hidden;
}

/* Estilos base para partículas */
.ice-particle {
  position: absolute;
  pointer-events: none;
  z-index: 9999;
  will-change: transform, opacity;
}

/* Estilo para copos de nieve (forma estelar) */
.ice-particle.snowflake {
  width: 20px;
  height: 20px;
  background: transparent;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 3L10 5l2 2 2-2-2-2zM5 10L3 12l2 2 2-2-2-2zM19 10l-2 2 2 2 2-2-2-2zM12 19l-2 2 2 2 2-2-2-2zM7.5 7.5L6 6l1.5-1.5L9 6 7.5 7.5zM16.5 7.5L15 6l1.5-1.5L18 6l-1.5 1.5zM7.5 16.5L6 15l1.5-1.5L9 15l-1.5 1.5zM16.5 16.5L15 15l1.5-1.5L18 15l-1.5 1.5z"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  animation: snowfall 10s linear infinite, sway 3s ease-in-out infinite;
  opacity: 0.8;
}

/* Estilo para partículas redondas (gotas de hielo) */
.ice-particle.dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  animation: snowfall 8s linear infinite;
  opacity: 0.6;
}

@keyframes snowfall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) translateX(20px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes sway {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(15px);
  }
}

/* Clases de animación para elementos */
.fade-in {
  animation: fadeIn 1s ease forwards;
  opacity: 0;
}

.delay-1 {
  animation-delay: 0.3s;
}

.delay-2 {
  animation-delay: 0.6s;
}

.delay-3 {
  animation-delay: 0.9s;
}

.fade-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.active {
  opacity: 1;
  transform: translateY(0);
}

.pulse {
  animation: pulse 2s infinite ease-in-out;
}

.float {
  animation: float 4s infinite ease-in-out;
}

/* Animación del menú hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Efecto de brillo para partículas en hover (opcional) */
.ice-particle:hover {
  filter: brightness(1.2) blur(0.8px);
}