/* Smooth Scroll Animations */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@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);
  }
}

/* Service Card Animations */
.services-grid > div {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.services-grid > div:nth-child(1) { animation-delay: 0.1s; }
.services-grid > div:nth-child(2) { animation-delay: 0.2s; }
.services-grid > div:nth-child(3) { animation-delay: 0.3s; }
.services-grid > div:nth-child(4) { animation-delay: 0.4s; }
.services-grid > div:nth-child(5) { animation-delay: 0.5s; }
.services-grid > div:nth-child(6) { animation-delay: 0.6s; }
.services-grid > div:nth-child(7) { animation-delay: 0.7s; }
.services-grid > div:nth-child(8) { animation-delay: 0.8s; }
.services-grid > div:nth-child(9) { animation-delay: 0.9s; }

/* Accordion animations */
.accordions article {
  animation: slideInRight 0.5s ease-out;
}

/* Button animations */
a[style*="padding: 15px 40px"],
a[style*="padding: 12px"],
.btn {
  transition: all 0.3s ease;
}

a[style*="padding: 15px 40px"]:hover,
a[style*="padding: 12px"]:hover {
  animation: none;
}

/* Section fade-in on scroll */
section {
  animation: fadeInUp 0.7s ease-out;
}

/* Page heading animation */
.page-heading {
  animation: fadeInUp 0.8s ease-out;
}

.page-heading h2 {
  animation: slideInLeft 0.6s ease-out 0.2s both;
}

.page-heading p {
  animation: slideInLeft 0.6s ease-out 0.4s both;
}

/* Hero section animations */
.hero-content h1 {
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-content p {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-content .buttons {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Staggered item animations */
.row > [class*="col-"] {
  animation: fadeInUp 0.5s ease-out;
}

/* Text animation for descriptions */
p {
  animation: fadeInUp 0.6s ease-out;
}

/* Icon animations */
i.fas {
  transition: all 0.3s ease;
}

/* Reduce animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Mobile animation adjustments */
@media (max-width: 767px) {
  .services-grid > div {
    animation-duration: 0.4s;
  }

  section {
    animation-duration: 0.4s;
  }

  .page-heading h2,
  .page-heading p {
    animation-duration: 0.4s;
  }
}
