.header-nav {
    z-index: 1000;
    padding: 15px;
}

.header-nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav__item {
    margin: 0 15px;
}

.header-nav__link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    /*padding: 8px 12px;*/
    border-radius: 6px;
    transition: all 0.3s ease;
}

.header-nav__link:hover {
    background-color: #fbf7fc;
    color: #a5271a;
    /* color: #3498db; */
    width: 100%;
}

.hamburger {
    margin-block: auto;
    display: none;
    cursor: pointer;
}

.hamburger-close {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #333;
    transition: all 0.3s ease;
}

.submenu {
    display: none;
    list-style: none;
    padding: 12px 0;
    margin: 5px 0;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.submenu li {
    padding: 8px 20px;
    transition: background-color 0.2s ease;
}

.submenu li:hover {
    background-color: #fcf7f7;
}

.submenu li a {
    color: #2c3e50;
    text-decoration: none;
    display: block;
}

.header-nav__item.active .submenu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.header-nav__item.has-children > .header-nav__link::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    display: inline-block;
    margin-right: 6px;
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.header-nav__item.has-children.active > .header-nav__link::after {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .header-nav {
        direction: rtl;
    }

    .hamburger {
        display: block;
    }

    .header-nav__list {
        display: flex;
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background-color: white;
        width: 250px;
        height: 100vh;
        text-align: right;
        transition: 0.3s ease;
        box-shadow: -2px 0 20px rgba(0, 0, 0, 0.08);
        padding: 20px;
        transform: translateX(100%);
    }

    .header-nav__list.active {
        right: 0;
        padding-top: 48px;
        transform: translateX(0);
    }

    .header-nav__item {
        margin: 12px 0;
    }

    .header-nav__item::first-child {
        margin-top: 25px;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .submenu {
        background-color: #f8f9fa;
        box-shadow: none;
        border-radius: 8px;
        margin: 10px 0;
    }

    .hamburger .bar {
        height: 2px;
        background-color: #2c3e50;
        margin: 6px auto;
    }
}

.hamburger-close .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-close .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-close .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}