.image-compare-wrapper {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0;
}

.image-compare-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
  background: #f0f0f0;
}

.compare-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare-image-before {
  z-index: 1;
}

.compare-image-after-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
}

.compare-image-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 3;
  cursor: col-resize;
  transform: translateX(-50%);
}

.compare-slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    transparent 5%, 
    var(--primary-green) 5%, 
    var(--primary-green) 95%, 
    transparent 95%, 
    transparent 100%
  );
  transform: translateX(-50%);
  box-shadow: 0 0 20px rgba(45, 80, 22, 0.5);
}

.compare-slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px solid var(--primary-green);
}

.compare-slider-handle span {
  width: 2px;
  height: 16px;
  background: var(--primary-green);
  border-radius: 1px;
}

.compare-slider-handle:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* Section Styles */
.compare-section {
  padding: 120px 0;
  background: var(--white);
}

.compare-section .section-title {
  margin-bottom: 60px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.compare-text {
  padding-right: 20px;
}

.compare-description {
  text-align: left;
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 25px;
}

.compare-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 450px;
}

#imageCompareContainer {
  width: 100%;
  height: 100%;
}

.highlight-text {
  color: var(--primary-green);
  font-weight: 600;
}

@media (max-width: 768px) {
  .image-compare-container {
    height: 350px;
  }

  .compare-slider-handle {
    width: 40px;
    height: 40px;
  }

  .compare-slider-handle span {
    height: 14px;
  }

  .compare-section {
    padding: 80px 0;
  }
  
  .compare-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .compare-text {
    padding-right: 0;
  }
  
  .compare-description {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .image-compare-container {
    height: 300px;
    border-radius: 15px;
  }

  .compare-slider-handle {
    width: 36px;
    height: 36px;
  }
}
