/* Foto-Hero (.hero-figure mit picture): Kachel folgt dem Bild, kein grauer Briefkasten.
   Platzhalter ohne picture bleiben unveraendert. */
.hero-figure:has(picture) {
  background: transparent;
  width: fit-content;
  max-width: min(100%, 26rem);
  min-height: 0;
  padding: 0;
  justify-self: center;
}

.hero-figure:has(picture) picture {
  display: block;
}

.hero-figure:has(picture) img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 26rem;
  object-fit: cover;
  object-position: center 42%;
}

/* Bildbreite bestimmt die Kachel; der Caption-Text dehnt sie nicht. */
.hero-figure:has(picture) figcaption {
  width: 0;
  min-width: 100%;
  box-sizing: border-box;
}
