/* Shared responsive behavior for project visuals.
   Desktop composition remains page-specific. On small screens the source
   image determines the height, instead of an arbitrary minimum hero height. */
.responsive-visual,
.hero-image,
.hero-media {
  min-width: 0;
  overflow: hidden;
}

.responsive-visual > img,
.hero-image > img,
.hero-media > img {
  display: block;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 768px) {
  .responsive-visual--contain-mobile,
  .hero-image,
  .hero-media {
    min-height: 0 !important;
    align-self: start;
    background: var(--bg, #faf9f7);
  }

  .responsive-visual--contain-mobile > img,
  .hero-image > img,
  .hero-media > img {
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}
