/* ==========================================================================
   D2C GAME — SHARED NAVIGATION FIX
   Keeps active states and mobile navigation consistent on every page.
   Loaded after all page-specific styles by templates/header.php.
   ========================================================================== */

/* Active desktop item: the PHP header adds .is-active from the current URL. */
/* ==========================================================================
   ACTIVE NAVIGATION
   Current URL is determined by templates/header.php
   ========================================================================== */

@media (min-width: 1024px) {


    /* ----------------------------------------------------------
       STANDARD TOP-LEVEL ACTIVE ITEM
       ---------------------------------------------------------- */

    .site-header
    .site-nav
    > a.is-active:not(:last-child) {
        color:
            var(
                --color-white,
                #fff
            ) !important;
    }


    /*
     * Purple current-page line.
     */

    .site-header
    .site-nav
    > a.is-active::after,

    .site-header
    .site-nav-dropdown.is-active
    > .site-nav-dropdown__summary::after {

        content:
            "" !important;

        position:
            absolute !important;

        left:
            0 !important;

        right:
            0 !important;

        bottom:
            -17px !important;

        height:
            2px !important;

        border:
            0 !important;

        border-radius:
            999px !important;

        background:
            #8B5CF6 !important;

    }


    /* ----------------------------------------------------------
       SERVICES
       ---------------------------------------------------------- */

    .site-header
    .site-nav-dropdown__summary {
        position:
            relative !important;
    }


    .site-header
    .site-nav-dropdown.is-active
    > .site-nav-dropdown__summary {

        color:
            var(
                --color-white,
                #fff
            ) !important;

    }


    /* ----------------------------------------------------------
       ACTIVE PAGE INSIDE SERVICES DROPDOWN
       ---------------------------------------------------------- */

    .site-header
    .site-nav-dropdown__menu
    a.is-active {

        background:
            var(
                --color-purple-50,
                #f5f0ff
            ) !important;

        color:
            var(
                --color-purple,
                #6d28d9
            ) !important;

        font-weight:
            750 !important;

    }


    /*
     * Do not use the main-header underline
     * inside the dropdown itself.
     */

    .site-header
    .site-nav-dropdown__menu
    a.is-active::after {

        content:
            none !important;

        display:
            none !important;

    }

}

/* One mobile header/menu treatment for every public page. */
@media (max-width: 1023px) {
    .site-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        width: 100% !important;
        min-height: 72px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #050817 !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
        color: #fff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .site-header .header-inner {
        position: relative !important;
        width: min(100% - 32px, 1180px) !important;
        max-width: none !important;
        min-height: 72px !important;
        height: 72px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 20px !important;
    }

    .site-header .brand {
        position: relative !important;
        z-index: 2 !important;
        margin: 0 !important;
        color: #fff !important;
        text-decoration: none !important;
    }

    .site-header .menu-toggle {
        position: relative !important;
        z-index: 2 !important;
        display: inline-flex !important;
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 42px !important;
        margin: 0 0 0 auto !important;
        padding: 8px !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        gap: 5px !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        color: #fff !important;
        cursor: pointer !important;
    }

    .site-header .menu-toggle span {
        display: block !important;
        width: 23px !important;
        height: 2px !important;
        margin: 0 !important;
        background: #fff !important;
        border: 0 !important;
        border-radius: 999px !important;
        opacity: 1;
        transition: transform .2s ease, opacity .2s ease !important;
    }

    .site-header .menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg) !important;
    }

    .site-header .menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0 !important;
    }

    .site-header .menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg) !important;
    }

    .site-header .site-nav {
        position: absolute !important;
        top: 100% !important;
        left: calc(50% - 50vw) !important;
        right: calc(50% - 50vw) !important;
        z-index: 1 !important;
        display: none !important;
        width: 100vw !important;
        margin: 0 !important;
        padding: 14px 24px 24px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        background: #050817 !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
        box-shadow: 0 18px 32px rgba(0, 0, 0, .18) !important;
    }

    .site-header .site-nav.open {
        display: flex !important;
    }

    .site-header .site-nav a,
    .site-header .site-nav a:last-child {
        position: relative !important;
        display: flex !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 14px 0 !important;
        align-items: center !important;
        justify-content: flex-start !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        color: #fff !important;
        font-size: 16px !important;
        line-height: 1.25 !important;
        font-weight: 650 !important;
        text-align: left !important;
        text-decoration: none !important;
    }

    .site-header .site-nav a:hover,
    .site-header .site-nav a:focus-visible {
        color: #fff !important;
    }

    .site-header .site-nav a.is-active {
        color: #fff !important;
        text-decoration-line: underline !important;
        text-decoration-color: #8B5CF6 !important;
        text-decoration-thickness: 2px !important;
        text-underline-offset: 7px !important;
    }
    .site-header
.site-nav-dropdown.is-active
> .site-nav-dropdown__summary {

    color:
        #fff !important;

    text-decoration-line:
        underline !important;

    text-decoration-color:
        #8B5CF6 !important;

    text-decoration-thickness:
        2px !important;

    text-underline-offset:
        7px !important;

}

    /* Disable desktop pseudo-underlines inside the stacked mobile menu. */
    .site-header .site-nav a::after {
        content: none !important;
    }
}


/* ======================================================================
   SERVICES: PAGE LINK + SEPARATE DROPDOWN TOGGLE
   The Services text is an ordinary navigation link inside <summary>.
   Stop click propagation on the link so the native <details> control
   only toggles when its arrow / summary area is clicked.
   Loaded last by templates/header.php so other global nav rules do not
   enlarge the link or change the existing appearance.
   ====================================================================== */

.site-header .site-nav .site-nav-dropdown__summary > .site-nav-dropdown__page-link {
    display: inline-flex !important;
    position: static !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    font: inherit !important;
    line-height: inherit !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer;
}

.site-header .site-nav .site-nav-dropdown__summary > .site-nav-dropdown__page-link::after {
    content: none !important;
    display: none !important;
}

.site-header .site-nav .site-nav-dropdown__summary > .site-nav-dropdown__page-link:focus-visible {
    outline: 2px solid #8B5CF6;
    outline-offset: 5px;
    border-radius: 2px;
}

.site-header .site-nav .site-nav-dropdown__summary > .site-nav-dropdown__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    min-height: 24px;
    cursor: pointer;
}


/* The dropdown's existing pseudo-element bridges the small space between
   the Services label and the menu, keeping the mouse hover uninterrupted. */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    .site-header .site-nav-dropdown__summary > .site-nav-dropdown__page-link:hover,
    .site-header .site-nav-dropdown__summary > .site-nav-dropdown__page-link:focus-visible {
        color: #fff !important;
    }
}
