/* Vision Simulator Styles */
.vision-simulator {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-body) 100%);
    position: relative;
    overflow: hidden;
}

.visor-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    /* Aspect Ratio for the viewing area */
    aspect-ratio: 16/9;
    cursor: col-resize;
    border: 4px solid #fff;
}

.visor-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Prevent image dragging */
    user-select: none;
    pointer-events: none;
}

/* Shared styles for both layers to ensure perfect overlap */
.visor-after,
.visor-before {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-size: cover;
    background-position: left center;
    /* Critical: Anchors image so resizing doesn't shift content */
}

/* The 'After' Image (Clear) - Bottom Layer */
.visor-after {
    width: 100%;
    background-image: url('https://images.unsplash.com/photo-1469474968028-56623f02e42e?auto=format&fit=crop&w=1600&q=80');
    z-index: 1;
}

/* The 'Before' Image (Blurry) - Top Layer */
.visor-before {
    width: 50%;
    /* Initial width */
    background-image: url('https://images.unsplash.com/photo-1469474968028-56623f02e42e?auto=format&fit=crop&w=1600&q=80');
    z-index: 2;
    border-right: 3px solid #fff;

    /* Simulate Cataract: Blur + Yellowing + Dimming */
    filter: blur(10px) sepia(30%) contrast(80%) brightness(90%);
}

/* The Handle */
.visor-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    /* Sync with .visor-before width */
    width: 4px;
    background: #fff;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to container */
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
    /* Center the line */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.visor-knob {
    width: 48px;
    height: 48px;
    background: #00CED1;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.visor-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: 20px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    z-index: 5;
    pointer-events: none;
}

.label-before {
    left: 20px;
}

.label-after {
    right: 20px;
    background: rgba(0, 206, 209, 0.8);
    /* Brand color for 'Clear' */
}