/* Cary Studio — Realizat de Petri Data Consult SRL | Suport: 0743 982 420 | office@petridataconsult.ro */
/* Image Comparison Slider */
.img-compare {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.10);
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.img-compare img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.img-compare-after {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  clip-path: inset(0 50% 0 0);
}
.img-compare-slider {
  position: absolute;
  top: 0; bottom: 0;
  width: 3px;
  left: calc(50% - 1.5px);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(2px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
}
.img-compare-handle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
.img-compare.dragging .img-compare-handle {
  transform: scale(1.15);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.img-compare-handle svg {
  width: 22px;
  height: 22px;
  color: var(--brand-600, #16a34a);
}
/* Labels */
.img-compare-label {
  position: absolute;
  bottom: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
  z-index: 5;
  backdrop-filter: blur(4px);
  transition: opacity 0.25s ease;
}
.img-compare-label-before {
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: white;
}
.img-compare-label-after {
  left: 12px;
  background: var(--brand-500, #22c55e);
  color: white;
}
/* Hint animation on load */
@keyframes compareHint {
  0% { left: calc(50% - 1.5px); }
  30% { left: calc(35% - 1.5px); }
  70% { left: calc(65% - 1.5px); }
  100% { left: calc(50% - 1.5px); }
}
.img-compare-hint .img-compare-slider {
  animation: compareHint 1.5s ease-in-out 0.8s 1;
}
.img-compare-hint .img-compare-after {
  animation: compareHintClip 1.5s ease-in-out 0.8s 1;
}
@keyframes compareHintClip {
  0% { clip-path: inset(0 50% 0 0); }
  30% { clip-path: inset(0 65% 0 0); }
  70% { clip-path: inset(0 35% 0 0); }
  100% { clip-path: inset(0 50% 0 0); }
}
