/* ===== CSS ANIMATIONS ===== */

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide in from left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide in from right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Pulse animation for WhatsApp button */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Bounce animation */
@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -10px, 0);
  }
  70% {
    transform: translate3d(0, -5px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

/* Rotate animation for geometric shapes */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== ANIMATION CLASSES ===== */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-right {
  animation: slideInRight 0.8s ease-out forwards;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

/* ===== HOVER ANIMATIONS ===== */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ===== WHATSAPP PULSE ANIMATION ===== */
.whatsapp-float a {
  animation: pulse 2s infinite;
}

.whatsapp-float a:hover {
  animation: none;
}

/* ===== GEOMETRIC SHAPES ANIMATION ===== */
.geometric-shape {
  animation: rotate 20s linear infinite;
}

.shape-1 {
  animation-duration: 25s;
  animation-direction: reverse;
}

.shape-2 {
  animation-duration: 30s;
}

.shape-3 {
  animation-duration: 20s;
  animation-direction: reverse;
}

/* ===== LOADING ANIMATIONS ===== */
.loading-skeleton {
  background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-50) 50%, var(--color-gray-100) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== SCROLL ANIMATIONS ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== BUTTON ANIMATIONS ===== */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* ===== FORM ANIMATIONS ===== */
.form-group {
  position: relative;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  transform: scale(1.02);
}

/* ===== NAVIGATION ANIMATIONS ===== */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ===== CARD ANIMATIONS ===== */
.card {
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

/* ===== STAGGER ANIMATIONS ===== */
.stagger-animation > * {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 0.6s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* ===== REDUCED MOTION OVERRIDES ===== */
@media (prefers-reduced-motion: reduce) {
  .geometric-shape {
    animation: none;
  }
  
  .whatsapp-float a {
    animation: none;
  }
  
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .stagger-animation > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}