body {
    overflow-x: hidden;
}

.galleryPreview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 96px 0;
    text-align: center;
}

.galleryPreview h2 {
    font-size: 48px;
    font-weight: 700;
    color: #1A2A3A;
}

.galleryPreviewSubHeader {
    font-size: 20px;
    font-weight: 400;
    color: #1A2A3A;
}

.galleryPreviewBlock {
    width: fit-content;
    margin: 48px auto 0 auto;
    padding: 0;
}

.beforeAfterHeader {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 95%;
    margin: 0 auto 24px auto;
    padding: 0;
}

.beforeAfterHeader p {
    margin: 0;
    padding: 0;
    color: #1A2A3A;
    font-size: 16px;
    font-weight: 400;
}

.beforeAfterContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: fit-content;
    margin: 0 auto;
    max-width: 1440px !important;
}

.beforeAfterSlider {
    width: 1086px;
    height: 763px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 48px;
}

.beforeAfterImageContainer {
    position: relative;
    width: 100%;
    height: 100%;
}

.beforeImage, .afterImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.afterImage {
    clip: rect(0, auto, auto, 0);
}

.slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 5px;
    background-color: #ffffff;
    cursor: ew-resize;
    transform: translateX(-50%);
    z-index: 10;
}

.sliderHandle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 74px;
    height: 40px;
    background-color: white;
    border-radius: 40px;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
}

.sliderHandle::before {
    content: '';
    position: absolute;
    inset: 0 -20px;
}

.sliderHandle::after {
    align-items: center;
    background: white url('../../images/icons/baArrows.svg') no-repeat center;
    border-radius: 40px;
    content: '';
    display: flex;
    font-size: 16px;
    font-weight: bold;
    justify-content: center;
    min-height: 42px !important;
    min-width: 42px !important;
}

.galleryPreview button {
    width: 148px;
    height: 59px;
    border-radius: 40px;
    background-color: #1a2a3a;
    font-size: 18px;
    color: var(--main-white-text);
    border: none;
}

@media (max-width: 1200px) {
    .beforeAfterSlider {
        width: 970px; /* Ширина слайдера */
        height: 680px; /* Высота слайдера */
    }
}

@media (max-width: 1000px) {
    .beforeAfterSlider {
        width: 863px; /* Ширина слайдера */
        height: 612px; /* Высота слайдера */
    }
}

@media (max-width: 900px) {
    .beforeAfterSlider {
        width: 777px; /* Ширина слайдера */
        height: 550px; /* Высота слайдера */
    }
}

@media (max-width: 800px) {
    .beforeAfterSlider {
        width: 680px; /* Ширина слайдера */
        height: 480px; /* Высота слайдера */
    }

    .galleryPreview h2 {
        font-size: 36px;
        font-weight: 700;
    }

    .galleryPreviewBlock {
        margin: 24px auto 0 auto;
    }
}

@media (max-width: 700px) {
    .beforeAfterSlider {
        width: 600px; /* Ширина слайдера */
        height: 400px; /* Высота слайдера */
    }
}

@media (max-width: 600px) {
    .galleryPreview {
        padding: 48px 0;
    }

    .galleryPreview button {
        width: 180px;
        font-size: 14px;
        line-height: 20px;
        font-weight: 600;
    }

    .beforeAfterSlider {
        width: 500px; /* Ширина слайдера */
        height: 320px; /* Высота слайдера */
        padding: 0 !important;
        margin: 0 auto;
    }

    .galleryPreviewBlock {
        margin: 24px auto;
    }

    .galleryPreview h2 {
        font-size: 22px;
        line-height: 30px;
        font-weight: 600;
    }

    .galleryPreviewSubHeader {
        font-size: 12px;
        font-weight: 400;
        line-height: 18px;
    }

    .fullSizeText {
        display: none;
    }

    .sliderHandle {
        width: 66px;
        height: 44px;
    }
}

@media (max-width: 510px) {
    .beforeAfterSlider {
        width: 460px; /* Ширина слайдера */
        height: 280px; /* Высота слайдера */
    }
}

@media (max-width: 470px) {
    .beforeAfterSlider {
        width: 400px; /* Ширина слайдера */
        height: 240px; /* Высота слайдера */
    }
}

@media (max-width: 420px) {
    .beforeAfterSlider {
        width: 360px; /* Ширина слайдера */
        height: 211px; /* Высота слайдера */
    }
}

@media (max-width: 380px) {
    .beforeAfterSlider {
        width: 330px; /* Ширина слайдера */
    }
}

@media (max-width: 350px) {
    .beforeAfterSlider {
        width: 300px; /* Ширина слайдера */
    }
}
