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

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s forwards;
}

.fade-in-down {
  opacity: 0;
  animation: fadeInDown 0.8s forwards;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.stagger-animation > * {
  opacity: 0;
  transform: translateY(20px);
}

.is-loaded .stagger-animation > * {
  animation: fadeInUp 0.8s forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* Header Animation */
header.scrolled {
  padding: 18px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.9);
}

/* Card Hover Animations */
.glassmorphic-card {
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glassmorphic-card:hover {
  transform: translateY(-10px) scale(1.02);
}

/* Button Hover Effect */
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 50px;
  opacity: 0;
  z-index: -1;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn:hover::after {
  opacity: 0.2;
  transform: scale(1);
}

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

.animated-gradient {
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

/* Logo Animation */
.logo {
  position: relative;
}

.logo::before {
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.logo:hover::before {
  transform: scale(1.2) rotate(360deg);
}

/* Page Transitions */
.page-transition-enter-active,
.page-transition-leave-active {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-transition-enter-from,
.page-transition-leave-to {
  opacity: 0;
  transform: translateY(20px);
}

/* Custom Animations */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

.floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(115, 102, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(115, 102, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(115, 102, 255, 0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Media Queries for Animation Fine-tuning */
@media (max-width: 768px) {
  .animate-on-scroll {
    transform: translateY(15px);
  }
  
  .stagger-animation > * {
    animation-delay: 0.1s !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
