/* ==============================
   GENERAL NAVIGATION STYLES
============================== */
.menu-container {
    display: flex;
    justify-content: space-between;
}
.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 20px;
    position: relative;
    z-index: 1000;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap:50px;
}

.nav-menu > .nav-item {
    position: relative;
    padding: 0 15px;
    position: relative;
    font-size:0.94em;
}
.nav-menu > .nav-item > a {
    font-family: "darkmode-off", sans-serif;
    font-weight:400 !important;
}
.home:not(.scrolled) .nav-menu > .nav-item > a {
    font-family: "darkmode-on", sans-serif;
    font-weight:500 !important;
}
.nav-menu > .nav-item.menu-item-has-children {
    padding-right:50px;
}
.nav-menu > .nav-item:after {
    content:'';
    display: block;
    width: 0;
    height:4px;
    position: absolute;
    bottom:-26px;
    left:0;
    background-color: #002C43;
    transition:0.6s all;
}
.home:not(.scrolled) .nav-menu > .nav-item:after {
    background-color: #fff;
}

.nav-menu > .nav-item:hover:after {
    width: 100%;
}


.nav-menu > .nav-item.menu-item-has-children > a::after  {
    content:'';
    display: block;
    position: absolute;
    right:15px;
    top:50%;
    transform: translateY(-50%);
    background-image: url(img/nav-down.svg);
    height:7.517px;
    width:15px;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    transition: 0.1s all;
    transform-origin: center;
    aspact-ratio:213 / 425;
}

.nav-menu > .nav-item.menu-item-has-children:hover > a::after  {
    transform: rotate(180deg);
}

.nav-menu > .nav-item > .menu-link {
    color: #0E405B;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease-in-out;
}

.home:not(.scrolled) .nav-menu > .nav-item > .menu-link {
    color: #ffffff;
}


/* ==============================
   FIX: OFFSET SUBMENUS USING PADDING
============================== */
.submenu-wrapper {
    position: absolute;
    left: 0;
    width: 100%;
    padding-top: 60px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

/* Inner container for background */
.submenu-content {
    background: #fff;
    padding: 20px;
    border-radius:0 0 4px 4px;
    min-width: 250px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    border-top:3px solid #1578CC;
    width:auto;
    width:40vw;
    transform:translateX(-33%);
}
.submenu-content:not(:has(.two-column-menu)) {
    padding-top: 40px;
}
.submenu-content:has(.two-column-menu) {
    width:70vw;
}

/* Show submenu only when hovering */
.nav-item:hover > .submenu-wrapper,
.submenu-wrapper:hover {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ==============================
   FIX: BUSINESS SECURITY TWO-COLUMN MENU
============================== */
.two-column-menu {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    

    padding: 20px;
    border-radius: 4px;
    gap: 40px;
}

/* Ensure columns are aligned properly */
.submenu-column {
    width: 100%;
    padding: 10px 20px;
    list-style:none;
}

.submenu-column:nth-of-type(1) {
    width: 30%;
    min-width:375px;
}
.submenu-column:nth-of-type(2) {
    width: 68%;
    border-left:1px solid #ccc;
    padding-left:2em;
}

/* Properly style submenu headings */
.explore-security .submenu-heading {
    color: #1578CC;
}
.submenu-heading {
    font-weight: bold;
    margin-bottom: 1.4em;
    font-size: 1.158em;
    display: block;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

ul.sub-menu-inner {
    margin: 0;
    padding: 0;
}

/* ==============================
   SINGLE-COLUMN MENU STYLING
============================== */
.sub-menu:not(.two-column-menu) {
    display: flex;
    flex-direction: column;
/*    width: 300px;*/
}

/* ==============================
   MENU ITEMS STYLING
============================== */
.sub-menu-item {
/*    padding: 12px 15px;*/
    margin: 0;
    padding:0;
    list-style:none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color:#1578CC;
    position: relative;
}

.sub-menu-item:not(.explore-item) {
    background-size: 0px;
    background-repeat: no-repeat;
    background-position: top 3em right 3em;
    transition:0.6s all;
    margin-bottom: 1em;
    padding-right:50px;
}
.sub-menu-item:not(.explore-item):hover {
    background-size:25px;
    background-image: url(img/icon-arrow-up-right.svg);
    background-position: top 16px right 13px;
}

.explore-item:after {
    content:'';
    display: block;
    position: absolute;
    top: 5px;
    right: 0;
    height: 17px;
    width: 22px;
    background-image: url(img/explore-arrow.svg);
    background-repeat: no-repeat;
    background-position: center;
    transition:0.6s all;
    transform:rotate(0deg);
    transform-origin: center center;
}

.explore-item:hover:after {
    transform: rotate(-45deg);
}

.sub-menu-item a.menu-link {
    color:#0E405B;

}

.sub-menu-item > a {
    font-weight:500;
}
.sub-menu-item > a > span {
    display: block;
    color:#6F8C9C;
    margin-bottom: 1em;
/*    font-weight: normal;*/
}

.sub-menu-item:last-child {
    border-bottom: none;
}

.sub-menu-item .menu-link {
    color: #ffffff;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.sub-menu-item:hover .menu-link {
}

.search-box {
    display: none;
    position: absolute;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);
}
.search-box input {

    height:60px;
    width:400px;
}

.header.search-open .main-nav ul {
    opactiy:0;
    visibility: hidden;
    pointer-events: none;
}
.header.search-open:before {
    content:'';
    display: block;
    height:calc(100% + 1px);
    width:100%;
    background-color: rgba(0, 0, 0, 0.6);
}

#search-toggle {
    background: transparent;
    border:0;
    margin-left:100px;
}

body.subnav-open .modal-bg {
    display: block;
}

/* ==============================
   RESPONSIVE DESIGN (MOBILE MENU)
============================== */

@media only screen and (max-width:1400px) {
    #search-toggle {
        display: none;
    }
    .main-nav, .header-contact {
/*        font-size:0.8em;*/
    }
}
@media only screen and (max-width:1280px) {

    .main-nav, .header-contact {
        font-size:0.9em;
    }
}
@media (max-width: 768px) {
    .menu-container {
        width: 100%;
    }
    #menu-main-menu {
        display: flex;
        position: relative;
        min-height:100vh;
        width: 100%;
    }
    .submenu-content {
        width: 100%;
        transform:none;
    }
    .menu-wrapper {
        display: none;
        width: 100%;
        position: fixed;
        top:0;
    }
    .main-nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }

    .nav-menu {
        flex-direction: column;
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #0d1b2a;
    }

    .nav-menu.active {
        display: block;
    }

    .nav-menu > .nav-item {
        width: 100%;
        text-align: center;
        padding: 12px 0;
    }

    .submenu-wrapper {
        position: static;
        display: none;
    }

    .nav-item:hover > .submenu-wrapper {
        display: block;
    }

    .two-column-menu {
        flex-direction: column;
        width: 100%;
    }

    .submenu-column {
        width: 100%;
    }
}
