/* ═══════════════════════════════════════════════════════════
   DANZALAGUA — ANIMATIONS
   Rules from UI/UX Pro Max + Impeccable:
   - Duration 150–300ms micro, ≤400ms complex
   - transform/opacity only (no width/height/top/left)
   - Respect prefers-reduced-motion
   - Spring-physics feel: ease-out for enter, ease-in for exit
   ═══════════════════════════════════════════════════════════ */

/* ─── KEYFRAMES ─── */

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%       { opacity: 0.3; transform: scaleY(0.6); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,164,90,0); }
  50%       { box-shadow: 0 0 0 10px rgba(201,164,90,0.15); }
}

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

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

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

/* ─── AOS OVERRIDES ─── */
[data-aos] {
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
}
[data-aos="fade-up"] {
  transform: translate3d(0, 28px, 0);
}
[data-aos="fade-right"] {
  transform: translate3d(-28px, 0, 0);
}
[data-aos="fade-left"] {
  transform: translate3d(28px, 0, 0);
}
[data-aos="zoom-in"] {
  transform: scale3d(0.92, 0.92, 1);
}

/* ─── HERO ANIMATIONS ─── */
.hero-eyebrow   { animation: slideUp 0.7s var(--ease-out, cubic-bezier(0.16,1,0.3,1)) both; }
.hero-title     { animation: slideUp 0.8s var(--ease-out, cubic-bezier(0.16,1,0.3,1)) 0.12s both; }
.hero-tagline   { animation: slideUp 0.7s var(--ease-out, cubic-bezier(0.16,1,0.3,1)) 0.25s both; }
.hero-actions   { animation: slideUp 0.7s var(--ease-out, cubic-bezier(0.16,1,0.3,1)) 0.38s both; }
.hero-awards    { animation: slideUp 0.6s var(--ease-out, cubic-bezier(0.16,1,0.3,1)) 0.5s  both; }

.hero-scroll-indicator {
  animation: fadeIn 1s ease 1.2s both;
}
.scroll-line {
  animation: scrollPulse 2.4s ease-in-out infinite;
}

/* ─── NAV TRANSITIONS ─── */
#navbar {
  animation: fadeIn 0.6s ease 0.1s both;
}

/* ─── AWARD BADGES — staggered entrance ─── */
.award-badge {
  animation: scaleIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
.award-badge:nth-child(1) { animation-delay: 0.65s; }
.award-badge:nth-child(2) { animation-delay: 0.72s; }
.award-badge:nth-child(3) { animation-delay: 0.79s; }
.award-badge:nth-child(4) { animation-delay: 0.86s; }

/* ─── STAT COUNTER ─── */
.stat-number {
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}

/* ─── SERVICE CARDS — icon pulse on focus ─── */
.service-card:focus-within .service-icon {
  animation: goldPulse 1.5s ease-in-out;
}

/* ─── FLOAT ANIMATION — story stat badge ─── */
.story-stat {
  animation: floatUp 4s ease-in-out infinite;
}

/* ─── GALLERY HOVER ─── */
.gallery-item {
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.gallery-item:hover {
  transform: scale(1.01);
  z-index: 2;
}

/* ─── LOADING STATE — submit button ─── */
.btn-loading .fa-spinner {
  animation: spinSlow 0.8s linear infinite;
}

/* ─── CTA BANNER — gold shimmer on button ─── */
.cta-banner .btn-gold {
  position: relative;
  overflow: hidden;
}
.cta-banner .btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.25) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
  pointer-events: none;
}

/* ─── WHATSAPP FLOAT — gentle pulse ─── */
.whatsapp-float {
  animation: goldPulse 2.5s ease-in-out 3s infinite;
}
/* override green pulse */
.whatsapp-float {
  animation-name: waPulse;
}
@keyframes waPulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(37,211,102,0.45); }
  50%       { box-shadow: 0 6px 40px rgba(37,211,102,0.7); }
}

/* ─── TABS PANEL TRANSITION ─── */
.events-panel {
  animation-duration: 0.35s;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.16,1,0.3,1);
}
.events-panel.active {
  animation-name: slideUp;
}

/* ─── NAVBAR LINK UNDERLINE ─── */
.nav-link::after {
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}

/* ─── TESTIMONIAL ENTRANCE (Swiper) ─── */
.swiper-slide {
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
              opacity 0.4s ease;
}

/* ─── BACK TO TOP TRANSITION ─── */
#backToTop {
  transition: opacity 0.25s ease,
              transform 0.25s cubic-bezier(0.16,1,0.3,1),
              color 0.15s,
              background 0.15s;
}

/* ─── REDUCED MOTION — always respect user preference ─── */
@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;
  }
  .awards-items { animation: none; }
  .scroll-line  { animation: none; }
  .story-stat   { animation: none; }
  .whatsapp-float { animation: none; }
  .hero-scroll-indicator { animation: none; opacity: 1; }
  .hero-eyebrow, .hero-title, .hero-tagline,
  .hero-actions, .hero-awards { animation: none; opacity: 1; transform: none; }
  [data-aos] { opacity: 1 !important; transform: none !important; }
}
