.selected-news-grid {
  width: min(1320px, calc(100% - 64px));
  margin: 42px auto;
  padding: 34px;
  background: #fff;
  border-top: 6px solid #071d3b;
  box-sizing: border-box;
}

.selected-news-grid-secondary {
  border-top-color: #071d3b;
}

/* Alle inhoudelijke nieuwssecties staan op wit en krijgen dezelfde blauwe lijn. */
.homepage-today-heading {
  width: min(1320px, calc(100% - 64px));
  margin: 38px auto 0;
  padding-top: 26px;
  border-top: 6px solid #071d3b;
  box-sizing: border-box;
}

.homepage-today-heading em {
  color: #e10b08;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.homepage-today-heading h2 {
  margin: 5px 0 0;
  color: #071d3b;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
}

#meer-nieuws,
.region-band,
.inbeeld-band {
  background: #fff !important;
}

#meer-nieuws > .title,
.region-band > .section-heading,
.inbeeld-inner > .inbeeld-heading {
  padding-top: 26px;
  border-top: 6px solid #071d3b;
  box-sizing: border-box;
}

.selected-news-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.selected-news-heading em,
.selected-news-card em,
.selected-news-hero em {
  color: #e10b08;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.selected-news-heading h2 {
  margin: 4px 0 0;
  color: #071d3b;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1;
}

.selected-news-heading > a {
  color: #071d3b;
  font-weight: 800;
  text-decoration: none;
}

.selected-news-layout {
  display: grid;
  grid-template-columns: minmax(210px, .9fr) minmax(0, 2fr) minmax(210px, .9fr);
  gap: 20px;
  align-items: stretch;
}

.selected-news-side {
  display: grid;
  grid-template-rows: repeat(2, minmax(min-content, auto));
  gap: 20px;
}

.selected-news-card {
  display: grid;
  align-content: start;
  min-width: 0;
  overflow: hidden;
  color: #071d3b;
  background: #fff;
  border: 1px solid #d8e0ea;
  text-decoration: none;
}

.selected-news-card > img,
.selected-news-card > .selected-news-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.selected-news-card > div:last-child {
  padding: 14px 15px 17px;
}

.selected-news-card small,
.selected-news-hero small {
  color: #67758a;
  font-weight: 700;
}

.selected-news-card h3 {
  margin: 7px 0 0;
  font-size: clamp(1.15rem, 1.55vw, 1.5rem);
  line-height: 1.12;
}

.selected-news-hero {
  position: relative;
  display: block;
  min-height: 590px;
  overflow: hidden;
  color: #fff;
  background: #071d3b;
  text-decoration: none;
}

.selected-news-hero > img,
.selected-news-hero > .selected-news-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selected-news-hero > span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(3, 16, 34, .92) 100%);
}

.selected-news-hero > div:last-child {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  padding: clamp(24px, 5vw, 54px);
}

.selected-news-hero small { color: rgba(255,255,255,.8); }

.selected-news-hero h2 {
  max-width: 900px;
  margin: 8px 0;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.04;
}

.selected-news-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  font-size: 1.05rem;
  line-height: 1.45;
}

.selected-news-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #071d3b, #123b70);
  font-size: clamp(1.2rem, 3vw, 2.8rem);
  font-weight: 900;
}

.selected-news-bottom {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.selected-news-bottom .selected-news-card {
  position: relative;
  isolation: isolate;
  min-height: 300px;
  aspect-ratio: 16 / 9;
  color: #fff;
  background: #071d3b;
}

.selected-news-bottom .selected-news-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 24% 0 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(3, 16, 34, .3) 38%, rgba(3, 16, 34, .94) 100%);
}

.selected-news-bottom .selected-news-card > img,
.selected-news-bottom .selected-news-card > .selected-news-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.selected-news-bottom .selected-news-card > div:last-child {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: clamp(20px, 4vw, 44px);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .58);
}

.selected-news-bottom .selected-news-card small {
  color: rgba(255, 255, 255, .82);
}

.selected-news-bottom .selected-news-card h3 {
  max-width: 960px;
  margin-top: 8px;
  color: #fff;
  font-size: clamp(1.35rem, 2.3vw, 2.75rem);
  line-height: 1.07;
}

.selected-news-ad {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 30px 0 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8e0ea;
}

.selected-news-ad > span {
  position: absolute;
  top: 8px;
  left: 12px;
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.selected-news-ad-slides {
  display: grid;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.selected-news-ad-slide {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}

.selected-news-ad-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.selected-news-ad-slide > a {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.selected-news-ad img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  .selected-news-ad-slide { transition: none; }
}

/* Onder het openingsgrid: verkeer en twee even grote reclamevakken. */
.homepage-utility-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  min-width: 0;
}

.homepage-utility-row > .traffic-widget,
.homepage-utility-row > .homepage-promo-slot {
  box-sizing: border-box;
  min-width: 0;
  min-height: 210px;
  height: 100%;
  overflow: hidden;
  border: 1px solid #d8e0ea;
}

.homepage-utility-row > .traffic-widget {
  padding: 16px 20px;
}

.homepage-utility-row .traffic-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d8e0ea;
}

.homepage-utility-row .traffic-title span,
.homepage-utility-row .traffic-title a {
  color: #e10b08;
  font-weight: 800;
  text-decoration: none;
}

.homepage-utility-row .traffic-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  color: #071d3b;
  text-decoration: none;
  border-bottom: 1px solid #d8e0ea;
}

.homepage-utility-row .traffic-item time {
  color: #e10b08;
  font-weight: 800;
}

.homepage-utility-row .traffic-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.homepage-promo-slot {
  position: relative;
  display: grid;
  padding: 30px 0 0;
  color: #071d3b;
  background: #fff;
  text-decoration: none;
}

.homepage-promo-slot > span {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 12px;
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.homepage-promo-slot img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.homepage-promo-empty {
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 38px 24px 24px;
  text-align: center;
}

.homepage-promo-empty strong {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.05;
}

.homepage-promo-empty small {
  color: #e10b08;
  font-size: .95rem;
  font-weight: 800;
}

/* Het openingsblok gebruikt dezelfde duidelijke kaartkaders en tekstschaal. */
.home-grid.homepage-example-grid > .homepage-editorial-grid > .mosaic-lead,
.home-grid.homepage-example-grid > .homepage-editorial-grid > .middle-story,
.home-grid.homepage-example-grid > .homepage-editorial-grid > .latest-news {
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid #d8e0ea !important;
}

.home-grid.homepage-example-grid > .homepage-editorial-grid > .latest-news {
  padding: 0 20px 20px !important;
}

.homepage-editorial-grid > .mosaic-lead .lead h1 {
  font-size: clamp(2rem, 3vw, 2.75rem) !important;
  line-height: 1.04 !important;
}

.homepage-editorial-grid > .middle-story h2 {
  font-size: clamp(1.15rem, 1.55vw, 1.5rem) !important;
  line-height: 1.12 !important;
}

/* Kaarten groeien mee met langere koppen; iedere rij houdt één gelijke hoogte. */
@media (min-width: 801px) {
  .home-grid.homepage-example-grid > .homepage-editorial-grid {
    grid-template-rows: minmax(clamp(510px, 43vw, 570px), auto) minmax(clamp(310px, 30vw, 390px), auto) auto !important;
  }

  .home-grid.story-count-6 > .homepage-editorial-grid {
    grid-template-rows: clamp(245px, 20.5vw, 275px) clamp(245px, 20.5vw, 275px) minmax(clamp(310px, 30vw, 390px), auto) auto !important;
  }

  .home-grid.story-count-3 > .homepage-editorial-grid > .middle-story:nth-child(3),
  .home-grid.story-count-4 > .homepage-editorial-grid > .middle-story:nth-child(n+2),
  .home-grid.story-count-5 > .homepage-editorial-grid > .middle-story:nth-child(n+3),
  .home-grid.story-count-6 > .homepage-editorial-grid > .middle-story:nth-child(n+4) {
    align-self: stretch !important;
    height: auto !important;
    min-height: clamp(310px, 30vw, 390px) !important;
  }

  .home-grid.story-count-3 > .homepage-editorial-grid > .middle-story:nth-child(3) img,
  .home-grid.story-count-3 > .homepage-editorial-grid > .middle-story:nth-child(3) .middle-placeholder,
  .home-grid.story-count-4 > .homepage-editorial-grid > .middle-story:nth-child(n+2) img,
  .home-grid.story-count-4 > .homepage-editorial-grid > .middle-story:nth-child(n+2) .middle-placeholder,
  .home-grid.story-count-5 > .homepage-editorial-grid > .middle-story:nth-child(n+3) img,
  .home-grid.story-count-5 > .homepage-editorial-grid > .middle-story:nth-child(n+3) .middle-placeholder,
  .home-grid.story-count-6 > .homepage-editorial-grid > .middle-story:nth-child(n+4) img,
  .home-grid.story-count-6 > .homepage-editorial-grid > .middle-story:nth-child(n+4) .middle-placeholder {
    height: clamp(190px, 18vw, 240px) !important;
    flex-basis: clamp(190px, 18vw, 240px) !important;
  }

  .home-grid.story-count-3 > .homepage-editorial-grid > .middle-story:nth-child(3) h2,
  .home-grid.story-count-4 > .homepage-editorial-grid > .middle-story:nth-child(n+2) h2,
  .home-grid.story-count-5 > .homepage-editorial-grid > .middle-story:nth-child(n+3) h2,
  .home-grid.story-count-6 > .homepage-editorial-grid > .middle-story:nth-child(n+4) h2 {
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
  }
}

/* Regio en beeldnieuws volgen dezelfde kaartstijl als de gekozen grids. */
.region-band > .section-heading,
.inbeeld-heading {
  margin-bottom: 22px;
}

.section-heading h2,
.inbeeld-heading h2 {
  margin-top: 4px;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
}

.region-layout,
.inbeeld-grid {
  gap: 20px;
}

.region-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr);
}

.region-feature {
  grid-template-columns: minmax(0, 55%) minmax(0, 1fr);
}

.region-feature,
.region-list,
.inbeeld-lead,
.inbeeld-side {
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8e0ea;
}

.region-feature > div,
.region-list,
.region-list a,
.region-list strong,
.inbeeld-lead > div,
.inbeeld-side,
.inbeeld-side h3 {
  min-width: 0;
  max-width: 100%;
}

.region-feature > div {
  padding: clamp(22px, 2vw, 32px);
}

.region-feature h3 {
  max-width: 100%;
  font-size: clamp(1.65rem, 1.9vw, 2.25rem);
  font-weight: 800;
  line-height: 1.08;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.inbeeld-lead h3 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  line-height: 1.04;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.region-list strong,
.inbeeld-side h3 {
  font-size: clamp(1.15rem, 1.55vw, 1.5rem);
  font-weight: 800;
  line-height: 1.12;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.region-list a {
  grid-template-columns: 48px minmax(0, 1fr) 24px;
}

.selected-news-card h3,
.selected-news-hero h2,
.homepage-editorial-grid > .mosaic-lead .lead h1,
.homepage-editorial-grid > .middle-story h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.inbeeld-side {
  color: #071d3b;
}

@media (max-width: 980px) {
  .homepage-today-heading { width: calc(100% - 48px); }
  .selected-news-grid { width: calc(100% - 48px); padding: 26px; }
  .selected-news-layout { grid-template-columns: 1fr 1fr; }
  .selected-news-hero { grid-column: 1 / -1; grid-row: 1; min-height: 500px; }
  .selected-news-side { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .region-layout,
  .region-feature { grid-template-columns: 1fr; }

  .homepage-utility-row { grid-template-columns: 1fr 1fr; }
  .homepage-utility-row > .traffic-widget { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .homepage-today-heading {
    width: calc(100% - 36px);
    margin-top: 24px;
    padding-top: 18px;
  }

  .homepage-today-heading h2 { font-size: 2rem; }

  #meer-nieuws > .title,
  .region-band > .section-heading,
  .inbeeld-inner > .inbeeld-heading {
    padding-top: 18px;
  }

  .selected-news-grid { width: calc(100% - 36px); margin: 24px auto; padding: 20px 14px; }
  .selected-news-heading { align-items: start; flex-direction: column; gap: 10px; }
  .selected-news-layout { grid-template-columns: 1fr; }
  .selected-news-hero { min-height: 430px; }
  .selected-news-side { grid-template-columns: 1fr; }
  .selected-news-bottom { grid-template-columns: 1fr; }
  .selected-news-hero p { display: none; }
  .home-grid.homepage-example-grid > .homepage-editorial-grid > .latest-news { padding: 0 16px 18px !important; }
  .homepage-utility-row { grid-template-columns: 1fr; }
  .homepage-utility-row > .traffic-widget { grid-column: auto; }

  .region-feature h3,
  .inbeeld-lead h3 {
    font-size: 2rem;
  }

  .region-layout,
  .region-feature {
    grid-template-columns: 1fr;
  }

  .home-grid.story-count-3 > .homepage-editorial-grid > .middle-story:nth-child(3),
  .home-grid.story-count-4 > .homepage-editorial-grid > .middle-story:nth-child(n+2),
  .home-grid.story-count-5 > .homepage-editorial-grid > .middle-story:nth-child(n+3),
  .home-grid.story-count-6 > .homepage-editorial-grid > .middle-story:nth-child(n+4) {
    height: auto !important;
  }

  .home-grid.story-count-3 > .homepage-editorial-grid > .middle-story:nth-child(3) h2,
  .home-grid.story-count-4 > .homepage-editorial-grid > .middle-story:nth-child(n+2) h2,
  .home-grid.story-count-5 > .homepage-editorial-grid > .middle-story:nth-child(n+3) h2,
  .home-grid.story-count-6 > .homepage-editorial-grid > .middle-story:nth-child(n+4) h2 {
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
  }
}
