/* Botão no Portfolio */
.pf-ad-wrap { margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.pf-view-head + .pf-ad-wrap { margin: 1.25rem 0 2rem; justify-content: flex-start; }

/* Página Antes e depois */
.ad-section { padding-top: clamp(1.5rem, 4vw, 3rem); }
.ad-back { margin: 0 0 1.75rem; }

/* Colunas sem espaços em branco: cada par ocupa só a sua própria altura,
   por isso as fotos horizontais não deixam vazio por baixo. */
.ad-grid { column-width: 340px; column-gap: clamp(1.25rem, 3vw, 2rem); margin-top: 1rem; }
.ad-pair { margin: 0 0 clamp(1.25rem, 3vw, 2rem); break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; }
.ad-empty { margin-top: 1.5rem; }

.ad-compare {
  --pos: 50%;
  position: relative; overflow: hidden; background: #111; line-height: 0;
  user-select: none; -webkit-user-select: none;
}
.ad-compare img { width: 100%; height: auto; display: block; pointer-events: none; }
.ad-compare .ad-before {
  position: absolute; inset: 0; height: 100%; object-fit: cover;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ad-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px;
  background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.6); transform: translateX(-1px); pointer-events: none;
}
.ad-handle::after {
  content: '‹ ›'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #111;
  font: 600 15px/42px system-ui, sans-serif; letter-spacing: 2px; text-align: center;
  box-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.ad-tag {
  position: absolute; top: .75rem; padding: .3em .7em; background: rgba(0,0,0,.6); color: #fff;
  font: .65rem/1.2 var(--font-mono, monospace); letter-spacing: .16em; text-transform: uppercase; pointer-events: none;
}
.ad-tag--b { left: .75rem; }
.ad-tag--a { right: .75rem; }
.ad-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0;
  cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none;
}
.ad-compare:focus-within { outline: 2px solid currentColor; outline-offset: 3px; }
.ad-cap { margin-top: .75rem; font-size: var(--fs-small, .9rem); color: var(--c-stone, inherit); line-height: 1.4; }
