/* ============================================================
   maps.css – Fundación MARCO
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: transparent;
    color: #333;
}

/* ── Contenedor mapa + lista (ocupa todo el body) ── */
.mapa-contenedor {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* ── Panel lateral ── */
.mapa-lista {
    width: 260px;
    min-width: 220px;
    background: #fff;
    overflow-y: auto;
    border-right: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.mapa-lista::-webkit-scrollbar {
    width: 4px;
}

.mapa-lista::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* Cada sucursal */
.sucursal-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    border-left: 4px solid transparent;
}

.sucursal-item:hover,
.sucursal-item.activo {
    background: #fdf0f2;
    border-left-color: #9C1836;
}

.sucursal-icono {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    background: #f5f5f5;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sucursal-icono img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.sucursal-info h3 {
    font-size: 0.82rem;
    font-weight: 700;
    color: #9C1836;
    margin-bottom: 4px;
    line-height: 1.3;
}

.sucursal-info p {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 3px;
    line-height: 1.4;
}

.sucursal-info p i {
    margin-right: 4px;
    color: #9C1836;
    width: 11px;
}

/* ── Mapa ── */
#mapa {
    flex: 1;
    height: 100%;
    z-index: 1;
}

/* ── Marcador logo ── */
.marco-marker {
    border-radius: 50%;
    border: 2px solid #9C1836;
    background: #fff;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ── Marcador fallback ── */
.marker-fallback {
    width: 38px;
    height: 38px;
    background: #9C1836;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.marker-fallback i {
    color: #fff;
    font-size: 1rem;
    transform: rotate(45deg);
}

/* ── Popup ── */
.popup-marco h4 {
    font-size: 0.88rem;
    color: #9C1836;
    margin-bottom: 6px;
    font-weight: 700;
}

.popup-marco p {
    font-size: 0.78rem;
    color: #555;
    margin-bottom: 4px;
}

.popup-marco p i {
    margin-right: 5px;
    color: #9C1836;
}

.popup-link {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 12px;
    background: #9C1836;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.76rem;
    transition: background 0.2s;
}

.popup-link:hover {
    background: #7a1229;
}

.popup-link i {
    margin-right: 4px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .mapa-contenedor {
        flex-direction: column;
    }

    .mapa-lista {
        width: 100%;
        max-height: 180px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    #mapa {
        height: 350px;
    }
}