/* Vinoc — Internet Dedicado y sus páginas por ciudad.
 * Se apoya en vinoc-wholesale.css (.wh, tema oscuro) y agrega:
 *   .wh-light  → secciones claras dentro de la misma página (alternan con las oscuras)
 *   .vm-*      → mapa de cobertura propio (SVG en línea, colores por variables)
 *   .id-*      → piezas de cobertura: estado de la ciudad, directorio de ciudades, cifras
 */

/* ───────── Secciones claras ───────── */
.wh .wh-light {
    --wh-bg: #f6f4fa;
    --wh-surface: #ffffff;
    --wh-surface-2: #eeebf6;
    --wh-line: rgba(40, 32, 64, .13);
    --wh-text: #17131b;
    --wh-muted: #4a4458;
    --wh-accent: #574ca8;
    --wh-purple: #665da5;
    background: var(--wh-bg);
    color: var(--wh-text);
}

.wh .wh-light--white {
    --wh-bg: #ffffff;
    --wh-surface: #f6f4fa;
}

.wh .wh-light .wh-btn--ghost {
    border-color: rgba(23, 19, 27, .28);
    color: #17131b !important;
}

.wh .wh-light .wh-btn--ghost:hover {
    border-color: #17131b;
    background: rgba(23, 19, 27, .04);
}

.wh .wh-light .wh-checks li {
    color: var(--wh-muted);
}

.wh .wh-light .wh-checks strong,
.wh .wh-light .wh-faq summary,
.wh .wh-light .wh-compare__row > span:first-child,
.wh .wh-light .wh-compare__row > span:last-child,
.wh .wh-light .wh-id__row span:last-child,
.wh .wh-light .wh-step h3,
.wh .wh-light .wh-card h3 {
    color: var(--wh-text);
}

.wh .wh-light .wh-checks li::before {
    border-color: #8a6a00;
}

.wh .wh-light .wh-card {
    box-shadow: 0 1px 2px rgba(40, 32, 64, .05), 0 8px 24px rgba(40, 32, 64, .05);
}

.wh .wh-light a:not(.wh-btn):not(.vm-node) {
    color: var(--wh-accent);
}

.wh .wh-light .wh-step::before {
    color: var(--wh-accent);
}

/* ───────── Migas de pan ───────── */
.id-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 18px !important;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: #b9b3c4;
}

.id-crumbs li + li::before {
    content: "/";
    margin-right: 6px;
    opacity: .6;
}

.wh .id-crumbs a {
    color: #dcd7e6;
    text-decoration: none;
}

.wh .id-crumbs a:hover {
    text-decoration: underline;
}

/* ───────── Mapa de cobertura ───────── */
.vm-wrap {
    --vm-land: #2b2534;
    --vm-border: #453d52;
    --vm-neighbor: #1d1921;
    --vm-line: #8f86e0;
    --vm-planned: #b9b3c4;
    --vm-node: #a79df0;
    --vm-node-stroke: #120f12;
    --vm-gpon: #ffc400;
    --vm-gpon-stroke: #120f12;
    --vm-intl: #120f12;
    --vm-label: #f3f0f8;
    --vm-halo: #120f12;
    --vm-focus: #ffc400;
    position: relative;
}

.wh-light .vm-wrap {
    --vm-land: #ffffff;
    --vm-border: #d8d2e6;
    --vm-neighbor: #ebe8f2;
    --vm-line: #7e74c9;
    --vm-planned: #8b8499;
    --vm-node: #665da5;
    --vm-node-stroke: #ffffff;
    --vm-gpon: #ffc400;
    --vm-gpon-stroke: #7a5d00;
    --vm-intl: #ffffff;
    --vm-label: #1f1a26;
    --vm-halo: #ffffff;
    --vm-focus: #574ca8;
}

.vm {
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 16px;
}

.vm-sea rect {
    fill: transparent;
}

.vm-neighbors path {
    fill: var(--vm-neighbor);
    stroke: none;
}

.vm-states path {
    fill: var(--vm-land);
    stroke: var(--vm-border);
    stroke-width: .8px;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.vm-link {
    fill: none;
    stroke: var(--vm-line);
    stroke-width: 1.6px;
    stroke-linecap: round;
    opacity: .85;
    vector-effect: non-scaling-stroke;
}

.vm-link--planned {
    stroke: var(--vm-planned);
    stroke-dasharray: 2 4;
    opacity: .9;
}

.vm-link.is-focus {
    stroke: var(--vm-focus);
    stroke-width: 2.4px;
    opacity: 1;
}

.vm-out text {
    fill: var(--vm-label);
    opacity: .8;
    font-family: 'Noto Sans', sans-serif;
    font-style: italic;
}

.vm-mark {
    fill: var(--vm-node);
    stroke: var(--vm-node-stroke);
    stroke-width: 1.2px;
    vector-effect: non-scaling-stroke;
    transition: transform .15s ease;
}

.vm-node--gpon .vm-mark {
    fill: var(--vm-gpon);
    stroke: var(--vm-gpon-stroke);
}

.vm-node--intl .vm-mark {
    fill: var(--vm-intl);
    stroke: var(--vm-node);
    stroke-width: 1.6px;
}

.vm-lbl {
    fill: var(--vm-label);
    font-family: 'Noto Sans', sans-serif;
    font-weight: 600;
    paint-order: stroke;
    stroke: var(--vm-halo);
    stroke-width: 3px;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}

.vm-lbl--hover {
    opacity: 0;
    transition: opacity .15s ease;
}

.vm-lbl--focus {
    font-weight: 800;
}

a.vm-node {
    cursor: pointer;
    outline: none;
}

a.vm-node:hover .vm-lbl--hover,
a.vm-node:focus-visible .vm-lbl--hover {
    opacity: 1;
}

a.vm-node:hover .vm-mark,
a.vm-node:focus-visible .vm-mark {
    stroke: var(--vm-focus);
    stroke-width: 2.4px;
}

.vm-ring {
    fill: none;
    stroke: var(--vm-focus);
    stroke-width: 2px;
    vector-effect: non-scaling-stroke;
}

.vm-pulse {
    fill: var(--vm-focus);
    opacity: .18;
    transform-box: fill-box;
    transform-origin: center;
    animation: vm-pulse 2.6s ease-out infinite;
}

@keyframes vm-pulse {
    0% { transform: scale(.4); opacity: .35; }
    100% { transform: scale(1.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .vm-pulse {
        animation: none;
    }
}

/* Leyenda */
.vm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 18px !important;
    font-size: 14px;
    color: var(--wh-muted);
}

.vm-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vm-key {
    display: inline-block;
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--vm-node, #665da5);
}

.vm-key--pop,
.vm-key--intl {
    width: 13px;
    border-radius: 0;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.vm-key--intl {
    background: transparent;
    box-shadow: inset 0 0 0 2px var(--vm-node, #665da5);
    clip-path: none;
    border-radius: 2px;
    width: 11px;
    height: 11px;
    transform: rotate(45deg) scale(.85);
}

.vm-key--gpon {
    background: var(--vm-gpon, #ffc400);
    box-shadow: inset 0 0 0 1.5px var(--vm-gpon-stroke, #7a5d00);
}

.vm-key--line,
.vm-key--planned {
    width: 22px;
    height: 0;
    border-radius: 0;
    background: none;
    border-top: 2px solid var(--vm-line, #7e74c9);
}

.vm-key--planned {
    border-top: 2px dashed var(--vm-planned, #8b8499);
}

/* ───────── Cobertura (página principal) ───────── */
.id-cover {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
    gap: 48px;
    align-items: start;
    margin-top: 40px;
}

.id-stats {
    display: grid;
    gap: 14px;
}

.id-stat {
    padding: 18px 20px;
    border: 1px solid var(--wh-line);
    border-radius: 14px;
    background: var(--wh-surface);
}

.id-stat strong {
    display: block;
    color: var(--wh-text);
    font-size: 34px;
    line-height: 1.1;
}

.id-stat span {
    display: block;
    margin-top: 4px;
    color: var(--wh-muted);
    font-size: 15px;
}

/* Directorio de ciudades */
.id-dir {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 32px;
    margin-top: 48px;
}

.id-dir h3 {
    margin-bottom: 10px !important;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--wh-purple);
    font-size: 16px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.id-dir ul {
    display: grid;
    gap: 2px;
}

.wh .id-dir a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    color: var(--wh-text) !important;
    font-size: 16px;
    text-decoration: none;
}

.wh .id-dir a:hover,
.wh .id-dir a:focus-visible {
    color: var(--wh-accent) !important;
    text-decoration: underline;
}

.id-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #665da5;
}

.id-dot--gpon {
    background: #ffc400;
    box-shadow: inset 0 0 0 1.5px #7a5d00;
}

.id-dot--pop {
    border-radius: 0;
    width: 10px;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* ───────── Página de ciudad: estado de la cobertura ───────── */
.id-status {
    padding: 26px 28px;
    border: 1px solid var(--wh-line);
    border-radius: 16px;
    background: var(--wh-surface);
}

.id-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--wh-surface-2);
    color: var(--wh-text);
    font-size: 14px;
    font-weight: 700;
}

.id-status h3 {
    margin-top: 16px !important;
    font-size: 22px;
}

.id-status p {
    margin-top: 10px !important;
}

.id-facts {
    margin-top: 20px !important;
    border-top: 1px solid var(--wh-line);
}

.id-facts li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--wh-line);
    font-size: 15px;
}

.id-facts li > span:first-child {
    color: var(--wh-muted);
}

.id-facts li > span:last-child {
    color: var(--wh-text);
    font-weight: 600;
    text-align: right;
}

.id-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px !important;
}

.wh .id-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--wh-line);
    border-radius: 999px;
    background: var(--wh-surface);
    color: var(--wh-text) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.wh .id-links a:hover,
.wh .id-links a:focus-visible {
    border-color: var(--wh-accent);
    color: var(--wh-accent) !important;
}

.id-links span {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px dashed var(--wh-line);
    border-radius: 999px;
    color: var(--wh-muted);
    font-size: 14px;
}

.id-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 48px;
    align-items: start;
    margin-top: 40px;
}

.id-map-card {
    padding: 10px;
    border: 1px solid var(--wh-line);
    border-radius: 18px;
    background: var(--wh-surface-2);
}

.id-map-card .vm {
    border-radius: 12px;
}

.id-map-note {
    margin-top: 12px !important;
    font-size: 14px;
}

/* Velocidad (página principal) */
.id-speed {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 26px;
}

.id-speed strong {
    color: var(--wh-text);
    font-size: clamp(40px, 5vw, 60px);
    line-height: 1;
}

.id-speed span {
    color: var(--wh-muted);
    font-size: 18px;
}

@media (max-width: 991.98px) {
    .id-cover,
    .id-split {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .id-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .id-dir {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 599.98px) {
    .id-stats {
        gap: 8px;
    }

    .id-stat {
        padding: 12px 12px;
    }

    .id-stat strong {
        font-size: 26px;
    }

    .id-stat span {
        font-size: 13px;
        line-height: 1.35;
    }

    .id-dir {
        grid-template-columns: 1fr;
    }

    .id-status {
        padding: 22px 18px;
    }
}

/* Comparativo dedicado vs compartido: etiquetas en móvil */
@media (max-width: 599.98px) {
    .wh-compare--id .wh-compare__row > span:nth-child(2)::before {
        content: "Compartido: ";
    }

    .wh-compare--id .wh-compare__row > span:last-child::before {
        content: "Dedicado: ";
    }

    html[lang="en"] .wh-compare--id .wh-compare__row > span:nth-child(2)::before {
        content: "Shared: ";
    }

    html[lang="en"] .wh-compare--id .wh-compare__row > span:last-child::before {
        content: "Dedicated: ";
    }
}

/* En pantallas chicas el mapa nacional se desliza de lado para que los nombres se lean */
@media (max-width: 767.98px) {
    .id-cover .vm-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px;
    }

    .id-cover .vm {
        width: 760px;
        max-width: none;
    }

    .id-cover .vm-wrap::after {
        content: "Desliza para ver todo el mapa →";
        display: block;
        position: sticky;
        left: 0;
        padding-top: 8px;
        color: var(--wh-muted);
        font-size: 13px;
    }

    html[lang="en"] .id-cover .vm-wrap::after {
        content: "Swipe to see the whole map →";
    }
}

/* Tarjetas de otras ciudades de la región */
.id-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.wh .id-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--wh-line);
    border-radius: 14px;
    background: var(--wh-surface);
    color: var(--wh-text) !important;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}

.wh .id-card:hover,
.wh .id-card:focus-visible {
    border-color: var(--wh-accent);
    transform: translateY(-2px);
}

.wh .id-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.id-card__name {
    padding: 12px 14px 0;
    font-size: 17px;
    font-weight: 700;
}

.id-card__kind {
    padding: 2px 14px 14px;
    color: var(--wh-muted);
    font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
    .wh .id-card {
        transition: none;
    }
}
