.header-outer {
    position: fixed;
    width: 100%;
    z-index: 5;
    background: var(--body-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
}

.page-scrolled .header-outer {
    border-bottom: solid 1px #eee;
}

header {
    padding: 20px 40px;
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
}

header .logo-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

header .logo-section img {
    max-height: 50px;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

header nav>div {
    display: flex;
    align-items: center;
    justify-content: center;
}

header nav>div>a,
header nav>.nav-dropdown-wrapper>a {
    text-decoration: none;
    color: var(--light-grey-font-color);
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    position: relative;
    gap: 5px;
}

header nav>div>a span+svg {
    width: 10px;
    height: 10px;
    margin-top: -4px;
}

header nav>div>a:not(.has-dropdown)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 5px;
    border-radius: 3px;
    background: var(--highlight-color);
    transition: width 0.3s ease-in-out;
}

header nav>div>a.active::after,
header nav>div>a:not(.has-dropdown):hover::after {
    width: 100%;
}

header nav>div>a svg path {
    fill: var(--light-grey-font-color);
}

header nav>div>a.active svg path {
    fill: var(--highlight-color);
}

header nav>div>a.active,
header nav>div>a:not(.has-dropdown):hover {
    color: var(--highlight-color);
}

header nav>div>a.active svg path,
header nav>div>a:not(.has-dropdown):hover svg path {
    fill: var(--highlight-color);
}


header nav>div>a svg {
    width: 22px;
    height: 22px;
}

header .header-btns {
    display: flex;
    align-items: center;
    gap: 20px;
}

header .header-btns a {
    text-decoration: none;
    color: var(--light-grey-font-color);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    border: solid 1px var(--primary-button-color);
    background: #fff;
}

header .header-btns a.highlighted {
    background: var(--primary-button-color);
    color: #fff;
}

.nav-dropdown-wrapper {
    position: relative;
}


.menu-dropdown {
    position: absolute;
    left: 0;
    top: 40px;
    box-shadow: 0 0 3px #ccc;
    background: #fff;
    border-radius: 10px;
    z-index: 2;
    max-height: 0;
    overflow: hidden;
    transition: all 300ms ease-in-out;
}

.menu-dropdown.opened {
    max-height: 100vh;
}

.menu-dropdown .search-box {
    padding: 10px;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 5px;
    border-bottom: solid 1px var(--input-border-color);
}

.menu-dropdown .search-box input {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 5px;
    width: calc(100% - 37px);
}

.menu-dropdown .search-box input:focus {
    outline: none !important;
}

.menu-wrapper {
    display: flex;
    overflow: hidden;
}

.menu-dropdown .menu-wrapper .left-section {
    width: 300px;
    transition: all 300ms ease-in-out;
}


.menu-dropdown .menu-wrapper .left-section a {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.menu-dropdown .menu-wrapper .left-section a.clicked {
    background: #fafafa;
    border-bottom: solid 1px #eee;
}

.menu-dropdown.opened-sub-menu .menu-wrapper .left-section {
    border-right: solid 1px #eee;
}

.menu-dropdown .menu-wrapper .right-section {
    width: 300px;
    background: #fafafa;
    width: 0;
    overflow: hidden;
    transition: all 300ms ease-in-out;
    opacity: 0;
}

.menu-dropdown.opened-sub-menu .menu-wrapper .right-section {
    width: 300px;
    opacity: 1;
}

.menu-dropdown .menu-wrapper .right-section a {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.menu-dropdown .menu-wrapper .right-section a.menu-back {
    justify-content: flex-start;
    gap: 10px;
    display: none;
    height: 53px;
    border-bottom: solid 1px var(--input-border-color);
}

/* Responsive Header */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-font-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

header nav>div.login-link,
header nav>div.signup-link {
    display: none;
}

@media screen and (max-width: 1200px) {
    header nav {
        gap: 20px;
    }
}

@media screen and (max-width: 1024px) {

    header nav>div {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-dropdown-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-dropdown {
        position: static;
        border-radius: 0;
        margin-left: -20px;
        width: calc(100% + 40px);
        background: #fafafa;
    }

    .menu-dropdown .search-box {
        padding: 10px 20px;
        overflow: hidden;
        transition: all 300ms ease-in-out;
        position: relative;
    }

    .menu-dropdown.opened-sub-menu .search-box {
        display: none;
    }

    .menu-dropdown .menu-wrapper .left-section a {
        padding: 10px 20px;
    }

    .menu-dropdown.opened-sub-menu .menu-wrapper .left-section {
        width: 0;
    }

    .menu-dropdown.opened-sub-menu .menu-wrapper .right-section {
        width: 100%;
    }

    .menu-dropdown.opened-sub-menu .menu-wrapper .right-section a {
        padding: 10px 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-dropdown .menu-wrapper .right-section a.menu-back {
        display: flex;
    }

    header nav {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 300px;
        background: #fff;
        flex-direction: column;
        justify-content: flex-start;
        padding: 100px 0px;
        gap: 20px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 9;
        transition: right 0.3s ease;
        overflow-y: auto;
        overflow-x: hidden;
        max-width: 100%;
    }

    header nav.active {
        right: 0;
    }

    header nav>div {
        padding: 0 20px;
        justify-content: flex-start;
    }

    header nav>div>a,
    header nav>.nav-dropdown-wrapper>a {
        font-size: 1.25rem;
    }

    header nav>div.login-link,
    header nav>div.signup-link {
        display: none;
    }
}

@media screen and (max-width: 600px) {

    header .header-btns .login-link-btn,
    header .header-btns .signup-link-btn {
        display: none;
    }

    header nav>div.login-link,
    header nav>div.signup-link {
        display: flex;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 10px 20px;
    }

    header .logo-section img {
        max-height: 40px;
    }

    header .header-btns {
        gap: 10px;
    }

    header .header-btns a {
        padding: 0 15px;
        font-size: 0.875rem;
    }
}