/* =========================================================================
   Single-post header banner — ported 1:1 from the .article-banner mock.
   Scoped under .xg-post-scope (the single.html <main>) so it can't leak.
   Output by the [article_banner] shortcode. Enqueued on single posts only.
   ========================================================================= */

.xg-post-scope .article-banner *,
.xg-post-scope .article-banner *::before,
.xg-post-scope .article-banner *::after { box-sizing: border-box; }

.xg-post-scope .article-banner {
  display: flex;
  align-items: stretch;
  background: linear-gradient(135deg, #23044C 0%, #2c1960 40%, #262946 100%);
  border-radius: 20px;
  overflow: hidden;
  margin: 0 0 52px;
}

/* Banner spans the full content row — TOC gutter + article column — exactly
   like the mock, where .article-banner and .article-body-wrap share one
   container. Here the TOC is position:absolute (right:100%; margin-right:64px),
   pulled 284px (220 width + 64 gap) left of the 760px .article-body-wrap, so
   the banner = 760 + 284 = 1044px, with its right edge on the body column.
   The .single-post.xg-post-scope prefix (0,3,1) overrides the stray 1220px
   DB-stored custom-CSS snippet regardless of load order. */
.single-post.xg-post-scope header.article-banner {
  max-width: 1044px;
  margin-left: auto;
  margin-right: calc((100% - 760px) / 2);
}

/* At <=1120px the desktop TOC hides (theme breakpoint) — no gutter to span,
   so the banner matches the centred 760px article column. */
@media (max-width: 1120px) {
  .single-post.xg-post-scope header.article-banner {
    max-width: 760px;
    margin-right: auto;
  }
}

.xg-post-scope .article-banner__text {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 32px 36px 40px;
  gap: 20px;
  min-width: 0;
}

.xg-post-scope .article-banner__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.xg-post-scope .article-banner__category {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: #D90041;
}
.xg-post-scope .article-banner__dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
}
.xg-post-scope .article-banner__tag {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.xg-post-scope .article-banner__title {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 18px;
}

.xg-post-scope .article-banner__deck {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  margin: 0;
  max-width: 480px;
}

.xg-post-scope .article-banner__byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
}
.xg-post-scope .article-banner__avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.18);
}
.xg-post-scope .article-banner__byline-name {
  font-size: 14px; font-weight: 600;
  color: #ffffff; display: block; margin-bottom: 3px;
}
.xg-post-scope .article-banner__byline-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.xg-post-scope .article-banner__byline-meta time { color: inherit; }
.xg-post-scope .article-banner__sep { color: rgba(255,255,255,0.2); }

/* Right image column — 16:9 */
.xg-post-scope .article-banner__image {
  flex: 0 0 auto;
  width: 50%;
  position: relative;
  padding: 32px 32px 32px 20px;
}
.xg-post-scope .article-banner__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
}

/* No featured image — text fills the banner */
.xg-post-scope .article-banner--no-image .article-banner__deck { max-width: 100%; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 860px) {
  .xg-post-scope .article-banner {
    flex-direction: column;
    border-radius: 16px;
    margin-bottom: 40px;
  }
  .xg-post-scope .article-banner__image {
    width: 100%;
    padding: 12px 12px 0 12px;
    order: -1;
  }
  .xg-post-scope .article-banner__image img {
    border-radius: 8px;
    width: 100%; height: auto;
    aspect-ratio: 16 / 9;
  }
  .xg-post-scope .article-banner__text { padding: 28px 28px 32px; gap: 24px; }
  .xg-post-scope .article-banner__deck { max-width: 100%; }
}
@media (max-width: 480px) {
  .xg-post-scope .article-banner { border-radius: 12px; margin-bottom: 32px; }
  .xg-post-scope .article-banner__image { padding: 10px 10px 0 10px; }
  .xg-post-scope .article-banner__image img { border-radius: 6px; }
  .xg-post-scope .article-banner__text { padding: 20px 20px 24px; }
  .xg-post-scope .article-banner__title { font-size: 22px; }
  .xg-post-scope .article-banner__deck { font-size: 14px; }
  .xg-post-scope .article-banner__byline-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
  .xg-post-scope .article-banner__sep { display: none; }
}
