/* SVG Route drawing animation */
@keyframes drawRoute {
  to {
    stroke-dashoffset: 0;
  }
}

.route-path {
  stroke-dasharray: 8;
  stroke-dashoffset: 100;
  animation: drawRoute 3s linear infinite;
}

.route-path-solid {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawRoute 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Pulse animation for map hubs and status points */
@keyframes pulseGlow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(47, 128, 237, 0.5);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(47, 128, 237, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(47, 128, 237, 0);
  }
}

@keyframes pulseYellowGlow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(244, 180, 0, 0.6);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(244, 180, 0, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(244, 180, 0, 0);
  }
}

.pulse-pin {
  animation: pulseGlow 2s infinite;
}

.pulse-yellow-pin {
  animation: pulseYellowGlow 2s infinite;
}

/* Floating animation for cargo assets in Hero section */
@keyframes floatElement {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes floatOpposite {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(12px) rotate(-1.5deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.float-cargo-1 {
  animation: floatElement 6s ease-in-out infinite;
}

.float-cargo-2 {
  animation: floatOpposite 7s ease-in-out infinite;
}

.float-cargo-3 {
  animation: floatElement 5s ease-in-out infinite;
}

/* Shimmer sweeping effect for cards backgrounds */
@keyframes shimmerGlow {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer-card {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmerGlow 6s infinite;
}

/* Animated success checkmark */
@keyframes successPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.15);
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-icon-animation {
  animation: successPop 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
  opacity: 0;
}

/* Gradient mesh flow bg animation */
@keyframes gradientMeshFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.mesh-bg {
  background: linear-gradient(-45deg, #f1f5f9, #e2e8f0, #e0f2fe, #f0fdf4);
  background-size: 400% 400%;
  animation: gradientMeshFlow 15s ease infinite;
}

/* Interactive Magnetic Attraction speed */
.magnetic-wrap {
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  display: inline-block;
}

/* Counter scroll effect entry classes */
.counting-number {
  transition: opacity 0.5s ease;
}

/* Timeline progress bar filling animations */
@keyframes timelineFill {
  0% {
    height: 0%;
  }
  100% {
    height: var(--fill-height, 100%);
  }
}

.timeline-fill-active {
  animation: timelineFill 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Broken path for 404/500 error pages */
@keyframes dashOffsetChange {
  to {
    stroke-dashoffset: -40;
  }
}

.broken-path {
  stroke-dasharray: 10, 10;
  animation: dashOffsetChange 2s linear infinite;
}
