/* SB program image presentation. Existing WP featured image remains the sole source of truth. */
body .sb-grid:has(> .sb-program-card) {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),360px));
  justify-content:center;
  align-items:stretch;
  gap:24px;
}
body .sb-program-card {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:18px;
  overflow:hidden;
  text-align:right;
}
body .sb-program-card > a:has(> img) {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-width:0;
  aspect-ratio:4/5;
  border-radius:12px;
  background:#f4f7fb;
  overflow:hidden;
}
body .sb-program-card > a > img {
  display:block;
  width:100%;
  height:100%;
  max-height:none;
  margin:0;
  padding:0;
  object-fit:contain !important;
  object-position:center;
  aspect-ratio:auto;
  border-radius:0;
}
body .sb-program-card h3 {
  margin:2px 0;
  font-size:clamp(18px,1.6vw,22px);
  line-height:1.55;
}
body .sb-program-card p { line-height:1.75; }
body .sb-program-card .sb-button { margin-top:auto; }
/* Program detail: preserve the entire poster and let the intro sit next to it on desktop. */
body .sb-program-detail > div:first-child > img.sb-program-featured {
  width:min(42%,350px);
  max-width:100%;
  height:auto;
  max-height:530px;
  object-fit:contain;
  object-position:top center;
  float:right;
  clear:right;
  margin:0 0 22px 24px;
  background:#f4f7fb;
  padding:8px;
  border:1px solid #e3eaf2;
  border-radius:14px;
}
body .sb-program-detail > div:first-child > .sb-entry { max-width:none; }
body .sb-program-detail > div:first-child > .sb-entry::after {content:"";display:table;clear:both;}
@media(max-width:820px){
  body .sb-program-detail > div:first-child > img.sb-program-featured{
    width:min(100%,440px);float:none;display:block;margin:0 auto 22px;
  }
}
@media(max-width:520px){
  body .sb-grid:has(> .sb-program-card){grid-template-columns:minmax(0,1fr)}
  body .sb-program-card{padding:15px}
  body .sb-program-card > a:has(> img){aspect-ratio:4/5}
}
