/* Animations */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-25%);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-2rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(2rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation Classes */
.animate-bounce {
  animation: bounce 2s infinite;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-gradient {
  background-size: 200% 100%;
  animation: gradient 3s ease infinite;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* Floating Elements */
.floating-element {
  position: absolute;
  border-radius: var(--radius-full);
  opacity: 0.2;
}

.floating-element-1 {
  top: 5rem;
  left: 2.5rem;
  width: 5rem;
  height: 5rem;
  background: var(--primary-200);
  animation: bounce 2s infinite;
}

.floating-element-2 {
  bottom: 5rem;
  right: 2.5rem;
  width: 4rem;
  height: 4rem;
  background: var(--purple-200);
  animation: bounce 2s infinite;
  animation-delay: 1s;
}

/* Hero Badge Animation */
.hero-badge {
  animation: pulse 2s infinite;
}

/* Button Hover Effects */
.btn-primary:hover .fa-chevron-right {
  transform: translateX(0.25rem);
  transition: transform var(--transition-fast);
}

/* Course Card Hover Effects */
.course-card:hover .btn-course {
  transform: scale(1.05);
}

/* Intersection Observer Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(2rem);
  transition: all 0.6s ease-out;
}

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

.slide-in-left {
  opacity: 0;
  transform: translateX(-2rem);
  transition: all 0.6s ease-out;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(2rem);
  transition: all 0.6s ease-out;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger animations for multiple elements */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* Hover state improvements */
.course-card:hover .course-image {
  transform: scale(1.02);
  transition: transform var(--transition-slow);
}

.feature-card:hover .feature-title {
  color: var(--primary-600);
  transition: color var(--transition-fast);
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
