/* Interactive before/after comparison slider */
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 22px;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  background: #111;
  cursor: ew-resize;
  isolation: isolate;
}
.ba-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Images are authored to the same aspect as the slider — fill avoids cover crop drift */
  object-fit: fill;
  pointer-events: none;
  max-width: none;
  display: block;
}
.ba-slider .ba-after { z-index: 1; }
.ba-slider .ba-before-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 50%;
  overflow: hidden;
  border-right: 0;
}
.ba-slider .ba-before-wrap img {
  width: 100cqi;
  width: var(--ba-full-w, 100%);
  max-width: none;
  height: 100%;
  object-fit: fill;
  object-position: left top;
}
.ba-slider .ba-after {
  object-position: left top;
}
.ba-slider .ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 4;
  width: 44px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  pointer-events: none;
}
.ba-slider .ba-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 12px rgba(0,0,0,.35);
}
.ba-slider .ba-handle span {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  letter-spacing: -1px;
}
.ba-slider .ba-label {
  position: absolute;
  z-index: 3;
  top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  pointer-events: none;
}
.ba-slider .ba-label-before {
  left: 14px;
  background: rgba(20,20,20,.72);
  color: #fff;
}
.ba-slider .ba-label-after {
  right: 14px;
  background: rgba(255,255,255,.9);
  color: #111;
}
.ba-slider .ba-range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
}
.ba-caption {
  margin-top: 12px;
  font-size: .92rem;
  opacity: .85;
}
.ba-caption strong { display: block; font-size: 1.05rem; opacity: 1; margin-bottom: 2px; }
.ba-caption span { display: block; }
