@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ========================================= */
/* VARIABLES GLOBALES Y BASE                 */
/* ========================================= */
:root {
    --primary-color: #224c63;
    --background-color: #7ccede;
    --dark-color: #151515;
}

html {
    font-size: 62.5%;
    font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    position: relative; 
}

/* ========================================= */
/* FONDO FIJO MULTIPLATAFORMA */
/* ========================================= */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: linear-gradient(#00000080, #00000080), url('../IMG/BG/bg3.png'); 
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -100; /* Lo manda detrás de todos los demás elementos de tu página */
}

.container {
    max-width: 120rem;
    margin: 0 auto;	
    padding: 0 2rem; /* Cojín lateral global */
}

/* ========================================= */
/* HEADER Y NAVEGACIÓN                       */
/* ========================================= */
.container-hero {
    background-color: var(--background-color);
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0rem 0;
}

.container-logo {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 0.5rem;
    padding: 0; 
    width: 100%;
}

.container-logo img {
    width: 230px;
    height: 90px;
    object-fit: contain;
    display: block;
    margin: 0 auto; 
}

.container-logo a {
    cursor: pointer;
    display: flex;
    justify-content: center;
}

.container-navbar {
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.menu {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.menu a {
    text-decoration: none;
    font-size: 1.7rem; 
    color: #fff; 
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.menu a::after {
    content: '';
    width: 0; 
    height: 2px; 
    background-color: #fff;
    position: absolute;
    bottom: -5px;   
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.menu a:hover {
    color: var(--background-color);
    transform: translateY(-3px);
}

.menu a:hover::after {
    width: 100%;
    opacity: 1;
}

/* ========================================= */
/* SECCIÓN SUCURSALES                        */
/* ========================================= */
.main-content {
    padding: 4rem 2rem;
}

.branches-section {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.branches-title {
    font-size: 4rem;
    color: #fff; 
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
}

.branches-intro {
    font-size: 1.8rem;
    color: var(--background-color);
    margin-bottom: 4rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.branches-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4rem;
}

.branch-card {
    background-color: #fff;
    border-radius: 1.5rem;
    width: 380px;
    max-width: 100%;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.branch-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(34, 76, 99, 0.2);
}

.branch-img-container {
    position: relative;
    height: 350px;
    overflow: hidden;
    background-color: #fff; 
    padding: 3rem; 
}

.branch-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: transform 0.5s ease;
}

.branch-card:hover .branch-img-container img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: var(--background-color);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.branch-info {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.branch-info h3 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

.info-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.icon-box {
    width: 35px;
    height: 35px;
    background-color: #f0f8fb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-box i {
    font-size: 1.6rem;
    color: var(--primary-color);
}

.info-row p {
    font-size: 1.5rem;
    color: #555;
    line-height: 1.6;
}

.btn-map {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    padding: 1.2rem;
    border-radius: 5rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.btn-map:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

/* ========================================= */
/* FOOTER                                    */
/* ========================================= */
.footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 7rem 0 3rem 0; 
    margin-top: 6rem;
}

.container-footer {
    display: flex;
    flex-direction: column;
    gap: 5rem; 
    padding: 0 2rem;
}

.menu-footer {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

.information {
    justify-self: center;
}

.my-account {
    justify-self: end;
}

.title-footer {
    font-weight: 600;
    font-size: 1.8rem;
    text-transform: uppercase;
    color: var(--background-color); 
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
}

.contact-info,
.information,
.my-account {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.information ul,
.my-account ul,
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    padding: 0;
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    font-size: 1.4rem;
    font-weight: 300;
    line-height: 1.6;
    color: #ddd;
}

.contact-list i {
    color: var(--background-color);
    font-size: 1.8rem;
    margin-top: 0.2rem;
}

.information ul li a,
.my-account ul li a {
    text-decoration: none;
    color: #ddd;
    font-size: 1.5rem;
    font-weight: 300;
    transition: all 0.3s ease;
    display: inline-block;
}

.information ul li a:hover,
.my-account ul li a:hover {
    color: #fff;
    transform: translateX(6px); 
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    background-color: rgba(255, 255, 255, 0.08); 
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-btn img {
    width: 2.2rem;
    height: 2.2rem;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.social-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.social-btn:hover img {
    transform: scale(1.1);
}

.copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap; 
    gap: 2rem;
}

.copyright p {
    font-weight: 300;
    font-size: 1.4rem;
    color: #bbb;
    margin: 0;
}

.copyright img {
    max-height: 2.5rem;
    width: auto;
    opacity: 0.9;
}

/* ========================================= */
/* BOTÓN WHATSAPP FLOTANTE                   */
/* ========================================= */
.whatsapp-flotante {
    position: fixed;
    width: 80px;
    height: 80px;
    bottom: 40px; 
    right: 50px; 
    background-color: #32d851;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 50px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 1000; 
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.whatsapp-flotante:hover {
    background-color: #118d3e;
    transform: scale(1.1);
}

.whatsapp-flotante i {
    color: #FFF; 
}

/* ========================================= */
/* TÍTULO DE SECCIÓN (SOLO MÓVIL)            */
/* ========================================= */

.mobile-page-title {
    display: none;
}

/* ========================================= */
/* MEDIA QUERIES (SISTEMA RESPONSIVE GLOBAL) */
/* ========================================= */

/* 1. Monitores pequeños y Tablets horizontales (hasta 1024px) */
@media (max-width: 1024px) {
    html {
        font-size: 58%; 
    }
    .hero {
        padding: 1rem 2rem;
    }
    .menu-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-list li {
        justify-content: center;
    }
    .social-icons {
        justify-content: center;
    }
    .information, 
    .my-account {
        justify-self: center;
    }
}

/* 2. Tablets en vertical y Celulares (hasta 768px) */
@media (max-width: 768px) {
    html { font-size: 55%; }
    .container-logo {
        padding-left: 0;
        margin: 0 auto; 
    }
    .navbar {
        justify-content: space-between;
        padding: 1.5rem 2rem;
    }
    
    /* --- CONFIGURACIÓN DEL MENÚ MÓVIL --- */
    .menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--primary-color);
        text-align: center;
        z-index: 100;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        padding: 0;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        padding: 2rem 0;
    }

    .menu li { margin-bottom: 1.5rem; }

    /* --- ESTILOS DEL BOTÓN HAMBURGUESA ANIMADO (LA "X") --- */
    .navbar .fa-bars { display: none; } /* Ocultamos el icono viejo por si acaso */

    .menu-btn {
        display: block; 
        width: 30px;
        height: 25px;
        position: relative;
        cursor: pointer;
        z-index: 101; 
    }

    .menu-btn span {
        display: block;
        position: absolute;
        height: 3px; 
        width: 100%;
        background: #fff;
        border-radius: 9px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: .25s ease-in-out; 
    }

    .menu-btn span:nth-child(1) { top: 0px; }
    .menu-btn span:nth-child(2) { top: 10px; }
    .menu-btn span:nth-child(3) { top: 20px; }

    .menu-btn.open span:nth-child(1) {
        top: 10px;
        transform: rotate(135deg);
    }
    .menu-btn.open span:nth-child(2) {
        opacity: 0;
        left: -60px;
    }
    .menu-btn.open span:nth-child(3) {
        top: 10px;
        transform: rotate(-135deg);
    }

    /* --- ADAPTACIÓN DE SUCURSALES Y FOOTER --- */
    .branch-card {
        width: 100%; /* La tarjeta abarca todo el ancho en móviles */
    }
    .branches-title {
        font-size: 3rem;
    }
    .menu-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-list li, .social-icons {
        justify-content: center;
    }
    .information, .my-account {
        justify-self: center;
    }

    .mobile-page-title {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        color: #ffffff;
        font-size: 1.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
}

/* 3. Teléfonos Anchos y Horizontales (hasta 576px) */
@media (max-width: 576px) {
    html { font-size: 50%; }
    .container-logo img {
        width: 180px; 
        height: auto;
    }
    .branch-img-container {
        height: 300px; /* Reducimos la altura de la foto en celulares para que no ocupe toda la pantalla */
    }
    .copyright {
        flex-direction: column-reverse; 
        text-align: center;
        justify-content: center;
    }
    .whatsapp-flotante {
        width: 60px;
        height: 60px;
        bottom: 25px;
        right: 25px;
        font-size: 3rem;
    }
}

/* 4. Teléfonos Delgados (hasta 400px) */
@media (max-width: 400px) {
    .container-logo img { width: 150px; }
    .whatsapp-flotante {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
        font-size: 2.8rem;
    }
}