.galeria {
  position: relative;
  height: 900px;
  overflow: hidden;
  /* Mask to fade top and bottom */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
}

.galeria-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Height is handled by content/transform */
  padding: 0 20px;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.galeria-item {
  position: absolute; /* Force absolute positioning */
  left: 20px; /* Match track padding */
  right: 20px; /* Match track padding */
  height: 530px;
  background: #fff;
  /* opacity: 0.4; */
  transform: scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.galeria-item.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
  z-index: 10;
}

/* Before/After Slider Styles */
.before-after-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
}

.image-after,
.image-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.image-after img,
.image-before img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-before img {
  filter: grayscale(100%) contrast(1.1);
}

.image-before {
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  transition: none;
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.slider-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: white;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  pointer-events: all;
  cursor: ew-resize;
}

.slider-button svg {
  width: 16px;
  height: 16px;
  color: #333;
}

.image-label {
  position: absolute;
  top: 16px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-weight: 600;
  font-size: 12px;
  border-radius: 6px;
  z-index: 5;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.label-before {
  left: 16px;
}
.label-after {
  right: 16px;
}
.label-hidden {
  opacity: 0;
  transition: opacity 0.2s;
}
