/* V23 — Press67-inspired compact centered editorial layout.
 * Overrides V17/V19/V20 conflicting page and headline dimensions.
 * Image SOURCE dimensions (1280x722) differ from the responsive displayed dimensions.
 */

/* Shared center axis: header, page contents, news blocks and footer. */
body .container,
body .v5-home.container {
  box-sizing:border-box;
  width:min(var(--ph23-layout-width,1180px), calc(100% - 48px)) !important;
  max-width:var(--ph23-layout-width,1180px) !important;
  margin-inline:auto !important;
}
body .v5-home.container { padding-inline:0 !important; }

/* Top cards and hero start on the same left edge; never stretch to viewport. */
.v5-home .v5-spot-section {
  width:min(100%,var(--ph17-canvas-spot-width,1280px)) !important;
  max-width:100% !important;
  margin:0 !important;
}
.v5-home .v5-front-stage {
  box-sizing:border-box;
  display:grid;
  width:min(100%,var(--ph17-canvas-stage-width,1280px)) !important;
  max-width:100% !important;
  margin:14px 0 0 !important;
  grid-template-columns:minmax(0,2.1fr) minmax(0,1fr) !important;
  gap:14px;
  align-items:stretch !important;
}
.v5-home .v5-main-headline,
.v5-home .v5-agenda,
.v5-home .v5-slider { min-width:0; }
.v5-home .v5-slider { border-radius:6px; }
.v5-home .v5-slider-stage {
  display:block;
  width:100%;
  height:var(--ph23-slider-height,auto) !important;
  aspect-ratio:1280 / 722 !important;
  max-height:none !important;
  min-height:0 !important;
  overflow:hidden;
}
.v5-home .v5-slide-link,
.v5-home .v5-slide-link>img {
  display:block;
  width:100%;
  height:100%;
}
.v5-home .v5-slide-link>img { object-fit:cover; }
.v5-home .v5-slider-stage .v5-slide-gradient {
  padding:58px 24px 20px;
  background:linear-gradient(0deg,rgba(5,10,19,.89),rgba(7,13,24,.40) 63%,transparent);
}
.v5-home .v5-slider-stage .v5-slide-gradient h2 {
  font-size:clamp(21px,2.4vw,var(--ph15-font-main-title,32px));
  line-height:1.16;
  -webkit-line-clamp:3;
  line-clamp:3;
}
.v5-home .v5-number-nav button { height:43px; }

/* Side news cards occupy the same total height as slider + slide numbers. */
.v5-home .v5-agenda { position:relative; min-height:0; align-self:stretch; }
.v5-home .v5-agenda-cards {
  position:absolute;
  inset:0;
  display:grid;
  height:100% !important;
  min-height:0 !important;
  grid-template-columns:minmax(0,1fr) !important;
  grid-template-rows:repeat(2,minmax(0,1fr)) !important;
  gap:12px;
}
.v5-home .v5-agenda-card {
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  height:100% !important;
  min-height:0 !important;
  border-radius:5px;
  overflow:hidden;
  background:#f3f4f6;
}
.v5-home .v5-agenda-card > div:first-child {
  flex:1 1 0%;
  min-height:0;
  height:auto !important;
  aspect-ratio:auto !important;
  overflow:hidden;
}
.v5-home .v5-agenda-card > div:first-child img {
  width:100%;height:100%;object-fit:cover;display:block;
}
.v5-home .v5-agenda-card > span { margin:7px 10px 0; font-size:10px; }
.v5-home .v5-agenda-card h3 {
  margin:2px 10px 9px;
  flex:none;
  font-size:clamp(14px,1.2vw,18px);
  line-height:1.25;
  -webkit-line-clamp:2;
  line-clamp:2;
}

/* Mid-sized screens: vertical stacking prevents excessively thin main images. */
@media(max-width:940px){
  .v5-home .v5-front-stage {
    grid-template-columns:minmax(0,1fr) !important;
  }
  .v5-home .v5-agenda-cards {
    position:static;
    height:auto !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    grid-template-rows:auto !important;
  }
  .v5-home .v5-agenda-card {
    min-height:220px !important;
    height:220px !important;
  }
}
@media(max-width:560px){
  body .container,body .v5-home.container {
    width:calc(100% - 24px) !important;
    max-width:calc(100% - 24px) !important;
  }
  .v5-home .v5-front-stage { gap:12px; margin-top:12px !important; }
  .v5-home .v5-slider-stage {height:var(--ph23-slider-mobile-height,auto) !important;}
  .v5-home .v5-slider-stage .v5-slide-gradient {padding:38px 13px 12px;}
  .v5-home .v5-slider-stage .v5-slide-gradient h2 {
    font-size:clamp(17px,5vw,24px);
    -webkit-line-clamp:2;
    line-clamp:2;
  }
  .v5-home .v5-number-nav button {height:37px; font-size:clamp(9px,2.9vw,15px);}
  .v5-home .v5-agenda-cards {gap:10px;}
  .v5-home .v5-agenda-card {min-height:192px !important;height:192px !important;}
  .v5-home .v5-agenda-card h3 {font-size:13px;}
}
