/**
 * Before/After Slider Styles
 */

.before-after-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: col-resize;
}

.before-after-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio, adjust as needed */
    overflow: hidden;
}

.before-img,
.after-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.after-img {
    clip-path: inset(0 0 0 0);
}

.before-after-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.before-after-slider .after-img {
    clip-path: inset(0 0 0 0);
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: #fff;
    cursor: col-resize;
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.slider-handle::after {
    content: '◀ ▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: var(--color-primary);
    line-height: 1;
}

.before-after-label {
    position: absolute;
    top: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 4;
}

.before-label {
    left: 1rem;
}

.after-label {
    right: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .before-after-container {
        max-width: 100%;
    }
    
    .before-after-label {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

