/* ========================================
   HEADER
======================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    background-color: rgba(250, 249, 247, 0.96);

    border-bottom: 1px solid rgba(81, 56, 44, 0.12);

    transition:
        background-color var(--transicion),
        box-shadow var(--transicion);
}


/* ========================================
   CONTENEDOR
======================================== */

.header__container {
    width: min(
        calc(100% - 60px),
        var(--ancho-contenido)
    );

    min-height: 92px;

    margin-inline: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;
}


/* ========================================
   LOGO
======================================== */

.header__logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.header__logo img {
    width: auto;
    height: 70px;

    object-fit: contain;
}


/* ========================================
   NAVEGACIÓN
======================================== */

.header__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 32px;
}


.header__nav a {
    position: relative;

    font-family: var(--fuente-texto);
    font-size: 13px;
    font-weight: 300;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: var(--cafe);

    padding: 8px 0;

    transition:
        color var(--transicion);
}


/* Línea decorativa debajo del enlace */

.header__nav a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 2px;

    width: 100%;
    height: 1px;

    background-color: var(--verde-olivo);

    transform: scaleX(0);
    transform-origin: center;

    transition:
        transform var(--transicion);
}


.header__nav a:hover {
    color: var(--verde-olivo);
}


.header__nav a:hover::after {
    transform: scaleX(1);
}


/* ========================================
   BOTÓN MENÚ MÓVIL
======================================== */

.header__menu-toggle {
    display: none;

    width: 42px;
    height: 42px;

    padding: 8px;

    border: 1px solid rgba(81, 56, 44, 0.25);
    border-radius: var(--radio-suave);

    background: transparent;

    cursor: pointer;
}


.header__menu-toggle span {
    display: block;

    width: 100%;
    height: 1px;

    margin: 5px 0;

    background-color: var(--cafe);
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 950px) {

    .header__container {
        width: min(
            calc(100% - 40px),
            var(--ancho-contenido)
        );

        gap: 20px;
    }


    .header__nav {
        gap: 20px;
    }


    .header__nav a {
        font-size: 12px;
    }

}


/* ========================================
   MÓVIL
======================================== */

@media (max-width: 768px) {

    .header__container {
        min-height: 78px;
    }

    .header__logo img {
        height: 58px;
    }

    .header__nav {
        display: none;  /* por defecto oculto */
        position: absolute;
        top: 78px; /* altura del header */
        left: 0;
        width: 100%;
        background-color: var(--marfil);
        padding: 20px 30px;
        flex-direction: column;
        gap: 15px;
        border-bottom: 1px solid rgba(81, 56, 44, 0.12);
        box-shadow: 0 4px 10px rgba(81, 56, 44, 0.08);
    }

    .header__nav--open {
        display: flex;
    }

    .header__menu-toggle {
        display: block;
    }
}