/* ===================== GALLERY SECTION ===================== */

/* Main gallery wrapper */
.gallery-section {
  padding: 60px 0;
}

/* BEFORE/AFTER container */
.comparison-wrapper {
  position: relative;
  height: 450px;
  overflow: hidden;
  border-radius: 12px;
}

/* Both images stack */
.comparison-image {
  position: absolute;
  width: 100%;
  height: 100%;
}

/* Image styling */
.comparison-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* AFTER image is clipped (revealed by slider) */
.after-image {
  clip-path: inset(0 0 0 50%);
}

/* Vertical divider line */
.slider-line {
  position: absolute;
  left: 50%;
  width: 4px;
  height: 100%;
  background: white;
}

/* Draggable circle */
.slider-handle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 50%;
  padding: 10px;
  cursor: ew-resize;
}

/* ===================== CAROUSEL ===================== */

/* ===================== CAROUSEL ===================== */

/* Outer wrapper keeps arrows and viewport aligned */
.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

/* Arrow buttons */
.carousel-btn {
  width: 50px;
  height: 50px;
  background: black;
  color: white;
  border-radius: 50%;
  border: none;
  flex: 0 0 auto;
  cursor: pointer;
}

/* Viewport hides thumbnails outside visible area */
.carousel-viewport {
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;
}

/* Track slides left/right */
.carousel-track {
  display: flex;
  gap: 8px;
  transition: transform 0.35s ease;
  justify-content:center;
  
}

/* Only 3 cards visible at a time on desktop */
.thumb-card {
  margin: .5em;
  flex: 0 0 calc((100% - 32px) / 3);
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 12px;
  overflow: hidden;
}

/* Active (selected) thumbnail */
.thumb-card.active {
  box-shadow: 0px 0px 11px 3px #2f7d32, 0 8px 20px rgba(0,0,0,0.25);
  transform: scale(1.03);
}

/* Optional hover effect */
.thumb-card:hover {
  transform: scale(1.02);
}

/* Thumbnail image styling */
.thumb-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* Mobile: show 1 card at a time */
@media (max-width: 768px) {
  .thumb-card {
    flex: 0 0 100%;
  }
}

/* ===================== END ===================== */