/*
 * .post-layout — body of a story, case study or article: text | sticky
 * sidebar, then Share between two lines
 * (template-parts/single/long-form.php).
 * Figma: Story D 337:12432 (body 926, sidebar 355, Share 337:12775) /
 * M 337:11995; Article D 337:10774 / M 337:10459.
 *
 * Phones: text → sidebar → Share, 40 px apart. From 1025 px: two
 * columns, the sidebar sticks under the fixed header (94 px when scrolled);
 * a sidebar taller than the window sticks by its bottom (post-layout.js).
 */

.post-layout {
  padding-top: var(--nv-section-y);
}

/* .post-layout__columns */
.post-layout__columns {
  display: flex;
  flex-direction: column;
  gap: var(--nv-flow-gap);

  /* @media (width >= 64.0625em) .post-layout__columns — 926 | 355 */
  @media (width >= 64.0625em) {
    display: grid;
    grid-template-columns: minmax(0, 57.875rem) 22.1875rem;
    justify-content: space-between;
    align-items: start;
    column-gap: 2.5rem;
  }
}

/* .post-layout__main — min-width keeps long words and wide embeds inside */
.post-layout__main {
  min-width: 0;

  /* .post-layout__main > h2 — a new section of the post: 1.4 × the flow gap above it,
     56 → 70 px (Vlad, 2026-10-17); rich-text.css keeps the cap trim */
  & > h2:not(:first-child, .nv-block, .is-style-icon-blue, .is-style-icon-green) {
    margin-top: calc(1.4 * var(--nv-flow-gap) - 0.14em);
  }
}

/* .post-layout__aside — recent posts, subscribe, tags (40 → 75 px apart) */
.post-layout__aside {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 1.7225rem + 3.3176vw, 4.6875rem);

  /* @media (width >= 64.0625em) .post-layout__aside — sticky; post-layout.js lowers the top of a sidebar taller than the window */
  @media (width >= 64.0625em) {
    position: sticky;
    top: var(--post-aside-top, 7.5rem);
  }
}

/* .post-layout__share — Share between two light lines: navy at 10 % (Figma story-V2 337:12774,
   Article template, Webinar Landing Page — Vlad, 2026-10-17) */
.post-layout__share {
  margin-top: var(--nv-flow-gap);
  border-top: 0.0625rem solid rgba(19, 33, 50, 0.1);
  border-bottom: 0.0625rem solid rgba(19, 33, 50, 0.1);
  padding: var(--nv-flow-gap) 0;

  /* @media (width >= 64.0625em) .post-layout__share — the desktop row has 10 px of its own (Figma 1574:13452) */
  @media (width >= 64.0625em) {
    padding: calc(var(--nv-flow-gap) + 0.625rem) 0;
  }
}
