/* ============================================================
   IB News — custom single article reading layout (.ibpost)
   Loaded only on single posts.
   ============================================================ */

/* Neutralise ColorMag's single-post sidebar/column layout */
.single-post.ibnews-enhanced .cm-container { max-width: 100% !important; }
.single-post.ibnews-enhanced #cm-secondary,
.single-post.ibnews-enhanced .cm-secondary,
.single-post.ibnews-enhanced .widget-area.cm-secondary { display: none !important; }

.ibpost {
  --ink: #0f1e3d;
  --body: #2a3550;
  --muted: #8a97ad;
  --line: #e8ecf3;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 24px 8px;
}
.ibpost a { text-decoration: none; }

/* Constrained reading column for text blocks */
.ibpost-head,
.ibpost-body,
.ibpost-foot { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ── Header ───────────────────────────────────────────────────────── */
.ibpost-head { text-align: left; padding-bottom: 30px; }
.ibpost .ibhome-tag,
.ibpost-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--cat, #1e40af);
  margin-bottom: 16px;
}
.ibpost-title {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.025em;
  color: var(--ink);
  margin: 0 0 20px;
}
.ibpost-standfirst {
  font-size: 20px;
  line-height: 1.58;
  color: #51607d;
  font-weight: 400;
  margin: 0 0 28px;
}

/* Byline */
.ibpost-byline {
  display: flex; align-items: center; gap: 13px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.ibpost-byline__av {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cat, #1e40af); color: #fff;
  font-weight: 800; font-size: 18px;
  text-transform: uppercase; flex-shrink: 0;
}
.ibpost-byline__name { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.ibpost-byline__sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.ibpost-dot { margin: 0 6px; }

/* ── Hero image ───────────────────────────────────────────────────── */
.ibpost-hero {
  margin: 8px 0 40px;
  border-radius: 16px;
  overflow: hidden;
}
.ibpost-hero img { display: block; width: 100%; height: auto; }

/* ── Body typography ──────────────────────────────────────────────── */
.ibpost-body {
  font-size: 18.5px;
  line-height: 1.82;
  color: var(--body);
}
.ibpost-body p { margin: 0 0 26px; }
.ibpost-body > *:first-child { margin-top: 0; }
.ibpost-body h2 {
  font-size: 27px; font-weight: 800; line-height: 1.25;
  letter-spacing: -.02em; color: var(--ink);
  margin: 48px 0 18px;
}
.ibpost-body h3 {
  font-size: 21px; font-weight: 800; line-height: 1.3;
  letter-spacing: -.015em; color: var(--ink);
  margin: 38px 0 14px;
}
.ibpost-body h4 { font-size: 18px; font-weight: 800; color: var(--ink); margin: 30px 0 12px; }
.ibpost-body a {
  color: var(--cat, #1d4ed8);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2.5px;
}
.ibpost-body a:hover { text-decoration-thickness: 2px; }
.ibpost-body strong { color: var(--ink); font-weight: 700; }
.ibpost-body ul, .ibpost-body ol { margin: 0 0 26px; padding-left: 1.3em; }
.ibpost-body li { margin: 0 0 10px; padding-left: 4px; }
.ibpost-body img,
.ibpost-body figure { max-width: 100%; height: auto; border-radius: 12px; margin: 12px 0 30px; }
.ibpost-body figure img { margin: 0; }
.ibpost-body figcaption { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 10px; }
.ibpost-body blockquote {
  margin: 32px 0;
  padding: 6px 0 6px 26px;
  border-left: 4px solid var(--cat, #1d4ed8);
  font-size: 21px; line-height: 1.55; font-weight: 600;
  color: var(--ink); font-style: normal;
}
.ibpost-body blockquote p:last-child { margin-bottom: 0; }
.ibpost-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* ── Footer: tags + share ─────────────────────────────────────────── */
.ibpost-foot {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.ibpost-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ibpost-tags a {
  font-size: 13px; font-weight: 600; color: #51607d;
  background: #f1f4fa; padding: 6px 12px; border-radius: 20px;
  transition: background .15s, color .15s;
}
.ibpost-tags a:hover { background: var(--cat, #1d4ed8); color: #fff; }
.ibpost-share { display: flex; align-items: center; gap: 8px; }
.ibpost-share span { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.ibpost-share a {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--ink);
  font-weight: 700; font-size: 14px;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.ibpost-share a:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-2px); }

/* ── Related stories ──────────────────────────────────────────────── */
.ibpost-related {
  max-width: 1080px;
  margin: 64px auto 0;
  padding: 44px 24px 8px;
  border-top: 1px solid var(--line);
}
.ibpost-related__h {
  font-size: 22px; font-weight: 800; letter-spacing: -.02em;
  color: var(--ink); margin: 0 0 26px;
}
.ibpost-related__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.ibpost-rcard__media {
  display: block; aspect-ratio: 16 / 10;
  border-radius: 12px; overflow: hidden; margin-bottom: 14px;
}
.ibpost-rcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.ibpost-rcard:hover .ibpost-rcard__media img { transform: scale(1.05); }
.ibpost-rcard .ibhome-tag { display:inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.ibpost-rcard__title {
  font-size: 16.5px; font-weight: 700; line-height: 1.36;
  letter-spacing: -.012em; margin: 0 0 8px;
}
.ibpost-rcard__title a { color: var(--ink); transition: color .15s; }
.ibpost-rcard:hover .ibpost-rcard__title a { color: #1d4ed8; }
.ibpost-rcard__date { font-size: 12px; color: var(--muted); }

/* ── Comments wrapper ─────────────────────────────────────────────── */
.ibpost-comments {
  max-width: 720px;
  margin: 56px auto 0;
  padding: 0 24px;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ibpost-related__grid { grid-template-columns: 1fr; gap: 22px; }
  .ibpost-rcard { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: center; }
  .ibpost-rcard__media { margin-bottom: 0; }
}
@media (max-width: 600px) {
  .ibpost { padding: 30px 20px 8px; }
  .ibpost-body { font-size: 17.5px; }
  .ibpost-standfirst { font-size: 18px; }
}
