/* ADVANCED ANIMATIONS & MICRO-INTERACTIONS */

/* Page transitions */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  animation: pageEnter 0.6s ease-out;
}

/* Stagger animations for lists */
@keyframes staggerIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.value-card:nth-child(1) {
  animation: staggerIn 0.5s ease-out 0.1s backwards;
}

.value-card:nth-child(2) {
  animation: staggerIn 0.5s ease-out 0.2s backwards;
}

.value-card:nth-child(3) {
  animation: staggerIn 0.5s ease-out 0.3s backwards;
}

/* Hover effects */
.value-card:hover,
.use-case-card:hover,
.feature-text-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(18, 62, 115, 0.2);
}

/* Button interactions */
button:active,
.btn-header-primary:active,
.btn-header-secondary:active {
  transform: scale(0.98);
}

/* Link hover effects */
a:not(.header-link):not(.btn-header-primary):not(.btn-header-secondary):hover {
  color: #3fa66b;
  text-decoration: underline;
}

/* SVG icon animations */
svg {
  transition:
    transform 0.3s ease,
    fill 0.3s ease,
    stroke 0.3s ease;
}

.value-card:hover svg {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 4px 8px rgba(63, 166, 107, 0.3));
}

/* Image hover effects */
.details-image:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* Badge animations */
.badge-blink {
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.5;
  }
}

/* Section header animations */
section h2,
section h3 {
  animation: slideInLeft 0.6s ease-out;
}

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

/* Scroll reveal animations */
@keyframes revealOnScroll {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: revealOnScroll 0.8s ease-out forwards;
}

/* Loading animations */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s infinite;
}

/* Gradient animations */
@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gradient-animated {
  background: linear-gradient(-45deg, #123e73, #3fa66b, #0a2647, #123e73);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* CTA button pulse */
.cta-button {
  animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(63, 166, 107, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(63, 166, 107, 0);
  }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* Disable animations for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode animations */
@media (prefers-color-scheme: dark) {
  .gradient-animated {
    background: linear-gradient(-45deg, #0f172a, #3fa66b, #123e73, #0f172a);
  }
}
