/* ==========================================================================
   Navigation
   The template's dropdowns are bare label lists. These rules add the
   one-line descriptions used on the Product and Solutions menus, and give
   the current page a visible state in the nav.
   ========================================================================== */

/* ------------------------------------------------ dropdowns with a description */

.skip-link {
    position: fixed;
    z-index: 10001;
    top: 12px;
    left: 12px;
    padding: 11px 16px;
    border-radius: 7px;
    background: var(--color-heading);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    color: #ffffff;
    transform: translateY(0);
}

/* ---------------------------------------------------- one shared header frame */

/*
 * The homepage previously used the wide shell while inner pages used the
 * narrower boxed-header variant. On laptop widths that pushed the CTA onto a
 * second row. Both layouts now share this single, non-wrapping frame.
 */
@media (min-width: 1024px) {
    nav.site-header-nav .site-header__shell {
        flex-wrap: nowrap;
        gap: 24px;
    }

    nav.site-header-nav .navbar-header,
    nav.site-header-nav .site-header__actions {
        flex: 0 0 auto;
    }

    nav.site-header-nav .navbar-collapse {
        flex: 1 1 auto;
        min-width: 0;
    }

    nav.site-header-nav ul.nav.navbar-nav.navbar-center {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
    }
}

/* ----------------------------------------------- inset inner-page header */

/*
 * Inner pages use the reference treatment: a white panel with rounded lower
 * corners, a bordered navigation group, and a solid purple action. The home
 * page keeps its transparent header over the hero.
 */
.site-header--inner .site-header__shell {
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(0, 6, 98, 0.08);
}

@media (min-width: 1024px) {
    .site-header--inner .site-header__shell {
        width: calc(100% - 60px);
        max-width: 1400px;
        min-height: 108px;
        padding: 0 28px;
        border-radius: 0 0 28px 28px;
        gap: 18px;
    }

    .site-header--inner .navbar-brand > img {
        height: 44px;
    }

    .site-header--inner nav.site-header-nav ul.nav.navbar-nav.navbar-center {
        padding: 0 8px;
        border: 1px solid #e1e2fa;
        border-radius: 8px;
        background: #fbfbff;
    }

    .site-header--inner nav.site-header-nav ul.nav > li > a {
        padding: 17px 8px;
        color: var(--color-heading);
        font-size: 13px;
    }

    .site-header--inner .site-header__cta {
        min-width: 178px;
        padding: 15px 26px;
        border-radius: 7px;
        text-align: center;
    }
}

@media (max-width: 1023px) {
    .site-header--inner .site-header__shell {
        width: calc(100% - 24px);
        padding-right: 18px;
        padding-left: 18px;
        border-radius: 0 0 20px 20px;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    nav.site-header-nav .site-header__actions {
        display: none;
    }

    nav.site-header-nav ul.nav > li > a {
        padding-right: 7px;
        padding-left: 7px;
        font-size: 13px;
    }
}

/* ------------------------------------------------ inner-page sticky state */

/*
 * Keep the inset reference layout at the top of an inner page, then return to
 * the site's original compact, full-width navigation treatment after scroll.
 */
@media (min-width: 1024px) {
    .site-header--inner nav.site-header-nav.sticked .site-header__shell {
        width: 100%;
        max-width: 960px;
        min-height: 0;
        padding: 0 15px;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        gap: 24px;
    }

    .site-header--inner nav.site-header-nav.sticked .navbar-brand > img {
        height: 50px;
    }

    .site-header--inner nav.site-header-nav.sticked ul.nav.navbar-nav.navbar-center {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .site-header--inner nav.site-header-nav.sticked ul.nav > li > a {
        padding: 28px 12px;
        font-size: 15px;
    }

    .site-header--inner nav.site-header-nav.sticked .site-header__cta {
        min-width: 0;
        padding: 16px 40px 14px;
        border-radius: 8px;
    }
}

@media (min-width: 1024px) and (max-width: 1199px) {
    .site-header--inner nav.site-header-nav.sticked ul.nav > li > a {
        padding-right: 7px;
        padding-left: 7px;
        font-size: 13px;
    }
}

@media (min-width: 1200px) {
    .site-header--inner nav.site-header-nav.sticked .site-header__shell {
        max-width: 95%;
    }
}

@media (min-width: 1400px) {
    .site-header--inner nav.site-header-nav.sticked .site-header__shell {
        max-width: 1800px;
    }
}

@media (min-width: 1024px) {
    nav.navbar.validnavs ul.dropdown-menu.nav-desc-menu {
        min-width: 400px;
        padding: 12px 0;
    }
}

nav.navbar.validnavs ul.dropdown-menu.nav-desc-menu > li > a {
    white-space: normal;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    line-height: 1.35;
}

.nav-desc-menu .nav-label {
    display: block;
    font-weight: 600;
}

.nav-desc-menu .nav-desc {
    display: block;
    /* the template capitalises every dropdown link; a sentence must not be */
    text-transform: none;
    margin-top: 3px;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
    opacity: 0.6;
}

/* ---------------------------------------------------------------- current page */

nav.navbar.validnavs ul.nav > li.current-menu-item > a,
nav.navbar.validnavs ul.nav > li.dropdown.active > a {
    color: var(--color-primary) !important;
}

nav.navbar.validnavs ul.dropdown-menu > li.current-menu-item > a,
nav.navbar.validnavs ul.dropdown-menu > li.current-menu-item > a .nav-label {
    color: var(--color-primary) !important;
}

/* ------------------------------------------------------- Discover Dynaiz banner */

.megamenu-banner .thumb a {
    display: block;
}

.megamenu-banner .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.megamenu-banner h4 a {
    color: inherit;
}

/* ----------------------------------------------------------------- side panel */

nav.navbar.validnavs .side .widget.newsletter p {
    margin-bottom: 0;
}

/* ------------------------------------------------- matching dropdown shape */

/*
 * The Discover Dynaiz megamenu is rounded to 20px, but the template gives the
 * plain dropdowns only 2px, so Product and Solutions read as a different shape
 * sitting under the same bar. Match them, and clip the item hover states to the
 * curve so the highlight does not square off the corners.
 */
@media (min-width: 1024px) {
    nav.navbar.validnavs li.dropdown ul.dropdown-menu {
        border-radius: 20px;
        overflow: hidden;
        padding-top: 14px;
        padding-bottom: 14px;
    }
}
