/* =========================================================
   ATHENA INVESTMENTS
   ACCESSIBLE RESPONSIVE NAVIGATION
   ONE MENU - DESKTOP + MOBILE
========================================================= */

.site-header *,
.site-header *::before,
.site-header *::after {
    box-sizing: border-box;
}

.site-header {
    position: relative;
    z-index: 9999;
}

.main-navigation {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    position: relative;
    z-index: 10001;
}

.logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    display: block;
    width: auto;
    max-width: 153px;
    height: auto;
}

.nav-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu > .nav-item {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu > .nav-item > .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    margin: 0;
    padding: 10px 18px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

button.nav-link {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}

.submenu-toggle {
    gap: 8px;
}

.submenu-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: transform 0.25s ease;
}

.submenu-arrow svg {
    display: block;
    width: 10px;
    height: 6px;
}

.submenu-toggle[aria-expanded="true"] .submenu-arrow {
    transform: rotate(180deg);
}

.nav-link:focus-visible,
.menu-toggle:focus-visible,
.menu-close-btn:focus-visible,
.submenu a:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 3px;
    border-radius: 2px;
}

.menu-close-btn {
    display: none;
}

.submenu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.submenu[hidden] {
    display: none !important;
}

/* =========================================================
   DESKTOP
========================================================= */
@media screen and (min-width: 992px) {

    .nav-wrapper {
        display: flex;
        align-items: center;
        position: relative;
        z-index: 10000;
    }

    .nav-menu {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: auto;
        margin: 0;
        padding: 0;
    }

    .nav-menu > .nav-item {
        position: relative;
        display: flex;
        align-items: center;
    }

    .nav-menu > .nav-item > .nav-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
         padding: 15px 18px;
        white-space: nowrap;
    }

    /* Updated Desktop Dropdown Container Width */
    .nav-menu > .has-submenu > .submenu {
        position: absolute;
        top: calc(100% + 5px);
        left: -250px;
        z-index: 100000;
        display: none;
        width: max-content;
       width:550px;
        margin: 0;
        padding: 15px;
        background: #ffffff;
        border: 0;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
        border-radius: 6px;
        overflow: visible;
        transform: none;
    }

    /* JS OPEN STATE OR HOVER STATE */
    .nav-menu > .has-submenu.submenu-open > .submenu,
    .nav-menu > .has-submenu:hover > .submenu {
        display: block;
    }

    /* Vertical stack for AIF and PMS main blocks */
    .submenu-inner {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Individual section (AIF / PMS) */
    .submenu-column {
        position: relative;
        width: 100%;
        margin: 0;
        padding: 0 0 5px 0;
    }

    .submenu-column:last-child {
        padding-bottom: 0;
        padding-top: 16px;
    }

    /* Horizontal Divider Line between AIF and PMS */
    .submenu-column + .submenu-column {
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        border-left: 0;
    }

    .submenu-column h3 {
        margin: 0 0 5px;
        padding: 0;
         font-size: 20px;
    font-weight: bold;
    display: block;
        line-height: 1.4;
        font-weight: 700;
        color: #B8333E ;
    }

    /* Horizontal arrangement for items inside each section */
    .submenu-column ul {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .submenu-column li {
        display: block;
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
        list-style: none;
        max-width: 160px;
    }

    .submenu-column a {
        display: block;
        width: 100%;
        margin: 0;
        padding: 4px 0;
        color: #333333 !important
        font-size: 15px;
        line-height: 1.4;
        text-decoration: none;
        white-space: normal;
        transition: color 0.2s ease;
    }

    .submenu-column a:hover {
        padding-left: 0;
        color: #a92535;
    }

    .submenu-toggle {
        cursor: pointer;
    }

    .menu-toggle {
        display: none;
    }

    .mobile-overlay {
        display: none;
    }
}

/* =========================================================
   MOBILE / TABLET
========================================================= */
@media screen and (max-width: 991px) {

    .main-navigation {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .menu-toggle {
        position: relative;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        margin: 0;
        padding: 0;
        border: 1px solid rgba(0, 0, 0, 0.12);
        border-radius: 0;
        background: transparent;
        color: inherit;
        cursor: pointer;
    }

    .hamburger-icon {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 22px;
        height: 22px;
    }

    .hamburger-icon span {
        display: block;
        width: 100%;
        height: 2px;
        background: currentColor;
        transform-origin: center;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .menu-close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 100002;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        margin: 0;
        padding: 0;
        background: #f5f5f5;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 50%;
        color: inherit;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .menu-close-btn:hover {
        background: #e5e5e5;
    }

    .nav-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100000;
        display: block;
        width: min(400px, 88vw);
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: 75px 24px 35px;
        background: #ffffff;
        box-shadow: 15px 0 50px rgba(0, 0, 0, 0.15);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.35s ease, visibility 0.35s ease;
    }

    .nav-wrapper.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-menu {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .nav-menu > .nav-item {
        position: relative;
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .nav-menu > .nav-item > .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 56px;
        margin: 0;
        padding: 12px 0;
        text-align: left;
        white-space: normal;
    }

    .nav-menu > .has-submenu > .submenu {
        position: static !important;
        display: none;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent;
        border: 0;
        box-shadow: none;
        transform: none !important;
        overflow: visible;
    }

    .nav-menu > .has-submenu.submenu-open > .submenu {
        display: block;
    }

    .nav-menu > .has-submenu:hover > .submenu {
        display: none;
    }

    .nav-menu > .has-submenu.submenu-open:hover > .submenu {
        display: block;
    }

    .submenu-inner {
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 5px 0 15px 15px;
    }

    .submenu-column {
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 5px 0 10px;
    }

    .submenu-column + .submenu-column {
        margin-top: 10px;
        padding-top: 15px;
        border-top: 1px solid rgba(0, 0, 0, 0.07);
        border-left: 0;
    }

    .submenu-column h3 {
        margin: 5px 0 8px;
        padding: 0;
        font-size: 14px;
        line-height: 1.4;
        font-weight: 600;   color: #B8333E ;
    }

    .submenu-column ul {
        display: block;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .submenu-column li {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        max-width: none;
    }

    .submenu-column a {
        display: block;
        width: 100%;
        padding: 9px 0;
        text-decoration: none;
        white-space: normal;
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 99999;
        display: block;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-overlay.is-visible {
        opacity: 1;
        visibility: visible;
    }
}

@media screen and (max-width: 480px) {
    .nav-wrapper {
        width: min(360px, 90vw);
        padding: 75px 20px 30px;
    }

    .nav-menu > .nav-item > .nav-link {
        min-height: 54px;
        padding: 11px 0;
    }

    .submenu-inner {
        padding-left: 12px;
    }

    .submenu-column a {
        padding: 8px 0;
        font-size: 14px;
        line-height: 1.5;color:#333333
    }
}

@media screen and (max-width: 360px) {
    .nav-wrapper {
        width: 92vw;
        padding-left: 18px;
        padding-right: 18px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header *,
    .site-header *::before,
    .site-header *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}