.blog-images.before-after-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.before-after-slider {
  --ba-position: 50%;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #111;
}

.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.ba-after {
  z-index: 1;
}

.ba-before-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: var(--ba-position);
  overflow: hidden;
}

.ba-before {
  width: 100%;
  min-width: 100%;
}

.ba-handle {
  position: absolute;
  top: 0;
  left: var(--ba-position);
  z-index: 5;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
}

.ba-handle span {
  display: block;
  width: 4px;
  height: 100%;
  background: #f97316;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.85);
}

.ba-handle button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 15px;
  box-shadow: 0 14px 35px rgba(249, 115, 22, 0.55);
  cursor: grab;
  pointer-events: auto;
}

.ba-range {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

.ba-label {
  position: absolute;
  top: 22px;
  z-index: 6;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.ba-label-before {
  left: 22px;
}

.ba-label-after {
  right: 22px;
  background: #f97316;
}

@media (max-width: 767px) {
  .before-after-slider {
    aspect-ratio: 4 / 3;
    border-radius: 18px;
  }

  .blog-images.before-after-wrapper {
    border-radius: 18px;
  }

  .ba-handle button {
    width: 46px;
    height: 46px;
    font-size: 12px;
  }

  .ba-label {
    top: 14px;
    padding: 7px 13px;
    font-size: 12px;
  }

  .ba-label-before {
    left: 14px;
  }

  .ba-label-after {
    right: 14px;
  }
}