/*
Theme Name: FMG Underground Child v3
Template: fmg-underground-v3
Version: 3.3.28-stream-image-fit
*/

/* IMPORTANT:
   Child theme does NOT override player / icons / azuracast.
   It only loads the parent styles & JS.
*/

/* =====================================================================
   FMG NEWS FULL ARTICLE SAFE VISIBILITY FIX
   - Does NOT force-show the detail view (no display:block here).
   - Only removes max-height/overflow clipping on the article body container.
   - Scoped to News page (page-id-1657).
   ===================================================================== */
body.page-id-1657 #newsDetailBody{
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
}

/* Embeds/images responsive inside full article */
body.page-id-1657 #newsDetailBody img,
body.page-id-1657 #newsDetailBody iframe,
body.page-id-1657 #newsDetailBody video,
body.page-id-1657 #newsDetailBody embed,
body.page-id-1657 #newsDetailBody object{
  max-width:100% !important;
  height:auto !important;
}


/* FMG NEWS: prevent default WP post loop flash while SPA hydrates */
body.fmg-news-route:not(.fmg-news-ready) article,
body.fmg-news-route:not(.fmg-news-ready) .wp-block-latest-posts,
body.fmg-news-route:not(.fmg-news-ready) .wp-block-post,
body.fmg-news-route:not(.fmg-news-ready) .wp-block-query {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* FMG News duplicate image visual fix */
body.page-id-1657 #newsDetailBody img:first-of-type{
  display:none !important;
}


/* =====================================================================
   FMG STREAM IMAGE FIT v1
   One 2:1 master image per stream, shown whole in both list + detail.
   Scoped ONLY to Streams media. No routing/player/content changes.
   Standard artwork size: 1774 x 887 (2:1), matching approved Lounge art.
   ===================================================================== */

/* Streams grid: use the same 2:1 canvas as the source artwork. */
.fmg-streams-grid .fmg-stream-thumb-wrap,
.fmg-streams-grid .fmg-stream-thumb-wrap.has-video {
  height: auto !important;
  aspect-ratio: 2 / 1 !important;
  background: #000;
}

/* Do not zoom/crop the still image. */
.fmg-streams-grid .fmg-stream-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}

.fmg-streams-grid .fmg-stream-card:hover .fmg-stream-thumb {
  transform: none !important;
}

/* More Info: same 2:1 canvas, so the exact same artwork is fully visible. */
#streamDetailView .fmg-stream-hero-media {
  aspect-ratio: 2 / 1 !important;
  background: #000;
}

#streamDetailView .fmg-stream-hero-media img {
  object-fit: contain !important;
  object-position: center center !important;
}
