/* Top menu */

.top-menu__list, .footer-menu__list {
    display: flex;
    gap: 8px 32px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.top-menu a, .footer-menu a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.top-menu a:hover, .top-menu__item.selected>a, .footer-menu a:hover {
    color: var(--color-accent);
    transition: var(--transition);
}

.top-menu__item--parent {
    position: relative;
}

.top-menu__list--children {
    position: absolute;
    left: 0;
    top: 50px;
    padding: 16px 24px;
    background: var(--color-white);
    box-shadow: 0 0 15px 3px rgba(0, 0, 0, .2);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: var(--transition);
}

.top-menu__item--parent>a {
    position: relative;
    padding-right: 20px;
}

.top-menu__item--parent>a:after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 12px;
    height: 100%;
    background: url('/local/img/icons/chevron-down.svg') left center no-repeat;
    transform: rotate(0);
    transition: var(--transition);
}

.top-menu__item--parent>a:hover:after {
    background-image: url('/local/img/icons/chevron-down-accent.svg');
    transition: var(--transition);
}

.top-menu__item--parent.is-active>ul {
    opacity: 1;
    pointer-events: auto;
    top: 35px;
    transition: var(--transition);
}

.top-menu__item--parent.is-active>a:after {
    transform: rotate(180deg);
    transition: var(--transition);
}

.top-menu__list--children {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.hamb {
    position: absolute;
    top: 50%;
    margin-top: -11px;
    right: 32px;
    width: 24px;
    height: 22px;
    display: none;
    z-index: 2;
}

.hamb i {
    position: absolute;
    left: 0;
    top: 10px;
    width: 100%;
    height: 2px;
    background: var(--color-text);
}

.hamb i {
    transition: all .5s ease-in-out;
}

.hamb i:first-child {
    top: 0;
}

.hamb i:nth-child(2) {
    opacity: 1;
    transition: opacity .5s ease-in-out;
}

.hamb i:last-child {
    top: unset;
    bottom: 0;
}


.top-menu.opened .hamb i:first-child {
    transform: rotate(45deg);
    top: 10px;
}

.top-menu.opened .hamb i:last-child {
    transform: rotate(-45deg);
    bottom: 10px;
}

.top-menu.opened .hamb i:nth-child(2) {
    opacity: 0;
}

@media (max-width: 1024px) {
    .top-menu__list {
        position: fixed;
        width: 100%;
        height: 100%;
        background: var(--color-white);
        top: 0;
        right: -100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 50px 24px 24px 24px;
        transition: var(--transition)
    }

    .top-menu.opened .top-menu__list {
        right: 0;
        transition: var(--transition)
    }

    .top-menu__list--children {
        position: static;
        max-height: 0;
        padding: 0 0 0 16px;
    }

    .top-menu__item--parent.is-active>.top-menu__list--children {
        max-height: 200px;
        box-shadow: unset;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .hamb {
        display: block;
    }

}
