/* BRYANWORKS v1.2.7 – show entire featured image across all post displays.
 * Cards/teasers retain their existing grid proportions and use contain (letterboxing
 * when necessary); full article covers display at their natural aspect ratio.
 * Existing source files and any actual cropped media assets are not edited.
 */

/* Single WordPress post: respect the source image's height/width ratio at all sizes. */
.dhp-article .dhp-hero-media {
  align-self: center;
  height: auto;
  max-height: none;
  overflow: visible;
}
.dhp-article .dhp-hero-media .dhp-cover-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

/* Post archives, search results, related-story grids and legacy post cards. */
.bw-post-image,
.dhp-archive .dhp-feature-image > a,
.dhp-card-grid .dhp-card-image {
  background-color: #f7f5f2;
}
.bw-post-image img,
.dhp-archive .dhp-feature-image img,
.dhp-card-grid .dhp-card-image img,
.bw-article-visual img {
  object-fit: contain;
  object-position: center;
}
.dhp-card-grid .dhp-card-image:hover img,
.dhp-archive .dhp-feature-image > a:hover img {
  transform: none;
}
/* Old-format single posts, should that partial be used by a shortcode/plugin. */
.bw-article-visual img {
  max-width: 100%;
  max-height: none;
  width: auto;
  height: auto;
}

/* Homepage: latest-post/curated-story thumbnails (not category photos or banners). */
/* Clean white backing eliminates beige "shadow" bands on contained thumbnails.
 * The image remains uncropped, with its natural proportions visible. */
.dh-stories .dh-story-photo {
  background: #fff;
  box-shadow: none;
}
.dh-stories .dh-story-photo img {
  object-fit: contain;
  object-position: center;
}
.dh-stories .dh-story-photo:hover img {
  transform: none;
}

/* Articles page: hero and both lead/regular article card thumbnails. */
.dh-articles .dh-articles-cover-photo,
.dh-articles .dh-articles-grid .dh-article-image,
.dh-inner .dh-article-image {
  background-color: #f7f5f2;
  background-image: none;
}
.dh-articles .dh-articles-cover-photo img,
.dh-articles .dh-articles-grid .dh-article-image img,
.dh-inner .dh-article-image img {
  object-fit: contain;
  object-position: center;
}
.dh-articles .dh-articles-cover-photo:hover img,
.dh-articles .dh-articles-grid .dh-article-image:hover img,
.dh-inner .dh-article-image:hover img {
  transform: none;
}

/* Daily News: lead image, side headlines and story cards. */
.dh-news .dh-news-feature-image,
.dh-news .dh-news-side-image,
.dh-news .dh-news-card-image {
  background-color: #f7f5f2;
}
.dh-news .dh-news-feature-image .dh-news-photo,
.dh-news .dh-news-side-image .dh-news-photo,
.dh-news .dh-news-card-image .dh-news-photo {
  object-fit: contain;
  object-position: center;
}
.dh-news .dh-news-feature-image:hover .dh-news-photo,
.dh-news .dh-news-side-image:hover .dh-news-photo,
.dh-news .dh-news-card-image:hover .dh-news-photo {
  transform: none;
}

/* Image-based job posting cards: already use contain; cancel hover zoom. */
.dh-jobs .dh-jobs-poster:hover .dh-jobs-poster-image img,
.dh-inner .dh-job-image:hover img {
  transform: none;
}
.dh-inner .dh-job-image img {
  object-fit: contain;
  object-position: center;
}


/* BRYANWORKS v1.2.24 — equal-size featured-image THUMBNAILS for news/posts.
 * Every thumbnail in a news or article card has the same responsive 16:10
 * frame; source image aspect ratios may differ, so cover crops only the frame.
 * Single-post hero images, category banners, and job posters are unchanged.
 * Loaded last via wp_enqueue_scripts priority 1000 to supersede v1.2.7/22.
 */
:root {
  --bw-news-card-image-ratio: 16 / 10;
}

/* Cards on the homepage (including curated stories with custom images). */
.dh-stories .dh-story-card .dh-story-photo,
.dh-stories .dh-story-card .dh-story-photo:not(.dh-story-photo--empty) {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--bw-news-card-image-ratio);
  overflow: hidden;
  padding: 0;
  flex: 0 0 auto;
}
.dh-stories .dh-story-card .dh-story-photo:not(.dh-story-photo--empty) img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}
/* Keep text-based fallbacks nicely centered inside the exact same frame. */
.dh-stories .dh-story-card .dh-story-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Daily News grid, Articles grid, general articles and post archive cards. */
.dh-news .dh-news-grid .dh-news-card-image,
.dh-articles .dh-articles-grid .dh-article-image,
.dh-inner .dh-article-grid .dh-article-image,
.dhp-card-grid .dhp-card-image,
.bw-post-card .bw-post-image {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--bw-news-card-image-ratio);
  overflow: hidden;
}

/* The image fills the frame exactly, without white/empty side bands. */
.dh-news .dh-news-grid .dh-news-card-image .dh-news-photo,
.dh-articles .dh-articles-grid .dh-article-image img,
.dh-inner .dh-article-grid .dh-article-image img,
.dhp-card-grid .dhp-card-image img,
.bw-post-card .bw-post-image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

/* News/article fallbacks are already absolute or act as full-frame backgrounds.
 * No device-specific pixel heights: frames stay equal through responsive grids. */

/* Posts with no assigned featured image get the same frame height. */
.bw-post-card .bw-post-image .dhp-card-placeholder,
.dhp-card-grid .dhp-card-image .dhp-card-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}
