/* ============================================================
   F-M Auto Repair — fm-animations.css
   ============================================================ */

/* --- Keyframes --- */
@keyframes fm-scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

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

@keyframes fm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fm-slide-in-left {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes fm-counter-tick {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fm-pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.4); }
  70%       { box-shadow: 0 0 0 12px rgba(192,57,43,0); }
}

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

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

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

/* --- Hero Entry Animations --- */
.fm-hero-badge  { animation: fm-fade-in-up 0.6s ease 0.2s both; }
.fm-hero-title  { animation: fm-fade-in-up 0.7s ease 0.4s both; }
.fm-hero-subtitle { animation: fm-fade-in-up 0.7s ease 0.55s both; }
.fm-hero-actions { animation: fm-fade-in-up 0.7s ease 0.7s both; }
.fm-hero-stats  { animation: fm-fade-in-up 0.7s ease 0.85s both; }
.fm-hero-scroll-indicator { animation: fm-fade-in 1s ease 1.2s both; }

/* --- Navbar Scroll Effect --- */
.fm-navbar.fm-scrolled {
  background: rgba(13,13,13,0.99);
  box-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

/* --- Floating badges (hero decoration) --- */
.fm-hero-float-badge {
  position: absolute; z-index: 3;
  background: rgba(255,255,255,0.08); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 12px;
  padding: 1rem 1.25rem; color: #fff;
  animation: fm-hero-float 4s ease-in-out infinite;
}
.fm-hero-float-badge-1 { right: 8%; top: 28%; animation-delay: 0s; }
.fm-hero-float-badge-2 { right: 5%; bottom: 28%; animation-delay: 1.5s; }
.fm-hero-float-badge-label { font-size: 0.72rem; color: rgba(255,255,255,0.5); letter-spacing: 0.1em; text-transform: uppercase; }
.fm-hero-float-badge-value { font-family: 'Barlow Condensed', sans-serif; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.fm-hero-float-badge-value span { color: #fbbf24; }

/* --- Pulse CTA button --- */
.fm-btn-pulse { animation: fm-pulse-red 2.4s ease-in-out infinite; }

/* --- Shimmer loading effect --- */
.fm-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: fm-shimmer 1.5s ease-in-out infinite;
}

/* --- Service icon hover ring --- */
.fm-service-card:hover .fm-service-card-icon {
  animation: fm-pulse-red 1.8s ease-in-out 1;
}

/* --- Page transitions --- */
.fm-page-enter {
  animation: fm-fade-in 0.4s ease both;
}

/* --- Slide-in from sides (used with IntersectionObserver) --- */
.fm-reveal-left  { opacity: 0; transform: translateX(-30px); transition: opacity 0.65s ease, transform 0.65s ease; }
.fm-reveal-right { opacity: 0; transform: translateX(30px);  transition: opacity 0.65s ease, transform 0.65s ease; }
.fm-reveal-left.fm-in-view, .fm-reveal-right.fm-in-view { opacity: 1; transform: translateX(0); }

/* --- Number counter animation --- */
.fm-counter-number { transition: all 0.3s ease; }
.fm-counter-number.fm-animating { animation: fm-counter-tick 0.2s ease; }

/* --- Image hover zoom (controlled) --- */
.fm-img-zoom { overflow: hidden; }
.fm-img-zoom img { transition: transform 0.5s cubic-bezier(0.4,0,0.2,1); }
.fm-img-zoom:hover img { transform: scale(1.06); }

/* --- Underline draw effect --- */
.fm-underline-draw {
  position: relative; display: inline-block;
}
.fm-underline-draw::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 2px; background: currentColor;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.fm-underline-draw:hover::after { width: 100%; }

/* --- Red accent line above headings --- */
.fm-heading-accent {
  position: relative; padding-top: 1rem;
}
.fm-heading-accent::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 48px; height: 3px; background: var(--fm-red);
  border-radius: 2px;
}
.fm-heading-accent.center::before {
  left: 50%; transform: translateX(-50%);
}

/* --- Card hover lift --- */
.fm-card-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.fm-card-lift:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.15); }

/* --- Gradient text --- */
.fm-gradient-text {
  background: linear-gradient(135deg, #e74c3c, #fbbf24);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Red glow effect --- */
.fm-red-glow { box-shadow: 0 0 30px rgba(192,57,43,0.3); }

/* --- Blinking cursor (for hero) --- */
.fm-cursor-blink {
  display: inline-block; width: 3px; height: 0.9em;
  background: var(--fm-red); margin-left: 4px; vertical-align: middle;
  animation: fm-scroll-pulse 1s step-end infinite;
}

/* --- Divider with icon --- */
.fm-divider-icon {
  display: flex; align-items: center; gap: 1rem; margin: 2rem 0;
}
.fm-divider-icon::before, .fm-divider-icon::after {
  content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.1);
}
.fm-divider-icon i { color: var(--fm-red); font-size: 0.85rem; }

/* --- Active nav pulse dot --- */
.fm-nav-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--fm-red); margin-left: 0.25rem;
  animation: fm-pulse-red 2s ease-in-out infinite;
  vertical-align: middle;
}
