/* ==========================================================================
   Thành Phát GO — Animations
   Smooth, Modern Micro-Animations & SVG Motions
   ========================================================================== */

/* Roadway Flow on Hero SVG & Booking Map */
.animated-road-path {
  stroke-dasharray: 8 8;
  animation: roadStream 12s linear infinite;
}

@keyframes roadStream {
  from { stroke-dashoffset: 200; }
  to { stroke-dashoffset: 0; }
}

/* Radar Beacon & Location Pin Pulsing */
.beacon-dot {
  transform-origin: center;
  animation: pulseBeacon 2.2s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
}

.radar-ring {
  transform-origin: center;
  animation: radarRing 2.4s cubic-bezier(0.1, 0.7, 0.3, 1) infinite;
}

@keyframes radarRing {
  0% { transform: scale(0.6); opacity: 0.9; }
  50% { opacity: 0.4; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes pulseBeacon {
  0% { transform: scale(0.9); opacity: 0.95; }
  50% { transform: scale(1.3); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 0.95; }
}

/* Floating Status Badges & Glass Cards (Grab Style) */
.float-card-top {
  animation: floatTop 5s ease-in-out infinite;
}

.float-card-bottom {
  animation: floatBottom 6s ease-in-out infinite 1s;
}

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

@keyframes floatBottom {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

.car-marker-move {
  animation: carMarkerSlide 8s ease-in-out infinite alternate;
}

@keyframes carMarkerSlide {
  0% { transform: translate(0, 0); }
  50% { transform: translate(30px, 15px); }
  100% { transform: translate(65px, -10px); }
}

/* Highway Route Self-Drawing & Arrival Animations (tp-site style) */
.hero-road-draw {
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: tpDrawRoad 2.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

@keyframes tpDrawRoad {
  to {
    stroke-dashoffset: 0;
  }
}

.hero-stop-point {
  transform-origin: center;
  animation: tpStopPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 2.4s both;
}

@keyframes tpStopPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.hero-traveler-move {
  animation: travelerGlow 2.2s ease-in-out infinite alternate;
}

@keyframes travelerGlow {
  from { filter: drop-shadow(0 0 4px rgba(0, 167, 216, 0.5)); }
  to { filter: drop-shadow(0 0 14px rgba(247, 162, 11, 0.85)); }
}

/* Headlight Glow for Electric Car Showcase */
.headlight-glow {
  animation: beamGlow 3s ease-in-out infinite alternate;
}

@keyframes beamGlow {
  from { opacity: 0.35; filter: blur(10px); }
  to { opacity: 0.8; filter: blur(14px); }
}

/* Wheel subtle rotation */
.wheel-rotate {
  transform-origin: center;
  animation: rotateWheel 10s linear infinite;
}

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

/* View transitions */
.fade-in {
  animation: fadeInView 0.3s ease-out;
}

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

/* Ambient Corner Blur Floating Keyframes */
@keyframes ambientGlowTopRight {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate(-32px, 26px) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translate(16px, 36px) scale(0.96);
    opacity: 0.88;
  }
}

@keyframes ambientGlowBottomLeft {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.88;
  }
  50% {
    transform: translate(36px, -24px) scale(1.09);
    opacity: 1;
  }
  100% {
    transform: translate(-14px, -32px) scale(0.95);
    opacity: 0.85;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animated-road-path,
  .beacon-dot,
  .float-badge,
  .headlight-glow,
  .wheel-rotate,
  .fade-in,
  .hero-blur-glow {
    animation: none !important;
  }
}
