.header {
    position: fixed;
    background: transparent;
    z-index: 1000;
    width: 100%;
    transition: all .3s ease-in-out;
}
.header.scrolled {
    background: #FFFFFF;
    transition: all .3s ease-in-out;
}
.header .header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}
.header .header_logo img {
    max-height: 50px;
}

@media (max-width: 991px) {
    .header .header_menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-top: 1px solid #eee;
        padding: 16px;
    }
    .header .header_menu.active {
        max-height: 500px;
    }
}
.header .header_nav {
    display: flex;
    gap: 20px;
    list-style: none;
}
@media (max-width: 991px) {
    .header .header_nav {
        flex-direction: column;
        padding: 10px 20px;
    }
}
.header .header_nav > li {
    position: relative;
}
.header .header_nav > li:last-child{
    padding-right: 10px;
}
.header .header_nav > li a {
    display: block;
    padding: 10px;
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    color: #1E1437;
    cursor: pointer;
}
.header .header_nav > li a:hover {
    color: #6541E7;
}
.header .header_nav > li:hover > ul {
    display: block;
}
.header .header_nav > li ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    background: #fff;
    list-style: none;
    min-width: 180px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.header .header_nav > li ul.sub-menu li a {
    padding: 10px 15px;
}
.header .header_nav > li ul.sub-menu li a:hover {
    color: #6541E7;
}
.header .submenu-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
}
@media (max-width: 991px) {
    .header .header_nav > li ul.sub-menu {
        position: static;
        display: none;
        padding-left: 15px;
    }
    .header .header_nav > li:last-child{
        padding-right: initial;
    }
}
/*.header .header_nav > li.menu-item-has-children > a::after {*/
/*    content: '▾';*/
/*    margin-left: 5px;*/
/*    font-size: 15px;*/
/*}*/
@media (max-width: 991px) {
    .header .header_nav > li.menu-item-has-children > a::after {
        float: right;
        transform: rotate(0);
        transition: transform 0.3s;
    }
    .header .header_nav > li.menu-item-has-children.open > a::after {
        transform: rotate(180deg);
    }
    .header .header_nav > li.menu-item-has-children.open > .sub-menu {
        display: block;
    }
    .header .submenu-toggle {
        border: none;
        position: absolute;
        right: 0;
        top: 0px;
    }
}
.header .header__burger {
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    display: none;
}
.header .header__burger span, .header .header__burger::before, .header .header__burger::after {
    content: '';
    background: #000;
    height: 2px;
    width: 100%;
    position: absolute;
    left: 0;
    transition: 0.3s;
}
.header .header__burger span {
    top: 50%;
    transform: translateY(-50%);
}
.header .header__burger::before {
    top: 0;
}
.header .header__burger::after {
    bottom: 0;
}
/* Десктоп: показуємо підменю при hover */
@media (min-width: 992px) {
    .header_nav li.menu-item-has-children {
        position: relative;
        display: flex;
        align-items: center;
    }

    .header_nav li.menu-item-has-children:hover > .sub-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-height: 400px;
    }
    .header_nav li.menu-item-has-children:first-child:hover > .sub-menu{
        overflow-y: scroll;
    }

    .header_nav .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease;
        background: #fff;
        min-width: 200px;
        z-index: 10;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .header_nav .sub-menu li a {
        padding: 10px 15px;
        display: block;
        white-space: nowrap;
    }
}
.header .header__burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    height: 20px;
    width: 25px;
}

.header .header__burger span {
    display: block;
    height: 2px;
    background: #000;
    width: 100%;
    transition: 0.3s;
}
@media (max-width: 991px) {
    .header .header_menu.active {
        z-index: 1000;
    }
}
/* Мобільна логіка */
@media (max-width: 991px) {
    .header_nav .sub-menu {
        display: none;
    }

    .menu-item-has-children.open > .sub-menu {
        display: block;
    }
}
/* Додати в кінець */
@media (max-width: 991px) {
    .header .header__burger {
        display: block;
        z-index: 1001; /* над меню */
    }

    .header .header__burger span {
        display: block;
    }

    .header .header__inner {
        position: relative;
    }
}

body.lock {
        overflow: hidden;
    }

.header_btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 36px;
}
.header_notification {
    position: relative;
}
.header_notification img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.header_notification span {
    position: absolute;
    top: -6px;
    right: -7px;
    background-color: #E10856;
    border-radius: 10px;
    width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 12px;
}
.header_btn a {
    padding: 8px 22px;
    border-radius: 16px;
    background-color: #281950;
    border: 1px solid #281950;
    color: #FFFFFF;
    transition: all 0.3s ease-in-out;
}
.header_btn a:hover {
    transition: all 0.3s ease-in-out;
    background-color: #FFFFFF;
    color: #281950;
    border: 1px solid #281950;
}

.header_menu {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #FFFFFF;
    border-radius: 16px;
}

.header_menu_order {
    display: none;
}
@media (max-width: 992px) {
    body.lock {
        overflow: hidden;
    }
    .header .cont {
        padding: 0px;
    }

    .header .header_menu {
        position: fixed;
        left: 0;
        width: 100%;
        height: 100vh; /* повноекранне */
        background: #ffffff;
        padding: 100px 20px 30px; /* відступ згори під хедер */
        overflow-y: auto;
        max-height: none;
        z-index: 1000;
        border-radius: 0;
        border: none;
    }

    .header .header_menu.active {
        display: block;
        top: 0;
        max-height: unset;
    }

    .header .header_nav {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    .header .header_nav > li > a {
        font-size: 18px;
        padding: 15px 0;
    }

    .header .header_nav > li ul.sub-menu {
        padding-left: 16px;
    }

    .header .header__burger {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    .header .header__inner {
        position: relative;
        z-index: 1002;
        background: #fff;
        padding: 16px 20px;
    }

    .header_btns {
        flex-direction: column;
        gap: 20px;
        margin-top: 30px;
    }

    .header_btn,
    .header_notification {
        width: 100%;
        text-align: center;
    }

    .header_btn a {
        display: block;
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }

    .header_notification span {
        font-size: 12px;
        width: 18px;
        height: 18px;
        top: -5px;
        right: -5px;
    }

    .header_menu {
        border: none !important;
        background: #fff !important;
    }
    .header_logo,
    .header_menu_order {
        position: relative;
        z-index: 1001;
    }
    .header_notification {
        width: 26px;
        text-align: center;
    }
    .header_menu_order > a {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 8px 18px;
        gap: 8px;
        width: 100%;
        max-width: 141px;
        height: 40px;
        background: linear-gradient(180deg, #962FE6 0%, #5E43E7 100%);
        box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
        border-radius: 16px;
        color: #FFFFFF;
        font-family: 'Manrope';
        font-style: normal;
        font-weight: 500;
        font-size: 15px;
        line-height: 21px;
        letter-spacing: 0.46px;
        text-transform: capitalize;

    }
    .header_menu_order {
        display: flex;
        align-items: center;
        gap: 12px;

    }
    .header__inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        flex-wrap: nowrap;
        position: relative;
    }

    .header_menu_order {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 20px;
    }


    .header .header_nav > li {
        position: relative;
        text-align: center;
        border-bottom: 1px solid #EBEFFF;
        display: flex;
        justify-content: center;
        flex-direction: column;
    }
    .header .header_nav > li.open {
        background: #F9F9FB;
    }
    .header .header_nav > li.menu-item-has-children.open > .sub-menu {
        display: block;
        text-align: left;
        background: #FFFFFF;
    }
    .header .header_nav > li ul.sub-menu li {
        border-bottom: 1px solid transparent;

    }
    .header .header_nav > li ul.sub-menu {
        box-shadow: none;
    }
    .header .arrow {
        width: 35px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
