/* ESG Flex Builder — Divi-5-artige Grid-Reihen mit nativen Gutenberg-Spalten. */
.single-post .entry-content .wp-block-columns.esg-flex-row,
.editor-styles-wrapper .wp-block-columns.esg-flex-row {
  gap: clamp(1rem, 2.4vw, 1.75rem);
  margin-block: clamp(1.5rem, 3vw, 2.5rem);
}
.single-post .entry-content .esg-flex-row > .wp-block-column,
.editor-styles-wrapper .esg-flex-row > .wp-block-column {
  min-width: 0;
}

/* Kartenstil pro Reihe: jede Spalte wird zur Karte. */
.single-post .entry-content .is-style-esg-cards > .wp-block-column,
.editor-styles-wrapper .is-style-esg-cards > .wp-block-column {
  --esg-flex-pad: clamp(1rem, 2vw, 1.5rem);
  overflow: hidden;
  padding: var(--esg-flex-pad);
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(248, 251, 255, .94));
  box-shadow: 0 1px 0 rgba(255,255,255,.86) inset, 0 16px 44px rgba(15, 23, 42, .08);
}
.single-post .entry-content .is-style-esg-cards > .wp-block-column > :first-child,
.editor-styles-wrapper .is-style-esg-cards > .wp-block-column > :first-child { margin-top: 0; }
.single-post .entry-content .is-style-esg-cards > .wp-block-column > :last-child,
.editor-styles-wrapper .is-style-esg-cards > .wp-block-column > :last-child { margin-bottom: 0; }

/* Bild am Kartenanfang läuft randlos bis zur Kante. */
.single-post .entry-content .is-style-esg-cards > .wp-block-column > .wp-block-image:first-child,
.editor-styles-wrapper .is-style-esg-cards > .wp-block-column > .wp-block-image:first-child {
  width: calc(100% + (var(--esg-flex-pad) * 2));
  max-width: none;
  margin: calc(var(--esg-flex-pad) * -1) calc(var(--esg-flex-pad) * -1) clamp(1rem, 2vw, 1.5rem);
}
.single-post .entry-content .esg-flex-row .wp-block-image img,
.editor-styles-wrapper .esg-flex-row .wp-block-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
}
.single-post .entry-content .is-style-esg-cards > .wp-block-column > .wp-block-image:first-child img,
.editor-styles-wrapper .is-style-esg-cards > .wp-block-column > .wp-block-image:first-child img {
  border-radius: 24px 24px 18px 18px;
}

/* Kicker-Zeile wie im Grid-System. */
.single-post .entry-content .esg-flex-row .esg-grid-kicker,
.editor-styles-wrapper .esg-flex-row .esg-grid-kicker {
  margin-bottom: .55rem;
  color: var(--clr-primary, #2563eb);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

[data-theme="dark"] .single-post .entry-content .is-style-esg-cards > .wp-block-column {
  border-color: rgba(125, 160, 210, .32);
  background: linear-gradient(180deg, rgba(21, 35, 64, .98), rgba(14, 25, 48, .96));
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 18px 46px rgba(0,0,0,.38);
}
[data-theme="dark"] .single-post .entry-content .is-style-esg-cards > .wp-block-column,
[data-theme="dark"] .single-post .entry-content .is-style-esg-cards > .wp-block-column p { color: #d7e2f1; }
[data-theme="dark"] .single-post .entry-content .is-style-esg-cards > .wp-block-column h2,
[data-theme="dark"] .single-post .entry-content .is-style-esg-cards > .wp-block-column h3 { color: #f8fafc; }

@media (max-width: 781px) {
  .single-post .entry-content .wp-block-columns.esg-flex-row:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 100% !important;
  }
}