/* ============================================
   SCROLL ANIMATIONS & TRANSITIONS
   ============================================ */

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Scroll Reveal Classes */
.scroll-reveal {
  opacity: 0;
  transition: none;
}

.scroll-reveal.revealed {
  animation-duration: 0.8s;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.fade-up.revealed {
  animation-name: fadeInUp;
}

.scroll-reveal.fade-left.revealed {
  animation-name: fadeInLeft;
}

.scroll-reveal.fade-right.revealed {
  animation-name: fadeInRight;
}

.scroll-reveal.scale-in.revealed {
  animation-name: scaleIn;
}

/* Stagger Animation Delays */
.scroll-reveal.delay-100.revealed { animation-delay: 0.1s; }
.scroll-reveal.delay-200.revealed { animation-delay: 0.2s; }
.scroll-reveal.delay-300.revealed { animation-delay: 0.3s; }
.scroll-reveal.delay-400.revealed { animation-delay: 0.4s; }
.scroll-reveal.delay-500.revealed { animation-delay: 0.5s; }

/* ============================================
   GLASSMORPHISM EFFECTS
   ============================================ */

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.glass-card-dark {
  background: rgba(46, 46, 46, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   LOADING STATES
   ============================================ */

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   RIPPLE EFFECT
   ============================================ */

.ripple {
  position: relative;
  overflow: hidden;
}

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

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* ============================================
   HOVER 3D EFFECTS
   ============================================ */

.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(2deg) scale(1.02);
}

/* ============================================
   MAGNETIC BUTTON EFFECT
   ============================================ */

.btn-magnetic {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GRADIENT ANIMATIONS
   ============================================ */

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

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================
   FLOATING ANIMATION
   ============================================ */

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

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

/* ============================================
   PULSE GLOW EFFECT
   ============================================ */

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(136, 199, 138, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(136, 199, 138, 0.8);
  }
}

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

/* ============================================
   NUMBER COUNTER ANIMATION
   ============================================ */

.counter {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   SMOOTH PAGE TRANSITIONS
   ============================================ */

.page-transition {
  animation: pageEnter 0.4s ease-out;
}

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