.custom-image-slider {
    position: relative;
    width: 960px; /* Set the max width to 960px */
    max-width: 100%; /* Ensure it remains responsive */
    margin: 0 auto; /* Center the slider */
    overflow: hidden;
    height: 540px; /* Set a fixed height to match image height */
}

.slider-before,
.slider-after {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: contain; /* Ensure images scale while maintaining aspect ratio */
}

.slider-after {
    overflow: hidden;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 540px; /* Ensure slider handle matches image height */
    background-color: #fff;
    cursor: ew-resize;
}

.slider-handle::before,
.slider-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    cursor: ew-resize;
    transition: all 0.2s ease-out;
}

.slider-handle::before {
    left: -24px;
    border-right: 16px solid #fff;
}

.slider-handle::after {
    right: -24px;
    border-left: 16px solid #fff;
}
