/* ============================================================
   SYNERGY LIGHT - Animaciones
   ============================================================ */

/* ----- FADE IN / OUT ----- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ----- GLOW EFFECTS ----- */
@keyframes pulseGlow {
  0%, 100% { 
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    opacity: 1;
  }
  50% { 
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.6), 0 0 60px rgba(0, 255, 136, 0.2);
    opacity: 0.9;
  }
}

@keyframes glowPulse {
  0%, 100% { 
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
  }
  50% { 
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6), 0 0 40px rgba(0, 255, 136, 0.3);
  }
}

@keyframes borderGlow {
  0%, 100% { 
    border-color: rgba(0, 255, 136, 0.2);
  }
  50% { 
    border-color: rgba(0, 255, 136, 0.6);
  }
}

/* ----- LIGHTNING / ELECTRIC ----- */
@keyframes lightningFlash {
  0%, 90%, 96% { 
    opacity: 1;
    filter: brightness(1);
  }
  92% { 
    opacity: 0.3;
    filter: brightness(2);
  }
  94% { 
    opacity: 1;
    filter: brightness(1.5);
  }
}

@keyframes electricity {
  0%, 100% { opacity: 0.5; }
  10% { opacity: 1; }
  20% { opacity: 0.3; }
  30% { opacity: 0.8; }
  40% { opacity: 0.2; }
  50% { opacity: 0.9; }
  60% { opacity: 0.4; }
  70% { opacity: 0.7; }
  80% { opacity: 0.1; }
  90% { opacity: 0.6; }
}

/* ----- BOUNCE / FLOAT ----- */
@keyframes bounceDown {
  0%, 100%, 80% { 
    transform: translateX(-50%) translateY(0); 
  }
  85% { 
    transform: translateX(-50%) translateY(5px); 
  }
  90% { 
    transform: translateX(-50%) translateY(0); 
  }
  95% { 
    transform: translateX(-50%) translateY(3px); 
  }
}

@keyframes scrollDot {
  0% { 
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  100% { 
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
  }
}

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

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

/* ----- WHATSAPP ----- */
@keyframes whatsappPulse {
  0% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.1); }
  100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
}

/* ----- PARTICLES ----- */
@keyframes particleFloat {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

@keyframes particleDrift {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translate(100px, -100px); opacity: 0; }
}

/* ----- COUNTER ----- */
@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

/* ----- CARD ENTRANCE ----- */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ----- SPINNER / LOADING ----- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes loadingDot {
  0%, 80%, 100% { 
    opacity: 0; 
  }
  40% { 
    opacity: 1; 
  }
}

/* ----- SHIMMER / SKELETON ----- */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

/* ----- SLIDE ----- */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ----- ROTATE ----- */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ----- SCALE ----- */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.5);
  }
}

/* ----- HOVER ANIMATION CLASSES ----- */
.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.hover-scale {
  transition: all 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ----- STAGGER ANIMATIONS ----- */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ----- ANIMATION UTILITY CLASSES ----- */
.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease forwards;
}

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

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

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-shimmer {
  background: linear-gradient(90deg, 
    var(--dark-bg-secondary) 25%, 
    var(--dark-bg-tertiary) 50%, 
    var(--dark-bg-secondary) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* ----- REDUCED MOTION ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}