/* ==========================================================================
   ANIMATIONS.CSS - KR PEST CONTROL SERVICES PVT. LTD
   Keyframes, Transitions, Scroll Reveals, Floating, and Hover Effects
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Standard Reveal Keyframes (Scroll-Triggered)
   -------------------------------------------------------------------------- */

/* Base transition setup for reveals */
.reveal {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal.active {
  opacity: 1;
  transform: translate(0, 0) scale(1) !important;
}

/* Fade Up */
.reveal-fade-up {
  transform: translateY(60px);
}

/* Fade Left */
.reveal-fade-left {
  transform: translateX(-60px);
}

/* Fade Right */
.reveal-fade-right {
  transform: translateX(60px);
}

/* Zoom In */
.reveal-zoom {
  transform: scale(0.9);
}

/* Slide Down */
.reveal-slide-down {
  transform: translateY(-40px);
}

/* Staggered Reveals (Delays) */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* --------------------------------------------------------------------------
   2. Constant Floating Animations (Passive Loops)
   -------------------------------------------------------------------------- */
@keyframes floatY {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes floatX {
  0% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(10px);
  }
  100% {
    transform: translateX(0px);
  }
}

@keyframes floatRotate {
  0% {
    transform: rotate(0deg) translateY(0px);
  }
  50% {
    transform: rotate(3deg) translateY(-10px);
  }
  100% {
    transform: rotate(0deg) translateY(0px);
  }
}

.animate-float-y {
  animation: floatY 6s ease-in-out infinite;
}

.animate-float-x {
  animation: floatX 8s ease-in-out infinite;
}

.animate-float-rotate {
  animation: floatRotate 7s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   3. Shimmer & Skeleton Screen Loading
   -------------------------------------------------------------------------- */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer-bg {
  background: linear-gradient(90deg, 
    var(--bg-secondary) 25%, 
    var(--bg-tertiary) 37%, 
    var(--bg-secondary) 63%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* --------------------------------------------------------------------------
   4. Pulse Glow Effects
   -------------------------------------------------------------------------- */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(11, 110, 79, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(11, 110, 79, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(11, 110, 79, 0);
  }
}

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

/* --------------------------------------------------------------------------
   5. Typing Cursor Animation
   -------------------------------------------------------------------------- */
@keyframes blinkCursor {
  from, to { border-color: transparent }
  50% { border-color: var(--accent); }
}

.typing-cursor {
  border-right: 3px solid var(--accent);
  animation: blinkCursor 0.75s step-end infinite;
}

/* --------------------------------------------------------------------------
   6. Button Ripple & Hover Specifics
   -------------------------------------------------------------------------- */
.ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-effect 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Infinite Rotation for icons on hover */
.rotate-on-hover:hover svg {
  transform: rotate(360deg);
}

.rotate-on-hover svg {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   7. Card Tilt / Zoom Interaction
   -------------------------------------------------------------------------- */
.card-hover-effect {
  transition: var(--transition-smooth);
}

.card-hover-effect:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: rgba(11, 110, 79, 0.15);
}

/* Image Scale on hover */
.img-zoom-wrapper {
  overflow: hidden;
  position: relative;
  border-radius: var(--border-radius-md);
}

.img-zoom-wrapper img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-zoom-wrapper:hover img {
  transform: scale(1.08);
}
