/*
 * Animations Stylesheet for domain.com
 * CSS-only animations for enhanced user experience
 */

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

/* Stagger Children Animations */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children > *:nth-child(1) {
  animation: fadeInUp 0.5s ease forwards 0.1s;
}

.stagger-children > *:nth-child(2) {
  animation: fadeInUp 0.5s ease forwards 0.3s;
}

.stagger-children > *:nth-child(3) {
  animation: fadeInUp 0.5s ease forwards 0.5s;
}

.stagger-children > *:nth-child(4) {
  animation: fadeInUp 0.5s ease forwards 0.7s;
}

.stagger-children > *:nth-child(5) {
  animation: fadeInUp 0.5s ease forwards 0.9s;
}

.stagger-children > *:nth-child(6) {
  animation: fadeInUp 0.5s ease forwards 1.1s;
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Slide In Animation */
@keyframes slideIn {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in {
  animation: slideIn 0.8s ease forwards;
}

/* Spin Animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 20s linear infinite;
}

/* Float Animation */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

.float {
  animation: float 4s ease-in-out infinite;
}

/* Scale Animation */
@keyframes scale {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.scale {
  animation: scale 0.8s ease forwards;
}

/* Testimonials Carousel Animation */
@keyframes carousel {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(0);
  }
  33.33% {
    transform: translateX(-100%);
  }
  58.33% {
    transform: translateX(-100%);
  }
  66.66% {
    transform: translateX(-200%);
  }
  91.66% {
    transform: translateX(-200%);
  }
  100% {
    transform: translateX(0);
  }
}

.testimonials-auto-scroll .testimonials-track {
  animation: carousel 20s infinite;
}

/* Shimmer Animation for buttons */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.btn-shimmer {
  background-image: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.2) 50%, 
    rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* CSS-only checkbox animations */
.form-check-input {
  position: relative;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--medium-gray);
  border-radius: 4px;
  outline: none;
  transition: all 0.3s;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--deep-mint);
  border-color: var(--deep-mint);
}

.form-check-input:checked::before {
  content: '✓';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
}

/* Slide down animation for FAQ */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-item.active .faq-answer {
  animation: slideDown 0.3s ease forwards;
}

/* Loading animation for form submission */
@keyframes loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: loading 1s ease-in-out infinite;
  margin-left: 10px;
  vertical-align: middle;
}
