/* ==========================================================================
   THAMRA PEST CONTROL SERVICES — ANIMATIONS STYLESHEET
   Smooth CSS3 Keyframes, Scroll Reveal & Reduced-Motion Support
   ========================================================================== */

/* Keyframes */
@keyframes heroProgress {
  from { width: 0%; }
  to { width: 100%; }
}

@keyframes whatsappPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Apply Pulse to Floating WhatsApp Button */
.floating-whatsapp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: whatsappPulse 2.4s infinite;
  z-index: -1;
}

/* Gentle Float for Decorative Elements & Info Cards */
.float-gentle {
  animation: floatGentle 6s ease-in-out infinite;
}

/* Progressive Scroll Reveal System
   Content remains fully visible when JS is disabled.
   Only hides elements before reveal when .js-anim-ready is present on <html>. */
html.js-anim-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

html.js-anim-ready [data-reveal="fade-left"] {
  transform: translateX(30px);
}

html.js-anim-ready [data-reveal="fade-right"] {
  transform: translateX(-30px);
}

html.js-anim-ready [data-reveal="zoom"] {
  transform: scale(0.95);
}

html.js-anim-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger Delays */
[data-delay="1"] { transition-delay: 0.08s !important; }
[data-delay="2"] { transition-delay: 0.16s !important; }
[data-delay="3"] { transition-delay: 0.24s !important; }
[data-delay="4"] { transition-delay: 0.32s !important; }
[data-delay="5"] { transition-delay: 0.4s !important; }
[data-delay="6"] { transition-delay: 0.48s !important; }

/* Filter Reveal Animation */
.service-filter-item.is-animating-in {
  animation: fadeInScale 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Reduced Motion Respect */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html.js-anim-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-bg img {
    transform: none !important;
  }
}
