/* Comparison Slider Styles */
.comparison-slider-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    user-select: none;
    background: #0f172a; /* Fallback matching color */
}

@media (max-width: 768px) {
    .comparison-slider-wrapper {
        aspect-ratio: 4 / 3; /* Slightly taller on mobile for better visibility */
    }
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: ew-resize;
}

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

.after-layer {
    z-index: 2;
    clip-path: inset(0 0 0 50%); /* Start at 50% */
    background-repeat: no-repeat;
    background-position: top;
    background-size: cover; /* Default for mobile (zoomed in/fill) */
}

@media (min-width: 992px) {
    .after-layer {
        background-size: 100% auto; /* Zoomed out for desktop */
    }
}

.before-layer {
    z-index: 1;
}

/* Label Badges */
.label-badge {
    position: absolute;
    bottom: 20px;
    padding: 6px 15px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    color: #fff;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.before-label {
    left: 20px;
}

.after-label {
    right: 20px;
}

/* Handle Styles */
.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #F48C06; /* Weburea Orange */
    z-index: 10;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 0 15px rgba(244, 140, 6, 0.4);
}

.handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #F48C06;
    border: 4px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.comparison-slider:hover .handle-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.handle-button i {
    font-size: 14px;
    margin: 0 2px;
}

/* Dragging state */
.comparison-slider.dragging {
    cursor: grabbing;
}
