/* Fix image display in blog posts */

/* Full-width responsive images with proper aspect ratio */
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 4px;
}

/* Image with caption styling */
.responsive-figure {
  margin: 1.5rem 0;
  width: 100%;
}

.responsive-figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

.responsive-figure figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Fix for featured images at the top of posts */
.image.fit {
  width: 100%;
  margin: 0 0 1.5rem 0;
}

.image.fit img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Fix for sidebar images */
#sidebar .image {
  margin-bottom: 1rem;
}

#sidebar .image img {
  width: 100%;
  height: auto;
}

/* Fix for home page post images */
.posts article .image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 4px;
}

/* Fix for mini-posts in sidebar */
.mini-posts article .image img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

/* --- Hero/banner image responsiveness overrides --- */
/* Ensure the hero image on the blog home keeps its natural aspect ratio */
#banner .image img {
  width: 100%;
  height: auto !important;           /* override theme's height:100% */
  object-fit: contain !important;    /* prevent cropping */
  display: block;
}

/* Make the hero layout stack nicely on smaller screens */
@media (max-width: 980px) {
  #banner { flex-direction: column-reverse; }
  #banner .image { width: 100% !important; margin: 1.5em 0 0 0 !important; }
}

/* Keep Editorial’s layout; only ensure image doesn’t distort/crop */
#banner .image { min-width: 0; }

/* On small screens, stack (theme already does) and remove fixed heights */
@media (max-width: 980px) {
  #banner .image {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
  }
}