/* ============================================
   ZYVERTO - Animations
   zy-animations.css
   ============================================ */

/* ---- KEYFRAMES ---- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes draw {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- HERO SHAPES ---- */
.hero-shape-1 { animation: float 8s ease-in-out infinite; }
.hero-shape-2 { animation: float 11s ease-in-out infinite reverse; }
.hero-shape-3 { animation: float 7s ease-in-out infinite 2s; }

/* ---- SCROLL ANIMATIONS ---- */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.from-bottom { transform: translateY(40px); }
.animate-on-scroll.from-left { transform: translateX(-40px); }
.animate-on-scroll.from-right { transform: translateX(40px); }
.animate-on-scroll.scale-in { transform: scale(0.92); }
.animate-on-scroll.animated {
  opacity: 1;
  transform: none;
}
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }
.animate-delay-6 { transition-delay: 0.6s; }

/* ---- HERO ENTRANCE ---- */
.hero-animate-1 { animation: fadeInUp 0.9s ease both; animation-delay: 0.1s; }
.hero-animate-2 { animation: fadeInUp 0.9s ease both; animation-delay: 0.3s; }
.hero-animate-3 { animation: fadeInUp 0.9s ease both; animation-delay: 0.5s; }
.hero-animate-4 { animation: fadeInUp 0.9s ease both; animation-delay: 0.7s; }
.hero-animate-img { animation: fadeInRight 1s ease both; animation-delay: 0.4s; }

/* ---- FLOATING BADGE ---- */
.hero-image-badge { animation: float 5s ease-in-out infinite; }

/* ---- COUNTER ---- */
.stat-num { animation: countUp 0.6s ease both; }

/* ---- CARD HOVER LIFT ---- */
.lift-on-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.lift-on-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(26,58,92,0.16);
}

/* ---- PULSE CTA ---- */
.pulse-cta {
  animation: pulse 2.5s ease-in-out infinite;
}

/* ---- SHIMMER EFFECT ---- */
.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  background-size: 200% auto;
  animation: shimmer 2.5s linear infinite;
}

/* ---- LOADING SPINNER ---- */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(26,155,138,0.2);
  border-top-color: var(--accent, #1a9b8a);
  border-radius: 50%;
  animation: rotateSlow 0.8s linear infinite;
  display: inline-block;
}

/* ---- STAGGER CARDS ---- */
.stagger-cards .card-item:nth-child(1) { transition-delay: 0.05s; }
.stagger-cards .card-item:nth-child(2) { transition-delay: 0.15s; }
.stagger-cards .card-item:nth-child(3) { transition-delay: 0.25s; }
.stagger-cards .card-item:nth-child(4) { transition-delay: 0.35s; }
.stagger-cards .card-item:nth-child(5) { transition-delay: 0.45s; }
.stagger-cards .card-item:nth-child(6) { transition-delay: 0.55s; }

/* ---- NAV LINK UNDERLINE ---- */
.nav-link-underline {
  position: relative;
}
.nav-link-underline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.9rem;
  right: 0.9rem;
  height: 2px;
  background: var(--accent, #1a9b8a);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}
.nav-link-underline:hover::after,
.nav-link-underline.active::after { transform: scaleX(1); }

/* ---- SMOOTH SECTION TRANSITIONS ---- */
section.in-view { animation: fadeIn 0.6s ease both; }

/* ---- TESTIMONIAL CAROUSEL ---- */
.testimonial-track {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- PROCESS STEP ANIMATION ---- */
.process-step .process-num {
  transition: background 0.3s ease, transform 0.3s ease;
}
.process-step:hover .process-num {
  background: var(--accent, #1a9b8a);
  transform: scale(1.1);
}

/* ---- ICON BOX ---- */
.icon-box-icon {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.icon-box:hover .icon-box-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 8px 20px rgba(26,155,138,0.4);
}

/* ---- GALLERY ---- */
.gallery-item {
  animation: fadeIn 0.5s ease both;
}

/* ---- SMOOTH LOADING ---- */
.page-load-fade {
  animation: fadeIn 0.6s ease both;
}

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