/* article-layout.css: wide editorial layout for articles and case studies (main.cs-container.cs-wide).
   Before: one narrow centred column with empty space either side, and two stacked headlines.
   Now: one headline across the page, section titles in a left column, text in the right column,
   and films, figures and tables running the full width. Below 1100px it falls back to one column. */

/* One headline. The old poster line is gone; the real H1 takes its place. */
.cs-wide .cs-hero-title { display: none; }
.cs-wide .cs-h1 {
  font-size: clamp(2rem, 4.3vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-transform: none;
  color: #000;
  margin: 0 0 1.6rem;
  max-width: 24ch;
}

@media (min-width: 1100px) {
  main.cs-container.cs-wide {
    max-width: 96rem;
    width: auto;
    margin: 0 auto;
    padding: 8.5rem 5rem 5rem 11rem;      /* left side clears the stacked menu */
  }
  .cs-wide .cs-h1 { max-width: 26ch; }

  /* Hero: headline across, then facts on the left and the summary on the right */
  .cs-wide > section:first-of-type {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(0, 52rem);
    column-gap: 4rem;
    align-items: start;
    margin-bottom: 3rem !important;
  }
  .cs-wide > section:first-of-type > * { grid-column: 2; }
  .cs-wide > section:first-of-type > .cs-tag,
  .cs-wide > section:first-of-type > .cs-h1,
  .cs-wide > section:first-of-type > .cs-spec { grid-column: 1 / -1; }
  .cs-wide > section:first-of-type > .cs-meta {
    grid-column: 1; grid-row: 3 / span 4;
    flex-direction: column; gap: 0.7rem;
    margin: 0; padding: 0.2rem 0 0; border: 0;
  }
  .cs-wide > section:first-of-type > .cs-dek { margin-top: 0; }

  /* Body: section label and title on the left, text on the right, media full width */
  .cs-wide .cs-body {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(0, 52rem);
    column-gap: 4rem;
    align-items: start;
    max-width: none;
  }
  .cs-wide .cs-body > * { grid-column: 2; min-width: 0; }
  .cs-wide .cs-body > .cs-num {
    grid-column: 1 / -1;
    margin: 3.5rem 0 0.7rem; padding-top: 1.4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.16);
  }
  .cs-wide .cs-body > h2 {
    grid-column: 1;
    margin: 0 0 1.5rem;
    font-size: clamp(1.5rem, 2.1vw, 2.3rem);
    line-height: 1.1;
  }
  .cs-wide .cs-body > h2 + * { margin-top: 0; }
  .cs-wide .cs-body > h3 { margin-top: 1.2rem; }

  /* Things that should use the whole width */
  .cs-wide .cs-body > .cs-fig,
  .cs-wide .cs-body > figure,
  .cs-wide .cs-body > .cs-figrow,
  .cs-wide .cs-body > .cs-videos,
  .cs-wide .cs-body > table,
  .cs-wide .cs-body > .cs-table,
  .cs-wide .cs-body > .cs-table-wrap,
  .cs-wide .cs-body > .cs-compare,
  .cs-wide .cs-body > .cs-pull,
  .cs-wide .cs-body > .cs-convert,
  .cs-wide .cs-body > .wm-next,
  .cs-wide .cs-body > .cs-cta { grid-column: 1 / -1; }
  .cs-wide .cs-body > .cs-fig.cs-explainer { grid-column: 2; }   /* diagrams read better at text width */
  .cs-wide .cs-body > .cs-pull { max-width: 60rem; margin-left: auto; margin-right: auto; }

  /* Opening block of a case study (films first, no section title): films side by side,
     the two call-out boxes side by side, then the text in the same right-hand column as the rest. */
  .cs-wide .cs-body:has(> div:not([class]) > video) { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .cs-wide .cs-body:has(> div:not([class]) > video) > * { grid-column: 1 / -1; width: 100%; max-width: 52rem; justify-self: end; }
  .cs-wide .cs-body:has(> div:not([class]) > video) > div { grid-column: auto; max-width: none; justify-self: stretch; align-self: stretch; margin-top: 0 !important; margin-bottom: 2.5rem !important; }
  .cs-wide .cs-body:has(> div:not([class]) > video) > div[style*="text-align"] { display: flex; flex-direction: column; justify-content: center; }

  /* FAQ block: title on the left, questions on the right, like every other section */
  .cs-wide .cs-body > .cs-faq {
    grid-column: 1 / -1; display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(0, 52rem); column-gap: 4rem; align-items: start;
    border-top: 1px solid rgba(0, 0, 0, 0.16); padding-top: 1.4rem;
  }
  .cs-wide .cs-body > .cs-faq > * { grid-column: 2; }
  .cs-wide .cs-body > .cs-faq > h2 { grid-column: 1; margin: 0; font-size: clamp(1.5rem, 2.1vw, 2.3rem); line-height: 1.1; }
  .cs-wide .cs-body > .article-pathways { grid-column: 1 / -1; }

  /* Footer block lines up with the text */
  .cs-wide > section:last-of-type { margin-top: 3rem !important; }
}
