/* ============================================================
   GetStarNews homepage story cards: lead, side stories, story grid.

   The desk publishes three image shapes: 16:9 editorial illustrations with
   text, 4:5 LOCAL HEADLINES graphics and 9:16 video/story frames. Each one
   carries headlines, captions or faces that a cover crop cuts off, so every
   card shows its image whole (contained over a blurred copy of itself) and
   the site headline sits below the art, never on top of it.
   ============================================================ */

/* header.php's fallback <style> caps every main/section at 1100px, which left
   the homepage narrower than its 95vw masthead (sports desk has the same fix). */
body.home-front main.he-main,
body.home-front main.he-main section{max-width:none}

/* ---- whole-image media frame ---- */
.he-media{position:relative;display:block;overflow:hidden;isolation:isolate;background:#05090f}
/* !important: site-polish.css's `main img:not(…)x3` sets max-width/height:auto/radius
   at (0,3,5) specificity, which would collapse these absolutely sized layers. */
.he-media img{position:absolute;display:block;max-width:none!important;border-radius:0!important}
.he-media__fill{top:-8%;left:-8%;width:116%;height:116%!important;object-fit:cover;filter:blur(22px) brightness(.45) saturate(1.15)}
.he-media__img{inset:0;width:100%;height:100%!important;object-fit:contain;transition:transform .3s ease}
.he-lead__main:hover .he-media__img,.he-side:hover .he-media__img,.he-story--media:hover .he-media__img{transform:scale(1.025)}

/* ---- lead: art on top, headline block below ---- */
.he-lead{gap:22px}
.he-lead__main{min-height:0;justify-content:flex-start}
.he-lead__media{display:block;flex:0 0 auto;border-bottom:1px solid var(--line)}
.he-lead__media .he-media{aspect-ratio:16/9}
.he-lead__body{flex:1 1 auto;padding:20px 26px 24px}
/* outranks site-polish.css's `main h1:not(…)x3` (0,3,2) headline sizing */
.home-enhanced .he-lead .he-lead__body .he-lead__title{font-size:clamp(1.6rem,2.05vw,2.45rem);line-height:1.08;margin:10px 0 10px}
.he-lead__body p{font-size:1.14rem;margin:0 0 12px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}

/* ---- side stories: fill the lead's height, art grows to take the slack ---- */
.he-lead__side{gap:16px}
.he-side{flex:1 1 0%;display:flex;flex-direction:column;min-height:0;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);transition:border-color .15s,background .15s}
.he-side:hover{border-color:var(--line-strong);background:var(--surface-strong)}
.he-side__media{flex:1 1 auto;min-height:150px;border-bottom:1px solid var(--line)}
.he-side__body{padding:12px 16px 14px}
.he-side__body .he-kicker{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.home-enhanced .he-side h3{font-size:1.08rem;font-weight:800;line-height:1.2;letter-spacing:-.015em;margin:6px 0;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}

/* ---- story grid: square frames keep every row even ---- */
.he-story--media{padding:0 0 16px;gap:8px;min-height:0}
.he-story__media{display:block}
.he-story__media .he-media{aspect-ratio:1/1}
.he-story--media>h3,.he-story--media>.he-story__foot{padding:0 16px}
.he-story--media>h3{margin-top:6px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.he-story--media .he-story__foot .he-kicker{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.he-story--media .he-story__foot .he-meta{flex:0 0 auto;white-space:nowrap}
@media (min-width:1600px){
  .home-front .he-stories{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* small screens: a poster lead gets its full 4:5 frame; side stories become
   compact rows (square art | text); the grid drops to two columns, then rows */
@media (max-width:760px){
  .he-lead--poster .he-lead__media .he-media{aspect-ratio:4/5}
  .he-lead__body{padding:18px 18px 20px}
  .he-lead__side{gap:12px}
  .he-side{flex:none;flex-direction:row}
  .he-side__media{flex:0 0 108px;min-height:0;height:108px;border-bottom:0;border-right:1px solid var(--line)}
  .he-side__body{align-self:center;min-width:0;padding:10px 14px}
  .home-front .he-stories{grid-template-columns:repeat(2,minmax(0,1fr))}
  .he-story--media>h3{font-size:1rem}
  .he-story--media>h3,.he-story--media>.he-story__foot{padding:0 12px}
  .he-story--media .he-story__foot{flex-wrap:wrap;gap:2px 8px}
  .he-story--media .he-story__foot .he-kicker{white-space:normal}
}
@media (max-width:460px){
  .home-front .he-stories{grid-template-columns:1fr}
  .he-story--media{display:grid;grid-template-columns:108px minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:14px;row-gap:6px;padding:12px}
  .he-story--media .he-story__media{grid-row:1 / span 2;align-self:start}
  .he-story--media>h3{margin:0}
  .he-story--media>h3,.he-story--media>.he-story__foot{padding:0}
  .he-story--media .he-story__foot{flex-direction:column;align-items:flex-start;gap:3px;padding-top:0}
  .he-story--media .he-story__foot .he-kicker{max-width:100%;white-space:nowrap}
}
