/* Image Slider - Before/After Comparison */
.image-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 40px 0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    user-select: none;
  }

.image-slider {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio by default, adjust as needed */
}

.image-slider-before,
.image-slider-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.image-slider-before img,
.image-slider-after img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-slider-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%; /* Starting position */
  width: 2px;
  background: rgba(255, 255, 255, 0.7);
  z-index: 2;
}

.image-slider-handle {
  position: absolute;  
  top: 50%;
  left: 50%; /* Starting position */
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  z-index: 10;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
  
  .image-slider-handle svg {
    width: 20px;
    height: 20px;
    fill: #E43D12;
  }

.image-slider-label {
    position: absolute;
    background-color: #E43D12;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    z-index: 5;
    top: 20px;
}

.label-before {
  left: 20px;
}

.label-after {
  right: 20px;
}

.image-slider-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

.image-slider-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: inset(0 0 0 50%); /* Initial position */
  }

@media (max-width: 768px) {
  .slider-container.full-width {
    height: 256px !important; /* Reduced height for tablets */
  }

  .image-slider-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* Starting position */
    width: 2px;
    height: 50%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 2;
  }
}

@media (max-width: 480px) {
  .slider-container.full-width {
    height: 125px !important; /* Even smaller height for phones */
  }
  
  .image-slider-handle {
    width: 30px; /* Smaller handle */
    height: 30px;
  }
  
  .image-slider-label {
    font-size: 12px;
    padding: 4px 8px;
  }
}