﻿/*
 * LLU 5.4.10
 * Desktop navigation follows the REAL inner page content box.
 *
 * The visible colored tiles are the <a class="llu-nav-item"> elements
 * themselves. No duplicate legacy color strip is allowed behind them.
 */

@media (min-width: 901px) {

    /* --------------------------------------------------------
       1) Remove the obsolete full-width hard-coded color stripe.
          This was the visual "ghost menu" left in the middle.
       -------------------------------------------------------- */

    body.llu-home .llu-scroll-nav--home,
    body > .llu-scroll-nav--home.is-stuck {
        background-image: none !important;
        background: var(--llu-page-bg) !important;
        background-color: var(--llu-page-bg) !important;
    }

    /* --------------------------------------------------------
       2) Track follows the page's real INNER content gutters.
          No receive-space is added to track padding on desktop.
       -------------------------------------------------------- */

    body.llu-home .llu-scroll-nav--home .llu-nav-track,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-track {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;

        padding-left: var(--llu-page-gutter-left, 0px) !important;
        padding-right: var(--llu-page-gutter-right, 0px) !important;

        justify-content: center !important;
        overflow: visible !important;
    }

    /* --------------------------------------------------------
       3) Move the REAL nav list. Color and click target therefore
          remain exactly on the same pixels during the whole scroll.
       -------------------------------------------------------- */

    body.llu-home .llu-scroll-nav--home .llu-nav-list,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list {
        transform: translate3d(var(--llu-nav-shift-x, 0px), 0, 0) !important;
        transform-origin: center center !important;
        will-change: transform;
        position: relative !important;
        z-index: 2 !important;
    }

    body.llu-home .llu-scroll-nav--home .llu-nav-item,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-item {
        position: relative !important;
        z-index: 1 !important;
        pointer-events: auto !important;
    }

    /* --------------------------------------------------------
       4) Preserve accepted 5.4.1 tile geometry for actual counts.
          This also prevents old generic sticky rules from stretching
          a 4-item menu across the full viewport.
       -------------------------------------------------------- */

    body.llu-home .llu-nav-list.llu-nav-count-1,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list.llu-nav-count-1 {
        flex: 0 0 123px !important;
        width: 123px !important;
        max-width: 123px !important;
        min-width: 123px !important;
        grid-template-columns: repeat(1, 123px) !important;
    }

    body.llu-home .llu-nav-list.llu-nav-count-2,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list.llu-nav-count-2 {
        flex: 0 0 246px !important;
        width: 246px !important;
        max-width: 246px !important;
        min-width: 246px !important;
        grid-template-columns: repeat(2, 123px) !important;
    }

    body.llu-home .llu-nav-list.llu-nav-count-3,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list.llu-nav-count-3 {
        flex: 0 0 369px !important;
        width: 369px !important;
        max-width: 369px !important;
        min-width: 369px !important;
        grid-template-columns: repeat(3, 123px) !important;
    }

    body.llu-home .llu-nav-list.llu-nav-count-4,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list.llu-nav-count-4 {
        flex: 0 0 492px !important;
        width: 492px !important;
        max-width: 492px !important;
        min-width: 492px !important;
        grid-template-columns: repeat(4, 123px) !important;
    }

    body.llu-home .llu-nav-list.llu-nav-count-5,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list.llu-nav-count-5 {
        flex: 0 1 900px !important;
        width: min(100%, 900px) !important;
        max-width: 900px !important;
        min-width: 0 !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    /* --------------------------------------------------------
       5) Left endpoint: sticky logo starts on exactly the same
          real page-content edge used by the navigation.
       -------------------------------------------------------- */

    body.llu-home .llu-scroll-nav--home.is-receiving-logo:not(.is-stuck)
        .llu-nav-sticky-tools,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-sticky-tools {
        left: var(--llu-page-gutter-left, 0px) !important;
    }
}
