/* Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px var(--primary-color);
  }
  50% {
    box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
  }
}

@keyframes bounce {
  0%,
  20%,
  53%,
  80%,
  100% {
    transform: translateY(0);
  }
  40%,
  43% {
    transform: translateY(-8px);
  }
  70% {
    transform: translateY(-4px);
  }
  90% {
    transform: translateY(-2px);
  }
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
}

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

/* Base Animation Classes */
.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.animate-slide-in-up {
  animation: slideInUp 0.8s ease-out forwards;
}

.animate-slide-in-down {
  animation: slideInDown 0.8s ease-out forwards;
}

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

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

.animate-zoom-in {
  animation: zoomIn 1s ease-out forwards;
}

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

.animate-spin-slow {
  animation: spinSlow 20s linear infinite;
}

.animate-bounce-slow {
  animation: bounce 2s infinite;
}

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

/* Delay Classes */
.animate-delay-200 {
  animation-delay: 0.2s;
  opacity: 0;
}

.animate-delay-300 {
  animation-delay: 0.3s;
  opacity: 0;
}

.animate-delay-400 {
  animation-delay: 0.4s;
  opacity: 0;
}

.animate-delay-500 {
  animation-delay: 0.5s;
  opacity: 0;
}

.animate-delay-600 {
  animation-delay: 0.6s;
  opacity: 0;
}

.animate-delay-700 {
  animation-delay: 0.7s;
  opacity: 0;
}

.animate-delay-800 {
  animation-delay: 0.8s;
  opacity: 0;
}

.animate-delay-900 {
  animation-delay: 0.9s;
  opacity: 0;
}

.animate-delay-1000 {
  animation-delay: 1s;
  opacity: 0;
}

.animate-delay-1200 {
  animation-delay: 1.2s;
  opacity: 0;
}

/* Hover Animations */
.animate-bounce-hover:hover {
  animation: bounce 0.6s ease-in-out;
}

.animate-pulse-hover:hover {
  animation: pulse 0.6s ease-in-out;
}

.animate-glow-hover:hover {
  animation: glow 1s ease-in-out infinite;
}

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

.animate-scale-hover:hover {
  transform: scale(1.1);
}

.animate-card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.animate-card-hover:hover {
  transform: translateY(-10px);
  border: 1px solid #fff;
}

.animate-underline-hover {
  position: relative;
  transition: color 0.3s ease;
}

.animate-underline-hover::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.animate-underline-hover:hover::after {
  width: 100%;
}

/* Scroll-triggered animations - Updated */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animate-in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Individual element animations */
.program-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.courses-content > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.we-breath-content .flame-logo {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease-out;
}

.we-breath-content .we-breath-title,
.we-breath-content .we-breath-text {
  opacity: 0;
  /* transform: translateY(30px); */
  transition: all 0.6s ease-out;
}

.mentor-details .meet-mentor-wrapper,
.mentor-details h3,
.mentor-details .mentor-bio,
.mentor-details .read-more {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s ease-out;
}

.mentor-photo {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s ease-out;
}

.footer-column li,
.footer-column p,
.footer-column a {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease-out;
}

.pre-footer-content,
.pre-footer-apps {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

/* Enhanced delay classes for better staggering */
.animate-delay-200 {
  transition-delay: 0.2s;
}

.animate-delay-300 {
  transition-delay: 0.3s;
}

.animate-delay-400 {
  transition-delay: 0.4s;
}

.animate-delay-500 {
  transition-delay: 0.5s;
}

.animate-delay-600 {
  transition-delay: 0.6s;
}

.animate-delay-700 {
  transition-delay: 0.7s;
}

.animate-delay-800 {
  transition-delay: 0.8s;
}

.animate-delay-900 {
  transition-delay: 0.9s;
}

.animate-delay-1000 {
  transition-delay: 1s;
}

.animate-delay-1200 {
  transition-delay: 1.2s;
}

/* Enhanced button animations */
.cta-button,
.explore-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cta-button::before,
.explore-button::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;
}

.cta-button:hover::before,
.explore-button:hover::before {
  left: 100%;
}


/* Loading animation for images */
img {
  transition: opacity 0.3s ease;
}


img:not([src*="placeholder"]):loaded {
  opacity: 1;
}

/* Responsive animation adjustments */
@media (max-width: 768px) {
  .animate-slide-in-up,
  .animate-slide-in-down,
  .animate-slide-in-left,
  .animate-slide-in-right {
    animation-duration: 0.6s;
  }

  .animate-delay-300,
  .animate-delay-400,
  .animate-delay-500,
  .animate-delay-600,
  .animate-delay-700,
  .animate-delay-800,
  .animate-delay-900,
  .animate-delay-1000,
  .animate-delay-1200 {
    animation-delay: 0.1s;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
