.c_compare {
  position: relative;
  width: 100%;
  max-width: 85%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  margin: 2rem auto;
  border: 5px solid var(--text_color_alt);
  border-radius: 0.5rem;
  overflow: hidden;
}

.c_image {
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.c_image-1 {
  left: 0;
  clip-path: inset(0 50% 0 0);
}

.c_image-2 {
  left: 0;
  clip-path: inset(0 0 0 50%);
}

.c_slider {
  position: absolute;
  z-index: 20;
  inset: 0;
  width: 100%;
  height: 100%;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
  margin: 0;
}

.c_slider::-webkit-slider-thumb,
.c_slider::-moz-range-thumb {
  appearance: none;
  background: transparent;
  border: none;
  width: 20px;
  height: 20px;
}

.c_divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: black;
  transform: translateX(-50%);
  z-index: 15;
  pointer-events: none;
}

.c_thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 30;
  background: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.c_thumb svg {
  width: 20px;
  height: 20px;
}

/* Hover labels */
.c_label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.c_label-before {
  left: 20px;
}

.c_label-after {
  right: 20px;
}

.c_compare:hover .c_label {
  opacity: 1;
}

.c_box-shadow {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}