.work-carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.work-carousel-track::-webkit-scrollbar {
  display: none;
}

.work-carousel-slide {
  flex: 0 0 calc(50% - 0.5rem);
  max-width: calc(50% - 0.5rem);
  scroll-snap-align: start;
}

.work-example-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.work-example-caption {
  text-align: center;
}

.work-example-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.work-example-location {
  font-size: 0.875rem;
  color: #64748b;
}

.before-after-slider {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background-color: #f1f5f9;
  touch-action: none;
  user-select: none;
  cursor: ew-resize;
}

.before-after-image {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--before-after-slider-width, 100%);
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

.before-after-after {
  inset: 0;
  width: 100%;
}

.before-after-before-wrap {
  position: absolute;
  inset: 0;
  width: var(--before-after-position, 50%);
  overflow: hidden;
  z-index: 2;
  border-right: 2px solid #ffffff;
}

.before-after-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--before-after-position, 50%);
  z-index: 3;
  width: 2.75rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}

.before-after-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #ffffff;
  box-shadow: 0 0 0 1px rgb(15 23 42 / 0.12);
}

.before-after-handle-grip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: #fbbf24;
  color: #0f172a;
  box-shadow: 0 4px 12px rgb(15 23 42 / 0.2);
}

.before-after-handle-grip::before,
.before-after-handle-grip::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.before-after-handle-grip::before {
  border-right: 6px solid #0f172a;
  margin-right: 2px;
}

.before-after-handle-grip::after {
  border-left: 6px solid #0f172a;
  margin-left: 2px;
}

.before-after-label {
  position: absolute;
  top: 0.75rem;
  z-index: 4;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background-color: rgb(15 23 42 / 0.72);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.before-after-label-before {
  left: 0.75rem;
}

.before-after-label-after {
  right: 0.75rem;
}

@media (max-width: 767px) {
  .work-carousel-track {
    padding-right: 1.5rem;
    margin-right: -1.5rem;
  }

  .work-carousel-slide {
    flex: 0 0 82%;
    max-width: 82%;
  }
}
