/* =====================================================================
   Blog article typography
   Used by the blog post page (.moda-blog-content) AND inside the CKEditor
   editing area in the admin (.cke_editable), so posts look the same while
   you write them as on the website.

   Scale:  h2 26px · h3 22px · h4 19px · h5 17px · h6 15px · text 16px
   ===================================================================== */
.moda-blog-content, .cke_editable {
  font-family: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #333;
  overflow-wrap: break-word;
}

/* ---------- headings ---------- */
.moda-blog-content h2, .cke_editable h2,
.moda-blog-content h3, .cke_editable h3,
.moda-blog-content h4, .cke_editable h4,
.moda-blog-content h5, .cke_editable h5,
.moda-blog-content h6, .cke_editable h6 {
  font-family: inherit;
  color: #2D4F2B;
  letter-spacing: -0.01em;
  scroll-margin-top: 90px;            /* anchor links don't hide the heading under the sticky navbar */
}
.moda-blog-content h2, .cke_editable h2 { font-size: 26px; line-height: 1.3;  font-weight: 700; margin: 36px 0 14px; }
.moda-blog-content h3, .cke_editable h3 { font-size: 22px; line-height: 1.35; font-weight: 700; margin: 28px 0 10px; }
.moda-blog-content h4, .cke_editable h4 { font-size: 19px; line-height: 1.4;  font-weight: 600; margin: 24px 0 8px; color: #26321f; }
.moda-blog-content h5, .cke_editable h5 { font-size: 17px; line-height: 1.45; font-weight: 600; margin: 20px 0 8px; color: #26321f; }
.moda-blog-content h6, .cke_editable h6 { font-size: 15px; line-height: 1.5;  font-weight: 700; margin: 18px 0 6px;
                                          color: #6b7a69; text-transform: uppercase; letter-spacing: .04em; }

/* Older posts set sizes inline (e.g. <h3><span style="font-size:20px">). Keep every heading
   on the scale above, whatever size was picked in the editor. */
.moda-blog-content :is(h2, h3, h4, h5, h6) *, .cke_editable :is(h2, h3, h4, h5, h6) * {
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit;
}
/* bold text inside a heading keeps the heading colour/weight (more specific than the strong rule below) */
.moda-blog-content :is(h2, h3, h4, h5, h6) :is(strong, b), .cke_editable :is(h2, h3, h4, h5, h6) :is(strong, b) {
  font-weight: inherit; color: inherit;
}

/* First heading / paragraph doesn't push the article down */
.moda-blog-content > :first-child, .moda-blog-content > p:empty + *, .cke_editable > :first-child { margin-top: 0; }
.moda-blog-content > p:empty { display: none; }

/* ---------- text ---------- */
.moda-blog-content p, .cke_editable p { font-size: 16px; line-height: 1.75; margin: 0 0 16px; }
.moda-blog-content :is(p, li) span[style*="font-size"], .cke_editable :is(p, li) span[style*="font-size"] {
  font-size: inherit !important;      /* body text stays 16px too */
}
.moda-blog-content strong, .moda-blog-content b, .cke_editable strong, .cke_editable b { font-weight: 700; color: #1b2618; }
.moda-blog-content a, .cke_editable a {
  color: #2D6B2A; font-weight: 600; text-decoration: underline;
  text-decoration-color: rgba(45, 107, 42, .35); text-underline-offset: 3px;
}
.moda-blog-content a:hover, .cke_editable a:hover { color: #1b4119; text-decoration-color: currentColor; }

/* ---------- lists ---------- */
.moda-blog-content ul, .moda-blog-content ol, .cke_editable ul, .cke_editable ol { margin: 0 0 18px; padding-left: 24px; }
.moda-blog-content ul li, .cke_editable ul li { list-style: disc !important; }
.moda-blog-content ol li, .cke_editable ol li { list-style: decimal !important; }
.moda-blog-content li, .cke_editable li { font-size: 16px; line-height: 1.7; margin: 0 0 6px; padding-left: 2px; }
.moda-blog-content li::marker, .cke_editable li::marker { color: #2D4F2B; }
.moda-blog-content li > p, .cke_editable li > p { margin: 0; }
.moda-blog-content li > ul, .moda-blog-content li > ol, .cke_editable li > ul, .cke_editable li > ol { margin: 6px 0 0; }

/* ---------- quotes, images, rules ---------- */
.moda-blog-content blockquote, .cke_editable blockquote {
  margin: 22px 0; padding: 14px 18px; border-left: 4px solid #FFB823;
  background: #FFF8E5; border-radius: 0 12px 12px 0; color: #26321f; font-style: normal;
}
.moda-blog-content blockquote p:last-child, .cke_editable blockquote p:last-child { margin-bottom: 0; }
.moda-blog-content img, .cke_editable img { max-width: 100%; height: auto; border-radius: 12px; }
.moda-blog-content figure, .cke_editable figure { margin: 22px 0; }
.moda-blog-content figcaption, .cke_editable figcaption { font-size: 14px; color: #6b7a69; text-align: center; margin-top: 6px; }
.moda-blog-content hr, .cke_editable hr { border: 0; border-top: 1px solid #ECE6D3; margin: 28px 0; opacity: 1; }
.moda-blog-content code, .cke_editable code { font-size: .9em; background: #F7F4EA; padding: 2px 6px; border-radius: 6px; }

/* ---------- tables (font only; layout lives in singleblog.html) ---------- */
.moda-blog-content table, .cke_editable table { font-size: 15px; line-height: 1.55; margin: 0 0 18px; }
.cke_editable table { width: 100% !important; }   /* editor shows tables full width, like the page */

/* ---------- editor only ---------- */
.cke_editable { max-width: 820px; margin: 20px auto; padding: 0 20px; background: #fff; }
