/* Rich Text Block — heading, rich-text body and optional image (Views/Partials/richTextBlock), scoped to .rich-text-block.
   Values from the reference ESG sub-pages (inline page CSS + main.css), measured 2026-10-21:
   container 1200px with 15px gutter (20px at ≤850px); text column padding-left 300px (0 at ≤850px);
   h3 28/32 weight 800, letter-spacing 1px, 30px below (24/28 at ≤850px);
   p 16/30, 16px between paragraphs (14/20 at ≤700px);
   h4 19px bold, letter-spacing 1px, 80px above (40px at ≤850px, reference p.mb-80) and 50px below (reference h4.mb-50).
   Links and lists have no ESG evidence; values follow the reference legal pages (#main-content):
   links underlined in the page accent, lists with disc/decimal markers 20px in, 16px below, items 16/25.6.
   Image: centred, natural size up to the column (bottomCentered) or the 1170px content (bottomWide),
   100px below the last paragraph (50px at ≤700px), 50px below an h4 caption.
   Spacing below from sectionComposition.spacingBottom (none / small / medium / large);
   --space-default (empty) = reference .mb-100: 100px, 50px at ≤700px.
   Known reference differences at ≤700px: .mb-100 is 0 (Environmental), 50 (Social) and 60px (Governance);
   50px is used for all. The Governance image gap at ≤700px is 60px in the reference (50px here).
   asideLeft and titleAccent (TechCare Parts Solutions) are described with their rules at the end of this file,
   and so are the h2 / h3 document headings (legal pages). */

.rich-text-block__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.rich-text-block__content {
  padding-left: 300px;
}

.rich-text-block__content > :last-child,
.rich-text-block__body > :last-child {
  margin-bottom: 0;
}

.rich-text-block__title {
  margin: 0 0 30px;
  font-family: var(--eve-font-display-extralight);
  font-weight: 800;
  font-size: 28px;
  line-height: 32px;
  letter-spacing: 1px;
  color: var(--eve-color-text);
}

.rich-text-block__body p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 30px;
  color: var(--eve-color-text);
}

.rich-text-block__body h4 {
  margin: 80px 0 50px;
  font-family: var(--eve-font-display-extralight);
  font-weight: 700;
  font-size: 19px;
  line-height: 26.6px;
  letter-spacing: 1px;
  color: var(--eve-color-text);
}

.rich-text-block__body h4:first-child {
  margin-top: 0;
}

.rich-text-block__body ul,
.rich-text-block__body ol {
  margin: 0 0 16px 20px;
  padding: 0;
  list-style: disc;
}

.rich-text-block__body ol {
  list-style: decimal;
}

.rich-text-block__body li {
  font-size: 16px;
  line-height: 25.6px;
  color: var(--eve-color-text);
}

.rich-text-block__body li p {
  margin: 0;
}

.rich-text-block__body a {
  color: var(--eve-page-accent, var(--eve-color-violet));
  text-decoration: underline;
}

.rich-text-block__body strong {
  font-weight: 700;
}

.rich-text-block__figure {
  margin-top: 100px;
  line-height: 0;
  text-align: center;
}

.rich-text-block__image {
  display: inline-block;
  max-width: 100%;
  height: auto;
}

/* The body ends with an h4 caption: its own 50px margin is the gap (reference Governance org chart). */
.rich-text-block--image-after-heading .rich-text-block__body > h4:last-child {
  margin-bottom: 50px;
}

.rich-text-block--image-after-heading .rich-text-block__figure,
.rich-text-block--image-after-title .rich-text-block__figure {
  margin-top: 0;
}

/* The title's own 30px is the gap when there is no body. */
.rich-text-block--image-after-title .rich-text-block__title {
  margin-bottom: 30px;
}

.rich-text-block--space-none {
  padding-bottom: 0;
}

.rich-text-block--space-small {
  padding-bottom: 50px;
}

.rich-text-block--space-medium {
  padding-bottom: 80px;
}

.rich-text-block--space-large {
  padding-bottom: 170px;
}

.rich-text-block--space-default {
  padding-bottom: 100px;
}

@media (max-width: 850px) {
  .rich-text-block__inner {
    padding: 0 20px;
  }

  .rich-text-block__content {
    padding-left: 0;
  }

  .rich-text-block__title {
    font-size: 24px;
    line-height: 28px;
  }

  .rich-text-block__body h4 {
    margin-top: 40px;
  }

  .rich-text-block__body h4:first-child {
    margin-top: 0;
  }

  .rich-text-block--space-small,
  .rich-text-block--space-medium {
    padding-bottom: 40px;
  }

  .rich-text-block--space-large {
    padding-bottom: 100px;
  }
}

@media (max-width: 700px) {
  .rich-text-block__body p {
    font-size: 14px;
    line-height: 20px;
  }

  .rich-text-block__figure {
    margin-top: 50px;
  }

  .rich-text-block--space-default {
    padding-bottom: 50px;
  }
}

/* —— titleAccent (optional, off by default): the heading in the page accent colour. —— */
.rich-text-block__title--accent {
  color: var(--eve-page-accent, var(--eve-color-violet));
}

/* —— asideLeft (TechCare Parts Solutions; reference .solutions: display flex, gap 20px, align-items center,
   img width 500px; h3 accent 28/32 with 5px above and 20px below; p 16/30 keeping its 16px margin inside the text block).
   The row sits in the 870px text column: image 500px, text beside it (350px at 1440px), vertically centred.
   At ≤850px: one column, no gap, centred text, image up to the column width (reference .solutions grid, text-align center).
   Spacing above (TechCare-scoped): directly after a featureColumns grid the block adds 40px (30px at ≤850px) on top of
   the grid's own bottom spacing, so the default medium spacing gives the reference .mb-120 (120px, 70px at ≤850px).
   Neither class exists on any other page, so no existing layout is affected. —— */
.rich-text-block__row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.rich-text-block--image-asideLeft .rich-text-block__figure {
  flex: 0 1 auto;
  margin-top: 0;
  text-align: left;
}

.rich-text-block--image-asideLeft .rich-text-block__image {
  width: 500px;
  max-width: 100%;
  vertical-align: middle;
}

.rich-text-block__text {
  flex: 1 1 0%;
}

.rich-text-block--image-asideLeft .rich-text-block__title {
  margin: 5px 0 20px;
}

.rich-text-block--image-asideLeft .rich-text-block__body > :last-child {
  margin-bottom: 16px;
}

.card-grid--featureColumns + .rich-text-block--image-asideLeft {
  padding-top: 40px;
}

@media (max-width: 850px) {
  .rich-text-block__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    text-align: center;
  }

  .rich-text-block--image-asideLeft .rich-text-block__figure {
    text-align: center;
  }

  .card-grid--featureColumns + .rich-text-block--image-asideLeft {
    padding-top: 30px;
  }
}

/* —— topWide (TechCare Digital Platform; reference .entry-content-fix > img.mb-50 + h3 + p):
   image first in the text column, natural size up to the column width, left-aligned; 50px below it plus the
   heading's 5px (55px, padding so the two do not collapse); heading 5px above and 20px below; the last paragraph keeps
   its 16px, so medium spacing gives the reference 96px (56px at ≤850px) before the next section or the footer.
   The class only exists on blocks set to topWide, so no existing layout is affected. —— */
.rich-text-block--image-topWide .rich-text-block__figure {
  margin-top: 0;
  padding-bottom: 50px;
  text-align: left;
}

.rich-text-block--image-topWide .rich-text-block__title {
  margin: 5px 0 20px;
}

.rich-text-block--image-topWide .rich-text-block__body > :last-child {
  margin-bottom: 16px;
}

/* —— Document headings (legal pages; reference /privacy-policy/, /terms-of-service/, #main-content, measured 2026-10-27):
   h2  numbered section heading: ClashGrotesk Regular 32/35 in the text colour at all widths, 35px above and 20px below;
       the first one has no space above, so it sits 50px (30px at ≤850px) under the page title.
   h3  accent sub-heading (reference p.sub > strong): bold 16/30 in the page accent, 16px below (14/20 at ≤700px).
   A body with section headings keeps its last paragraph's 16px, as the reference does before the section padding:
   with Spacing Bottom medium that is 96px (56px at ≤850px) before the footer, and 16px before a following Contact Box
   when Spacing Bottom is none. Bodies without h2 are unchanged. —— */
.rich-text-block__body h2 {
  margin: 35px 0 20px;
  font-family: var(--eve-font-display-regular);
  font-weight: 400;
  font-size: 32px;
  line-height: 35px;
  letter-spacing: normal;
  color: var(--eve-color-text);
}

.rich-text-block__body > h2:first-child {
  margin-top: 0;
}

.rich-text-block__body h3 {
  margin: 0 0 16px;
  font-family: var(--eve-font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 30px;
  color: var(--eve-page-accent, var(--eve-color-violet));
}

.rich-text-block__body:has(> h2) > :last-child {
  margin-bottom: 16px;
}

@media (max-width: 700px) {
  .rich-text-block__body h3 {
    font-size: 14px;
    line-height: 20px;
  }
}

/* —— List items (legal pages; reference #main-content li: 16/25.6 at all widths). The editor wraps each item's text in
   a paragraph (li > p); it takes the item's size instead of the paragraph rule (16/30, 14/20 at ≤700px), so items stay
   16/25.6. No other page has a list in a Rich Text Block body. —— */
.rich-text-block__body li p {
  font-size: inherit;
  line-height: inherit;
}

/* —— Privacy pages (Language Switcher before the block): the reference's first h2 keeps its 35px top margin, which
   collapses with the page title's 30px at ≤850px, so the gap is 35px there (50px above 850px either way).
   Terms (no switcher) keeps 30px. —— */
@media (max-width: 850px) {
  .language-switcher ~ .rich-text-block .rich-text-block__body > h2:first-child {
    margin-top: 35px;
  }
}
