﻿/* ==========================================
   PALETA DE COLORES
   DARK MODERN & NEON
   ========================================== */

:root {
    --bg-map: #0b0f19;
    --accent-cyan: #00f2fe;
    --accent-purple: #7928ca;
    --accent-pink: #ff0080;
    --text-color: #ffffff;
}





/* ==========================================
   CONTENEDOR DEL MAPA
   CLASS: .hero-map-container
   ========================================== */

.hero-map-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    display:none;
}
    .hero-map-container.visible {
        display: block;
    }


/* ==========================================
   SVG DEL MAPA
   CLASS: .map-bg-grid
   ========================================== */

.map-bg-grid {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    overflow: visible;
    pointer-events: none;
}


/* ==========================================
   CAMINOS SECUNDARIOS
   CLASS: .secondary-routes
   ========================================== */

.secondary-routes {
    fill: none;
    stroke: rgba(79, 172, 254, 0.25);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 10 14;
    animation: secondaryRoadMove 30s linear infinite;
}

    .secondary-routes path:nth-child(2n) {
        stroke: rgba(121, 40, 202, 0.22);
        stroke-dasharray: 6 16;
    }

    .secondary-routes path:nth-child(3n) {
        stroke: rgba(0, 242, 254, 0.18);
        stroke-width: 2;
    }


/* ==========================================
   CAMINO PRINCIPAL - BASE
   CLASS: .main-route-base
   ========================================== */

.main-route-base {
    fill: none;
    stroke: rgba(2, 12, 27, 0.9);
    stroke-width: 18;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ==========================================
   CAMINO PRINCIPAL - NEÓN
   CLASS: .animated-route
   ========================================== */

.animated-route {
    fill: none;
    stroke: url("#routeGradient");
    stroke-width: 15;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url("#routeGlow");
    opacity: 1;
}


/* ==========================================
   LÍNEA CENTRAL DEL CAMINO
   CLASS: .road-center-line
   ========================================== */

.road-center-line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.95);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 12 16;
    animation: mainRoadMove 1.2s linear infinite;
}


/* ==========================================
   CARRO ANIMADO
   CLASS: .car-element
   ========================================== */

.motor-element {
    pointer-events: none;
}




/* ==========================================
   NODOS DE NEGOCIOS
   CLASS: .business-node
   ========================================== */

.business-node {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    animation: float 4s ease-in-out infinite;
}


/* ==========================================
   POSICIONES DE LOS NEGOCIOS
   ========================================== */

.node-1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.node-2 {
    top: 60%;
    left: 35%;
    animation-delay: 1s;
}

.node-3 {
    top: 20%;
    left: 65%;
    animation-delay: 2s;
}

.node-4 {
    top: 75%;
    left: 75%;
    animation-delay: 1.5s;
}


/* ==========================================
   CONTENEDOR DE ICONOS
   CLASS: .icon-wrapper
   ========================================== */

.icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient( 135deg, var(--accent-cyan), var(--accent-purple) );
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.6);
    transition: transform 0.3s ease;
}

.business-node:hover .icon-wrapper {
    transform: scale(1.2);
}


/* ==========================================
   ICONOS DE LOS NEGOCIOS
   CLASS: .flat-icon
   ========================================== */

.flat-icon {
    width: 26px;
    height: 26px;
    fill: #ffffff;
}


/* ==========================================
   ANILLO DE PULSO
   CLASS: .pulse-ring
   ========================================== */

.pulse-ring {
    position: absolute;
    top: 5px;
    z-index: -1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-cyan);
    animation: expandPulse 2s infinite ease-out;
}


/* ==========================================
   ETIQUETAS DE LOS NEGOCIOS
   CLASS: .business-tag
   ========================================== */

.business-tag {
    margin-top: 8px;
    padding: 4px 10px;
    color: var(--text-color);
    font-family: "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}


/* ==========================================
   RADAR CENTRAL
   CLASS: .radar-pulse
   ========================================== */

.radar-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 242, 254, 0.7);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: radarExpand 2.5s ease-out infinite;
}


/* ==========================================
   PIN MOVIBLE
   CLASS: .moving-pin
   ========================================== */

.moving-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: none;
    pointer-events: none;
}


/* ==========================================
   CABEZA DEL PIN
   CLASS: .pin-head
   ========================================== */

.pin-head {
    width: 18px;
    height: 18px;
    background: var(--accent-pink);
    border: 3px solid #ffffff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.8);
    transform: rotate(-45deg);
}


/* ==========================================
   ANIMACIÓN DE FLOTACIÓN
   ========================================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}


/* ==========================================
   ANIMACIÓN DEL PULSO DE NEGOCIOS
   ========================================== */

@keyframes expandPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}


/* ==========================================
   ANIMACIÓN DEL RADAR CENTRAL
   ========================================== */

@keyframes radarExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(8);
        opacity: 0;
    }
}


/* ==========================================
   ANIMACIÓN DE LA LÍNEA CENTRAL
   ========================================== */

@keyframes mainRoadMove {
    to {
        stroke-dashoffset: -28;
    }
}


/* ==========================================
   ANIMACIÓN DE CAMINOS SECUNDARIOS
   ========================================== */

@keyframes secondaryRoadMove {
    to {
        stroke-dashoffset: -240;
    }
}


/* ==========================================
   AJUSTES PARA CELULARES
   ========================================== */

@media (max-width: 580px) {

    .icon-wrapper {
        width: 46px;
        height: 46px;
    }

    .flat-icon {
        width: 23px;
        height: 23px;
    }

    .pulse-ring {
        top: 4px;
        width: 38px;
        height: 38px;
    }

    .business-tag {
        margin-top: 6px;
        padding: 4px 8px;
        font-size: 10px;
    }

    .main-route-base {
        stroke-width: 16;
    }

    .animated-route {
        stroke-width: 15;
    }

    .road-center-line {
        stroke-width:4;
    }
}


/* ==========================================
   REDUCIR ANIMACIONES POR ACCESIBILIDAD
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    .business-node,
    .pulse-ring,
    .radar-pulse,
    .secondary-routes,
    .road-center-line {
        animation-duration: 1ms;
        animation-iteration-count: 1;
    }
}
