/* Step Before After - Elementor Widget (SBAE) */
.sbae-wrapper {
  --sbae-radius: 16px;
  --sbae-ratio: 1/1; /* 4/4 = 1:1 */
  --sbae-fit: cover;
  --sbae-line: #ffffff;
  --sbae-line-w: 2px;
  --sbae-knob: #0ea5e9;
  --sbae-knob-s: 44px;
  margin: 10px auto 24px;
  max-width: 100%;
}

/* Main image container */
.sbae-wrapper .sba {
  position: relative;
  width: 100%;
  aspect-ratio: var(--sbae-ratio); /* ✅ force square ratio */
  border-radius: var(--sbae-radius);
  overflow: hidden;
  background: #111;
  touch-action: pan-y; /* allow vertical scroll */
}

/* Images */
.sbae-wrapper .sba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit:  var(--sbae-fit);
  object-position: center;
  display: block;
  user-select: none;
  pointer-events: none;
}

.sbae-wrapper .sba .sba-after { z-index: 1; }
.sbae-wrapper .sba .sba-before {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

/* Slider handle and knob */
.sbae-wrapper .sba .sba-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: var(--sbae-line-w);
  left: var(--pos, 50%);
  transform: translateX(-50%);
  background: var(--sbae-line);
  pointer-events: none;
  z-index: 3;
}

.sbae-wrapper .sba .sba-knob {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: var(--sbae-knob-s);
  height: var(--sbae-knob-s);
  border-radius: 50%;
  background: var(--sbae-knob);
  color: #fff;
  font-size: 20px;
  line-height: var(--sbae-knob-s);
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
	z-index:9999;
}

/* Range input (hidden slider) */
.sbae-wrapper .sba .sba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

/* Labels */
.sba-has-labels .sba-chip {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  font: 600 12px/1.2 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-6px);
  transition: .25s ease;
  pointer-events: none;
	z-index:9999;
}
.sba-has-labels:hover .sba-chip {
  opacity: 1;
  transform: translateY(0);
}
.sba-chip--before { left: 12px; }
.sba-chip--after  { right: 12px; }

/* Meta section */
.sba-meta {
  margin-top: 14px;
  text-align: center;
}
.align-left .sba-meta { text-align: left; }
.align-right .sba-meta { text-align: right; }

.sba-title {
  margin: 0 0 6px;
  font: 700 20px/1.3 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
.sba-desc {
  margin: 0 0 10px;
  color: #555;
}
.sba-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: transparent;
  color: #467FF7;
  text-decoration: none;
  font-weight: 600;
}
.sba-btn:hover {
  filter: brightness(1.05);
}


/* -----------------------------------
   📱 Responsive Improvements
----------------------------------- */
@media (max-width: 1024px) {
  .sbae-wrapper .sba {
    aspect-ratio: 4/3; /* for tablets */
  }
}

@media (max-width: 767px) {
  .sbae-wrapper .sba {
    aspect-ratio: 1/1; /* for phones */
  }

  .sba-title {
    font-size: 18px;
  }

  .sba-desc {
    font-size: 14px;
    line-height: 1.5;
  }

  .sba-btn {
    padding: 8px 14px;
    font-size: 14px;
  }
}



