.before-after{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.before-after figure{width:100%;height:188px;aspect-ratio:auto;overflow:hidden}
.before-after img{display:block;width:100%;height:100%;object-fit:contain;object-position:center}
@media(max-width:575px){.before-after figure{height:165px}}

/* Legendas UX: cada foto mantém sua identificação logo abaixo. */
.before-after figure {
  display: flex;
  flex-direction: column;
  height: auto !important;
  aspect-ratio: auto !important;
  overflow: hidden;
}

.before-after figure img {
  width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
  flex: 0 0 auto;
}

.before-after figure figcaption {
  position: static !important;
  inset: auto !important;
  display: block;
  width: 100%;
  flex: 0 0 auto;
  padding: 6px 4px;
  background: #572B6B;
  color: #F8F8F8;
  text-align: center;
  font-size: .65rem;
  font-weight: 700;
}
