
.comparison {
    display:block;
    position: relative;
    width: 100%;
    height: 100%;
    line-height: 0;
    user-select: none;

}

.comparison figure img {
    position: relative; 
    object-fit: cover;
    visibility: hidden;
    width: 30vw;
    max-width: 500px;
    min-width: 300px;
}

figure .before {
    background-image: url(../img/services/stairs-before1.jpeg);
    background-size: cover;
    background-repeat: no-repeat;
    width: 50%;
    height: max-content;
    position: relative;
    border: none;
    box-sizing: border-box;
    background-size: cover;
}

.before div:first-of-type {
    position: absolute;
    width: 40px;
    height: calc(50% - 40px / 2);
    left: calc(100% - 40px);
    top: 0;
    border: none;
    border-right: 3px solid white;
}

.before div:last-of-type {
    position: absolute;
    width: 40px;
    height: calc(50% - 41px / 2);
    left: calc(100% - 40px);
    top: calc(50% + 46px / 2);
    border: none;
    border-right: 3px solid white;
}

figure.after {
    background-image: url(../img/example-phone.jpg);
    background-repeat: no-repeat;
    overflow: hidden;
    width: fit-content;
    background-size: cover;
    border-radius: 1rem;
}

.before::before {
    content: " ";
    position: absolute;
    width: 40px;
    height: 40px;
    left: calc(100% - 42px / 2);
    top: calc(50% - 40px / 2);
    border-radius: 40px;
    border: 3px solid white;
    cursor: all-scroll;
}

.before span:first-of-type {
    position: absolute;
    width: 0;
    height: 0;
    z-index: 100;
    left: calc(100% - 34px / 2);
    top: calc(50% - 6px / 2);
    border: 6px inset transparent !important;
    border-right: 7px solid #fff !important;
    cursor: all-scroll;
}

.before span:last-of-type {
    position: absolute;
    width: 0;
    height: 0;
    z-index: 100;
    left: calc(100% + 14px / 2);
    top: calc(50% - 6px / 2);
    border: 6px inset transparent !important;
    border-left: 7px solid #fff !important;
    cursor: all-scroll;
}