/* ============================================================
   22-before-after.css — drag-to-wipe before/after image slider
   Module: <section id="transformations">
   Logic: js/before-after.js
   ============================================================ */

#transformations { background: var(--c-bg); }

.ba-frame {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--c-card);
  box-shadow: var(--shadow-lg);
  user-select: none;
  -webkit-user-select: none;
}
.ba-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ba-after {
  z-index: 1;
}
.ba-before {
  z-index: 2;
  clip-path: inset(0 50% 0 0);
}

/* Labels */
.ba-label {
  position: absolute;
  z-index: 4;
  top: 16px;
  background: var(--c-ink);
  color: var(--c-white);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ba-label.is-before { left: 16px; }
.ba-label.is-after { right: 16px; background: var(--c-green); }

/* Drag handle */
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--c-white);
  z-index: 3;
  cursor: ew-resize;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
}
.ba-handle::before,
.ba-handle::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 48px; height: 48px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.ba-handle::before {
  background: var(--c-white);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.ba-handle::after {
  width: 24px; height: 24px;
  background:
    linear-gradient(90deg, var(--c-blue) 50%, transparent 50%) 0 50%/4px 12px no-repeat,
    linear-gradient(90deg, transparent 50%, var(--c-blue) 50%) 100% 50%/4px 12px no-repeat;
}
.ba-handle-arrows {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  color: var(--c-blue);
  font-size: 1.3rem;
  font-weight: 900;
  pointer-events: none;
  letter-spacing: -2px;
}

.ba-hint {
  text-align: center;
  margin-top: var(--s-3);
  font-size: 0.88rem;
  color: var(--c-muted);
}
