/* ===============================
   CONTENEDOR GENERAL
================================ */
.sucursales-wrapper{
    max-width:1250px;
    margin:auto;
    padding:0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ===============================
   BANNER SUCURSALES
================================ */
.banner-sucursales{
    position: relative;
    height: 90vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-sucursales::before{
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1;
}

.banner-sucursales .banner-texto{
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 900px;
    padding: 0 20px;
    width: 100%;
}

.banner-sucursales .banner-texto h4{
    font-size: clamp(14px, 3vw, 18px);
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.banner-sucursales .banner-texto h2{
    font-size: clamp(28px, 6vw, 44px);
    margin-bottom: 15px;
    line-height: 1.2;
}

.banner-sucursales .banner-texto p{
    font-size: clamp(16px, 3.5vw, 20px);
    margin-bottom: 30px;
    line-height: 1.4;
}

.banner-sucursales .btn-banner{
    background: #ffcc00;
    color: #000;
    padding: 14px 40px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: .3s;
    display: inline-block;
    font-size: clamp(14px, 2.5vw, 16px);
}

.banner-sucursales .btn-banner:hover{
    background: #e6b800;
    transform: translateY(-2px);
}

/* ===============================
   TITULO PRINCIPAL
================================ */
.sucursales-titulo{
    text-align:center;
    font-size: clamp(24px, 5vw, 42px);
    font-weight:800;
    margin: 40px 0 30px;
    padding: 0 10px;
    line-height: 1.3;
}

/* ===============================
   BUSCADOR
================================ */
.buscador-sucursales{
    max-width:520px;
    margin:20px auto 15px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 20px;
    border-radius:50px;
    border:1px solid #ddd;
    background:#f7f7f7;
    width: calc(100% - 40px);
    box-sizing: border-box;
}

.buscador-sucursales i{
    color:#666;
    font-size: 18px;
    flex-shrink: 0;
}

.buscador-sucursales input{
    border:none;
    outline:none;
    background:transparent;
    width:100%;
    font-size:16px;
    min-width: 0;
    padding: 5px 0;
}

/* ===============================
   BOTÓN UBICACIÓN
================================ */
.ubicacion-usuario{
    text-align:center;
    margin-bottom:25px;
    padding: 0 10px;
}

.ubicacion-usuario button{
    background:#b30000;
    color:#fff;
    border:none;
    padding:12px 26px;
    border-radius:40px;
    font-size:15px;
    cursor:pointer;
    transition:.3s;
    max-width: 100%;
    width: auto;
}

.ubicacion-usuario button:hover{
    background:#8f0000;
}

/* ===============================
   GRID SUCURSALES
================================ */
.sucursales-grid{
    display:flex;
    flex-direction:column;
    gap: 60px;
    padding-bottom: 40px;
}

/* ===============================
   CARD SUCURSAL
================================ */
.sucursal-card{
    display:flex;
    gap: 40px;
    align-items:flex-start;
    scroll-margin-top: 230px;
    width: 100%;
}

/* ===============================
   INFO SUCURSAL
================================ */
.sucursal-info{
    width:45%;
    min-width: 0;
}

.sucursal-info h3{
    font-size: clamp(22px, 4vw, 36px);
    font-weight:800;
    margin-bottom:20px;
    color:#111;
    line-height: 1.3;
}

.sucursal-info .label{
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight:700;
    margin-top:18px;
    margin-bottom:6px;
    color:#000;
}

.sucursal-info p{
    font-size: clamp(14px, 2.5vw, 18px);
    line-height:1.6;
    color:#444;
    margin-bottom:6px;
    word-wrap: break-word;
}

.telefono{
    font-size: clamp(16px, 3vw, 20px);
    margin-top:6px;
}

.telefono a{
    font-weight:700;
    color:#000;
    text-decoration:none;
}

.distancia{
    margin-top:10px;
    font-size: clamp(14px, 2.5vw, 16px);
    color:#777;
}

/* ===============================
   MEDIA CONTAINER - MAPAS CUADRADOS
================================ */
.sucursal-media{
    width: 55%;
    max-width: 55%;
    flex-shrink: 0;
    position: relative;
}

.sucursal-foto img{
    width:100%;
    border-radius:12px;
    margin-bottom:15px;
    box-shadow:0 8px 20px rgba(0,0,0,.15);
    display: block;
    height: auto;
    object-fit: cover;
}

/* Foto y Mapa - MÁS CUADRADOS */
.media-foto,
.media-mapa{
    width: 100%;
    height: 420px;              /* 👈 MÁS CUADRADO desktop */
    border-radius: 12px;
    display: none;
    object-fit: cover;
}

/* Mostrar solo el activo */
.media-foto.active,
.media-mapa.active{
    display: block;
}

/* Iframe de mapa */
.media-mapa iframe{
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    display: block;
}

/* Botón toggle */
.btn-toggle-media{
    margin-top: 12px;
    background: #111;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-toggle-media:hover{
    background: #a40000;
}

/* ===============================
   BOTONES SUCURSAL
================================ */
.sucursal-botones{
    margin-top:30px;
    display:flex;
    gap:15px;
    flex-wrap:wrap;
}

.sucursal-botones a{
    padding:14px 24px;
    font-size: clamp(14px, 2.5vw, 16px);
    font-weight:600;
    border-radius:50px;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content: center;
    gap:8px;
    transition:.3s;
}

.sucursal-botones a:not(.btn-wsp){
    background:#fff;
    color:#000;
    border:2px solid #cfcfcf;
}

.sucursal-botones a:not(.btn-wsp):hover{
    background:#000;
    color:#fff;
    transform:translateY(-2px);
}

.btn-wsp{
    background:#25d366;
    color:#fff;
    border:2px solid #25d366;
    box-shadow:0 6px 18px rgba(37,211,102,.35);
}

.btn-wsp:hover{
    background:#1ebe5d;
    border-color:#1ebe5d;
    transform:translateY(-2px) scale(1.03);
}

/* ===============================
   WHATSAPP FLOTANTE
================================ */
.whatsapp-float{
    position:fixed;
    width:58px;
    height:58px;
    bottom:25px;
    right:25px;
    background:#25d366;
    color:#fff;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
    box-shadow:0 8px 20px rgba(0,0,0,.3);
    z-index:9999;
    text-decoration:none;
    transition:.3s;
}

.whatsapp-float:hover{
    transform:scale(1.1);
}

/* ===============================
   RESPONSIVE - TABLET (≤ 1024px)
================================ */
@media(max-width:1024px){
    .sucursal-card{
        flex-direction:column;
        gap: 30px;
    }

    .sucursal-media,
    .sucursal-info{
        width:100%;
        max-width: 100%;
    }

    .media-foto,
    .media-mapa{
        height: 400px;          /* 👈 Cuadrado tablet */
    }
}

/* ===============================
   RESPONSIVE - MOBILE (≤ 768px)
================================ */
@media(max-width:768px){
    .banner-sucursales{
        height: auto;
        min-height: 350px;
        padding: 60px 0;
    }

    .banner-texto{
        padding: 0 15px;
    }

    .banner-texto h2{
        font-size: clamp(24px, 7vw, 32px);
    }

    .banner-texto p{
        font-size: clamp(14px, 4vw, 16px);
    }

    .banner-sucursales .btn-banner{
        padding: 12px 30px;
        font-size: 14px;
    }

    .sucursales-titulo{
        font-size: clamp(22px, 6vw, 28px);
        margin: 30px 0 25px;
    }

    .buscador-sucursales{
        padding: 10px 16px;
        gap: 10px;
        width: calc(100% - 30px);
    }

    .buscador-sucursales input{
        font-size: 15px;
    }

    .ubicacion-usuario button{
        padding: 10px 22px;
        font-size: 14px;
    }

    .sucursal-info h3{
        font-size: clamp(20px, 5vw, 26px);
    }

    .sucursal-info .label,
    .sucursal-info p,
    .telefono,
    .distancia{
        font-size: clamp(14px, 3.5vw, 16px);
    }

    .sucursal-botones{
        gap: 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .sucursal-botones a{
        justify-content: center;
        padding: 12px 20px;
        font-size: 15px;
    }

    .media-foto,
    .media-mapa{
        height: 350px;          /* 👈 Cuadrado móvil */
    }
}

/* ===============================
   RESPONSIVE - MÓVIL PEQUEÑO (≤ 480px)
================================ */
@media(max-width:480px){
    .sucursales-wrapper{
        padding: 0 15px;
    }

    .banner-sucursales{
        min-height: 300px;
    }

    .banner-texto h4{
        font-size: 13px;
        letter-spacing: 1px;
    }

    .banner-texto h2{
        font-size: 22px;
    }

    .banner-texto p{
        font-size: 14px;
        margin-bottom: 20px;
    }

    .banner-sucursales .btn-banner{
        padding: 10px 24px;
        font-size: 13px;
    }

    .sucursales-titulo{
        font-size: 20px;
        margin: 25px 0 20px;
    }

    .buscador-sucursales{
        padding: 8px 14px;
        border-radius: 40px;
        width: 100%;
        margin: 15px auto 10px;
    }

    .buscador-sucursales i{
        font-size: 16px;
    }

    .buscador-sucursales input{
        font-size: 14px;
    }

    .ubicacion-usuario button{
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 35px;
    }

    .sucursal-card{
        gap: 25px;
        scroll-margin-top: 200px;
    }

    .sucursal-info h3{
        font-size: 20px;
        margin-bottom: 15px;
    }

    .sucursal-info .label{
        margin-top: 14px;
        margin-bottom: 4px;
        font-size: 14px;
    }

    .sucursal-info p{
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 4px;
    }

    .telefono{
        font-size: 16px;
    }

    .distancia{
        font-size: 13px;
        margin-top: 8px;
    }

    .sucursal-botones{
        margin-top: 20px;
        gap: 10px;
    }

    .sucursal-botones a{
        padding: 10px 16px;
        font-size: 14px;
    }

    .media-foto,
    .media-mapa{
        height: 300px;          /* 👈 Cuadrado móvil pequeño */
        border-radius: 12px;
    }

    .btn-toggle-media{
        padding: 8px 16px;
        font-size: 13px;
    }

    .whatsapp-float{
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 26px;
    }
}

/* Animación suave */
.sucursal-card {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}