/* =========================================
   HUMA GYM — ANIMATIONS STYLESHEET
   Scroll Reveal, Fade, Stagger, etc.
   ========================================= */

/* -------- REVEAL ANIMATIONS -------- */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1),
              transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal-up     { transform: translateY(40px); }
.reveal-left   { transform: translateX(-50px); }
.reveal-right  { transform: translateX(50px); }

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.35s !important; }
.delay-4 { transition-delay: 0.5s !important; }
.delay-5 { transition-delay: 0.65s !important; }

/* -------- PAGE LOAD HERO ANIMATIONS -------- */
.hero-badge   { animation: heroFadeUp 0.7s 0.2s both; }
.hero-title   { animation: heroFadeUp 0.8s 0.35s both; }
.hero-subtitle{ animation: heroFadeUp 0.8s 0.5s both; }
.hero-actions { animation: heroFadeUp 0.8s 0.65s both; }
.trust-indicators { animation: heroFadeUp 0.8s 0.8s both; }

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

/* Staggered children for .reveal-up groups */
.features-grid .feature-card:nth-child(1) { transition-delay: 0.05s; }
.features-grid .feature-card:nth-child(2) { transition-delay: 0.12s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.19s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.26s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.33s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.40s; }
.features-grid .feature-card:nth-child(7) { transition-delay: 0.47s; }
.features-grid .feature-card:nth-child(8) { transition-delay: 0.54s; }

.programs-grid .program-card:nth-child(1) { transition-delay: 0.05s; }
.programs-grid .program-card:nth-child(2) { transition-delay: 0.15s; }
.programs-grid .program-card:nth-child(3) { transition-delay: 0.25s; }
.programs-grid .program-card:nth-child(4) { transition-delay: 0.35s; }
.programs-grid .program-card:nth-child(5) { transition-delay: 0.45s; }
.programs-grid .program-card:nth-child(6) { transition-delay: 0.55s; }

.stats-grid .stat-card:nth-child(1) { transition-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { transition-delay: 0.15s; }
.stats-grid .stat-card:nth-child(3) { transition-delay: 0.25s; }
.stats-grid .stat-card:nth-child(4) { transition-delay: 0.35s; }

/* -------- HOVER GLOW PULSE -------- */
.stat-card:hover .stat-icon {
  animation: iconBounce 0.5s ease;
}
.feature-card:hover .feature-icon-bg {
  animation: iconBounce 0.4s ease;
}
@keyframes iconBounce {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15) rotate(-5deg); }
}

/* -------- BUTTON RIPPLE -------- */
.btn { position: relative; overflow: hidden; }
.btn .ripple {
  position: absolute; border-radius: 50%;
  width: 4px; height: 4px;
  background: rgba(255,255,255,0.4);
  animation: rippleExpand 0.6s ease-out forwards;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
@keyframes rippleExpand {
  0%   { width: 4px; height: 4px; opacity: 1; }
  100% { width: 400px; height: 400px; opacity: 0; }
}

/* -------- GRADIENT BORDER ANIMATION -------- */
.testimonial-card {
  background-image: linear-gradient(var(--bg-glass), var(--bg-glass)),
                    linear-gradient(135deg, rgba(249,115,22,0.3), rgba(251,191,36,0.3));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* -------- SHIMMER LOADING EFFECT -------- */
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* -------- FLOATING ELEMENTS -------- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}
.cta-icon { animation: float 3s ease-in-out infinite; }
.whatsapp-float svg { animation: float 2.5s ease-in-out infinite; }

/* -------- PROGRESS BAR LOADER -------- */
.page-loader {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 9999;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: loaderBar 1.5s linear infinite, loaderFade 0.5s 0.8s forwards;
}
@keyframes loaderBar {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}
@keyframes loaderFade {
  to { opacity: 0; pointer-events: none; }
}

/* -------- SCROLL TRIGGERED NUMBER COUNTER -------- */
.stat-number {
  display: inline-block;
  transition: none;
}

/* -------- SECTION TRANSITION OVERLAY -------- */
section {
  position: relative;
  z-index: 1;
}

/* -------- GALLERY ITEM STAGGER -------- */
.gallery-item {
  animation: galleryReveal 0.6s ease both;
}
.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes galleryReveal {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* -------- MOBILE MENU ANIMATION -------- */
.mobile-nav-list li {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.mobile-nav.open .mobile-nav-list li { opacity: 1; transform: translateX(0); }
.mobile-nav.open .mobile-nav-list li:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav.open .mobile-nav-list li:nth-child(2) { transition-delay: 0.10s; }
.mobile-nav.open .mobile-nav-list li:nth-child(3) { transition-delay: 0.15s; }
.mobile-nav.open .mobile-nav-list li:nth-child(4) { transition-delay: 0.20s; }
.mobile-nav.open .mobile-nav-list li:nth-child(5) { transition-delay: 0.25s; }
.mobile-nav.open .mobile-nav-list li:nth-child(6) { transition-delay: 0.30s; }
.mobile-nav.open .mobile-nav-list li:nth-child(7) { transition-delay: 0.35s; }
.mobile-nav.open .mobile-nav-list li:nth-child(8) { transition-delay: 0.40s; }
.mobile-nav.open .mobile-nav-list li:nth-child(9) { transition-delay: 0.45s; }

/* -------- ABOUT FEATURE STAGGER -------- */
.about-feature:nth-child(1) { transition-delay: 0.05s; }
.about-feature:nth-child(2) { transition-delay: 0.12s; }
.about-feature:nth-child(3) { transition-delay: 0.19s; }
.about-feature:nth-child(4) { transition-delay: 0.26s; }
.about-feature:nth-child(5) { transition-delay: 0.33s; }
.about-feature:nth-child(6) { transition-delay: 0.40s; }

/* -------- ACTIVE NAV INDICATOR -------- */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -2px; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: transform 0.3s ease;
}
.nav-link.active::after,
.nav-link:hover::after { transform: translateX(-50%) scaleX(1); }
.header:not(.scrolled) .nav-link::after {
  background: rgba(255,255,255,0.8);
}

/* -------- REDUCED MOTION -------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .hero-img { animation: none; }
  .marquee-inner { animation: none; }
  .bg-shapes .shape { animation: none; }
}

/* -------- GYM EQUIPMENT & ELEMENT TRANSITIONS -------- */
.feature-card {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
              border-color 0.4s ease;
}
.feature-card:hover .feature-icon-bg {
  transform: scale(1.15) rotate(360deg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white !important;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35);
}
.feature-card:hover .feature-icon-bg svg {
  color: white !important;
}

.program-card {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
              border-color 0.5s ease;
}
.program-card:hover .program-icon {
  transform: translateY(-8px) scale(1.2) rotate(10deg);
  filter: drop-shadow(0 8px 16px rgba(249, 115, 22, 0.4));
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.program-card.featured:hover .program-icon {
  filter: drop-shadow(0 8px 16px rgba(255, 255, 255, 0.4));
}

.facilities:hover .deco-barbell {
  transform: rotate(45deg) scale(1.15);
  color: var(--primary) !important;
  opacity: 0.7;
}
.facilities:hover .deco-dumbbell {
  transform: rotate(-35deg) scale(1.15);
  color: var(--accent) !important;
  opacity: 0.7;
}
.facilities:hover .deco-kettlebell {
  transform: translateY(-15px) rotate(15deg) scale(1.15);
  color: var(--primary) !important;
  opacity: 0.7;
}
.facilities .gym-deco {
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.5s ease, opacity 0.5s ease;
}
