/* ========================================
   BEFORE/AFTER SLIDER SECTION
======================================== */

.before-after-slider-section {
  padding: 48px 8% 48px !important;
  background: #f9f9f9;
}

.before-after-slider-section .container-width {
  padding: 0 !important;
}

.before-after-slider-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.comparison-slider {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.comparison-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* 4:3 aspect ratio */
  overflow: hidden;
}

.comparison-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.comparison-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comparison-image.after-image {
  clip-path: inset(0 0 0 50%);
  transition: clip-path 0.1s ease;
}

.image-label {
  position: absolute;
  top: 20px;
  background: rgba(184, 144, 81, 0.95);
  color: white;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
  border-radius: 4px;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.label-before {
  left: 20px;
}

.label-after {
  right: 20px;
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: ew-resize;
  z-index: 20;
  margin: 0;
}

.slider-handle::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 40px;
  background: #B89051;
  border-radius: 50%;
  cursor: ew-resize;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  border: 3px solid white;
}

.slider-handle::-moz-range-thumb {
  width: 40px;
  height: 40px;
  background: #B89051;
  border-radius: 50%;
  cursor: ew-resize;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  border: 3px solid white;
}

.slider-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: white;
  pointer-events: none;
  z-index: 15;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: left 0.1s ease;
}

/* Tablet responsive */
@media (max-width: 1024px) {
  .before-after-slider-section {
    padding: 40px 6% 40px !important;
  }
  
  .before-after-slider-section .container-width {
    padding: 0 !important;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .before-after-slider-section {
    padding: 32px 5% 32px !important;
  }
  
  .before-after-slider-section .container-width {
    padding: 0 !important;
  }

  .before-after-slider-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .image-label {
    padding: 6px 12px;
    font-size: 0.75rem;
    top: 15px;
  }

  .label-before {
    left: 15px;
  }

  .label-after {
    right: 15px;
  }

  .slider-handle::-webkit-slider-thumb {
    width: 35px;
    height: 35px;
  }

  .slider-handle::-moz-range-thumb {
    width: 35px;
    height: 35px;
  }
}
