/* ==========================================================================
   News & Insights — article detail page.
   Ported from the approved prototype (spectrum-posts-detail-prototype.html),
   scoped under .sc-post so it never collides with the corespin theme, and with
   the site chrome (topbar/header/footer) dropped — the theme supplies those.
   Rendered inside the theme's #main. The WYSIWYG `content` is echoed inside
   .sc-post__body; its inline tags/classes (h2, blockquote, .inline-image,
   .caption, …) are styled here so authored content matches the prototype.
   ========================================================================== */

.sc-post {
  --sc-blue: #002f6c;
  --sc-blue-dark: #08254a;
  --sc-cyan: #24a9e0;
  --sc-orange: #f4762d;
  --sc-text: #222;
  --sc-muted: #757a80;
  --sc-border: #dfe5ec;
  --sc-soft: #f5f7fa;
  --sc-max: 1180px;
  --sc-article: 780px;
  --sc-shadow: 0 12px 30px rgba(8, 37, 74, .10);

  font-family: Arial, Helvetica, sans-serif;
  color: var(--sc-text);
  line-height: 1.55;
}

.sc-post *,
.sc-post *::before,
.sc-post *::after {
  box-sizing: border-box;
}

.sc-post a {
  color: inherit;
  text-decoration: none;
}

.sc-post__shell {
  width: min(var(--sc-max), calc(100% - 48px));
  margin: 0 auto;
}

/* ---- Hero (full-bleed image band) --------------------------------------- */
.sc-post__hero {
  position: relative;
  min-height: clamp(330px, 45vw, 560px);
  background: #dce4ed;
  overflow: hidden;
}
/* Horizontal alignment */
.sc-post__hero.left .insight-header-banner__image {
    object-position: left center;
}

.sc-post__hero.center .insight-header-banner__image {
    object-position: center center;
}

.sc-post__hero.right .insight-header-banner__image {
    object-position: right center;
}
.sc-post__hero img {
  width: 100%;
  height: clamp(330px, 45vw, 560px);
  object-fit: cover;
  display: block;
}

.sc-post__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .02), rgba(0, 0, 0, .18));
  pointer-events: none;
}

.sc-post__hero-fallback {
  width: 100%;
  height: clamp(330px, 45vw, 560px);
  background:
    linear-gradient(100deg, rgba(0, 47, 108, .92), rgba(8, 37, 74, .84)),
    radial-gradient(circle at 85% 20%, rgba(36, 169, 224, .45), transparent 34%);
}

/* ---- Article head ------------------------------------------------------- */
.sc-post__shell {
  position: relative;
}

.sc-post__head {
  width: min(var(--sc-article), 100%);
  margin: 0 auto;
  padding: 44px 0 4px;
}

.sc-post__breadcrumbs {
  margin: 0 0 20px;
  color: #66717d;
  font-size: 14px;
}

.sc-post__breadcrumbs a {
  color: var(--sc-blue);
  font-weight: 700;
}

.sc-post__eyebrow {
  color: var(--sc-orange);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .09em;
  margin: 0 0 10px;
}

.sc-post__title {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -.045em;
  color: #252a30;
  margin: 0;
}

.sc-post__dek {
  margin: 18px 0 0;
  color: #626b75;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

.sc-post__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 22px;
  color: #6f7780;
  font-size: 14px;
}

.sc-post__meta strong {
  color: #39424d;
}

.sc-post__status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #5c4313;
  background: #fde7c2;
}

.sc-post__editor-preview {
  margin: 28px auto 0;
  width: min(var(--sc-article), 100%);
  padding: 12px 16px;
  border-left: 4px solid var(--sc-orange);
  background: #fff7e7;
  color: #5c4313;
  font-size: 14px;
  font-weight: 700;
}

.sc-post__editor-preview code {
  font-family: "Courier New", monospace;
}

/* ---- Article body (WYSIWYG content) ------------------------------------- */
.sc-post__body {
  width: min(var(--sc-article), calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 54px;
  color: #5f666e;
  font-size: 18px;
}

.sc-post__body > p,
.sc-post__body > div > p {
  margin: 0 0 22px;
}

.sc-post__body p {
  margin: 0 0 22px;
}

.sc-post__body h2 {
  margin: 42px 0 14px;
  color: #29323c;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -.03em;
}

.sc-post__body h3 {
  margin: 32px 0 12px;
  color: #29323c;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.sc-post__body a {
  color: var(--sc-blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sc-post__body strong {
  color: #39424d;
}

.sc-post__body ul,
.sc-post__body ol {
  margin: 0 0 22px;
  padding-left: 22px;
}

.sc-post__body li {
  margin: 0 0 10px;
}

.sc-post__body blockquote {
  margin: 34px 0;
  padding: 6px 0 6px 24px;
  border-left: 5px solid var(--sc-cyan);
  color: #2d3742;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
}

/* Inline images: bare <img> from the editor and the prototype .inline-image figure. */
.sc-post__body img {
  max-width: 100%;
  height: auto;
  display: block;
}

.sc-post__body figure,
.sc-post__body .inline-image {
  margin: 34px 0 10px;
}

.sc-post__body .inline-image img {
  width: 100%;
  object-fit: cover;
  max-height: 430px;
}

.sc-post__body figcaption,
.sc-post__body .caption {
  margin: 9px 0 28px;
  color: #7a828a;
  font-size: 14px;
  font-style: italic;
}

/* ---- Tags --------------------------------------------------------------- */
.sc-post__tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--sc-border);
}

.sc-post__tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--sc-border);
  color: #53606e;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

/* ---- Related slider ----------------------------------------------------- */
.sc-post__related {
  border-top: 1px solid #e4eaf0;
  padding: 48px 0 64px;
  overflow: hidden;
}

.sc-post__related-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.sc-post__related-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: #252a30;
}

.sc-post__slider-controls {
  display: flex;
  gap: 10px;
}

.sc-post__slider-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #bfc7d1;
  background: transparent;
  color: var(--sc-blue);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sc-post__slider-btn:hover {
  border-color: var(--sc-blue);
  box-shadow: var(--sc-shadow);
}

.sc-post__slider-window {
  position: relative;
}

.sc-post__slider-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 60px) / 3);
  gap: 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0 0 20px;
  scrollbar-width: none;
}

.sc-post__slider-track::-webkit-scrollbar {
  display: none;
}

.sc-post__related-card {
  scroll-snap-align: start;
  min-width: 0;
}

.sc-post__related-card a {
  display: block;
}

.sc-post__related-thumb {
  width: 100%;
  aspect-ratio: 1.52 / 1;
  overflow: hidden;
  background: #dfe6ee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-post__related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .28s ease, filter .28s ease;
}

.sc-post__related-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.08) contrast(1.04);
}

.sc-post__related-placeholder {
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 47, 108, .92), rgba(36, 169, 224, .78));
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-post__related-body {
  padding: 14px 0 0;
}

.sc-post__related-card-title {
  margin: 0 0 6px;
  color: #2b2f34;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -.02em;
}

.sc-post__related-type {
  margin: 0;
  color: var(--sc-orange);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 960px) {
  .sc-post__slider-track {
    grid-auto-columns: calc((100% - 30px) / 2);
  }
}

@media (max-width: 700px) {
  .sc-post__shell,
  .sc-post__body {
    width: min(100% - 32px, var(--sc-max));
  }

  .sc-post__hero,
  .sc-post__hero img,
  .sc-post__hero-fallback {
    min-height: 260px;
    height: 260px;
  }

  .sc-post__head {
    padding-top: 32px;
  }

  .sc-post__body {
    font-size: 17px;
    padding-bottom: 42px;
  }

  .sc-post__body blockquote {
    font-size: 21px;
  }

  .sc-post__related-header {
    align-items: start;
    flex-direction: column;
  }

  .sc-post__slider-track {
    grid-auto-columns: 86%;
    gap: 20px;
  }
}
