/* Galeria com transição no scroll – [ub_servico_galeria_scroll] */
.ub-gt {
  /* ====== AJUSTES ====== */
  --ub-gt-bg: #00004c;            /* fundo que aparece quando a foto anterior recua */
  --ub-gt-shade: 0, 0, 76;        /* cor (RGB) do degradê atrás dos títulos */
  --ub-gt-title: clamp(30px, 4.4vw, 76px);   /* tamanho dos títulos */
  --ub-gt-accent: #e30613;        /* barra de progresso / botão ativo */

  position: relative;
  width: 100%;
  font-family: 'Poppins', sans-serif;
}
.ub-gt *, .ub-gt *::before, .ub-gt *::after { box-sizing: border-box; }

/* ---------- Sem JS / "reduzir movimento": fotos uma abaixo da outra ---------- */
.ub-gt__stage { display: grid; gap: 20px; }
.ub-gt__item { position: relative; margin: 0; overflow: hidden; border-radius: 20px; }
.ub-gt .ub-gt__photo {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  border-radius: 0 !important;
}
.ub-gt__caption {
  position: absolute;
  left: 20px;
  bottom: 18px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}
.ub-gt__dim,
.ub-gt__shade,
.ub-gt__titles,
.ub-gt__ui,
.ub-gt__live { display: none; }

/* ---------- Com o efeito ativo ---------- */
.ub-gt.is-ready .ub-gt__frame {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ub-gt-bg);
}
.ub-gt.is-ready .ub-gt__stage {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}
.ub-gt.is-ready .ub-gt__item {
  position: absolute;
  inset: 0;
  border-radius: 0;
  transform-origin: 50% 50%;
  will-change: transform;
}
.ub-gt.is-ready .ub-gt__photo { transform-origin: 50% 50%; }
.ub-gt.is-ready .ub-gt__caption { display: none; }

.ub-gt.is-ready .ub-gt__dim {
  display: block;
  position: absolute;
  inset: 0;
  background: var(--ub-gt-bg);
  opacity: 0;
  pointer-events: none;
}

/* degradê para os títulos ficarem legíveis em qualquer foto */
.ub-gt.is-ready .ub-gt__shade {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(var(--ub-gt-shade), .85) 0%, rgba(var(--ub-gt-shade), .35) 32%, rgba(var(--ub-gt-shade), 0) 60%),
    linear-gradient(to bottom, rgba(var(--ub-gt-shade), .35) 0%, rgba(var(--ub-gt-shade), 0) 22%);
}

/* títulos grandes */
.ub-gt.is-ready .ub-gt__titles {
  display: block;
  position: absolute;
  z-index: 60;
  left: 6%;
  right: 6%;
  bottom: 130px;
  pointer-events: none;
  color: #fff;
}
.ub-gt__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
}
.ub-gt__title-wrap {
  position: relative;
  min-height: calc(var(--ub-gt-title) * 2.1);   /* até 2 linhas */
}
.ub-gt .ub-gt__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  max-width: 18ch;
  font-family: 'Poppins', sans-serif !important;
  font-size: var(--ub-gt-title);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #fff;
  will-change: transform, opacity;
}

/* contador + progresso + botões */
.ub-gt.is-ready .ub-gt__ui {
  display: flex;
  position: absolute;
  z-index: 70;
  left: 6%;
  right: 6%;
  bottom: 40px;
  align-items: center;
  gap: 28px;
  color: #fff;
}
.ub-gt__count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ub-gt__current { font-size: 22px; font-weight: 600; }
.ub-gt__sep, .ub-gt__total { opacity: .6; }
.ub-gt__progress {
  position: relative;
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .22);
  overflow: hidden;
}
.ub-gt__bar {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--ub-gt-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.ub-gt__chapters { display: flex; gap: 8px; }
.ub-gt .ub-gt__chapter {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background .3s ease, box-shadow .3s ease, color .3s ease;
}
.ub-gt .ub-gt__chapter:hover,
.ub-gt .ub-gt__chapter:focus-visible { background: rgba(255, 255, 255, .26); outline: none; }
.ub-gt .ub-gt__chapter[aria-current="true"] {
  background: var(--ub-gt-accent);
  box-shadow: none;
}

/* texto para leitores de tela (anuncia a foto atual) */
.ub-gt.is-ready .ub-gt__live {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Celular */
@media (max-width: 767px) {
  .ub-gt { --ub-gt-title: clamp(28px, 8vw, 40px); }
  .ub-gt.is-ready .ub-gt__titles { left: 20px; right: 20px; bottom: 112px; }
  .ub-gt.is-ready .ub-gt__ui { left: 20px; right: 20px; bottom: 28px; gap: 16px; flex-wrap: wrap; }
  .ub-gt__progress { order: 3; flex-basis: 100%; }
  .ub-gt__chapters { margin-left: auto; gap: 6px; }
  .ub-gt .ub-gt__chapter { min-width: 0; width: 10px; height: 10px; padding: 0; border-radius: 50%; font-size: 0; }
  .ub-gt__eyebrow { font-size: 12px; padding: 6px 12px; }
}
