.before-after {
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.before-after__title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

/* صندوق المشروع */
.ba-box {
  margin-bottom: 3rem;
padding-top: 3rem;
}

.ba-text {
  margin-top: .5rem;
  text-align: center;
  font-size: 1.1rem;
 font-weight: 800;
  color: #457249;
}

/* تأثير السلايدر */
.ba-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 12px;
  cursor: ew-resize;
}

.ba-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* الصورة العلوية */
.ba-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%; /* نقطة البداية */
  overflow: hidden;
  clip-path: inset(0 50% 0 0);
}

/* شريط السحب */
.ba-slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: #fff;
  border: 2px solid #000;
  transform: translateX(-50%);
  cursor: ew-resize;
}

/* ==== موبايل: عرض الصورة قبل وبعد فوق بعض ==== */
@media (max-width: 768px) {

  /* خلي صندوق الصور عادي بدون سلايدر */
  .ba-wrapper {
    display: flex;
    flex-direction: column;
    position: static;
    border-radius: 12px;
    overflow: hidden;
  }

  /* رجّع كل صورة لوضعها الطبيعي */
  .ba-before,
  .ba-after {
    position: static;
    width: 100% !important;
    height: auto !important;
    clip-path: none !important;
    object-fit: cover;
    margin: 0;
  }

  /* أخفي شريط السحب */
  .ba-slider {
    display: none;
  }
}
