/* Keeps a consistent crop and prevents layout jump */
.c-listing__item-media-container {
  aspect-ratio: 16 / 9;   /* change to 4/3 or 1/1 if you prefer */
  width: 100%;
  overflow: hidden;
}

.c-listing__item-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* fills the box; crops edges neatly */
}

/* Fallback for older browsers without aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
  .c-listing__item-media-container { position: relative; }
  .c-listing__item-media-container::before {
    content: "";
    display: block;
    padding-top: 56.25%;   /* 16:9 = 9/16 * 100 */
  }
  .c-listing__item-media {
    position: absolute;
    inset: 0;
  }
}
