/* Additive cover repair. Enqueue only on CV article/library archives and
   singular cv_article. The theme body has no WordPress post-type classes. */

/* Existing article artwork includes text: show the complete composition.
   Keep the cover independent of the narrower reading column. */
main .story-hero {
  width: calc(100% - (2 * var(--gutter, 24px)));
  max-width: 1280px;
  height: auto;
  margin-inline: auto;
  overflow: visible;
}

main .story-hero img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

/* Article thumbnails are 16:9 artwork. Natural dimensions also preserve
   the 3:2 story illustrations when the mixed library is displayed. */
main .editorial-grid .editorial-image {
  aspect-ratio: auto;
  overflow: visible;
}

main .editorial-grid .editorial-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  /* WordPress sizes="auto" enables UA size containment. A pure auto ratio
     falls back to its 3000x1500 placeholder even after image decoding. */
  aspect-ratio: auto 3 / 2;
  contain-intrinsic-size: none;
  object-fit: contain;
  object-position: center;
  transform: none;
}

main .editorial-grid .editorial-image[href*="/artigos/"] img {
  aspect-ratio: auto 16 / 9;
}

main .editorial-grid .editorial-image[href*="/meditacao-autoconhecimento-regulacao-emocional/"] img {
  aspect-ratio: auto 3 / 2;
}

main .editorial-grid .editorial-image:hover img {
  transform: none;
}
