.before-after-slider-wrapper {
    width: 100%;
    position: relative;
}

.before-after-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    min-height: 300px;
}

.before-content,
.after-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

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

.content-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.before-content video,
.before-content iframe,
.after-content video,
.after-content iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.youtube-video {
    pointer-events: none;
}

.content-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}

.before-label {
    left: 20px;
}

.after-label {
    right: 20px;
}

.slider-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background-color: #ffffff;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: ew-resize;
}

.handle-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.handle-arrow.left {
    left: 12px;
    border-width: 6px 8px 6px 0;
    border-color: transparent #333 transparent transparent;
}

.handle-arrow.right {
    right: 12px;
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent #333;
}

@media (max-width: 768px) {
    .before-after-slider-container {
        min-height: 250px;
    }

    .content-label {
        font-size: 12px;
        padding: 6px 12px;
        top: 10px;
    }

    .before-label {
        left: 10px;
    }

    .after-label {
        right: 10px;
    }

    .slider-handle {
        width: 40px;
        height: 40px;
    }

    .handle-arrow.left {
        left: 10px;
        border-width: 5px 6px 5px 0;
    }

    .handle-arrow.right {
        right: 10px;
        border-width: 5px 0 5px 6px;
    }
}

@media (max-width: 480px) {
    .before-after-slider-container {
        min-height: 200px;
    }
}
