/* Enhanced Animations for Better User Experience */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Enhanced fade-in animations with stagger */
.ai-stagger-1 { animation-delay: 0.1s; }
.ai-stagger-2 { animation-delay: 0.2s; }
.ai-stagger-3 { animation-delay: 0.3s; }
.ai-stagger-4 { animation-delay: 0.4s; }
.ai-stagger-5 { animation-delay: 0.5s; }

/* New animation keyframes */
@keyframes ai-bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(-50px);
  }
  50% {
    opacity: 1;
    transform: scale(1.05) translateY(-10px);
  }
  70% {
    transform: scale(0.9) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes ai-zoom-in {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ai-rotate-in {
  0% {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

@keyframes ai-flip-in {
  0% {
    opacity: 0;
    transform: perspective(1000px) rotateY(-90deg);
  }
  100% {
    opacity: 1;
    transform: perspective(1000px) rotateY(0deg);
  }
}

@keyframes ai-wave {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes ai-shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: 200px 0;
  }
}

/* Animation classes */
.ai-bounce-in {
  animation: ai-bounce-in 1s ease-out both;
}

.ai-zoom-in {
  animation: ai-zoom-in 0.8s ease-out both;
}

.ai-rotate-in {
  animation: ai-rotate-in 0.8s ease-out both;
}

.ai-flip-in {
  animation: ai-flip-in 1s ease-out both;
}

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

/* Hover effects */
.ai-hover-glow:hover {
  box-shadow: 0 0 20px rgba(79, 172, 254, 0.4);
  transition: box-shadow 0.3s ease;
}

.ai-hover-lift:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
}

.ai-hover-scale:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.ai-hover-rotate:hover {
  transform: rotate(5deg);
  transition: transform 0.3s ease;
}

/* Button animations */
.ai-button-pulse {
  position: relative;
  overflow: hidden;
}

.ai-button-pulse::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ai-button-pulse:hover::before {
  width: 300px;
  height: 300px;
}

/* Shimmer effect for loading states */
.ai-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(79, 172, 254, 0.2) 50%,
    transparent 100%
  );
  background-size: 200px 100%;
  animation: ai-shimmer 2s infinite;
}

/* Card animations */
.ai-card-entrance {
  animation: ai-slide-up 0.8s ease-out both;
}

.ai-card-entrance:nth-child(even) {
  animation: ai-slide-in-right 0.8s ease-out both;
}

.ai-card-entrance:nth-child(odd) {
  animation: ai-slide-in-left 0.8s ease-out both;
}

/* Section animations */
.ai-section-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.ai-section-fade.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Text reveal animation */
.ai-text-reveal {
  overflow: hidden;
  position: relative;
}

.ai-text-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #d4145a, #932091);
  transform: translateX(-100%);
  animation: ai-text-reveal 1.5s ease-out both;
  animation-delay: 0.5s;
}

@keyframes ai-text-reveal {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Image animations */
.ai-image-zoom {
  overflow: hidden;
}

.ai-image-zoom img {
  transition: transform 0.5s ease;
}

.ai-image-zoom:hover img {
  transform: scale(1.1);
}

/* Progress bar animation */
.ai-progress {
  width: 100%;
  height: 4px;
  background: rgba(79, 172, 254, 0.2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.ai-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(79, 172, 254, 0.8), transparent);
  animation: ai-slide-in-right 2s ease-in-out infinite;
}

/* Intersection Observer animations */
.ai-observe {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.ai-observe.ai-observed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ai-bounce-in,
  .ai-zoom-in,
  .ai-rotate-in,
  .ai-flip-in {
    animation-duration: 0.6s;
  }
  
  .ai-hover-lift:hover {
    transform: translateY(-3px);
  }
  
  .ai-hover-scale:hover {
    transform: scale(1.02);
  }
}

/* Accessibility: Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .ai-bounce-in,
  .ai-zoom-in,
  .ai-rotate-in,
  .ai-flip-in,
  .ai-wave,
  .ai-shimmer,
  .ai-section-fade,
  .ai-text-reveal::after,
  .ai-progress::after {
    animation: none !important;
    transition: none !important;
  }
  
  .ai-hover-lift:hover,
  .ai-hover-scale:hover,
  .ai-hover-rotate:hover {
    transform: none !important;
  }
}
