/* Agent blog grid: prevent collapsed thumbnails */
body.post-type-archive-agent .entry-thumb img,
body.tax-agent_cat .entry-thumb img,
body.single-agent .kw-agent__blog .entry-thumb img,
body.archive .kw-agent__blog .entry-thumb img,
.archive.post-type-archive-agent .wp-post-image {
  display: block;
  width: 100%;
  height: auto !important;         /* override height=0 or max-height:0 */
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover;               /* looks good if wrapper is fixed-height */
}

/* If the theme uses a ratio wrapper, make it behave like a card cover */
.kw-agent__blog .entry-thumb,
.archive.post-type-archive-agent .entry-thumb {
  position: relative;
  overflow: hidden;
}

.kw-agent__blog .entry-thumb > img,
.archive.post-type-archive-agent .entry-thumb > img {
  position: relative;              /* if your theme uses absolute, change to absolute and add inset:0; height:100% */
}

/* Fix zero-height thumbnails on agent blog cards */
.post-thumbnail { 
  height: auto !important;
  aspect-ratio: auto !important; /* don’t enforce a ratio if wrapper has none */
}

/* Make the image size itself naturally */
.post-thumbnail img {
  display: block;
  width: 100%;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover; /* keep nice crop once height is real */
}

/* Be extra specific on the agent blog context */
body.single-agent .entry-content .post-thumbnail,
body.single-agent .entry-content .post-thumbnail img {
  height: auto !important;
  aspect-ratio: auto !important;
}
