/* Animation Definitions */

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@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;
  }
}

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

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

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

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(255, 107, 53, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
  }
}

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

.animate-fade-in-down {
  animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out;
}

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

.animate-scale-in {
  animation: scaleIn 0.6s ease-out;
}

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

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

.animate-bounce {
  animation: bounce 1s ease-in-out;
}

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

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

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

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

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

/* Animation Delays */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }
.animate-delay-600 { animation-delay: 0.6s; }
.animate-delay-700 { animation-delay: 0.7s; }
.animate-delay-800 { animation-delay: 0.8s; }
.animate-delay-900 { animation-delay: 0.9s; }
.animate-delay-1000 { animation-delay: 1s; }

/* Animation Durations */
.animate-duration-200 { animation-duration: 0.2s; }
.animate-duration-300 { animation-duration: 0.3s; }
.animate-duration-400 { animation-duration: 0.4s; }
.animate-duration-500 { animation-duration: 0.5s; }
.animate-duration-600 { animation-duration: 0.6s; }
.animate-duration-700 { animation-duration: 0.7s; }
.animate-duration-800 { animation-duration: 0.8s; }
.animate-duration-900 { animation-duration: 0.9s; }
.animate-duration-1000 { animation-duration: 1s; }

/* Animation Timing Functions */
.animate-ease-linear { animation-timing-function: linear; }
.animate-ease-in { animation-timing-function: ease-in; }
.animate-ease-out { animation-timing-function: ease-out; }
.animate-ease-in-out { animation-timing-function: ease-in-out; }
.animate-ease-back { animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* Scroll-triggered Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.animate-on-scroll.fade-in-left {
  transform: translateX(-30px);
}

.animate-on-scroll.fade-in-left.animate-in {
  transform: translateX(0);
}

.animate-on-scroll.fade-in-right {
  transform: translateX(30px);
}

.animate-on-scroll.fade-in-right.animate-in {
  transform: translateX(0);
}

.animate-on-scroll.scale-in {
  transform: scale(0.9);
}

.animate-on-scroll.scale-in.animate-in {
  transform: scale(1);
}

/* Hover Animations */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.hover-rotate:hover {
  transform: rotate(5deg);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(26, 35, 126, 0.3);
}

/* Loading Animations */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: loadingDots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes loadingDots {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Entrance Animations for Different Elements */
.animate-hero-title {
  animation: fadeInUp 0.8s ease-out;
}

.animate-hero-subtitle {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.animate-hero-description {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.animate-hero-button {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.animate-service-card:nth-child(1) {
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.animate-service-card:nth-child(2) {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.animate-service-card:nth-child(3) {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.animate-advantage-card:nth-child(1) {
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.animate-advantage-card:nth-child(2) {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.animate-advantage-card:nth-child(3) {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Animation Utilities */
.animate-none {
  animation: none !important;
}

.animate-infinite {
  animation-iteration-count: infinite;
}

.animate-once {
  animation-iteration-count: 1;
}

.animate-paused {
  animation-play-state: paused;
}

.animate-running {
  animation-play-state: running;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-fade-in-up,
  .animate-fade-in-down,
  .animate-fade-in-left,
  .animate-fade-in-right,
  .animate-fade-in,
  .animate-scale-in,
  .animate-slide-in-up,
  .animate-slide-in-down,
  .animate-bounce,
  .animate-pulse,
  .animate-float,
  .animate-shake,
  .animate-spin,
  .animate-glow {
    animation: none !important;
    transition: none !important;
  }
  
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
  
  .hover-lift:hover,
  .hover-scale:hover,
  .hover-rotate:hover {
    transform: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}