/* Desktop Horizontal Menu */

/* Desktop версія - меню на весь екран з верху */
@media (min-width: 1001px) {
    .start .wheader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 9999;
    }

    .start .wheader .menu__icon {
        position: absolute;
        right: 30px;
        top: 30px;
        z-index: 10000;
    }

    /* Менюhovер - на весь екран зверху */
    .start .hheader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        display: none;
        margin: 0;
        padding: 0;
        z-index: 9998;
        overflow-y: auto;
    }

    .start .wheader.menu_state_open .hheader {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Контейнер меню - горизонтальний */
    .start .hheader .menu-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 80px;
        max-width: 1200px;
        width: 100%;
        padding: 40px;
    }

    /* Мовне меню зверху */
    .start .hheader .langmenu {
        position: absolute;
        top: 40px;
        right: 100px;
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        gap: 15px;
    }

    .start .hheader .langmenu li {
        display: inline-block;
    }

    .start .hheader .langmenu li a {
        font-size: 18px;
        font-family: "Arial";
        color: rgb(101, 101, 101);
        text-decoration: none;
        padding: 5px 15px;
        transition: all 0.3s ease;
    }

    .start .hheader .langmenu li.active a,
    .start .hheader .langmenu li a:hover {
        color: #004298;
        font-weight: bold;
    }

    /* Основне меню та особистий кабінет - горизонтально */
    .start .wmenu,
    .start .wcabinet {
        flex: 0 0 auto;
    }

    .start .wmenu ul,
    .start .wcabinet ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .start .wmenu ul li,
    .start .wcabinet {
        position: relative;
        margin-bottom: 20px;
    }

    .start .wmenu ul li a,
    .start .wcabinet > a {
        font-size: 24px;
        font-family: "Arial";
        color: rgb(48, 75, 110);
        line-height: 1.75;
        text-decoration: none;
        display: block;
        transition: all 0.3s ease;
        position: relative;
        padding-left: 0;
    }

    .start .wmenu ul li a:hover,
    .start .wcabinet > a:hover {
        color: #004298;
        transform: translateX(10px);
    }

    .start .wmenu ul li a::before,
    .start .wcabinet > a::before {
        content: "";
        position: absolute;
        left: -20px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 2px;
        background-color: #72c224;
        transition: width 0.3s ease;
    }

    .start .wmenu ul li a:hover::before,
    .start .wcabinet > a:hover::before {
        width: 15px;
    }

    /* Підменю особистого кабінету */
    .start .wcabinet {
        position: relative;
    }

    .start .wcabinet::after {
        content: "";
        background-image: url(../img/nmenu.png);
        width: 10px;
        height: 16px;
        position: absolute;
        right: -25px;
        top: 12px;
        transition: transform 0.3s ease;
    }

    .start .wcabinet.active::after {
        background-image: url(../img/hmenu.png);
        width: 16px;
        height: 10px;
        transform: rotate(0deg);
    }

    .start .wcabinet ul {
        display: none;
        margin-top: 15px;
        padding-left: 20px;
    }

    .start .wcabinet.active ul {
        display: block;
    }

    .start .wcabinet ul li {
        margin-bottom: 10px;
    }

    .start .wcabinet ul li a {
        font-size: 18px;
        color: rgb(116, 116, 116);
        line-height: 1.5;
    }

    .start .wcabinet ul li a:hover {
        color: #004298;
    }

    /* Додатковий декор */
    .start .hheader::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg,
            transparent 0%,
            #72c224 25%,
            #004298 50%,
            #72c224 75%,
            transparent 100%);
    }
}

/* Mobile версія - залишаємо як є */
@media (max-width: 1000px) {
    .start .wheader {
        position: absolute;
        top: 26px;
        left: 0;
    }

    .start .wheader .menu__icon {
        display: block;
        width: 40px;
        height: 35px;
        position: relative;
        cursor: pointer;
        top: 0;
        left: 15px;
    }

    .start .wheader .menu__icon span {
        display: block;
        position: absolute;
        height: 5px;
        -webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
        -moz-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
        box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
        width: 100%;
        background: #fff;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: .25s ease-in-out;
    }

    .start .wheader .menu__icon span:nth-child(1) {
        top: 0px;
    }

    .start .wheader .menu__icon span:nth-child(2),
    .start .wheader .menu__icon span:nth-child(3) {
        top: 13px;
    }

    .start .wheader .menu__icon span:nth-child(4) {
        top: 26px;
    }

    .start .wheader.menu_state_open .menu__icon span:nth-child(1) {
        top: 21px;
        width: 0%;
        left: 50%;
    }

    .start .wheader.menu_state_open .menu__icon span:nth-child(2) {
        transform: rotate(45deg);
    }

    .start .wheader.menu_state_open .menu__icon span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .start .wheader.menu_state_open .menu__icon span:nth-child(4) {
        top: 18px;
        width: 0%;
        left: 50%;
    }

    .start .hheader {
        margin-top: 8px;
        width: 234px;
        padding-top: 20px;
        height: auto;
        padding-bottom: 20px;
        background-color: #fff;
        position: relative;
        z-index: 555;
        display: none;
    }

    .start .wheader.menu_state_open .hheader {
        display: block;
    }
}

/* Плавна прокрутка при відкритому меню на desktop */
@media (min-width: 1001px) {
    body.menu-open {
        overflow: hidden;
    }
}
