/* UYANA — Before & After carousel section
   Scoped to .uyba so it cannot leak into the rest of the theme. */

.uyba {
  --uyba-gold: #b3842e;
  --uyba-ink: #1a1a1a;
  --uyba-muted: #6d6a64;
  --uyba-dot: rgba(0, 0, 0, 0.22);
  --uyba-dot-active: #1a1a1a;
  --uyba-max: 1340px;
  --uyba-gap: 28px;

  box-sizing: border-box;
  background: transparent;
  color: var(--uyba-ink);
  padding: 0;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Use when the section sits on a dark page background. */
.uyba--on-dark {
  --uyba-ink: #f4f2ee;
  --uyba-muted: #a9a49b;
  --uyba-dot: rgba(255, 255, 255, 0.28);
  --uyba-dot-active: #ffffff;
}

.uyba *,
.uyba *::before,
.uyba *::after { box-sizing: border-box; }

.uyba__inner {
  max-width: var(--uyba-max);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 1388px) {
  .uyba__inner { padding: 0; }
}

/* ---------- Arrows ---------- */

.uyba__nav {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}

.uyba__nav[hidden] { display: none; }

.uyba__arrow {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--uyba-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.25s ease;
}

.uyba__arrow:hover:not(:disabled) {
  opacity: 0.55;
}

.uyba__arrow:focus-visible {
  outline: 2px solid var(--uyba-ink);
  outline-offset: 2px;
}

.uyba__arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

.uyba__arrow svg { width: 22px; height: 22px; }

/* ---------- Carousel ---------- */

.uyba__viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.uyba__viewport.is-grabbing { cursor: grabbing; }

.uyba__track {
  display: flex;
  gap: var(--uyba-gap);
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.uyba__track.is-dragging { transition: none; }

.uyba__slide {
  flex: 0 0 auto;
  min-width: 0;
}

/* ---------- Card ---------- */

.uyba__card {
  height: 100%;
}

/* ---------- Before / After reveal ---------- */

.uyba-ba {
  --pos: 50%;
  position: relative;
  aspect-ratio: var(--uyba-ratio, 1 / 1);
  overflow: hidden;
  background: #000;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
}

.uyba-ba__layer {
  position: absolute;
  inset: 0;
  margin: 0;
}

.uyba-ba__layer--before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.uyba-ba__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.uyba-ba__tag {
  position: absolute;
  bottom: 18px;
  z-index: 3;
  font-size: 13px;
  line-height: 1;
  color: #1a1a1a;
  background: #fff;
  border-radius: 8px;
  padding: 10px 18px;
  pointer-events: none;
}

.uyba-ba__tag--before { left: 22px; }
.uyba-ba__tag--after  { right: 22px; }

.uyba-ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  z-index: 4;
  cursor: ew-resize;
}

.uyba-ba__handle:focus-visible {
  outline: none;
}

.uyba-ba__handle:focus-visible .uyba-ba__knob {
  box-shadow: 0 0 0 3px var(--uyba-gold);
}

.uyba-ba__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 84px;
  border-radius: 24px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #1a1a1a;
}

.uyba-ba__knob svg { width: 13px; height: 18px; display: block; }

.uyba__hint {
  margin: 40px 0 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--uyba-muted);
  text-align: center;
}

/* ---------- Dots ---------- */

.uyba__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.uyba__dots[hidden] { display: none; }

.uyba__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--uyba-dot);
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.uyba__dot.is-active {
  background: var(--uyba-dot-active);
  transform: scale(1.45);
}

.uyba__dot:focus-visible {
  outline: 2px solid var(--uyba-ink);
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .uyba {
    --uyba-gap: 18px;
  }
  .uyba__nav { margin-bottom: 18px; }
  .uyba-ba__tag {
    bottom: 12px;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 7px;
  }
  .uyba-ba__tag--before { left: 14px; }
  .uyba-ba__tag--after { right: 14px; }
  .uyba-ba__knob {
    width: 80px;
    height: 70px;
    border-radius: 20px;
    gap: 15px;
  }
  .uyba-ba__knob svg { width: 11px; height: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .uyba__track { transition: none; }
}
