.compare__wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    aspect-ratio: 16 / 8;
    border-radius: 0px;
    overflow: hidden;
    background: #0f0f0f;
    --position: 50%;
}

.compare__image {
    position: absolute;
    inset: 0;
    display: flex;
}

.compare__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.compare__image--after {
    width: 100%;
    overflow: hidden;
    clip-path: inset(0 calc(100% - var(--position)) 0 0);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
}

.compare__divider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    left: var(--position);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    touch-action: none;
}

.compare__divider::before {
    content: "";
    position: absolute;
    width: 1.2px;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
}

.compare__handle {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 50%;
    border: 1.8px solid #ffffff40;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: grab;
    flex-shrink: 0;
    flex-grow: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    padding: 0;
    margin: 0;
    transition: transform 0.15s ease, border 0.15s ease;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}


.compare__handle:hover {
  border: 1.8px solid #ffffff;
}

.compare__handle:active {
    cursor: grabbing;
}

.compare__handle::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    position: absolute;
}

.compare__handle:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .compare__wrapper {
        aspect-ratio: 8 / 5;
    }
}