/* ==========================================================================
   Global Infrastructure - Animated Map Background
   ========================================================================== */

#hwy-index .hwy-infra {
  position: relative;
  overflow: hidden;
  isolation: auto;
  padding: 100px 0 120px;
  background: linear-gradient(180deg, var(--hh-bg) 0%, #f8fafc 100%);
  border-top: 1px solid var(--hh-line);
}

#hwy-index .hwy-infra::before {
  display: none;
}

/* Map Container */
#hwy-index .hwy-infra-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: transparent;
}

/* World Map Dots Pattern */
#hwy-index .hwy-infra-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(0, 85, 255, 0.08) 1.5px, transparent 1.5px),
    radial-gradient(rgba(0, 85, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px, 15px 15px;
  background-position: 0 0, 7.5px 7.5px;
  opacity: 0.6;
}

/* Canvas for animated network */
#hwy-index .hwy-infra-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Region Points */
#hwy-index .hwy-infra-region {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
}

#hwy-index .hwy-infra-region-dot {
  width: 8px;
  height: 8px;
  background: var(--hh-accent);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 0 0 rgba(0, 85, 255, 0.4);
  animation: regionPulse 2.5s ease-out infinite;
}

#hwy-index .hwy-infra-region-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 85, 255, 0.3);
  animation: regionRing 2.5s ease-out infinite;
}

#hwy-index .hwy-infra-region-label {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 500;
  color: var(--hh-ink-2);
  white-space: nowrap;
  opacity: 0.8;
  letter-spacing: 0.02em;
}

/* Region pulse animation */
@keyframes regionPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 85, 255, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(0, 85, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 85, 255, 0);
  }
}

@keyframes regionRing {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Stagger animation for regions */
#hwy-index .hwy-infra-region:nth-child(1) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(1) .hwy-infra-region-dot::after {
  animation-delay: 0s;
}

#hwy-index .hwy-infra-region:nth-child(2) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(2) .hwy-infra-region-dot::after {
  animation-delay: 0.4s;
}

#hwy-index .hwy-infra-region:nth-child(3) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(3) .hwy-infra-region-dot::after {
  animation-delay: 0.8s;
}

#hwy-index .hwy-infra-region:nth-child(4) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(4) .hwy-infra-region-dot::after {
  animation-delay: 1.2s;
}

#hwy-index .hwy-infra-region:nth-child(5) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(5) .hwy-infra-region-dot::after {
  animation-delay: 1.6s;
}

#hwy-index .hwy-infra-region:nth-child(6) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(6) .hwy-infra-region-dot::after {
  animation-delay: 2.0s;
}

#hwy-index .hwy-infra-region:nth-child(7) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(7) .hwy-infra-region-dot::after {
  animation-delay: 0.3s;
}

#hwy-index .hwy-infra-region:nth-child(8) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(8) .hwy-infra-region-dot::after {
  animation-delay: 0.7s;
}

#hwy-index .hwy-infra-region:nth-child(9) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(9) .hwy-infra-region-dot::after {
  animation-delay: 1.1s;
}

#hwy-index .hwy-infra-region:nth-child(10) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(10) .hwy-infra-region-dot::after {
  animation-delay: 1.5s;
}

#hwy-index .hwy-infra-region:nth-child(11) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(11) .hwy-infra-region-dot::after {
  animation-delay: 1.9s;
}

#hwy-index .hwy-infra-region:nth-child(12) .hwy-infra-region-dot,
#hwy-index .hwy-infra-region:nth-child(12) .hwy-infra-region-dot::after {
  animation-delay: 0.5s;
}

/* Content remains on top */
#hwy-index .hwy-infra .hwy-container {
  position: relative;
  z-index: 3;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #hwy-index .hwy-infra {
    padding: 60px 0 80px;
  }
  
  #hwy-index .hwy-infra-region-label {
    font-size: 9px;
  }
  
  #hwy-index .hwy-infra-region-dot {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 480px) {
  #hwy-index .hwy-infra-region-label {
    display: none;
  }
  
  #hwy-index .hwy-infra-region-dot {
    width: 5px;
    height: 5px;
  }
}
