/* Portfolio directory only. Homepage featured cases keep their existing layout. */
body.editorial-page #portfolio-directory > .portfolio-row {
  overflow: visible;
}

body.editorial-page #portfolio-directory .portfolio-row-media {
  display: block;
  align-self: start;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  overflow: visible;
  transform: none;
  scale: none;
}

body.editorial-page #portfolio-directory .portfolio-row-media picture {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  overflow: visible;
  transform: none;
  scale: none;
}

/* Natural image height preserves both the wide case-01 and the taller captures.
   These selectors also override object-cover/h-full in the dynamic fallback. */
body.editorial-page #portfolio-directory .portfolio-row-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transform: none;
  scale: none;
}

/* Keep a readable target if the existing renderer replaces a failed preview. */
body.editorial-page #portfolio-directory .portfolio-row-media > div {
  min-height: 12rem;
}
