/* =====================================================
   MAPA DE SUCURSALES - CFL CRISTO REY
===================================================== */

.mapa-sucursales-section {
    padding: 80px 0;
    background: #f7f7f7;
}

.mapa-sucursales-header {
    text-align: center;
    margin-bottom: 35px;
}

.mapa-sucursales-subtitle {
    display: block;
    margin-bottom: 8px;
    color: #f47b20;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}

.mapa-sucursales-header h2 {
    margin: 0 0 12px;
    font-size: 34px;
    font-weight: 700;
}

.mapa-sucursales-header p {
    margin: 0 auto 22px;
    max-width: 650px;
    color: #777;
}

.mapa-location-btn {
    border: 0;
    padding: 13px 24px;
    border-radius: 4px;
    background: #f47b20;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
}

.mapa-location-btn:hover {
    background: #222;
}

.mapa-location-btn:disabled {
    opacity: .7;
    cursor: wait;
}

.mapa-location-status {
    min-height: 22px;
    margin-top: 10px;
    color: #777;
    font-size: 13px;
}

.nearest-message {
    margin: 0 auto 25px;
    max-width: 800px;
    padding: 15px 20px;
    border-left: 4px solid #f47b20;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
    text-align: center;
}

.nearest-message.hidden {
    display: none;
}

.mapa-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    min-height: 600px;
    overflow: hidden;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 35px rgba(0,0,0,.10);
}

.mapa-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mapa-search {
    padding: 18px;
    border-bottom: 1px solid #eee;
}

.mapa-search input {
    width: 100%;
    height: 46px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    font-size: 14px;
}

.mapa-search input:focus {
    border-color: #f47b20;
}

.sedes-list {
    overflow-y: auto;
    max-height: 550px;
}

.sede-card {
    padding: 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: .25s;
}

.sede-card:hover {
    background: #fafafa;
}

.sede-card.nearest {
    background: #fff8f2;
    border-left: 4px solid #f47b20;
}

.sede-number {
    display: inline-flex;
    width: 28px;
    height: 28px;
    margin-right: 8px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f47b20;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.sede-name {
    font-size: 16px;
    font-weight: 700;
}

.sede-distance {
    margin-top: 8px;
    color: #f47b20;
    font-size: 13px;
    font-weight: 700;
}

.sede-address {
    margin-top: 10px;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}

.sede-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.action-btn {
    display: inline-block;
    padding: 8px 11px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
}

.route-btn {
    background: #f47b20;
    color: #fff !important;
}

.whatsapp-btn {
    background: #25d366;
    color: #fff !important;
}

.mapa-container {
    position: relative;
    min-width: 0;
}

#map {
    width: 100%;
    height: 600px;
}

.center-user-btn {
    position: absolute;
    right: 15px;
    bottom: 25px;
    z-index: 500;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #222;
    font-size: 24px;
    line-height: 44px;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
    cursor: pointer;
}

.center-user-btn:hover {
    color: #f47b20;
}

.custom-marker {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #f47b20;
    box-shadow: 0 3px 10px rgba(0,0,0,.30);
    color: #fff;
    font-weight: 700;
    transform: rotate(-45deg);
}

.custom-marker span {
    transform: rotate(45deg);
}

.custom-marker.nearest-marker {
    width: 48px;
    height: 48px;
    background: #222;
}

.user-marker {
    width: 18px;
    height: 18px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #2878ff;
    box-shadow: 0 0 0 8px rgba(40,120,255,.20), 0 2px 8px rgba(0,0,0,.35);
}

.popup-title {
    margin-bottom: 3px;
    color: #f47b20;
    font-size: 13px;
    font-weight: 700;
}

.popup-sede {
    margin-bottom: 8px;
    font-size: 17px;
    font-weight: 700;
}

.popup-address {
    margin-bottom: 8px;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
}

.popup-distance {
    margin-bottom: 10px;
    color: #f47b20;
    font-size: 12px;
    font-weight: 700;
}

.popup-route {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 3px;
    background: #f47b20;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
}

@media (max-width: 991px) {
    .mapa-layout {
        grid-template-columns: 1fr;
    }

    .sedes-list {
        max-height: none;
    }

    .mapa-container {
        order: -1;
    }

    #map {
        height: 450px;
    }
}

@media (max-width: 575px) {
    .mapa-sucursales-section {
        padding: 55px 0;
    }

    .mapa-sucursales-header h2 {
        font-size: 27px;
    }

    #map {
        height: 380px;
    }

    .sede-actions {
        flex-wrap: wrap;
    }
}