/* Reusable Before/After Image Slider Styles */
.before-after-slider {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 auto;
}

.before-after-slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.before-after-slider-container,
.after-slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.before-slider-image,
.after-slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.before-slider-container {
    clip-path: inset(0 50% 0 0);
}

.after-slider-container {
    clip-path: inset(0 0 0 50%);
}

.slider-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: #fff;
    z-index: 3;
    transform: translateX(-1px);
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: 2px solid var(--yellow);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    user-select: none;
}

.slider-handle:active {
    cursor: grabbing;
}

.slider-handle-arrow-left,
.slider-handle-arrow-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 19px;
    height: 19px;
    font-size: 0; /* Hide the text characters */
    line-height: 0;
}

.slider-handle-arrow-left {
    left: 0px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 2L4 6L8 10Z' fill='%23000'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.slider-handle-arrow-right {
    right: 0px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 2L8 6L4 10Z' fill='%23000'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.slider-label-before,
.slider-label-after {
    position: absolute;
    bottom: 10px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 1;
}

.slider-label-before {
    left: 10px;
}

.slider-label-after {
    right: 10px;
}

/* Hover effects for better visibility */
.before-after-slider:hover .slider-handle {
    background-color: #666;
}

.before-after-slider:hover .slider-line {
    background-color: #666;
}