/* ========================================
   VideoRep - Premium Animation Styles
   Scroll reveals, stagger, Lottie-style
   CSS keyframe animations, counters
   ======================================== */

/* -----------------------------------------
   1. Scroll Reveal — Fade + Slide Up
   ----------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Slide from left */
.reveal--left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.reveal--right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up */
.reveal--scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* -----------------------------------------
   2. Stagger Animations for Children
   ----------------------------------------- */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger > *.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.24s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.36s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.48s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.6s; }

/* -----------------------------------------
   3. Hero Photo — Animated Blue Glow
   ----------------------------------------- */
@keyframes heroGlow {
  0%, 100% {
    box-shadow: 0 0 40px rgba(30, 113, 231, 0.12),
                0 20px 60px rgba(30, 113, 231, 0.08);
  }
  50% {
    box-shadow: 0 0 60px rgba(30, 113, 231, 0.2),
                0 20px 80px rgba(30, 113, 231, 0.15);
  }
}

.hero-glow {
  animation: heroGlow 4s ease-in-out infinite;
}

/* -----------------------------------------
   4. Floating Badge Animation
   ----------------------------------------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

/* -----------------------------------------
   5. Gradient Border Animation
   ----------------------------------------- */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-border {
  position: relative;
}

.animated-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #1e71e7, #0ea5e9, #059669, #1e71e7);
  background-size: 300% 300%;
  animation: gradientShift 6s ease infinite;
  border-radius: inherit;
  z-index: -1;
}

/* -----------------------------------------
   6. Service Card Icon Pulse
   ----------------------------------------- */
@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.service-v2-card:hover .service-v2-card__icon {
  animation: iconPulse 0.6s ease;
}

/* -----------------------------------------
   7. Animated Checkmark (SVG-based)
   ----------------------------------------- */
@keyframes drawCheck {
  0% { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: 0; }
}

.animated-check path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}

.visible .animated-check path {
  animation: drawCheck 0.5s 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

/* -----------------------------------------
   8. Counter Animation
   ----------------------------------------- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.counter-animate {
  opacity: 0;
  transform: translateY(20px);
}

.counter-animate.counted {
  animation: countUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* -----------------------------------------
   9. Logo Bar — Infinite Scroll (optional)
   ----------------------------------------- */
@keyframes scrollLogos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.logo-scroll-track {
  display: flex;
  animation: scrollLogos 30s linear infinite;
  width: max-content;
}

.logo-scroll-track:hover {
  animation-play-state: paused;
}

/* -----------------------------------------
   10. Guarantee Shield Animation
   ----------------------------------------- */
@keyframes shieldPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(5, 150, 105, 0));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(5, 150, 105, 0.3));
  }
}

.guarantee-icon-animated {
  animation: shieldPulse 3s ease-in-out infinite;
}

/* -----------------------------------------
   11. CTA Button Shimmer Effect
   ----------------------------------------- */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.btn--shimmer {
  position: relative;
  overflow: hidden;
  background-size: 200% auto;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  animation: shimmer 3s linear infinite;
}

/* -----------------------------------------
   12. Slide Down (Mobile Menu)
   ----------------------------------------- */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -----------------------------------------
   13. Spin (Loading)
   ----------------------------------------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* -----------------------------------------
   14. Fade In
   ----------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* -----------------------------------------
   15. Stats Number — Typewriter/Count Effect
   ----------------------------------------- */
.stat-count {
  display: inline-block;
  min-width: 2ch;
}

/* -----------------------------------------
   16. Mega Menu Dropdown
   ----------------------------------------- */
@keyframes dropdownReveal {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* -----------------------------------------
   17. Hero Text Entrance
   ----------------------------------------- */
@keyframes heroTextIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text-animate > * {
  opacity: 0;
  animation: heroTextIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-text-animate > *:nth-child(1) { animation-delay: 0.1s; }
.hero-text-animate > *:nth-child(2) { animation-delay: 0.25s; }
.hero-text-animate > *:nth-child(3) { animation-delay: 0.4s; }
.hero-text-animate > *:nth-child(4) { animation-delay: 0.55s; }
.hero-text-animate > *:nth-child(5) { animation-delay: 0.7s; }
.hero-text-animate > *:nth-child(6) { animation-delay: 0.85s; }

/* -----------------------------------------
   18. Hero Photo Entrance
   ----------------------------------------- */
@keyframes heroPhotoIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.hero-photo-animate {
  opacity: 0;
  animation: heroPhotoIn 1s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

  .reveal,
  .reveal--left,
  .reveal--right,
  .reveal--scale,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }

  .hero-text-animate > *,
  .hero-photo-animate {
    opacity: 1;
  }

  .counter-animate {
    opacity: 1;
    transform: none;
  }
}
