/* Navigation all elements styles */
.glacial-top-banner {
    position: fixed;
    width: 100%;
    left: 0;
    top: auto;
    padding: 0;
    z-index: 1020;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 7px 0 rgb(0 0 0 / 17%);
    --dropdown-width: 280px;
}

.nav-top-items, .site-navigation {
    height: auto;
    width: 100%;
}

.kc-banner-top-offset .glacial-top-banner {
    /*top: 50px;*/
}

.w-nav:after {
    content: "";
    display: none;
}

.header-logo {
    width: 100%;
    max-width: 250px;
}

.no-js .site-navigation ul,
.site-navigation .sub-menu.toggled-on,
.site-navigation ul li:hover > ul {
    display: block;
}

.site-navigation a:focus,
button.toggle-dropdown:focus,
button.menu-button:focus {
    outline: 1px solid #999;
    outline-offset: -2px;
}

.site-navigation a:focus:not(:focus-visible),
button.toggle-dropdown:focus:not(:focus-visible),
button.menu-button:focus:not(:focus-visible) {
    outline: none;
}

.site-navigation {
    display: flex;
    font-family: var(--nav-font);
    font-size: var(--nav-font-size);
    flex: 1;
    position: static;
    padding-bottom: 0;
    padding-top: 0;
}

.site-navigation a[href="#"]:hover {
    cursor: default;
}

button.toggle-dropdown {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding: 0;
    width: auto;
    position: absolute;
    right: var(--nav-horz-pad);
    top: 0;
    height: 100%;
    pointer-events: none;
}

.sub-menu button.toggle-dropdown {
    right: 0;
}

.site-navigation ul .toggle-dropdown.toggled-on svg {
    transform: rotate(180deg);
}

.site-navigation ul ul .toggle-dropdown svg {
    transform: rotate(270deg);
}

.site-navigation ul ul .toggle-dropdown.toggled-on svg {
    transform: rotate(90deg);
}

.gl-top-level > li.edge > ul {
    left: auto;
    right: 0;
}

.gl-dropdown-1 > li.edge > ul {
    left: auto;
    right: 100%;
}

ul.sub-menu.gl-dropdown-2 {
    left: var(--dropdown-width);
    top: 0;
}

.site-navigation a {
    width: 100%;
    padding: var(--nav-vert-pad) var(--nav-horz-pad);
    text-decoration: none;
    text-transform: var(--transform-top);
    font-weight: var(--weight-top);
    transition: 0s;
    line-height: 1.4;
}

.site-navigation a:not([href]) {
    cursor: default;
}

.site-navigation li.menu-item-has-children > a {
    padding-right: calc(var(--nav-horz-pad) + 17px);
}

.site-navigation > ul > li:not(.menu-item-has-children) > a {
    padding-right: var(--nav-horz-pad);
}

.site-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-navigation > ul {
    width: 100%;
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    align-items: center;
    justify-content: var(--nav-justify);
}

.site-navigation ul ul {
    font-size: 15px;
    display: none;
    position: absolute;
    width: var(--dropdown-width);
    top: 100%;
    left: 0;
    margin-left: 0;
    z-index: 999;
    /*box-shadow: 0 15px 30px 0 rgba(48, 66, 118, 0.2);*/
}

.site-navigation ul ul ul.gl-dropdown-3 {
    left: var(--dropdown-width);
    top: 0;
}

.site-navigation ul ul .toggle-dropdown {
    width: 15%;
    padding: 2px;
}

.site-navigation ul ul li {
    margin: 0;
    padding: 0;
}

.site-navigation ul ul a {
    font-size: var(--nav-font-size-drop);
    padding: var(--nav-vert-pad-drop) var(--nav-horz-pad-drop);
    font-weight: var(--weight-drop);
    text-transform: var(--transform-drop);
}

.site-navigation ul li {
    display: flex;
    position: relative;
    margin-right: 0;
    transition: 0s;
}

/*Top Level*/

.gl-top-level {
    gap: 5px;
}

.gl-top-level > li {
    background: var(--top-level-bg-color, none);
}

.gl-top-level > li > a {
    color: var(--top-level-color, #000);
}

.gl-top-level li > .toggle-dropdown svg {
    stroke: var(--top-level-color, #000);
}

.gl-top-level > li:hover {
    background: var(--top-level-bg-color-hover, none);
}

.gl-top-level > li:hover > a {
    color: var(--top-level-color-hover, #000);
}

.gl-top-level > li:hover > .toggle-dropdown svg {
    stroke: var(--top-level-color-hover, #000);
}

/* Current Menu Item*/
.gl-top-level > li.current-menu-item > a {
    color: var(--top-level-color-hover);
}

.gl-top-level li.current-menu-item > .toggle-dropdown svg {
    stroke: var(--top-level-color-hover);
}

.gl-top-level > li.current-menu-item {
    background: var(--top-level-bg-color-hover);
}

/* Dropdown 1 */
.gl-dropdown-1 > li {
    background: var(--lvl-1-bg-color);
}

.gl-dropdown-1 > li > a {
    color: var(--lvl-1-color);
}

.gl-dropdown-1 li > .toggle-dropdown svg {
    stroke: var(--lvl-1-color);
}

.gl-dropdown-1 > li:hover {
    background: var(--lvl-1-bg-color-hover);
}

.gl-dropdown-1 > li:hover > a {
    color: var(--lvl-1-color-hover);
}

.gl-dropdown-1 li:hover .toggle-dropdown svg {
    stroke: var(--lvl-1-color-hover);
}

/* Dropdown 2 */
.gl-dropdown-2 > li,
.gl-dropdown-2 ul > li {
    background: var(--lvl-2-bg-color);
}

.gl-dropdown-2 > li > a,
.gl-dropdown-2 ul > li > a {
    color: var(--lvl-2-color);
}

.gl-dropdown-2 .toggle-dropdown svg,
.gl-dropdown-2 ul .toggle-dropdown svg {
    stroke: var(--lvl-2-color);
}

.gl-dropdown-2 > li:hover,
.gl-dropdown-2 ul > li:hover {
    background: var(--lvl-2-bg-color-hover);
}

.gl-dropdown-2 > li:hover > a,
.gl-dropdown-2 ul > li:hover > a {
    color: var(--lvl-2-color-hover);
}

.gl-dropdown-2 li:hover .toggle-dropdown svg,
.gl-dropdown-2 ul li:hover .toggle-dropdown svg {
    stroke: var(--lvl-2-color-hover);
}

/* ====================== Mega menu (multi-column dropdowns) ====================== */
/* A .gl-mega <div> replaces the sub-menu <ul> for items flagged mega_menu (Glacial_Nav_Walker). */

/* Default: panel anchors to the left edge of its parent <li> and is sized by its columns.
   The <li> is already position:relative (set on .site-navigation ul li above). */
.gl-top-level > li.gl-mega-parent {
    position: relative;
}

.gl-mega {
    display: none;
    position: absolute;
    left: auto;
    right: auto;
    top: 100%;
    z-index: 99;
    background: var(--lvl-1-bg-color);
    box-shadow: 0 15px 30px 0 rgba(48, 66, 118, 0.2);
    padding: 20px 30px;
    flex-flow: row nowrap;
    gap: 0 20px;
}

/* Full-width (ACF full_width on): the panel spans the whole nav width. Desktop only —
   on mobile the .gl-mega rule further down stacks every mega panel in-flow regardless. */
@media (min-width: 992px) {
    /* The <li> goes position:static so .gl-mega resolves its containing block to
       .glacial-top-banner (position:fixed; width:100%) and can span edge-to-edge. */
    .gl-top-level > li.gl-mega-parent.gl-mega-full {
        position: static;
    }

    .gl-top-level > li.gl-mega-parent.gl-mega-full > .gl-mega {
        left: 0;
        right: 0;
        flex-flow: row wrap;
        justify-content: space-between;
    }

    /* With the <li> static, the absolutely-positioned caret would re-anchor to the
       banner and fly off to the top-right. Render it inline after the label instead,
       so it no longer depends on the <li> being a positioning context. */
    .gl-top-level > li.gl-mega-parent.gl-mega-full > .toggle-dropdown {
        position: static;
        height: auto;
    }

    .gl-top-level > li.gl-mega-parent.gl-mega-full > a {
        width: auto;
        padding-right: var(--nav-horz-pad);
    }
}

/* Hover opens the panel on DESKTOP ONLY. Unscoped, this beat the mobile
   .gl-mega.toggled-on rule on specificity ((0,4,2) vs (0,2,0)), so on a touch
   device the sticky :hover left after a tap forced the panel open regardless of
   the chevron — and closing it did nothing while the hover persisted. The plain
   dropdowns already had the equivalent guard (see the max-width: 991px block's
   `.site-navigation > ul > li:hover > ul { display: none }`); the mega menus
   never got one. */
@media (min-width: 992px) {
    .gl-top-level > li.gl-mega-parent:hover > .gl-mega {
        display: flex;
    }
}

.gl-mega-col {
    display: flex;
    flex-flow: column;
    min-width: 238px;
    margin: 0 10px;
}

.gl-mega-heading {
    color: var(--lvl-1-color);
    margin: 0 0 6px;
}

.gl-mega-heading.h3-top-marg {
    margin-top: 15px;
}

.gl-mega-heading > a {
    color: inherit;
    text-decoration: none;
}

.gl-mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gl-mega-links > li {
    display: block;
    background: transparent;
}

.gl-mega-links > li > a {
    display: block;
    color: var(--lvl-2-color);
    padding: var(--nav-vert-pad-drop, 8px) 0;
    text-decoration: none;
}

.gl-mega-links > li:hover > a {
    background: var(--lvl-2-bg-color-hover);
    color: var(--lvl-2-color-hover);
}

.site-navigation ul.gl-mega-links {
    background: var(--lvl-1-bg-color);
    position: static;
    width: auto;
}

/* .gl-mega-links is a <ul> inside the top-level <ul>, so `.site-navigation ul ul`
   hides it by default; this is what reveals it inside an open panel. Desktop
   only for the same reason as above — the mobile block re-reveals it from
   .toggled-on instead of from :hover. */
@media (min-width: 992px) {
    li.gl-mega-parent:hover ul {
        display: block;
    }
}

.top-dd-list a {
    color: var(--color);
    font-size: .9em;
    line-height: 1em;
    padding: 10px 20px;
    display: block;

    position: relative;
    vertical-align: top;
    text-decoration: none;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
}

@media (max-width: 991px) {

    .gl-top-level li.current-menu-item > .toggle-dropdown svg {
        stroke: #fff;
    }

    .w-nav-button {
        padding: 7px;
    }

    .gl-mega-heading.h3-white {
        text-align: left;
    }

    .w-nav-button.w--open {
        background-color: #031444;
    }

    .site-navigation a:focus,
    button.toggle-dropdown:focus,
    button.menu-button:focus {
        outline: none;
        outline-offset: 0;
    }

    button.toggle-dropdown {
        pointer-events: all;
        position: static;
        height: auto;
        padding: 0;
        width: 64px;
        background: var(--mobile-button-background);
    }

    .site-navigation {
        height: 100%;
        padding-bottom: 12em;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        position: fixed;
        background: var(--mobile-bg-color);
    }

    .site-navigation > ul > li {
        border-bottom: 1px solid var(--mobile-border-color);
    }

    .site-navigation ul ul.toggled-on ul, .site-navigation ul ul.toggled-on {
        display: block;
        padding-left: 1em;
        padding-bottom: 5px;
    }

    .site-navigation > ul > li:hover > ul {
        display: none;
    }

    .site-navigation ul ul .toggle-dropdown {
        display: none;
        visibility: hidden;
    }

    .site-navigation > ul {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .site-navigation ul li {
        width: 100%;
        align-items: stretch;
        background: transparent;
        position: static;
        flex-wrap: wrap;
        margin-right: 0;
    }

    .site-navigation li:hover {
        background: transparent;
    }

    .gl-top-level > li.current-menu-item {
        background: var(--mobile-bg-color);
    }

    .gl-top-level > li.current-menu-item a {
        color: var(--mobile-color);
    }

    .site-navigation li:hover > a {
        color: var(--mobile-color);
    }

    .site-navigation li:hover .toggle-dropdown svg {
        stroke: var(--mobile-color);
    }

    .site-navigation ul li a {
        color: var(--mobile-color);
        padding: 12px 10px;
    }

    .site-navigation button.toggle-dropdown svg {
        stroke: var(--mobile-color);
        width: 17px;
        height: 17px;
    }

    .site-navigation ul ul {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .site-navigation ul li a {
        width: 100%;
        text-align: left;
    }

    .site-navigation ul li.menu-item-has-children > a {
        flex: 1;
    }

    .menu-item-has-children > a:after {
        display: none;
    }

    .glacial-top-banner:before {
        content: '';
        display: none;
    }

    /* Mega menu on mobile: stack columns; open via the chevron (.toggled-on added by glacial.js). */
    .gl-mega {
        display: none;
        position: static;
        flex-direction: column;
        box-shadow: none;
        padding: 0;
        width: 100%;
        background: transparent;
    }

    .gl-mega.toggled-on {
        display: flex;
    }

    /* The nested lists are hidden by `.site-navigation ul ul`; on desktop the
       :hover rule above reveals them, so mobile needs its own. */
    .gl-mega.toggled-on .gl-mega-links {
        display: block;
    }

    .gl-mega-col {
        min-width: 0;
        margin: 0;
    }

    .gl-mega-heading {
        color: var(--mobile-color);
        padding: 12px 10px 4px;
    }

    .gl-mega-links > li > a {
        color: var(--mobile-color);
        padding: 8px 10px 8px 1.5em;
    }

}

/* ---------------------------------------------------------------------------
 * Primary nav overflow — trailing items collapse into a "More" dropdown.
 *
 * .site-navigation > ul is `flex-wrap: wrap`, so once the ten top-level items
 * stop fitting (around 1580px) the bar silently grew to two rows. js/glacial-nav-overflow.js
 * measures for that wrap and moves items off the end into the .gl-more list
 * until the bar is one row again — so nothing becomes unreachable, which is
 * what simply hiding the overflow would have done.
 *
 * The item is built to look exactly like a walker-rendered dropdown parent, so
 * it inherits the existing top-level, hover and dropdown styling; only the bits
 * that cannot be inherited live here.
 * ------------------------------------------------------------------------ */
.gl-top-level > li.gl-more > a {
    cursor: default;
}

/* Its dropdown hangs off the right edge — the item is always last in the bar. */
.gl-top-level > li.gl-more > .sub-menu {
    left: auto;
    right: 0;
}

/* Hidden until the script finds something to put in it (and below 992px, where
   the mobile menu lists every item anyway). */
.gl-top-level > li.gl-more[hidden] {
    display: none;
}

@media (max-width: 991px) {

    ul.gl-mega-links {
        padding-left: 1rem;
    }

    .gl-top-level > li.gl-more {
        display: none;
    }
}
