/* ---------- before / after slider (shared: home + treatment pages) ---------- */
.ba-grid > * { min-width: 0; }
.ba-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(14px, 1.6vw, 22px); align-items: stretch; }

.ba { --pos: 50%; position: relative; overflow: hidden; min-height: clamp(380px, 38vw, 540px); border-radius: 28px; user-select: none; -webkit-user-select: none;
  touch-action: pan-y; cursor: ew-resize; background: #e9ecfe; box-shadow: 0 0 0 1px rgba(101,120,238,.18), 0 18px 48px rgba(70,85,200,.14); }
.ba-layer { position: absolute; inset: 0; }
.ba-layer > svg, .ba-layer > img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-after { clip-path: inset(0 0 0 var(--pos)); }

.ba-line { position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(101,120,238,.18), 0 0 18px rgba(40,50,150,.25); pointer-events: none; }
.ba-handle { position: absolute; z-index: 4; top: 50%; left: var(--pos); width: 52px; height: 52px; margin: -26px 0 0 -26px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: ew-resize; color: var(--accent-deep); background: #fff;
  box-shadow: 0 8px 26px rgba(40,50,150,.3), 0 0 0 1px rgba(101,120,238,.2); transition: transform .2s, box-shadow .2s; }
.ba-handle svg { width: 24px; height: 24px; }
.ba:hover .ba-handle, .ba.drag .ba-handle { transform: scale(1.07); }
.ba.drag .ba-handle { box-shadow: 0 8px 26px rgba(40,50,150,.3), 0 0 0 5px rgba(127,144,248,.3); }
.ba-handle:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }

.ba-tag { position: absolute; z-index: 2; top: 16px; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: #2c2d3a; pointer-events: none;
  background: rgba(255,255,255,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 3px rgba(60,75,190,.12), 0 0 0 1px rgba(255,255,255,.9) inset; }
.ba-tag-b { left: 16px; }
.ba-tag-a { right: 16px; background: var(--accent); color: #fff; box-shadow: none; }

.ba-hint { position: absolute; z-index: 2; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; color: #2c2d3a; pointer-events: none;
  background: rgba(255,255,255,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgba(70,85,200,.16); transition: opacity .3s; }
.ba.touched .ba-hint { opacity: 0; }

.ba-side { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: clamp(24px, 3vw, 40px); }
.ba-side .chips { margin-bottom: 6px; }
.ba-side h3 { font-family: "Inter Tight", sans-serif; font-weight: 500; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.ba-side > p { font-size: 16.5px; line-height: 1.6; color: var(--soft); }
.ba-side .checks li { padding: 12px 0; font-size: 15.5px; }
.ba-disc { margin-top: auto; padding-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--soft); }
.ba-side .btn { white-space: nowrap; }
.ba-side .btn svg { width: 13px; height: 13px; margin-left: 10px; }

/* compact variant for treatment pages */
.ba-section { padding: clamp(60px, 7vw, 98px) var(--gutter) clamp(56px, 7vw, 96px); background: #fafaff; }
.ba-section .ba-head { margin-bottom: clamp(24px, 3vw, 40px); }
.ba-section .ba-head h2 { font-family: "Inter Tight", sans-serif; font-weight: 500; font-size: clamp(32px, 4vw, 54px); line-height: 1.04; letter-spacing: -.04em; text-wrap: balance; max-width: 12em; }
.ba-section .ba-head p { margin-top: 12px; max-width: 36em; font-size: 16.5px; line-height: 1.6; color: var(--soft); }

@media (max-width: 900px) { .ba-grid { grid-template-columns: 1fr; } .ba { aspect-ratio: 1 / 1; min-height: 0; } }
@media (max-width: 560px) { .ba-side .btn { width: 100%; justify-content: center; } .ba-tag { top: 12px; } .ba-tag-b { left: 12px; } .ba-tag-a { right: 12px; } }
@media (prefers-reduced-motion: reduce) { .ba-handle, .ba-hint { transition: none; } }
