/* Animations */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes moveBackground {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100% 100%;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* CSS-only Carousel Animation */
#testimonial-0:checked ~ .testimonial-slider .testimonial-item[data-index="0"],
#testimonial-1:checked ~ .testimonial-slider .testimonial-item[data-index="1"],
#testimonial-2:checked ~ .testimonial-slider .testimonial-item[data-index="2"] {
  display: block;
  animation: fadeIn 0.5s ease-in-out forwards;
}

#testimonial-0:checked ~ .carousel-indicators .indicator:nth-child(1),
#testimonial-1:checked ~ .carousel-indicators .indicator:nth-child(2),
#testimonial-2:checked ~ .carousel-indicators .indicator:nth-child(3) {
  background-color: var(--mint-green);
}

/* Section Animation */
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hover Effects */
.service-card:hover .service-icon img {
  animation: pulse 1s infinite;
}

.btn:hover {
  animation: pulse 0.5s forwards;
}

/* Mobile Menu Animation */
.menu-open .mobile-nav {
  animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Form Feedback Animation */
.form-success {
  animation: fadeIn 0.5s forwards;
}

.form-error {
  animation: shake 0.5s forwards;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}
