/* Image Comparison Slider Styles */
.image-comparison-slider {
    position: relative;
    width: 100%;
    max-width: 700px; /* Adjust max-width as needed */
    height: auto; /* Height will be determined by image aspect ratio */
    max-height: 85vh;
    overflow: hidden;
    border-radius: 8px; /* Matches existing image styling */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Matches existing image styling */
    cursor: ew-resize; /* Indicates horizontal resizing */
    user-select: none; /* Prevent text selection during drag */
    margin: 80px auto 0 auto; /* Adjust for header and center */


    margin-top: 80px; /* Adjust for header */
}

.image-comparison-slider img {
    display: block;
    width: 100%;
    height: auto;
}

.image-comparison-slider .after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* height: 100%; */
    overflow: hidden;
}

.image-comparison-slider .after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure images cover the area */
}

.image-comparison-slider .slider-handle {
    position: absolute;
    top: 0;
    left: 50%; /* Start in the middle */
    width: 4px; /* Thin vertical line */
    height: 100%;
    background-color: #fff; /* White line */
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10; /* Ensure handle is on top */
}

.image-comparison-slider .slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; /* Size of the circle */
    height: 40px;
    background-color: #fff; /* White circle */
    border: 2px solid #333; /* Dark border for contrast */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Optional: Add arrows to the handle for better UX */
.image-comparison-slider .slider-handle::after {
    content: '↔'; /* Left-right arrow character */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2em;
    color: #333;
    z-index: 11; /* Ensure arrow is above the circle */
}

/* Responsive adjustments for the slider */
@media (max-width: 768px) {
    .image-comparison-slider {
        margin-top: 40px; /* Adjust margin for smaller screens */
    }
    .image-comparison-slider .slider-handle::before {
        width: 30px;
        height: 30px;
    }
    .image-comparison-slider .slider-handle::after {
        font-size: 1em;
    }
}
