/* ==========================================================================
   LEVLI Agência — Componentes de materiais (acompanha assets/js/materiais.js)
   Prévia de documentos · galeria · antes/depois
   Proporção vem dos atributos width/height da imagem (sem salto de layout).
   ========================================================================== */

.mat-docs { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.mat-doc { display: grid; gap: .75rem; align-content: start; min-width: 0; }
.mat-doc__page {
  background: var(--offwhite); border: 1px solid var(--grafite); border-radius: 4px; overflow: hidden;
}
.mat-doc__page img { width: 100%; height: auto; aspect-ratio: 210 / 297; object-fit: cover; }
.mat-doc__cap { display: grid; gap: .25rem; font-size: .88rem; color: var(--texto-suave); }
.mat-doc__cap strong { color: var(--grafite); font-weight: 600; font-size: .95rem; }
.mat-doc__pdf { color: var(--grafite); font-weight: 600; text-underline-offset: 3px; justify-self: start; }

.mat-gallery { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.mat-gallery > li { min-width: 0; }
.mat-fig { display: grid; gap: .6rem; position: relative; min-width: 0; }
.mat-fig img { width: 100%; height: auto; border-radius: 4px; background: rgba(41, 41, 41, 0.06); }
.mat-fig figcaption { font-size: .88rem; color: var(--texto-suave); }

.mat-compare { display: grid; gap: 1.5rem; }
.mat-compare .mat-fig { align-content: start; }
.mat-badge {
  position: absolute; top: .75rem; left: .75rem; z-index: 1;
  background: var(--grafite); color: var(--offwhite); border-radius: 999px;
  padding: .25rem .8rem; font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.mat-fig--depois .mat-badge { background: var(--rosa); color: var(--grafite); }

@media (min-width: 700px) {
  .mat-compare { grid-template-columns: 1fr 1fr; }
}
