/* Animation styles */

/* Smooth fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* Staggered animation for children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(10px);
}

.stagger-children.animate > *:nth-child(1) {
  animation: fadeIn 0.4s ease forwards 0.1s;
}

.stagger-children.animate > *:nth-child(2) {
  animation: fadeIn 0.4s ease forwards 0.2s;
}

.stagger-children.animate > *:nth-child(3) {
  animation: fadeIn 0.4s ease forwards 0.3s;
}

.stagger-children.animate > *:nth-child(4) {
  animation: fadeIn 0.4s ease forwards 0.4s;
}

.stagger-children.animate > *:nth-child(5) {
  animation: fadeIn 0.4s ease forwards 0.5s;
}

.stagger-children.animate > *:nth-child(6) {
  animation: fadeIn 0.4s ease forwards 0.6s;
}

/* Pulse animation */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Underline animation */
.animated-underline {
  position: relative;
  display: inline-block;
}

.animated-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

.animated-underline:hover::after {
  width: 100%;
}

/* Button hover animation */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
  width: 300%;
  height: 300%;
}

/* Rotate animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate {
  animation: rotate 20s linear infinite;
}

/* Shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

.shimmer {
  background: 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;
}

/* Scale on scroll */
.scale-on-scroll {
  transform: scale(0.95);
  opacity: 0.8;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.scale-on-scroll.visible {
  transform: scale(1);
  opacity: 1;
}