/* Animations Stylesheet */

/* Fade In Animation */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

.fade-in-delay-1 {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards 0.2s;
}

.fade-in-delay-2 {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards 0.4s;
}

.fade-in-delay-3 {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards 0.6s;
}

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

/* Fade In on Scroll */
.fade-in-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Button Hover Animation */
.cta-button, .submit-button {
  position: relative;
  overflow: hidden;
}

.cta-button::after, .submit-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.cta-button:hover::after, .submit-button:hover::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

/* Service Card Hover Animation */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: translateY(0);
}

/* Testimonial Slide Animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.testimonial-slide.active {
  animation: slideIn 0.5s ease forwards;
}

.testimonial-slide.leaving {
  animation: slideOut 0.5s ease forwards;
}

/* Form Input Focus Animation */
.form-group input:focus,
.form-group textarea:focus {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Header Scroll Animation */
.header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Social Icon Hover Animation */
.social-icons a img {
  transition: transform 0.3s ease;
}

.social-icons a:hover img {
  transform: scale(1.2);
}

/* Pulse Animation for Form Submit */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.submit-button.pulse {
  animation: pulse 1.5s infinite;
}