/* ============================================================
   R. Plane Carpenter — Before / After Drag Slider
   ============================================================ */

.ba-section {
  background: #0a0806;
  padding: 80px 0 100px;
}

.ba-section .section-head {
  margin-bottom: 48px;
}

/* Slider container */
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  cursor: col-resize;
  box-shadow: 0 60px 120px rgba(0, 0, 0, .65),
              0 0 0 1px rgba(255, 255, 255, .06);
  user-select: none;
  -webkit-user-select: none;
}

/* Both images fill the container identically so they stay aligned */
.ba-before,
.ba-after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ba-before { filter: saturate(.85); }

/* After wrapper clips from the right to reveal the after image left-to-right */
.ba-after-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}

/* Gold divider line */
.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: #c4873d;
  box-shadow: 0 0 14px rgba(196, 135, 61, .65),
              0 0 32px rgba(196, 135, 61, .3);
  z-index: 4;
  will-change: left;
}

/* Circular drag handle */
.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #c4873d;
  box-shadow: 0 0 0 5px rgba(196, 135, 61, .25),
              0 4px 20px rgba(0, 0, 0, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease;
}

.ba-slider.is-dragging .ba-handle {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 0 8px rgba(196, 135, 61, .2),
              0 4px 24px rgba(0, 0, 0, .5);
}

/* Before / After labels */
.ba-label {
  position: absolute;
  bottom: 24px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(10, 8, 6, .55);
  padding: 6px 12px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 3;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ba-label-before { right: 20px; }
.ba-label-after  { left: 20px; }

/* Mobile */
@media (max-width: 720px) {
  .ba-section { padding: 60px 0 72px; }
  .ba-slider { aspect-ratio: 4 / 5; border-radius: 10px; }
  .ba-handle { width: 40px; height: 40px; }
}
