/* Blur to Normal Animation Component */
@keyframes blurToNormal {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

/* Base animation class */
.animate-blur {
  animation: blurToNormal 0.8s ease-out forwards;
}

/* Staggered children animation */
.animate-blur-children > * {
  opacity: 0;
  animation: blurToNormal 0.8s ease-out forwards;
}

/* Delay utilities */
.delay-0 {
  animation-delay: 0s !important;
}
.delay-1 {
  animation-delay: 0.1s !important;
}
.delay-2 {
  animation-delay: 0.2s !important;
}
.delay-3 {
  animation-delay: 0.3s !important;
}
.delay-4 {
  animation-delay: 0.4s !important;
}
.delay-5 {
  animation-delay: 0.5s !important;
}

/* Duration utilities */
.duration-fast {
  animation-duration: 0.5s !important;
}
.duration-normal {
  animation-duration: 0.8s !important;
}
.duration-slow {
  animation-duration: 1.2s !important;
}

/* Auto stagger children (up to 10 items) */
.stagger-children > *:nth-child(1) {
  animation-delay: 0.1s;
}
.stagger-children > *:nth-child(2) {
  animation-delay: 0.2s;
}
.stagger-children > *:nth-child(3) {
  animation-delay: 0.3s;
}
.stagger-children > *:nth-child(4) {
  animation-delay: 0.4s;
}
.stagger-children > *:nth-child(5) {
  animation-delay: 0.5s;
}
.stagger-children > *:nth-child(6) {
  animation-delay: 0.6s;
}
.stagger-children > *:nth-child(7) {
  animation-delay: 0.7s;
}
.stagger-children > *:nth-child(8) {
  animation-delay: 0.8s;
}
.stagger-children > *:nth-child(9) {
  animation-delay: 0.9s;
}
.stagger-children > *:nth-child(10) {
  animation-delay: 1s;
}

/* Animation trigger on scroll */
.animate-on-scroll {
  opacity: 0;
  transition: all 0.8s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Scroll-triggered blur animations */
.animate-blur-on-scroll {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  transition: none;
}

.animate-blur-on-scroll.is-visible {
  animation: blurToNormal 0.8s ease-out forwards;
}

/* Scroll-triggered with delays */
.animate-blur-on-scroll.delay-0.is-visible {
  animation-delay: 0s;
}
.animate-blur-on-scroll.delay-1.is-visible {
  animation-delay: 0.1s;
}
.animate-blur-on-scroll.delay-2.is-visible {
  animation-delay: 0.2s;
}
.animate-blur-on-scroll.delay-3.is-visible {
  animation-delay: 0.3s;
}
.animate-blur-on-scroll.delay-4.is-visible {
  animation-delay: 0.4s;
}
.animate-blur-on-scroll.delay-5.is-visible {
  animation-delay: 0.5s;
}
.animate-blur-on-scroll.delay-6.is-visible {
  animation-delay: 0.6s;
}

/* Scroll-triggered stagger children */
.stagger-on-scroll > * {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  transition: none;
}

.stagger-on-scroll.is-visible > *:nth-child(1) {
  animation: blurToNormal 0.8s ease-out forwards;
  animation-delay: 0.1s;
}
.stagger-on-scroll.is-visible > *:nth-child(2) {
  animation: blurToNormal 0.8s ease-out forwards;
  animation-delay: 0.2s;
}
.stagger-on-scroll.is-visible > *:nth-child(3) {
  animation: blurToNormal 0.8s ease-out forwards;
  animation-delay: 0.3s;
}
.stagger-on-scroll.is-visible > *:nth-child(4) {
  animation: blurToNormal 0.8s ease-out forwards;
  animation-delay: 0.4s;
}
.stagger-on-scroll.is-visible > *:nth-child(5) {
  animation: blurToNormal 0.8s ease-out forwards;
  animation-delay: 0.5s;
}

/* Navbar Slide Down Animation */
@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-down {
  animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Optional animation delays for navbar elements */
.nav-item-delay > *:nth-child(1) {
  animation-delay: 0.1s;
}
.nav-item-delay > *:nth-child(2) {
  animation-delay: 0.2s;
}
.nav-item-delay > *:nth-child(3) {
  animation-delay: 0.3s;
}
.nav-item-delay > *:nth-child(4) {
  animation-delay: 0.4s;
}
.nav-item-delay > *:nth-child(5) {
  animation-delay: 0.5s;
}

/* Combined animations */
.animate-slide-down-with-blur {
  animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards,
    blurToNormal 0.8s ease-out forwards;
}

/* Floating Animation */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Different timing variations */
.float-slow {
  animation-duration: 4s;
}

.float-fast {
  animation-duration: 2s;
}

/* Offset animations to create wave effect */
.float-delay-1 {
  animation-delay: -0.5s;
}

.float-delay-2 {
  animation-delay: -1s;
}

.float-delay-3 {
  animation-delay: -1.5s;
}
.float-delay-4 {
  animation-delay: -2s;
}
.float-delay-5 {
  animation-delay: -2.5s;
}
.float-delay-6 {
  animation-delay: -3s;
}
