#beforeafter {
    padding: 0 0 112px;
    overflow: hidden;
    position: relative;
    max-width: 1920px;
    margin: 0 auto;
}

.ba_img {
    background: url(../assets/bgba.jpg) top / cover no-repeat;
}

#beforeafter .main_gradient {
    padding: 0 0 120px;
}

#ba_block {
    width: 100%;
    height: 100%;
    position: relative;
}

.ba_slider {
    width: 1460px;
    height: 671px;
    margin: 0 auto;
    position: relative;
}

.animate-on-scroll.ba_slider {
    transform: translate(0, 100px);
    transition: all 0.5s linear;
    opacity: 0;
}

#ba_page {
    width: 100%;
    height: 100%;
    position: absolute;
}

* {
    margin: 0;
    box-sizing: border-box;
}

.wrapper {
    width: 1181px;
    height: 671px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    overflow: hidden;
    background: linear-gradient(180deg, #BD9C49 0%, #E6B843 63.5%, #EECE7F 79%, #8C7845 98.5%);
    padding: 2px;
}

.before,
.after {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background-repeat: no-repeat;
    background-color: #121212;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 2px;
    left: 2px;
    pointer-events: none;
    overflow: hidden;
}

.content-image {
    height: 100%;
}

.after {
    width: 125px;
}

.scroller {
    position: absolute;
    left: 100px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3px;
    height: 100%;
    background: #B0944D;
}

.scroller_romb {
    min-width: 53px;
    height: 53px;
    transform: rotate(-45deg);
    background: linear-gradient(180deg, #BD9C49 0%, #E6B843 63.5%, #EECE7F 79%, #8C7845 98.5%);
    padding: 2px;
    transition: all 0.2s ease;
    position: relative;
}

.scroller_inromb {
    background: #1c160e;
    width: 100%;
    height: 100%;
}

.scrolling {
    pointer-events: none;
    opacity: 1;
}

.scrolling.scroller:after {
    opacity: 0;
}

.scrolling.scroller .scroller_romb {
    opacity: 0;
}

.scroller__thumb {
    width: 100%;
    height: 100%;
    padding: 5px;
}

.scroller:after {
    content: " ";
    display: block;
    width: 38px;
    height: 38px;
    position: absolute;
    z-index: 3;
    transition: 0.3s;
    background-image: url(../assets/arrows.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.ba_novigator {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 1184px;
    margin: 0 auto;
    justify-content: center;
    padding: 45px 0 11px;
    min-height: 80px;
}

.ba_item {
    width: 12px;
    height: 12px;
    transform: rotate(-45deg);
    opacity: 0.24;
    background: #B0944D;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ba_item:hover {
    opacity: 1;
}

.ba_item_active {
    width: 16px;
    height: 16px;
    transform: rotate(-45deg);
    background: linear-gradient(227deg, #FFE5A3 0.25%, #CBA74C 62.05%, #EECE7F 97.57%);
    opacity: 1;
}

.ba_arrow {
    min-width: 62px;
    height: 62px;
    transform: rotate(-45deg);
    background: linear-gradient(180deg, #BD9C49 0%, #E6B843 63.5%, #EECE7F 79%, #8C7845 98.5%);
    padding: 2px;
    transition: all 0.2s ease;
    position: relative;
    transition: all 0.3s ease;
    position: absolute;
    z-index: 101;
    cursor: pointer;
}

.ba_inarrow {
    background: #1c160e;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ba_arrow img {
    transition: all 0.3s ease;
    transform: rotate(45deg);
}

.ba_arrow:hover img {
    filter: brightness(0) saturate(100%) invert(44%) sepia(14%) saturate(995%) hue-rotate(5deg) brightness(93%) contrast(86%);
}

.arrow_l {
    top: 305px;
    left: 0;
}

.arrow_l img {
    transform: rotate(225deg);
}

.arrow_r {
    top: 305px;
    right: 0;
}

@media (max-width: 1570px) {

    .ba_slider {
        width: 1285px;
        height: 584px;
    }

    .wrapper {
        width: 1032px;
        height: 584px;
    }

    .arrow_l {
        top: 260px;
        left: 0;
    }

    .arrow_r {
        top: 260px;
        right: 0;
    }
}

@media (max-width: 1430px) {

    .ba_slider {
        width: 947px;
        height: 419px;
    }

    .wrapper {
        width: 739px;
        height: 419px;
    }

    .ba_arrow {
        min-width: 48px;
        height: 48px;
    }

    .arrow_l {
        top: 184px;
        left: 0;
    }

    .arrow_r {
        top: 184px;
        right: 0;
    }

    .scroller_romb {
        min-width: 45px;
        height: 45px;
    }

    .scroller:after {
        width: 30px;
        height: 30px;
    }

    .ba_arrow img {
        width: 30px;
        height: 30px;
    }

    .ba_novigator {
        gap: 24px;
        max-width: 492px;
        padding: 40px 0 11px;
        min-height: 73px;
    }

    .ba_item {
        width: 9px;
        height: 9px;
    }

    .ba_item_active {
        width: 12px;
        height: 12px;
    }

}

@media (max-width: 1020px) {

    .arrow_l {
        top: auto;
        left: 260px;
        bottom: -75px;
    }

    .arrow_r {
        top: auto;
        right: 260px;
        bottom: -75px;
    }
}

@media (max-width: 930px) {

    .ba_slider {
        width: 100%;
    }
}

@media (max-width: 835px) {
    .arrow_l {
        left: 220px;
    }

    .arrow_r {
        right: 220px;
    }
}

@media (max-width: 780px) {

    .ba_slider {
        height: 333px;
    }

    .wrapper {
        width: 580px;
        height: 331px;
    }
}

@media (max-width: 760px) {
    .arrow_l {
        left: 200px;
    }

    .arrow_r {
        right: 200px;
    }
}

@media (max-width: 730px) {
    .arrow_l {
        left: 170px;
    }

    .arrow_r {
        right: 170px;
    }
}

@media (max-width: 665px) {
    .arrow_l {
        left: 120px;
    }

    .arrow_r {
        right: 120px;
    }
}

@media (max-width: 620px) {

    .wrapper {
        padding: 1.5px;
    }
    
    .before,
    .after {
        width: calc(100% - 3px);
        height: calc(100% - 3px);
        top: 1.5px;
        left: 1.5px;
    }

    .ba_arrow {
        padding: 1.4px;
    }

    .ba_slider {
        height: 254px;
    }

    .wrapper {
        width: 436px;
        height: 251px;
    }
}

@media (max-width: 560px) {
    .arrow_l {
        left: 75px;
    }

    .arrow_r {
        right: 75px;
    }
}

@media (max-width: 460px) {
    .arrow_l {
        left: 64px;
        bottom: -53px;
    }

    .arrow_r {
        right: 64px;
        bottom: -53px;
    }

    .wrapper {
        width: 340px;
        height: 194px;
    }

    .ba_slider {
        height: 196px;
    }

    .scroller_romb {
        min-width: 35px;
        height: 35px;
    }

    .ba_arrow {
        min-width: 33px;
        height: 33px;
    }

    .ba_novigator {
        padding: 24px 0 11px;
        gap: 27px;
        min-height: 60px;
    }
}

@media (max-width: 425px) {
    .arrow_l {
        left: 45px;
    }

    .arrow_r {
        right: 45px;
    }
}


@media (max-width: 385px) {
    .arrow_l {
        left: 25px;
    }

    .arrow_r {
        right: 25px;
    }
}