/* ==========================================================================
   QR Agri & Food Consulting — rich-text content

   Loaded after style.css and responsive.css on blog posts, plain pages and
   course/service pages. The approved design has no article page, so bodies
   written in the editor (or migrated from the old site) had no typography;
   this gives them one built from the design's tokens.

   1. Page offset under the fixed header
   2. Article typography (.entry-content)
   3. Additional sections on course/service pages (.cd-extra)
   ========================================================================== */


/* 1. Posts and plain pages have no banner, so push the content below the header. */
.single-post .page-body > .section:first-child,
.page-template-default .page-body > .section:first-child {
  padding-top: 150px;
}


/* 2. Article typography */
.entry-content {
  max-width: 780px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
}

/* Reset first, then space consecutive blocks (same specificity, so order matters). */
.entry-content > * {
  margin: 0;
}

.entry-content > * + * {
  margin-top: 1.1em;
}

.entry-content h2 {
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.2;
  margin-top: 2em;
}

.entry-content h3 {
  font-size: 21px;
  line-height: 1.3;
  margin-top: 1.6em;
}

.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-size: 18px;
  line-height: 1.35;
  margin-top: 1.4em;
}

.entry-content h2 + *,
.entry-content h3 + *,
.entry-content h4 + * {
  margin-top: .5em;
}

.entry-content ul,
.entry-content ol {
  margin: 0;
  padding-left: 1.4em;
}

.entry-content li + li {
  margin-top: .35em;
}

.entry-content a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
}

.entry-content figure {
  margin: 1.6em 0;
}

.entry-content figcaption {
  margin-top: .5em;
  color: var(--muted);
  font-size: 14px;
}

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--g-600);
  color: var(--muted);
  font-style: italic;
}

.entry-content iframe {
  display: block;
  width: 100%;
  min-height: 460px;
  border: 0;
  border-radius: var(--r);
  background: var(--white);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.entry-content th,
.entry-content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}


/* 3. Additional sections on course and service pages */
.cd-extra {
  color: var(--muted);
  line-height: 1.7;
}

.cd-extra > * + * {
  margin-top: .8em;
}

.cd-extra h4 {
  font-size: 17px;
  color: var(--ink);
  margin-top: 1.2em;
}

.cd-extra h4:first-child {
  margin-top: 0;
}

.cd-extra ul,
.cd-extra ol {
  padding-left: 1.3em;
}

.cd-extra img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
}

@media (max-width: 760px) {
  .single-post .page-body > .section:first-child,
  .page-template-default .page-body > .section:first-child {
    padding-top: 120px;
  }

  .entry-content {
    font-size: 16px;
  }

  .entry-content iframe {
    min-height: 360px;
  }
}
