/* ========================================
   SCROLL ANIMATIONS - Sistema de Animaciones Modernas y Elegantes
   ======================================== */

/* Variables de animación */
:root {
  --animation-duration: 0.8s;
  --animation-delay: 0.1s;
  --animation-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --animation-distance: 50px;
}

/* Estado inicial de elementos animables */
[data-animate] {
  opacity: 0;
  transition: opacity var(--animation-duration) var(--animation-easing),
              transform var(--animation-duration) var(--animation-easing);
}

/* Fade In */
[data-animate="fade-in"] {
  opacity: 0;
}

[data-animate="fade-in"].animate-in {
  opacity: 1;
}

/* Fade Up - Elementos suben mientras aparecen */
[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(var(--animation-distance));
}

[data-animate="fade-up"].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Fade Down */
[data-animate="fade-down"] {
  opacity: 0;
  transform: translateY(calc(var(--animation-distance) * -1));
}

[data-animate="fade-down"].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Fade Left */
[data-animate="fade-left"] {
  opacity: 0;
  transform: translateX(var(--animation-distance));
}

[data-animate="fade-left"].animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* Fade Right */
[data-animate="fade-right"] {
  opacity: 0;
  transform: translateX(calc(var(--animation-distance) * -1));
}

[data-animate="fade-right"].animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* Scale In - Elementos crecen mientras aparecen */
[data-animate="scale-in"] {
  opacity: 0;
  transform: scale(0.9);
}

[data-animate="scale-in"].animate-in {
  opacity: 1;
  transform: scale(1);
}

/* Zoom In */
[data-animate="zoom-in"] {
  opacity: 0;
  transform: scale(0.8);
}

[data-animate="zoom-in"].animate-in {
  opacity: 1;
  transform: scale(1);
}

/* Slide In Left */
[data-animate="slide-left"] {
  opacity: 0;
  transform: translateX(100px);
}

[data-animate="slide-left"].animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* Slide In Right */
[data-animate="slide-right"] {
  opacity: 0;
  transform: translateX(-100px);
}

[data-animate="slide-right"].animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* Flip In */
[data-animate="flip-in"] {
  opacity: 0;
  transform: perspective(1000px) rotateY(-20deg);
  transform-style: preserve-3d;
}

[data-animate="flip-in"].animate-in {
  opacity: 1;
  transform: perspective(1000px) rotateY(0);
}

/* Delays escalonados para múltiples elementos */
[data-delay="1"] { transition-delay: calc(var(--animation-delay) * 1) !important; }
[data-delay="2"] { transition-delay: calc(var(--animation-delay) * 2) !important; }
[data-delay="3"] { transition-delay: calc(var(--animation-delay) * 3) !important; }
[data-delay="4"] { transition-delay: calc(var(--animation-delay) * 4) !important; }
[data-delay="5"] { transition-delay: calc(var(--animation-delay) * 5) !important; }
[data-delay="6"] { transition-delay: calc(var(--animation-delay) * 6) !important; }
[data-delay="7"] { transition-delay: calc(var(--animation-delay) * 7) !important; }
[data-delay="8"] { transition-delay: calc(var(--animation-delay) * 8) !important; }

/* Animaciones de Hero Section */
.hero-content {
  animation: heroFadeIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

/* Animación de texto con efecto de typing */
.hero-title {
  animation: titleReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
  opacity: 0;
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
    letter-spacing: 10px;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: normal;
  }
}

/* Animación de subtítulo */
.hero-subtitle {
  animation: subtitleReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
  opacity: 0;
}

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

/* Animación de botones del hero */
.hero-buttons {
  animation: buttonsReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.9s forwards;
  opacity: 0;
}

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

/* Animación de badge/tag */
.hero-badge {
  animation: badgeReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
  opacity: 0;
}

@keyframes badgeReveal {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Efecto de línea divisoria animada */
.divider-animated {
  position: relative;
  overflow: hidden;
}

.divider-animated::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d3d801, transparent);
  animation: dividerSlide 2s ease-in-out infinite;
}

@keyframes dividerSlide {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Animación de cards con hover mejorado */
.card-animate {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-animate:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Efecto de parallax suave para imágenes */
.parallax-image {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animación de números/contadores */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.counter-animate {
  animation: countUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Efecto de brillo en hover para botones */
.button-shine {
  position: relative;
  overflow: hidden;
}

.button-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.button-shine:hover::before {
  left: 100%;
}

/* Animación de ondas para secciones */
@keyframes wave {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.wave-animate {
  animation: wave 3s ease-in-out infinite;
}

/* Efectos de texto brillante */
.text-glow {
  text-shadow: 0 0 20px rgba(211, 216, 1, 0.5),
               0 0 40px rgba(211, 216, 1, 0.3);
  transition: text-shadow 0.3s ease;
}

.text-glow:hover {
  text-shadow: 0 0 30px rgba(211, 216, 1, 0.8),
               0 0 60px rgba(211, 216, 1, 0.5);
}

/* Animación de loading sutil */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse-animate {
  animation: pulse-slow 3s ease-in-out infinite;
}

/* Transición suave para todos los enlaces */
a {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mejora de rendimiento */
[data-animate],
.hero-content,
.hero-title,
.hero-subtitle,
.hero-buttons,
.hero-badge {
  will-change: opacity, transform;
}

/* Reducir animaciones en dispositivos con preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Animaciones específicas para móvil - más sutiles */
@media (max-width: 768px) {
  :root {
    --animation-distance: 30px;
    --animation-duration: 0.6s;
  }
  
  .card-animate:hover {
    transform: translateY(-4px);
  }
}



