/* ==========================================================================
   HEADER Y MENÚ EMERGENTE - Grael
   Barra superior, navegación, botón WhatsApp y menú lateral móvil.
   ========================================================================== */

/* Con body.f-claro el header usa fondo azul Grael */
.f-claro .header {
    background-color: #035d96;
}

.header-navegacion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}
.logo img {
    width: 15rem;
}
.navegacion {
    display: none;
}

.navegacion-link {
    text-decoration: none;
    color: var(--color-blanco);
    font-size: 1.6rem;
    font-weight: 500;
}

.header-acciones {
    display: flex;
    gap: 1rem;
    align-items: center;
}
/* Navegación usuario (icono + globo) */
.usuario {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icono-usuario {
    width: 2.8rem;
    height: 2.8rem;
    cursor: pointer;
    display: block;
}

.usuario-navegacion {
    position: absolute;
    top: calc(100% + 0.9rem); /* debajo del icono */
    left: 50%;
    transform: translateX(-50%) translateY(0.6rem);
    min-width: 13rem;
    padding: 0.9rem 0;
    background-color: #ffffff;
    border-radius: 1.4rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease-out, transform 0.18s ease-out, visibility 0.18s ease-out;
    z-index: 1100;
}

.usuario-navegacion::before {
    content: "";
    position: absolute;
    top: -0.7rem;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 0.8rem 0.8rem 0.8rem;
    border-style: solid;
    border-color: transparent transparent #ffffff transparent;
}

.usuario-link {
    display: block;
    padding: 0.9rem 1.6rem;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-parrafo);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}

.usuario-link:hover {
    color: #035d96;
}

.usuario-link::after {
    content: "";
    position: absolute;
    left: 1.6rem;
    right: 1.6rem;
    bottom: 0;
    border-bottom: 1px solid #e0e0e0;
}

.usuario-link:last-child::after {
    border-bottom: none;
}

.usuario.usuario--abierto .usuario-navegacion {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}


.img-whatsapp img {
    width: 3.8rem;
    height: 3.8rem;
}


.menu-icono {
    width: 3rem;
    height: 3rem;
    cursor: pointer;
}
@media (min-width: 568px) {
    .img-whatsapp {
        display: none;
    }
}

@media (min-width: 768px) {
    .logo img {
        width: 16rem;
    }
    .header-acciones {
        gap: 2rem;
    }
   
}
@media (min-width: 950px) {
    .navegacion {
        display: flex;
        gap: 2rem;
    }
}
/* --- Menú emergente (móvil): cortina y panel lateral --- */
.menu-emergente-contenedor__cortina {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-emergente-contenedor--abierto .menu-emergente-contenedor__cortina {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.menu-emergente {
    position: fixed;
    top: 0;
    right: 0;
    width: 25%;
    min-width: 280px;
    height: 100%;
    background-color: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.menu-emergente-contenedor--abierto .menu-emergente {
    transform: translateX(0);
}

.menu-emergente__cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem;
    flex-shrink: 0;
}

.menu-emergente__marca {
    display: flex;
    align-items: center;
}

.menu-emergente__logo {
    width: 10rem;
    display: block;
}

.menu-emergente__cerrar {
    width: 2.8rem;
    height: 2.8rem;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    line-height: 1;
    color: var(--color-negro);
    border-radius: 4px;
}

.menu-emergente__lista {
    padding: 1.5rem 2rem ;
    overflow-y: auto;
}

.menu-emergente__enlace {
    text-decoration: none;

    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.4rem 0;
    border-bottom: 1px solid #e0e0e0;
    transition: color 0.2s;
}

.menu-emergente__enlace img {
    width: 2.4rem;
    height: 2.4rem;
}
.menu-emergente__enlace span {
    font-size: 1.6rem;
    font-weight: 450;
    color: #546f8b;
}
.menu-emergente__enlace:last-child {
    border-bottom: none;
}
