/* Drag-to-compare before/after slider — shared by /sofa-cleaning and every service page.
   Markup comes from ba_slider() in includes/functions.php; behaviour from assets/js/compare.js. */
.ba-compare { --pos: 50%; position: relative; margin: 0; aspect-ratio: 8 / 5; overflow: hidden; border-radius: 18px;
  background: #e6ece9; user-select: none; -webkit-user-select: none; box-shadow: 0 14px 34px -16px rgba(6,53,38,.45); }
.ba-layer { position: absolute; inset: 0; }
.ba-layer img, .ba-layer svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 4px; transform: translateX(-50%); background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 0 18px rgba(0,0,0,.35); pointer-events: none; z-index: 3; }
.ba-handle span { position: absolute; top: 50%; left: 50%; width: 50px; height: 50px; transform: translate(-50%, -50%); border-radius: 50%;
  background: #fff; color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.3); transition: transform .2s; }
.ba-compare:hover .ba-handle span, .ba-compare:focus-within .ba-handle span { transform: translate(-50%, -50%) scale(1.12); }
.ba-compare:focus-within .ba-handle span { box-shadow: 0 0 0 4px #ffb703, 0 6px 18px rgba(0,0,0,.3); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 4; -webkit-appearance: none; appearance: none; }
.ba-tag { position: absolute; top: 14px; z-index: 2; padding: 5px 12px; border-radius: 30px; font-size: .78rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: #fff; transition: opacity .25s; pointer-events: none; }
.ba-tag-before { left: 14px; background: rgba(120,72,30,.85); }
.ba-tag-after { right: 14px; background: rgba(14,124,90,.92); }
.ba-compare figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 26px 16px 12px; color: #fff; font-weight: 600;
  font-size: .95rem; background: linear-gradient(transparent, rgba(0,0,0,.6)); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ba-handle span { transition: none; } }
