/*
 * Shared desktop header fitting
 * Keep the large-screen navigation inside the viewport and use the same
 * alignment on the homepage and every inner page.
 */
body.index {
    overflow-x: clip;
}

@media (min-width: 992px) {
    .header > .container {
        width: 100%;
        max-width: none;
        padding-right: clamp(24px, 2.15vw, 46px);
        padding-left: clamp(24px, 2.15vw, 46px);
    }

    .header .header__top {
        display: grid;
        grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
        gap: clamp(12px, 1.2vw, 26px);
        align-items: center;
        position: relative;
    }

    .header .header__top--left,
    .header .header__top--right,
    .header .header__bottom,
    .header .ttu-main-nav {
        min-width: 0;
    }

    .header .header__top--left {
        gap: clamp(18px, 1.65vw, 34px);
        overflow: hidden;
    }

    .header .header__top--left-item:first-child,
    .header .header__top--left-item.connec {
        flex: 0 1 auto;
        min-width: 0;
    }

    .header .header__top--left-item:first-child {
        flex-shrink: 0;
    }

    .header .header__top--left-item a img {
        width: auto;
        max-width: clamp(235px, 18vw, 350px);
        height: clamp(30px, 2.05vw, 38px);
    }

    .header .header__top--left-item.connec a {
        font-size: clamp(13px, 1vw, 16px);
        white-space: nowrap;
    }

    .header .ttu-test-mode-badge {
        display: inline-flex;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
        white-space: nowrap;
    }

    .header .header__top--right {
        display: flex;
        flex-wrap: nowrap;
        gap: clamp(7px, 0.65vw, 13px);
        justify-content: flex-end;
    }

    .header .header__top--right > a:not(.ttu-header-login),
    .header .header__top--right > .ttu-header-login,
    .header .header__top--right > .lang {
        flex: 0 0 auto;
    }

    .header .ttu-header-login {
        margin-left: clamp(8px, 0.85vw, 16px);
        padding-right: clamp(9px, 0.8vw, 12px);
        padding-left: clamp(9px, 0.8vw, 12px);
    }

    .header .header__bottom {
        display: grid;
        grid-template-columns: minmax(0, 1fr) clamp(210px, 14.5vw, 280px);
        gap: clamp(18px, 2vw, 40px);
        align-items: center;
    }

    .header .header__bottom--menu {
        width: 100%;
        max-width: 100%;
        gap: clamp(20px, 3vw, 66px);
        justify-content: center;
    }

    .header .ttu-header-search {
        width: 100%;
        min-width: 0;
        max-width: 280px;
    }
}

@media (min-width: 992px) and (max-width: 1650px) {
    .header .header__bottom--menu {
        gap: clamp(14px, 2vw, 34px);
    }
}

@media (min-width: 992px) and (max-width: 1240px) {
    .header .header__top--left-item.connec {
        display: none;
    }

    .header .header__bottom {
        grid-template-columns: minmax(0, 1fr) 205px;
        gap: 14px;
    }

    .header .header__bottom--menu {
        gap: 12px;
    }
}
