.image-comparison-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
    user-select: none;
}

.image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio (default) */
}

.image-after,
.image-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.image-before {
    clip-path: inset(0 50% 0 0);
    z-index: 2;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: #fff;
    z-index: 3;
    cursor: ew-resize;
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.slider-button svg {
    color: #666;
}

/* Prevent Elementor editor from interfering with the slider */
.elementor-editor-active .image-comparison-slider {
    pointer-events: none;
}

.elementor-editor-active .slider-button {
    pointer-events: auto;
}

