/* Container for the image comparison */
.img-comp-container {
  position: relative;
  width: 100%;
  height: 40rem;
  min-height: 40rem;
  overflow: hidden;
  line-height: 0;
}

/* The "before" image container (bottom layer) */
.img-comp-container .img-comp-img {
  position: relative;
  width: 100%;
  height: 100%;
}

/* The "before" image itself */
.img-comp-container .img-comp-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The "after" image container (top layer) */
.img-comp-container .img-comp-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  border-right: 3px solid white;
}

/* The "after" image itself - CRITICAL FIX */
.img-comp-container .img-comp-overlay img {
  display: block;
  width: auto; /* Changed from 100% */
  height: 100%;
  max-width: none; /* Override any theme styles */
  position: absolute;
  object-fit: cover;
  top: 0;
  left: 0;
}

/* The slider handle */
.img-comp-container .img-comp-slider {
  position: absolute;
  z-index: 9;
  cursor: ew-resize;
  width: 40px;
  height: 40px;
  background-color: white;
  border: 3px solid #333;
  border-radius: 50%;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-comp-container .img-comp-slider:before {
  content: '\2194';
  font-size: 20px;
  font-weight: bold;
  color: #333;
}
