/* ==========================================================================
   ESTILOS DE PÁGINA DE UBICACIÓN (SEDES & MAPA INTERACTIVO ACL)
   Diseño Corporativo Ejecutivo en Azul Marino (#06264f) con Acentos Naranja (#ff5f1f)
   ========================================================================== */

.locations-main {
    min-height: calc(100vh - 84px);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 40%, #eef3f8 100%);
    padding-bottom: 70px;
}

.locations-hero-section {
    padding: 55px 20px 40px;
}

.locations-container {
    max-width: 1260px;
    margin: 0 auto;
    width: 100%;
}

/* --- Encabezado de Sección --- */
.locations-header {
    text-align: center;
    margin-bottom: 40px;
}

.locations-header .section-pill-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--accent-orange-alt, #ff5f1f);
    background: rgba(255, 95, 31, 0.08);
    border: 1px solid rgba(255, 95, 31, 0.22);
    margin-bottom: 14px;
}

.locations-header h1 {
    color: var(--dark-blue, #06264f);
    font-size: clamp(28px, 3.8vw, 38px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 12px;
    line-height: 1.25;
}

.locations-header h1 .highlight {
    color: var(--accent-orange-alt, #ff5f1f);
}

.locations-header p {
    color: #64748b;
    font-size: 15.5px;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 680px;
}

/* --- Grilla de la Consola de Ubicaciones (Dashboard Split) --- */
.locations-console-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
    align-items: start;
}

/* --- Barra Lateral de Sedes (Izquierda) --- */
.locations-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Tarjeta Individual de Sucursal */
.branch-card {
    background: #ffffff;
    border: 1px solid rgba(6, 38, 79, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 18px rgba(6, 38, 79, 0.04);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.branch-card:hover {
    transform: translateY(-4px);
    border-color: var(--dark-blue, #06264f);
    box-shadow: 0 12px 28px rgba(6, 38, 79, 0.09);
}

.branch-card.is-active {
    border-color: var(--dark-blue, #06264f);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(6, 38, 79, 0.12);
}

/* Cabecera de la Tarjeta */
.branch-card-header {
    margin-bottom: 14px;
}

.branch-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.branch-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(6, 38, 79, 0.07);
    color: var(--dark-blue, #06264f);
}

.branch-card.is-active .branch-badge {
    background: var(--dark-blue, #06264f);
    color: #ffffff;
}

.branch-status-dot {
    font-size: 11.5px;
    font-weight: 600;
    color: #10b981;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.branch-status-dot i {
    font-size: 7px;
}

.branch-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.branch-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(6, 38, 79, 0.06);
    color: var(--dark-blue, #06264f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.branch-card:hover .branch-icon-box,
.branch-card.is-active .branch-icon-box {
    background: var(--dark-blue, #06264f);
    color: var(--accent-orange-alt, #ff5f1f);
    transform: scale(1.05);
}

.branch-title-group h2 {
    font-size: 17px;
    font-weight: 800;
    color: var(--dark-blue, #06264f);
    margin: 0 0 2px;
    line-height: 1.3;
}

.branch-city {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 600;
}

/* Dirección */
.branch-address {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 16px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.branch-address i {
    color: var(--accent-orange-alt, #ff5f1f);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 13px;
}

/* Chips de Contacto Rápido */
.branch-contact-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.chip-wa {
    background: rgba(37, 211, 102, 0.1);
    color: #0f766e;
    border: 1px solid rgba(37, 211, 102, 0.25);
}

.chip-wa:hover {
    background: #25d366;
    color: #ffffff;
    border-color: #25d366;
}

.chip-tel {
    background: rgba(6, 38, 79, 0.06);
    color: var(--dark-blue, #06264f);
    border: 1px solid rgba(6, 38, 79, 0.12);
}

.chip-tel:hover {
    background: var(--dark-blue, #06264f);
    color: #ffffff;
}

/* Botones de Acción de la Tarjeta */
.branch-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.btn-branch-focus {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--dark-blue, #06264f);
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-branch-focus:hover {
    background: var(--dark-blue, #06264f);
    color: #ffffff;
    border-color: var(--dark-blue, #06264f);
}

.btn-branch-directions {
    background: var(--dark-blue, #06264f);
    color: #ffffff;
    border: 1px solid var(--dark-blue, #06264f);
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-branch-directions:hover {
    background: var(--accent-orange-alt, #ff5f1f);
    border-color: var(--accent-orange-alt, #ff5f1f);
    color: #ffffff;
}

/* Tarjeta Inferior de Cobertura */
.branch-info-card {
    background: #ffffff;
    border: 1px solid rgba(6, 38, 79, 0.08);
    border-radius: 16px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 14px rgba(6, 38, 79, 0.03);
}

.info-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-card-item i {
    font-size: 18px;
    color: var(--dark-blue, #06264f);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.info-card-item div {
    display: flex;
    flex-direction: column;
}

.info-card-item strong {
    font-size: 12.5px;
    color: var(--dark-blue, #06264f);
    font-weight: 700;
}

.info-card-item span {
    font-size: 11.5px;
    color: #64748b;
}

.info-card-divider {
    height: 1px;
    background: #f1f5f9;
}

/* --- Panel del Mapa Interactivo (Derecha) --- */
.locations-map-display {
    background: #ffffff;
    border: 1px solid rgba(6, 38, 79, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(6, 38, 79, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Barra de Herramientas Superior del Mapa */
.map-controls-toolbar {
    background: #ffffff;
    border-bottom: 1px solid #edf2f7;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.map-pills-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.map-pill-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--dark-blue, #06264f);
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-pill-btn:hover {
    background: #ffffff;
    border-color: var(--dark-blue, #06264f);
}

.map-pill-btn.active {
    background: var(--dark-blue, #06264f);
    color: #ffffff;
    border-color: var(--dark-blue, #06264f);
}

.map-pill-btn.active i {
    color: var(--accent-orange-alt, #ff5f1f);
}

.map-external-link {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--dark-blue, #06264f);
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
}

.map-external-link:hover {
    background: var(--dark-blue, #06264f);
    color: #ffffff;
    border-color: var(--dark-blue, #06264f);
}

.map-external-link i.fa-google {
    color: var(--accent-orange-alt, #ff5f1f);
    transition: color 0.2s ease;
}

.map-external-link:hover i.fa-google {
    color: #ffffff;
}

/* Lienzo Oficial de Google Maps */
.gmaps-embed-wrapper {
    position: relative;
    width: 100%;
    height: 560px;
    background: #f1f5f9;
}

.gmaps-embed-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

/* Pie Informativo del Mapa */
.map-canvas-footer {
    background: #ffffff;
    border-top: 1px solid #edf2f7;
    padding: 12px 18px;
}

.map-status-info {
    font-size: 13px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-status-info i {
    color: var(--accent-orange-alt, #ff5f1f);
    font-size: 14px;
}

.map-status-info strong {
    color: var(--dark-blue, #06264f);
}

/* ==========================================================================
   ADAPTACIÓN MÓVIL Y TABLET
   ========================================================================== */
@media (max-width: 992px) {
    .locations-hero-section {
        padding: 40px 16px 30px;
    }

    .locations-console-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .locations-map-display {
        order: -1; /* En móvil, el mapa aparece primero para que el usuario vea de inmediato las ubicaciones */
    }

    .gmaps-embed-wrapper {
        height: 380px;
    }

    .map-controls-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .map-pills-selector {
        width: 100%;
        justify-content: center;
    }

    .map-pill-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
        font-size: 11.5px;
    }

    .map-external-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .locations-header h1 {
        font-size: 24px;
    }

    .locations-header p {
        font-size: 14px;
    }

    .branch-card {
        padding: 18px 16px;
    }

    .branch-actions-row {
        grid-template-columns: 1fr;
    }
}
