:root {}

.mst-flex {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

/* Top Bar */
.header-container {
    max-height: 145px;
    position: fixed;
    z-index: 9;
    width: 100%;
    top: 0;
    background-color: var(--the-white);
    transition: background-color 0.3s, max-height 0.3s;
    display: flex;
    align-items: baseline;
    border-bottom: 1px solid var(--the--font);
    padding: 10px 0;
}

.header-container.scrolled {
    max-height: 90px;
    background-color: #fff;
}

#menu-primary-menu li a {
    font-size: 18px;
}

/* Main Logo */
.header-container.scrolled .main-logo img.black-logo {
    transition: 500ms;
    position: relative;
    top: 0;
    /* padding: 4px; */
    width: 200px;
}

/* Menu Links and Colors */
.header-container.scrolled .the-primary-menu .site-menu li a,
.header-container.scrolled #mega-menu-wrap-primary #mega-menu-primary>li.mega-menu-item>a.mega-menu-link {
    color: var(--the--font) !important;
}

.header-container.scrolled .search-trigger::before,
.header-container.scrolled .search-trigger span::before,
.header-container.scrolled .search-trigger span::after {
    color: var(--the--font) !important;

}

/* Mega Menu */
.header-container.scrolled #mega-menu-wrap-primary .mega-menu-toggle .mega-toggle-block-0 .mega-toggle-animated-inner,
.header-container.scrolled #mega-menu-wrap-primary .mega-menu-toggle .mega-toggle-block-0 .mega-toggle-animated-inner::before,
.header-container.scrolled #mega-menu-wrap-primary .mega-menu-toggle .mega-toggle-block-0 .mega-toggle-animated-inner::after {
    background-color: var(--the-black);
}

.header-container.scrolled #mega-menu-wrap-primary #mega-menu-primary>li.mega-menu-item>a.mega-menu-link {
    color: var(--the-dark-blue) !important;
}




/* === Desktop Menu === */
#menu-primary-menu {
    display: flex !important;
    gap: 1.5em;
}

.burger-icon {
    display: none;
    /* Hide burger on desktop */
}

.close-icon {
    display: none;
    /* Only visible on mobile */
}

#menu-primary-menu li:last-of-type a {
    background: var(--the-blue);
    padding: 10px 20px;
    color: var(--the-white);
    border-radius: 9px;
}

#menu-primary-menu li a {
    transition: 500ms;
    padding: 5px;
}

/* All menu items EXCEPT the last: hover effect */
#menu-primary-menu li:not(:last-of-type) a:hover {
    background: var(--the--purple);
    padding: 5px;
    border-radius: 9px;
}

/* Last menu item: keep base style, custom hover */
#menu-primary-menu li:last-of-type a {
    background: var(--the-blue);
    padding: 10px 20px;
    color: var(--the-white);
    border-radius: 9px;
}

/* Optional: custom hover for last item */
#menu-primary-menu li:last-of-type a:hover {
    background: var(--the--purple);
    color: var(--the-blue);
}

#menu-primary-menu li.current-menu-item a {
    background: var(--the--purple);
    padding: 5px;
    border-radius: 9px;
    color: var(--the-blue);
    /* Optional: make text color white for contrast */
}


/* === Mobile Menu === */
@media (max-width: 1000px) {
    .the-primary-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: var(--the--purple);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
        transition: left 0.4s ease;
        z-index: 999;
        display: flex;
        flex-direction: column;
        padding: 20px;
    }

    .the-primary-menu .menu {
        list-style: none;
        padding: 0;
        margin: 60px 0 0 0;
        display: flex;
        flex-direction: column;
    }

    .the-primary-menu .menu li {
        margin-bottom: 20px;
        text-align: center;
    }

    .the-primary-menu .menu li a {
        text-decoration: none;
        color: var(--the-black);
        font-size: 20px;
        display: block;
        padding: 10px 0;
    }

    .burger-icon {
        display: block;
        font-size: 39px;
        cursor: pointer;
        z-index: 1001;
        color: var(--the-blue);
    }

    .close-icon {
        font-size: 28px;
        text-align: right;
        cursor: pointer;
        color: var(--the-blue);
    }

    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 998;
        transition: all 0.4s ease;
    }
.close-icon {
    display: block;
    /* Only visible on mobile */
}

    /* When menu is active */
    .menu-open .the-primary-menu {
        left: 0;
        /* Slide menu in */
    }

    .menu-open .menu-overlay {
        display: block;
        /* Show overlay */
    }
}