/**
 * Before/After Image Slider Styles
 */
.before-after-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    cursor: ew-resize;
}

.before-after-container img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.after-image {
    position: relative;
    z-index: 1;
}

.before-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    clip-path: inset(0 50% 0 0);
    -webkit-clip-path: inset(0 50% 0 0);
}

.ba-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #fff;
    z-index: 3;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-50%);
}

.ba-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ba-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.ba-handle:before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 6px 8px 0;
    border-color: transparent #666 transparent transparent;
    margin-right: 4px;
}

.ba-handle:after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 6px;
    border-color: transparent transparent transparent #666;
    margin-left: 4px;
}

.ba-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ba-label-before {
    left: 20px;
}

.ba-label-after {
    right: 20px;
}

@media (max-width: 768px) {
    .ba-handle {
        width: 40px;
        height: 40px;
    }

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

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

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