.regions-mega-menu {
    overflow: hidden;
}

.regions-mega-menu__inner {
    display: flex;
    min-height: 600px;
    @media screen and (max-width: 768px) {
        flex-direction: column;
        min-height: inherit;
    }
}

.regions-mega-menu__list-wrap {
    flex-shrink: 0;
    flex: 0 0 25%;
    max-width: 25%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-end;
    background: var(--wp--preset--color--primary);
    color:#fff;
    padding: 20px;
    gap: 50px;
    position: relative;
    @media screen and (max-width: 768px) {
        flex: 0 0 100%;
        max-width: 100%;
        flex-direction: column;
        gap: 20px;
        &::before{
            content: "";
            display: block;
            position: absolute;
            top: 0;
            right: 0;
            width: 100px;
            height: 100%;
            background: linear-gradient(-90deg, var(--wp--preset--color--primary) 15%, transparent 100%);
            z-index: 2;
            pointer-events: none;
        }
    }
    &::after{
        content: "";
        display: block;
        width: 100%;
        height: 100%;
        background: url('assets/images/bg-menu.webp') no-repeat center center;
        background-size: cover;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 0;
        opacity: .35;
        pointer-events: none;
    }
}

.regions-mega-menu__list-title {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5em;
    writing-mode: sideways-lr;
    text-orientation: mixed;
    font-size: 20px;
    position: relative;
    z-index: 1;
    @media screen and (max-width:1060px) {
        display: none;
    }
}

.regions-mega-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
    min-width: 200px;
    @media screen and (max-width: 768px) {
        width: 100%;
        display: flex;
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: scroll;
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none; /* Firefox */
        &::-webkit-scrollbar {
            display: none; /* Chrome, Safari, Opera */
        }
    }
}

.regions-mega-menu__item {
    margin: 0;
    position: relative;
    @media screen and (max-width: 768px) {
        flex: 0 0 auto;
        &:last-child{
            margin-right: 50px;
        }
    }
    &::after{
        content: "";
        display: block;
        width: 130%;
        height: 1px;
        background: #fff;
        position: absolute;
        left: 0.75em;
        bottom: 2px;
        transition: all .2s ease-in-out;
        max-width: 0;
        @media screen and (max-width: 768px) {
            width: 100%;
            left: 0;
        }
    }
}

.regions-mega-menu__link {
    display: block;
    width: 100%;
    padding: 0.5em 0.75em;
    text-align: left;
    font-weight: 300;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-family: var(--wp--preset--font-family--montserrat);
    color: #fff;
}

.regions-mega-menu__item.is-active{
    &::after{
        max-width: 100%;
    }
    .regions-mega-menu__link {
        font-weight: 700;
    }
}

.regions-mega-menu__panels {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 2;
    background: #FEF6F2 url('../../src/svg/favicon-bg.svg') no-repeat right center;
    background-size: 18% auto;
    @media screen and (max-width: 768px) {
        background-image: none;
    }
}

.regions-mega-menu__panel {
    display: none;
    padding: 1rem 2rem;
    @media screen and (max-width: 768px) {
        padding: calc(var(--wp--style--root--padding-left) * 2);
    }
}

.regions-mega-menu__panel[hidden] {
    display: none !important;
}

.regions-mega-menu__panel:not([hidden]) {
    display: block;
}

.regions-mega-menu__panel-inner {
    max-width: 100%;
}
