/* ==========================================================================
   MD Azaruddin Cooling - Rich Micro-Interactions & Animation Design System
   ========================================================================== */

/* 1. Core Keyframe Animations */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 122, 0, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(255, 122, 0, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 122, 0, 0);
  }
}

@keyframes radarPing {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.8);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}

@keyframes floatAlt {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(-1deg);
  }
}

@keyframes ambientPulse {
  0%, 100% {
    transform: scale(1) translate(0, 0);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.15) translate(-10px, 15px);
    opacity: 1;
  }
}

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

@keyframes rotateSubtle {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideUpSticky {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes starSparkle {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.25); filter: brightness(1.3) drop-shadow(0 0 4px #f59e0b); }
}

/* 2. Interactive Scroll Reveal & Stagger System */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grid items */
.services-grid .reveal:nth-child(1),
.reviews-grid .reveal:nth-child(1),
.how-it-works-grid .reveal:nth-child(1),
.pricing-grid .reveal:nth-child(1) { transition-delay: 0.05s; }

.services-grid .reveal:nth-child(2),
.reviews-grid .reveal:nth-child(2),
.how-it-works-grid .reveal:nth-child(2),
.pricing-grid .reveal:nth-child(2) { transition-delay: 0.12s; }

.services-grid .reveal:nth-child(3),
.reviews-grid .reveal:nth-child(3),
.how-it-works-grid .reveal:nth-child(3),
.pricing-grid .reveal:nth-child(3) { transition-delay: 0.18s; }

.services-grid .reveal:nth-child(4),
.how-it-works-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

.services-grid .reveal:nth-child(5) { transition-delay: 0.3s; }
.services-grid .reveal:nth-child(6) { transition-delay: 0.36s; }

/* 3. Ambient Background & Shape Animations */
.shape-1 {
  animation: ambientPulse 12s ease-in-out infinite alternate;
}

.shape-2 {
  animation: ambientPulse 16s ease-in-out infinite alternate-reverse;
}

/* 4. Button Shimmer & Glowing Ripple */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  transition: all 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.shine-effect:hover::after {
  left: 130%;
}

.btn-accent {
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-accent:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(255, 122, 0, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(2, 86, 196, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* 5. Floating Badges Micro-Interactions */
.badge-top-left {
  animation: float 5s ease-in-out infinite;
}

.badge-bottom-right {
  animation: floatAlt 6s ease-in-out infinite 1s;
}

/* 6. Rating Stars Animation on Review Cards */
.review-card:hover .review-stars svg {
  animation: starSparkle 0.8s ease forwards;
}

.review-card:hover .review-stars svg:nth-child(2) { animation-delay: 0.1s; }
.review-card:hover .review-stars svg:nth-child(3) { animation-delay: 0.2s; }
.review-card:hover .review-stars svg:nth-child(4) { animation-delay: 0.3s; }
.review-card:hover .review-stars svg:nth-child(5) { animation-delay: 0.4s; }

.review-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.review-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 35px -5px rgba(2, 86, 196, 0.14);
}

/* 7. How It Works Step Cards */
.how-step-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.how-step-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px -10px rgba(2, 86, 196, 0.15);
}

.how-step-card:hover .how-icon-circle {
  transform: scale(1.15) rotate(8deg);
  background: var(--primary);
  color: #ffffff;
}

.how-icon-circle {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 8. Trust Strip Micro-Animations */
.trust-item {
  transition: transform 0.3s ease;
}

.trust-item:hover {
  transform: translateY(-3px);
}

.trust-item:hover .trust-icon-box {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.trust-icon-box {
  transition: all 0.3s ease;
}

/* 9. Locality Chips Bounce on Hover */
.locality-chip {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.locality-chip:hover {
  transform: translateY(-3px) scale(1.03);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(2, 86, 196, 0.25);
}

.locality-chip:hover svg {
  color: #ffffff;
  transform: scale(1.15);
}

.locality-chip svg {
  transition: transform 0.2s ease, color 0.2s ease;
}

/* 10. Featured Pricing Card Gradient Border Glow */
.featured-price {
  position: relative;
  border-color: rgba(2, 86, 196, 0.4) !important;
  box-shadow: 0 16px 36px -8px rgba(2, 86, 196, 0.22);
}

.price-box {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.price-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px -10px rgba(2, 86, 196, 0.18);
}

/* 11. Mobile Sticky Action Bar Entrance */
.mobile-sticky-action-bar {
  animation: slideUpSticky 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 12. Pulsing Emergency Dot */
.emergency-pill .pulse-dot {
  animation: radarPing 1.8s infinite;
}

/* 13. Brand Badge Glow */
.brand-badge-item {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.brand-badge-item:hover {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(2, 86, 196, 0.12);
  color: var(--primary);
}
