/* ═══════════════════════════════════════════
   Slider de distribuidores
   Logos legibles en fichas del mismo tamaño; la activa se agranda y debajo se muestra
   su nombre, nivel y cobertura, más un punto por distribuidor.
   ═══════════════════════════════════════════ */

.header-Map {
    --dm-ink: #15254C;
    --dm-brand: #365072;
    --dm-line: #d5e2ef;
    --dm-bg: #f4f8fc;

    padding: 36px 16px 20px;
    background: var(--dm-bg);
    font-family: "Poppins", sans-serif;
}

.dm-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 1040px;
    margin: 0 auto;
}

.slider-viewport {
    flex: 1 1 auto;
    min-width: 0;
    height: 150px;
    overflow: hidden;
    outline-offset: 2px;
    /* desvanecido en los bordes: sugiere que hay más logos a los lados */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
    touch-action: pan-y;
}
.slider-viewport:focus-visible { outline: 2px solid var(--dm-brand); border-radius: 12px; }

.header-Map ul {
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform .45s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

.header-Map ul li {
    flex: 0 0 188px;
    height: 104px;
    margin: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    border: 1px solid var(--dm-line);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    opacity: .78;
    transform: scale(.92);
    transition: transform .4s ease, opacity .4s ease, box-shadow .4s ease, border-color .4s ease;
}
.header-Map ul li:hover { opacity: 1; }
.header-Map ul li.active {
    opacity: 1;
    transform: scale(1.1);
    border-color: var(--dm-brand);
    box-shadow: 0 10px 26px rgb(54 80 114 / 22%);
}
.header-Map ul li img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.slider-arrow {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1.5px solid var(--dm-brand);
    border-radius: 50%;
    background: #fff;
    color: var(--dm-brand);
    cursor: pointer;
    transition: background .25s ease, color .25s ease, transform .2s ease;
}
.slider-arrow svg { width: 20px; height: 20px; }
.slider-arrow:hover:not(:disabled) { background: var(--dm-brand); color: #fff; }
.slider-arrow:active:not(:disabled) { transform: scale(.94); }
.slider-arrow:focus-visible { outline: 2px solid var(--dm-ink); outline-offset: 2px; }
.slider-arrow:disabled { opacity: .3; cursor: default; }

/* ── Ficha del distribuidor activo ── */
.dm-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    margin: 14px auto 0;
    min-height: 30px;
    color: var(--dm-ink);
}
.dm-name { margin: 0; font-size: 1.05rem; font-weight: 600; letter-spacing: .02em; }
.dm-meta { font-size: .88rem; color: #4d6580; }
.dm-level {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dm-ink);
    background: #e3edf7;
}
.dm-level[hidden] { display: none; }
.dm-level--platinum { color: #192348; background: linear-gradient(0deg, #495580 0%, #ebf0ff 100%); }
.dm-level--silverplus { color: #1c0e60; background: linear-gradient(0deg, #9a99a4 0%, #ebf7ff 100%); }
.dm-level--silver { color: #21393a; background: linear-gradient(0deg, #3e646b 0%, #f0e4e4 100%); }
.dm-level--bronze { color: #252202; background: linear-gradient(0deg, #635e11 0%, #fdbb2d 100%); }

/* ── Posición: un punto por distribuidor ── */
.dm-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 10px auto 0;
    max-width: 420px;
}
.dm-dot {
    width: 22px;          /* área táctil amplia; el punto se dibuja con ::before */
    height: 22px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.dm-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b9cbe0;
    transition: width .3s ease, background .3s ease;
}
.dm-dot:hover::before { background: var(--dm-brand); }
.dm-dot[aria-current="true"]::before { width: 22px; border-radius: 999px; background: var(--dm-brand); }
.dm-dot:focus-visible { outline: 2px solid var(--dm-ink); border-radius: 6px; }

/* ── Responsivo ── */
@media (max-width: 768px) {
    .header-Map { padding: 28px 12px 16px; }
    .slider-viewport { height: 130px; }
    .header-Map ul li { flex-basis: 150px; height: 88px; padding: 12px 14px; margin: 0 5px; }
    .slider-arrow { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
    .dm-stage { gap: 6px; }
    .slider-viewport { height: 118px; }
    .header-Map ul li { flex-basis: 128px; height: 78px; padding: 10px 12px; margin: 0 4px; }
    .slider-arrow { width: 36px; height: 36px; }
    .slider-arrow svg { width: 18px; height: 18px; }
    .dm-name { font-size: 1rem; }
    .dm-dots { gap: 0; max-width: none; }
    .dm-dot { width: 20px; height: 24px; }
    .dm-dot::before { width: 6px; height: 6px; }
    .dm-dot[aria-current="true"]::before { width: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .header-Map ul, .header-Map ul li, .dm-dot::before { transition: none; }
}


/* ═══════════════════════════════════════════
   Mapa interactivo de la República Mexicana
   ═══════════════════════════════════════════ */

#content-map {
    background: #f4f8fc;
    padding-bottom: 40px;
}

.dynamic-map {
    display: flex;
    justify-content: center;
    padding: 20px 16px 0;
}

.mapa-mx {
    width: 100%;
    max-width: 900px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}

.mapa-mx path {
    fill: #c8def0;
    stroke: #fff;
    stroke-width: 1;
    stroke-linejoin: round;
    transition: transform 0.4s ease, filter 0.4s ease, fill 0.4s ease, opacity 0.4s ease;
    transform-origin: center;
    transform-box: fill-box;
    cursor: default;
    pointer-events: all;
}

/* Estado elevado — efecto 3D */
    .mapa-mx path.state-active {
        cursor: crosshair;
        fill: #365072;
        transform: translateY(0px);
        filter: drop-shadow(1px 10px 0px rgba(36, 43, 60, 0.6));
    }

/* Estados sin vinculación cuando hay selección */
    .mapa-mx path.state-dimmed {
        fill: #889fb3;
        opacity: 0.45;
    }

/* ── Tooltip nombre de estado ── */
#map-tooltip {
    position: fixed;
    background: rgba(54, 80, 114, 0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 9000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

#map-tooltip.visible { opacity: 1; }

/* ── Ficha de distribuidor ── */
.info-map {
    max-width: 70%;
    margin: 0 auto;
    padding: 0 16px 40px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.info-map--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.info-card {
    display: flex;
    gap: 28px;
    align-items: anchor-center;
    /*background: #fff;*/
    border-radius: 14px;
    padding: 24px 28px;
    /*box-shadow: 0 4px 20px rgba(54, 80, 114, 0.12);
    border-left: 5px solid #365072;*/
}

.info-card__logo {
    flex-shrink: 0;
    width: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

    .info-card__logo img {
        max-width: 210px;
        object-fit: contain;
        max-height: 80px;
    }

.info-card__body {
    flex: 1;
    min-width: 0;
}

.info-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 35px;
    flex-wrap: wrap;
    flex-direction: column;
}

.info-card__header h4 {
    margin: 0;
    font-size: 25px;
    font-weight: 700;
    color: #365072;
}

.info-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-platinum { background: #e8f0f8; color: #365072; border: 1px solid #b0c8e0; }
.badge-bronze {background: #fef9e7;color: #9a6f00;border: 1px solid #f0d060;}
.badge-silverplus {background: #f4f4f4;color: #666;border: 1px solid #ccc;}
.badge-silver  { background: #f4f4f4; color: #666;    border: 1px solid #ccc;    }

.info-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

    .info-card__list li {
        font-size: 14px;
        color: #4a5e74;
        display: flex;
        align-items: flex-start;
        gap: 8px;
        width: 31%;
    }

.info-card__list li > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #365072;
    opacity: 0.7;
}

.info-card__list li i {
    color: #365072;
    font-size: 15px;
    margin-top: 1px;
    flex-shrink: 0;
}

.info-card__list a {
    color: #365072;
    text-decoration: none;
}

.info-card__list a:hover { text-decoration: underline; }

/* ── Responsivo ficha ── */
@media (max-width: 600px) {
    .info-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .info-card__list li { justify-content: center; }
}

/* ── Responsivo mapa ── */
@media (max-width: 768px) {
    .mapa-mx { max-width: 100%; }
}
