/* V20.54.6 — stable picture contract for article detail, related cards and org-chart media. */

/* A picture wrapper must behave like the image container, not shrink to intrinsic content. */
picture.vc-news-detail-hero-picture,
picture.vc-news-related-picture,
picture.vc-orgchart-person-picture,
picture.vc-orgchart-modal-person-picture{display:block;width:100%;min-width:0;max-width:100%}

/* Article detail hero: full media width on desktop, predictable crop, no narrow intrinsic wrapper. */
.vc-news-detail-hero-picture>.vc-news-detail-hero-image{display:block;width:100%;max-width:none;margin:0;border:0}
body[data-tenant="ecide"] .ecide35-news-detail-media{width:100%;min-height:clamp(360px,52vw,650px);background:#eaf2fc}
body[data-tenant="ecide"] .ecide35-news-detail-media>.vc-news-detail-hero-picture{height:clamp(360px,52vw,650px)}
body[data-tenant="ecide"] .ecide35-news-detail-media>.vc-news-detail-hero-picture>.vc-news-detail-hero-image{width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;object-fit:cover!important;object-position:center!important;background:#eaf2fc!important}

/* Related articles: desktop is a clean 3-column grid; mobile becomes horizontal cards. */
body[data-tenant="ecide"] .ecide35-news-related-track{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px!important;overflow:visible!important;padding:4px 2px 14px!important}
body[data-tenant="ecide"] .ecide35-news-related-track>a{display:flex;flex-direction:column;min-width:0!important;width:auto!important;max-width:none!important;flex:none!important;border-radius:20px!important;overflow:hidden}
body[data-tenant="ecide"] .ecide35-news-related-track>a>.vc-news-related-picture{aspect-ratio:16/9;overflow:hidden;background:#edf5ff}
body[data-tenant="ecide"] .ecide35-news-related-track>a>.vc-news-related-picture>.vc-news-related-image{display:block;width:100%!important;height:100%!important;aspect-ratio:auto!important;object-fit:cover!important;transition:transform .28s ease}
body[data-tenant="ecide"] .ecide35-news-related-track>a:hover>.vc-news-related-picture>.vc-news-related-image{transform:scale(1.025)}

/* Shared / OPEG / generic organization news. */
.org-news-detail-hero>.vc-news-detail-hero-picture{height:min(68vh,720px);min-height:420px;overflow:hidden}
.org-news-detail-hero>.vc-news-detail-hero-picture>.vc-news-detail-hero-image{width:100%;height:100%;object-fit:cover;object-position:center}
.org-news-related>a>.vc-news-related-picture{display:block;width:100%;aspect-ratio:16/9;overflow:hidden}
.org-news-related>a>.vc-news-related-picture>.vc-news-related-image{display:block;width:100%;height:100%;object-fit:cover}

/* 5BSS */
.bss-news-detail-media>.vc-news-detail-hero-picture{height:clamp(360px,52vw,680px);overflow:hidden}
.bss-news-detail-media>.vc-news-detail-hero-picture>.vc-news-detail-hero-image{width:100%;height:100%;object-fit:cover}
.bss-news-related-grid>a>.vc-news-related-picture{display:block;width:100%;aspect-ratio:16/9;overflow:hidden}
.bss-news-related-grid>a>.vc-news-related-picture>.vc-news-related-image{display:block;width:100%;height:100%;object-fit:cover}

/* LPII */
.lpii-news-detail-media>.vc-news-detail-hero-picture{height:100%;min-height:360px;overflow:hidden}
.lpii-news-detail-media>.vc-news-detail-hero-picture>.vc-news-detail-hero-image{width:100%;height:100%;object-fit:cover}
.lpii-news-related-card>.vc-news-related-picture{display:block;width:100%;aspect-ratio:16/9;overflow:hidden}
.lpii-news-related-card>.vc-news-related-picture>.vc-news-related-image{display:block;width:100%;height:100%;object-fit:cover}

/* Org chart photos: MOE <picture> must remain transparent to the card layout. */
.vc-orgchart-photo>.vc-orgchart-person-picture{width:100%;height:100%}
.vc-orgchart-photo>.vc-orgchart-person-picture>.vc-orgchart-person-image{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.ocf-person>.vc-orgchart-person-picture{width:auto;height:auto;flex:0 0 auto}
.ocf-person>.vc-orgchart-person-picture>.ocf-avatar{display:block;object-fit:cover}
.ocf-node-surface>.vc-orgchart-person-picture>.ocf-branch-image{display:block;width:100%;height:100%;object-fit:cover}
.vc-orgchart-modal-hero>.vc-orgchart-modal-person-picture{height:100%}
.vc-orgchart-modal-hero>.vc-orgchart-modal-person-picture>.vc-orgchart-modal-person-image{display:block;width:100%;height:100%;object-fit:cover}

@media(max-width:760px){
  body[data-tenant="ecide"] .ecide35-news-detail-media{min-height:0}
  body[data-tenant="ecide"] .ecide35-news-detail-media>.vc-news-detail-hero-picture{height:auto;min-height:0}
  body[data-tenant="ecide"] .ecide35-news-detail-media>.vc-news-detail-hero-picture>.vc-news-detail-hero-image{height:auto!important;max-height:none!important;object-fit:contain!important}
  body[data-tenant="ecide"] .ecide35-news-related-track{display:flex!important;gap:14px!important;overflow-x:auto!important;scroll-snap-type:x mandatory;padding:2px 16px 14px 0!important}
  body[data-tenant="ecide"] .ecide35-news-related-track>a{flex:0 0 min(84vw,340px)!important;scroll-snap-align:start}
  .org-news-detail-hero>.vc-news-detail-hero-picture,.bss-news-detail-media>.vc-news-detail-hero-picture{height:auto;min-height:0}
  .org-news-detail-hero>.vc-news-detail-hero-picture>.vc-news-detail-hero-image,.bss-news-detail-media>.vc-news-detail-hero-picture>.vc-news-detail-hero-image{height:auto;object-fit:contain}
  .lpii-news-detail-media>.vc-news-detail-hero-picture{height:auto;min-height:0}
  .lpii-news-detail-media>.vc-news-detail-hero-picture>.vc-news-detail-hero-image{height:auto;object-fit:contain}
}

/* Theme detail images: the class is mirrored on <picture>, so keep the wrapper and img aligned. */
.public-news-modern-detail>.vc-news-detail-hero-picture.public-news-modern-detail-image,
.viso-news-detail-card>.vc-news-detail-hero-picture.viso-news-detail-image{display:block;width:100%;max-height:none;margin-bottom:28px;overflow:hidden;border-radius:22px}
.public-news-modern-detail>.vc-news-detail-hero-picture>.public-news-modern-detail-image,
.viso-news-detail-card>.vc-news-detail-hero-picture>.viso-news-detail-image{display:block;width:100%;height:clamp(320px,52vw,560px);max-height:560px;margin:0;border-radius:0;object-fit:cover}

/* 5BSS related cards become actual media cards instead of text cards squeezed by picture. */
body[data-tenant="fivebss"] .bss-news-related-grid>a{display:flex!important;min-width:0;min-height:0!important;flex-direction:column!important;justify-content:flex-start!important;padding:0!important;overflow:hidden}
body[data-tenant="fivebss"] .bss-news-related-grid>a>.vc-news-related-picture{flex:0 0 auto}
body[data-tenant="fivebss"] .bss-news-related-grid>a>span{margin:14px 18px 0!important;padding:0;color:#868d97}
body[data-tenant="fivebss"] .bss-news-related-grid>a>strong{margin:7px 18px 0!important;padding:0;font-size:20px;line-height:1.22}
body[data-tenant="fivebss"] .bss-news-related-grid>a>p{margin:8px 18px 20px!important;color:#8f959f;font-size:12px;line-height:1.55}

@media(max-width:760px){
  .public-news-modern-detail>.vc-news-detail-hero-picture>.public-news-modern-detail-image,
  .viso-news-detail-card>.vc-news-detail-hero-picture>.viso-news-detail-image{height:auto;max-height:none;object-fit:contain}
}
