.img-compare-container {
  position: relative;
  width: 600px;
  height: 400px;
  overflow: hidden;
}

.img-background,
.img-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%; /* Start with 50% overlay */
  height: 100%;
  overflow: hidden;
}

.slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background-color: white;
  cursor: ew-resize;
  z-index: 10;
  transform: translateX(-50%);
}
