/* Features */
.features {
  padding: 80px 0;
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.features .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-title {
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 60px;
  color: var(--text-tertiary);
  transition: color 0.3s ease;
}

.features-map-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 60px 30px;
  min-height: 680px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-position: center center; /* Centra el mapa de fondo */
  background-size: cover;  
}

.map-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../css/imagenes/MapaCapital.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 16px;
  overflow: hidden;
  opacity: 4.7;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.map-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  opacity: 0.2;
  z-index: 2;
  pointer-events: none;
}

.connection-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.route-dots {
  position: absolute;
  width: 100%;
  height: 100%;
}

.route-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 15px var(--primary), 0 0 25px var(--primary);
  transform: translate(-50%, -50%);
  z-index: 4;
}

.route-dot:nth-child(2) {
  animation-delay: 0.4s;
}

.route-dot:nth-child(3) {
  animation-delay: 0.8s;
}

.route-dot:nth-child(4) {
  animation-delay: 1.2s;
}

.route-dot:nth-child(5) {
  animation-delay: 1.6s;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.7;
  }
}

.vehicle-marker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: moveVehicle 20s infinite linear;
  z-index: 4;
  transform: translate(-50%, -50%);
}

.vehicle-marker[data-vehicle="1"] {
  animation-duration: 18s;
  animation-delay: 0s;
}

.vehicle-marker[data-vehicle="2"] {
  animation-duration: 22s;
  animation-delay: 3s;
}

.vehicle-marker[data-vehicle="3"] {
  animation-duration: 20s;
  animation-delay: 6s;
}

@keyframes moveVehicle {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(15%, 10%);
  }
  50% {
    transform: translate(30%, 5%);
  }
  75% {
    transform: translate(15%, -5%);
  }
  100% {
    transform: translate(0, 0);
  }
}

.vehicle-icon {
  font-size: 32px;
  animation: bounce 2s infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

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

.vehicle-info {
  position: absolute;
  background: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shadow-hover);
  border: 2px solid var(--primary);
  min-width: 140px;
  transition: all 0.3s ease;
  z-index: 5;
  opacity: 0.95;
  backdrop-filter: blur(4px);
}

.vehicle-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.vehicle-plate {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
}

.features-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;
  gap: 24px 28px;
  z-index: 10;
  max-width: 920px;
  margin: 0 auto;
}

.feature-card {
  background-color: var(--bg-secondary);
  padding: 10px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px var(--shadow-hover);
  border: 4px solid transparent;
  backdrop-filter: blur(2px);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 32px var(--shadow-hover);
  border-color: var(--secondary);
  background-color: var(--bg-secondary);
  border-radius: 30px;
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-card h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-tertiary);
  transition: color 0.3s ease;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  transition: color 0.3s ease;
}

@media (max-width: 768px) {
  .features-map-container {
    padding: 30px 16px;
  }
  
  .map-background {
    opacity: 0.5;
  }
  
  .vehicle-info {
    min-width: 120px;
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .vehicle-name {
    font-size: 12px;
  }
  
  .vehicle-plate {
    font-size: 10px;
  }
  
  .features-grid {
    max-width: 100%;
    grid-template-columns: 1fr;
  }
  
  .connection-lines {
    opacity: 0.5;
  }
  
  .map-background {
    opacity: 0.6;
  }
}

@media (max-width: 1100px) {
  .features-grid {
    max-width: 820px;
  }
}
