/* =========================
       STEP 5 â€” Before/After showcase (optional)
       We'll include a compact slider you already built earlier.
    ========================= */
        .ba-wrap {
            padding: 3rem 20px;
        }

        .ba-box {
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            background: #071826;
            border: 1px solid rgba(255, 255, 255, 0.03);
        }

        .ba-container {
            width: 100%;
            height:100%;
            border-radius: var(--radius);
            overflow: hidden;
            background: #fff;
            position: relative;
            user-select: none;
            touch-action: none;
            /* mejora el comportamiento tÃ¡ctil */
        }

        /* Imagen base (after) ocupa todo */
        .ba-inner {
            position: relative;
            width: 100%;
            aspect-ratio: 5 / 4;
            /* ajusta al tamaÃ±o real de tu foto */
            overflow: hidden;
        }

        /* Ambas imágenes siempre a tamaño completo */
        .ba-before,
        .ba-after {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        /* La imagen BEFORE se recorta sin cambiar tamaño */
        .ba-before {
            clip-path: inset(0 50% 0 0);
            /* 50% por defecto */
        }

        .ba-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            /* evita distorsiÃ³n entre before y after */
        }

        .ba-before img,
        .ba-after img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }


        /* LÃ­nea divisoria fina */
        .ba-divider {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 2px;
            background: linear-gradient(180deg, #fff, #0002);
            pointer-events: none;
        }

        /* Handle (bola) */
        .ba-handle {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: var(--handle-size);
            height: var(--handle-size);
            border-radius: 50%;
            background: linear-gradient(180deg, #fff, #f3f4f6);
            box-shadow: 0 6px 18px rgba(2, 6, 23, 0.16);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: grab;
            z-index: 5;
            border: 2px solid rgba(15, 23, 42, 0.06);
        }

        .ba-handle:active {
            cursor: grabbing;
        }

        /* Icon inside handle */
        .ba-handle::before {
            content: "";
            width: 14px;
            height: 14px;
            background:
                linear-gradient(180deg, rgba(6, 182, 212, 1), rgba(6, 182, 212, 0.9));
            mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M12 7a1 1 0 0 1 1 1v2h2a1 1 0 1 1 0 2h-2v2a1 1 0 1 1-2 0v-2H9a1 1 0 1 1 0-2h2V8a1 1 0 0 1 1-1z"/></svg>') center/contain no-repeat;
            -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M12 7a1 1 0 0 1 1 1v2h2a1 1 0 1 1 0 2h-2v2a1 1 0 1 1-2 0v-2H9a1 1 0 1 1 0-2h2V8a1 1 0 0 1 1-1z"/></svg>') center/contain no-repeat;
        }

        /* Controls: slider range (visually hidden but useful as alternative) */
        .ba-controls {
            display: flex;
            gap: 10px;
            align-items: center;
            padding: 12px;
            background: linear-gradient(180deg, #ffffff00, #f8fafc);
        }

        .ba-range {
            width: 100%;
        }

        /* Accessibility focus */
        .ba-handle:focus {
            outline: 3px solid rgba(6, 182, 212, 0.22);
            outline-offset: 4px;
        }

        /* Fallback cuando JS desactivado: muestra las dos imÃ¡genes apiladas */
        noscript .ba-inner {
            padding-bottom: 0;
            display: flex;
            gap: 0;
        }

        noscript .ba-after,
        noscript .ba-before {
            position: relative;
            width: 50%;
            height: auto;
        }