/* ============================================================
   LUXURY AUTO — animations.css
   Keyframes, hero transitions, scroll effects, micro-interactions
   ============================================================ */

/* ── Keyframe Animations ──────────────────────────────────── */

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

@keyframes float-indicator {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(10px); }
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

@keyframes hero-text-in {
  0%   { opacity: 0; transform: translateY(28px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes hero-badge-in {
  0%   { opacity: 0; transform: translateY(-14px); }
  100% { opacity: 1; transform: translateY(0); }
}

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

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

@keyframes bounce-y {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

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

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

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes count-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero Content Entrance ────────────────────────────────── */
.hero-badge-anim {
  animation: hero-badge-in 0.55s cubic-bezier(0.34,1.56,0.64,1) both;
  animation-delay: 0.1s;
}

.hero-title-anim {
  animation: hero-text-in 0.65s cubic-bezier(0.4,0,0.2,1) both;
  animation-delay: 0.2s;
}

.hero-desc-anim {
  animation: hero-text-in 0.65s cubic-bezier(0.4,0,0.2,1) both;
  animation-delay: 0.35s;
}

.hero-actions-anim {
  animation: hero-text-in 0.65s cubic-bezier(0.4,0,0.2,1) both;
  animation-delay: 0.48s;
}

/* Re-trigger on slide change */
.slide-text-reset .hero-badge-anim,
.slide-text-reset .hero-title-anim,
.slide-text-reset .hero-desc-anim,
.slide-text-reset .hero-actions-anim {
  animation: none;
}

.slide-text-active .hero-badge-anim {
  animation: hero-badge-in 0.55s cubic-bezier(0.34,1.56,0.64,1) both;
}

.slide-text-active .hero-title-anim {
  animation: hero-text-in 0.65s cubic-bezier(0.4,0,0.2,1) 0.12s both;
}

.slide-text-active .hero-desc-anim {
  animation: hero-text-in 0.65s cubic-bezier(0.4,0,0.2,1) 0.25s both;
}

.slide-text-active .hero-actions-anim {
  animation: hero-text-in 0.65s cubic-bezier(0.4,0,0.2,1) 0.38s both;
}

/* ── Stats Counter Number Animation ──────────────────────── */
.hero-stat-number.counting {
  animation: count-up 0.4s ease both;
}

/* ── Progress Bar Animation ───────────────────────────────── */
.hero-progress-animate {
  animation: progress-fill linear forwards;
}

@keyframes progress-fill {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ── Card Lift (supplemental) ─────────────────────────────── */
.card-lift {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.3s ease;
}

.card-lift:hover {
  transform: translateY(-10px) scale(1.015);
}

/* ── Button Pulse (CTA accent) ────────────────────────────── */
.btn-pulse {
  position: relative;
  overflow: visible;
}

.btn-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: var(--gradient-accent);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  animation: pulse-ring 2.5s cubic-bezier(0.4,0,0.6,1) infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* ── WhatsApp Float Button ────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 32px;
  right: 28px;
  z-index: 900;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,0.45);
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
  animation: bounce-y 3s ease-in-out infinite;
}

.wa-float:hover {
  transform: scale(1.12);
  box-shadow: 0 12px 36px rgba(37,211,102,0.55);
  animation: none;
}

.wa-float svg { width: 30px; height: 30px; fill: white; }

.wa-float-tooltip {
  position: absolute;
  right: 68px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-text-dark);
  color: white;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  box-shadow: var(--shadow-md);
}

.wa-float-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right: none;
  border-left-color: var(--color-text-dark);
}

.wa-float:hover .wa-float-tooltip { opacity: 1; }

/* ── Shimmer Loading Skeleton ─────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}

/* ── Ripple Effect ────────────────────────────────────────── */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple-wave {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,0.3);
  animation: ripple-anim 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ── Stagger Fade-In Grid Items ───────────────────────────── */
.car-card:nth-child(1) { animation-delay: 0s; }
.car-card:nth-child(2) { animation-delay: 0.08s; }
.car-card:nth-child(3) { animation-delay: 0.16s; }
.car-card:nth-child(4) { animation-delay: 0.24s; }
.car-card:nth-child(5) { animation-delay: 0.32s; }
.car-card:nth-child(6) { animation-delay: 0.40s; }

/* ── Number Roll Effect ───────────────────────────────────── */
@keyframes number-roll {
  0%   { transform: translateY(0%); }
  100% { transform: translateY(-50%); }
}

/* ── Hero Slide Parallax ──────────────────────────────────── */
.hero-slide.active img {
  animation: subtle-zoom 8s ease-out forwards;
}

@keyframes subtle-zoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1.0); }
}

/* ── Filter Pill Active Transition ───────────────────────── */
.filter-pill {
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.filter-pill.active {
  animation: pill-pop 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes pill-pop {
  0%   { transform: scale(0.95); }
  60%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ── Scroll Progress Top Bar ──────────────────────────────── */
.scroll-progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-accent);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Form Focus Glow ──────────────────────────────────────── */
.form-control:focus {
  animation: focus-glow 0.3s ease forwards;
}

@keyframes focus-glow {
  0%   { box-shadow: 0 0 0 0 rgba(109,33,168,0.1); }
  100% { box-shadow: 0 0 0 3px rgba(109,33,168,0.12); }
}

/* ── Testimonial Auto-Scroll Pause ────────────────────────── */
.testimonials-track {
  will-change: transform;
}

/* ── Section Dividers ─────────────────────────────────────── */
.section-divider {
  width: 60px;
  height: 4px;
  background: var(--gradient-purple);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.section-divider.left { margin-left: 0; }

/* ── Gradient Text ────────────────────────────────────────── */
.gradient-text {
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glow Border on Hover ─────────────────────────────────── */
.glow-border {
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.glow-border:hover {
  box-shadow: 0 0 0 3px rgba(109,33,168,0.15), var(--shadow-lg);
}

/* ── No Cars Found State ──────────────────────────────────── */
.no-cars {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  animation: fade-in-up 0.4s ease both;
}

.no-cars-icon { font-size: 3.5rem; margin-bottom: 16px; }
.no-cars h3 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--color-text-dark); margin-bottom: 8px; }
.no-cars p { color: var(--color-text-muted); font-size: 0.9rem; }
