/* =========================================
   1. RESET Y CONFIGURACIÓN BASE
   ========================================= */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f9f9f9;
    overflow-x: hidden;
}

/* =========================================
   2. BARRA SUPERIOR (TOP-BAR) LÍQUIDA
   ========================================= */
   .top-bar {
    background-color: #1a1a1a;
    color: #ffffff;
    /* Padding proporcional al ancho de pantalla */
    padding: 0.8vw 5vw; 
}

.top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Eliminamos el max-width fijo para que sea líquido total */
    width: 100%;
    margin: 0 auto;
    /* Fuente que escala con la pantalla */
    font-size: 0.9vw; 
}

.contact-info {
    display: flex;
}

.contact-item {
    display: flex;
    align-items: center;
    /* Espaciado entre items proporcional */
    margin-right: 2vw; 
    opacity: 0.9;
}

.top-icon {
    /* El icono ahora escala con el texto */
    height: 1.1vw; 
    width: auto;
    margin-right: 0.5vw;
    border-radius: 0.1vw; 
}

.flags {
    display: flex;
    /* Hueco entre banderas proporcional */
    gap: 0.8vw;
}

.flags img {
    /* Banderas escalables */
    height: 1.2vw;
    width: auto;
    cursor: pointer;
    transition: transform 0.2s;
}

.flags img:hover {
    transform: scale(1.1);
}

/* =========================================
   10. MENÚ MÓVIL OVERLAY (TEXTO LÍQUIDO)
   ========================================= */
   .mobile-overlay {
    height: 100%;
    width: 0; 
    position: fixed;
    z-index: 2000;
    top: 0;
    right: 0;
    background-color: #ffffff;
    overflow-x: hidden;
    transition: 0.4s ease-in-out; 
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

.overlay-content {
    padding: 4vw 2vw; /* Padding líquido */
    width: 100%;
    display: flex;
    flex-direction: column;
}

.close-menu {
    position: absolute;
    top: 1.5vw;
    right: 2vw;
    font-size: 3vw; /* Icono líquido */
   
    cursor: pointer;
    color: #333;
}

.mobile-links {
    list-style: none;
    padding: 0;
    text-align: left; 
}

.mobile-links li {
    margin-bottom: 2vw; /* Espaciado líquido */
    position: relative;
}

.mobile-links a {
    text-decoration: none;
    font-size: 1.8vw; /* TEXTO LÍQUIDO PRINCIPAL */
    color: #333;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-block;
}

.mobile-links a:hover {
    color: #f50000;
}

/* --- LÓGICA DE HOVER PARA SUBMENÚ --- */
.mobile-submenu {
    list-style: none;
    padding-left: 1.5vw;
    margin-top: 0.8vw;
    border-left: 0.15vw solid #eee;
    
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease-in-out;
}

.mobile-dropdown:hover .mobile-submenu {
    max-height: 500px; 
    opacity: 1;
    margin-top: 1vw;
    margin-bottom: 1vw;
}

.mobile-submenu li {
    margin-bottom: 0.8vw;
}

.mobile-submenu a {
    font-size: 1.2vw; /* TEXTO LÍQUIDO SECUNDARIO */
    color: #666;
    font-weight: 400;
}

/* --- CONTACTO Y LOGO --- */
.separator {
    border: 0;
    border-top: 1px solid #eee;
    margin: 2vw 0;
}

.mobile-contact-info {
    width: 100%;
    text-align: left; 
}

.mobile-logo {
    height: 3.5vw; /* Logo líquido */
    min-height: 40px;
    margin-bottom: 2vw;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.mobile-contact-info h3 {
    color: #b43434;
    text-transform: uppercase;
    font-size: 1vw; /* Títulos de contacto líquidos */
    letter-spacing: 0.1vw;
    margin-bottom: 0.8vw;
    margin-top: 1.5vw;
}

.mobile-contact-info h3:first-of-type {
    margin-top: 0;
}

.mobile-contact-info p {
    font-size: 1vw; /* Párrafos de contacto líquidos */
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

/* =========================================
   3. NAVEGACIÓN (NAVBAR) - 100% LÍQUIDA Y CENTRADA
   ========================================= */
   .navbar {
    background: #ffffff;
    padding: 1vw 5%; 
    box-shadow: 0 0.2vw 1vw rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: grid;
    /* Tres columnas líquidas: los laterales ocupan el mismo espacio (1fr) */
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    height: 4vw; /* Altura líquida */
    max-height: 55px;
    min-height: 35px;
    width: auto;
    justify-self: start; /* Pegado a la izquierda de su columna */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5vw; /* Espacio líquido */
    justify-content: center; /* Centrado en la columna central */
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1.5vw; /* TAMAÑO LÍQUIDO */
    transition: color 0.3s;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
    color: #b43434;
}

/* Flechita líquida */
.arrow {
    font-size: 0.8vw;
    margin-left: 0.5vw;
}

/* LÓGICA DEL DESPLEGABLE LÍQUIDO */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(1vw);
    background-color: #ffffff;
    min-width: 15vw; /* Ancho líquido */
    box-shadow: 0 0.8vw 1.6vw rgba(0,0,0,0.1);
    list-style: none;
    padding: 1vw 0;
    border-radius: 0.4vw;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
    padding: 0.8vw 1.5vw;
    font-size: 1.2vw; /* Submenú líquido */
}

.menu-burger {
    justify-self: end; /* Pegado a la derecha de su columna */
    font-size: 2.5vw;
    cursor: pointer;
}






/* Estilos para el mensaje de éxito */
.form-success-message {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: #28a745; /* Verde éxito */
    color: white;
    font-size: 30px;
    line-height: 60px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.form-success-message h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.form-success-message p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-reset {
    background: transparent;
    border: 1px solid #ccc;
    padding: 8px 15px;
    cursor: pointer;
    color: #888;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-reset:hover {
    background: #f5f5f5;
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}








/* =========================================
   ESTILOS MÓVIL (MAX-WIDTH: 768px)
   ========================================= */
   @media screen and (max-width: 768px) {
    
    /* 1. Ajuste de la Barra Superior */
    .top-bar {
        padding: 2vw 4vw;
    }

    .top-content {
        font-size: 2.5vw;
    }

    .contact-item {
        margin-right: 3vw;
    }

    .top-icon {
        height: 4vw;
        margin-right: 1.5vw;
    }

    .flags img {
        height: 5vw;
    }

    /* 2. Navbar Principal en Móvil */
    .nav-container {
        grid-template-columns: 1fr 1fr; 
        padding: 2vw 0;
    }

    .logo {
        height: 8vw;
        max-height: 45px;
    }

    .nav-links {
        display: none; /* Escondemos el menú horizontal */
    }

    .menu-burger {
        display: block;
        font-size: 8vw;
        justify-self: end;
    }

    /* 3. Menú Lateral (Overlay) - 100% de la pantalla */
    .mobile-overlay {
        width: 0; 
        right: 0;
        left: 0; /* Asegura que cubra todo el ancho */
        position: fixed;
        height: 100%;
        background-color: #ffffff;
        z-index: 2000;
        transition: 0.4s ease-in-out;
        box-shadow: none; /* Sin sombra para full-screen */
        overflow-x: hidden;
    }

    .overlay-content {
        padding: 15vw 8vw;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow-y: auto; /* Permite scroll interno si el menú es largo */
    }

    .close-menu {
        position: absolute;
        top: 5vw;
        right: 6vw;
        font-size: 10vw;
        cursor: pointer;
        color: #333;
    }

    /* 4. Enlaces y Submenú */
    .mobile-links li {
        margin-bottom: 6vw;
    }

    .mobile-links a {
        font-size: 7vw; 
        color: #333;
        font-weight: 600;
        text-decoration: none;
    }

    /* Lógica de Submenú para clic en Móvil */
    .mobile-submenu {
        display: none; /* Oculto por defecto */
        list-style: none;
        padding-left: 5vw;
        margin-top: 3vw;
        border-left: 0.5vw solid #eee;
    }

    /* Esta clase se activa con el JS al tocar "Servicios" */
    .mobile-submenu.active {
        display: block;
    }

    .mobile-submenu li {
        margin-bottom: 4vw;
    }

    .mobile-submenu a {
        font-size: 5vw;
        color: #666;
        font-weight: 400;
    }

    /* 5. Info de Contacto y Separadores */
    .separator {
        border: 0;
        border-top: 1px solid #eee;
        margin: 8vw 0;
    }

    .mobile-logo {
        height: 12vw;
        margin-bottom: 8vw;
        display: block;
        margin-left: 0; /* Alineado a la izquierda */
    }

    .mobile-contact-info h3 {
        color: #b43434;
        text-transform: uppercase;
        font-size: 4.5vw;
        letter-spacing: 0.1vw;
        margin-bottom: 2vw;
        margin-top: 4vw;
    }

    .mobile-contact-info p {
        font-size: 4vw;
        color: #555;
        line-height: 1.5;
        margin-bottom: 1vw;
    }
}