/* ESG configurable blog grids — Divi-like capability with native Gutenberg. */
.single-post .entry-content .esg-grid-template,
.editor-styles-wrapper .esg-grid-template {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.75rem);
  margin-block: clamp(2rem, 4vw, 3.5rem);
}
.single-post .entry-content .esg-grid-template--2,
.editor-styles-wrapper .esg-grid-template--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.single-post .entry-content .esg-grid-template--3,
.editor-styles-wrapper .esg-grid-template--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.single-post .entry-content .esg-grid-template--4,
.editor-styles-wrapper .esg-grid-template--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.single-post .entry-content .esg-grid-template--auto,
.editor-styles-wrapper .esg-grid-template--auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.single-post .entry-content .esg-grid-template--feature,
.editor-styles-wrapper .esg-grid-template--feature { grid-template-columns: minmax(0, 1.65fr) minmax(260px, .85fr); }
.single-post .entry-content .esg-grid-template--magazine,
.editor-styles-wrapper .esg-grid-template--magazine { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.single-post .entry-content .esg-grid-template--magazine > :first-child,
.editor-styles-wrapper .esg-grid-template--magazine > :first-child { grid-column: span 4; grid-row: span 2; }
.single-post .entry-content .esg-grid-template--magazine > :not(:first-child),
.editor-styles-wrapper .esg-grid-template--magazine > :not(:first-child) { grid-column: span 2; }
.single-post .entry-content .esg-grid-card,
.editor-styles-wrapper .esg-grid-card,
.single-post .entry-content .esg-simple-post-shell,
.editor-styles-wrapper .esg-simple-post-shell {
  --esg-grid-card-pad: clamp(1rem, 2vw, 1.5rem);
  min-width: 0;
  overflow: hidden;
  padding: var(--esg-grid-card-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 .esg-grid-card > :first-child,
.editor-styles-wrapper .esg-grid-card > :first-child { margin-top: 0; }
.single-post .entry-content .esg-grid-card > .esg-grid-image:first-child,
.editor-styles-wrapper .esg-grid-card > .esg-grid-image:first-child,
.single-post .entry-content .esg-simple-post-shell > .esg-grid-image,
.editor-styles-wrapper .esg-simple-post-shell > .esg-grid-image {
  width: calc(100% + (var(--esg-grid-card-pad) * 2));
  max-width: none;
  margin: calc(var(--esg-grid-card-pad) * -1) calc(var(--esg-grid-card-pad) * -1) clamp(1rem, 2vw, 1.5rem);
}

.single-post .entry-content .esg-grid-card--horizontal,
.editor-styles-wrapper .esg-grid-card--horizontal {
  display: grid;
  grid-template-columns: minmax(110px, .9fr) minmax(0, 1.1fr);
  align-items: stretch;
  gap: clamp(.85rem, 1.8vw, 1.25rem);
}
.single-post .entry-content .esg-grid-card--horizontal > .esg-grid-image:first-child,
.editor-styles-wrapper .esg-grid-card--horizontal > .esg-grid-image:first-child {
  width: calc(100% + var(--esg-grid-card-pad));
  height: calc(100% + (var(--esg-grid-card-pad) * 2));
  margin: calc(var(--esg-grid-card-pad) * -1) 0 calc(var(--esg-grid-card-pad) * -1) calc(var(--esg-grid-card-pad) * -1);
}
.single-post .entry-content .esg-grid-card--horizontal > .esg-grid-image:first-child img,
.editor-styles-wrapper .esg-grid-card--horizontal > .esg-grid-image:first-child img {
  height: 100%;
  min-height: 180px;
  aspect-ratio: auto;
  border-radius: 24px 18px 18px 24px;
}
.single-post .entry-content .esg-grid-copy,
.editor-styles-wrapper .esg-grid-copy {
  min-width: 0;
  align-self: center;
}
.single-post .entry-content .esg-grid-card > :last-child,
.editor-styles-wrapper .esg-grid-card > :last-child { margin-bottom: 0; }
.single-post .entry-content .esg-grid-kicker,
.editor-styles-wrapper .esg-grid-kicker {
  margin-bottom: .55rem;
  color: var(--clr-primary, #2563eb);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.single-post .entry-content .esg-grid-note,
.editor-styles-wrapper .esg-grid-note {
  border-left: 4px solid #8AD321;
  background: rgba(138, 211, 33, .10);
}
.single-post .entry-content .esg-grid-image,
.editor-styles-wrapper .esg-grid-image {
  display: block;
  margin-inline: 0;
}
.single-post .entry-content .esg-grid-image img,
.editor-styles-wrapper .esg-grid-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
}
.single-post .entry-content .esg-grid-card > .esg-grid-image:first-child img,
.editor-styles-wrapper .esg-grid-card > .esg-grid-image:first-child img,
.single-post .entry-content .esg-simple-post-shell > .esg-grid-image img,
.editor-styles-wrapper .esg-simple-post-shell > .esg-grid-image img {
  border-radius: 24px 24px 18px 18px;
}
[data-theme="dark"] .single-post .entry-content .esg-grid-card,
[data-theme="dark"] .single-post .entry-content .esg-simple-post-shell {
  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 .esg-grid-card,
[data-theme="dark"] .single-post .entry-content .esg-grid-card p,
[data-theme="dark"] .single-post .entry-content .esg-simple-post-shell,
[data-theme="dark"] .single-post .entry-content .esg-simple-post-shell p { color: #d7e2f1; }
[data-theme="dark"] .single-post .entry-content .esg-grid-card h2,
[data-theme="dark"] .single-post .entry-content .esg-grid-card h3,
[data-theme="dark"] .single-post .entry-content .esg-simple-post-shell h2 { color: #f8fafc; }
@media (max-width: 860px) {
  .single-post .entry-content .esg-grid-template,
  .editor-styles-wrapper .esg-grid-template { grid-template-columns: 1fr; }
  .single-post .entry-content .esg-grid-template--magazine > *,
  .editor-styles-wrapper .esg-grid-template--magazine > * { grid-column: auto; grid-row: auto; }
  .single-post .entry-content .esg-grid-card--horizontal,
  .editor-styles-wrapper .esg-grid-card--horizontal { grid-template-columns: 1fr; }
  .single-post .entry-content .esg-grid-card--horizontal > .esg-grid-image:first-child,
  .editor-styles-wrapper .esg-grid-card--horizontal > .esg-grid-image:first-child {
    width: calc(100% + (var(--esg-grid-card-pad) * 2));
    height: auto;
    margin: calc(var(--esg-grid-card-pad) * -1) calc(var(--esg-grid-card-pad) * -1) clamp(1rem, 2vw, 1.5rem);
  }
  .single-post .entry-content .esg-grid-card--horizontal > .esg-grid-image:first-child img,
  .editor-styles-wrapper .esg-grid-card--horizontal > .esg-grid-image:first-child img {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-radius: 24px 24px 18px 18px;
  }
}