/* ===========================================
   BLOG POST PAGE
   Loaded only by blog-post.php (served at /blogs/<slug>), after style.css
   and responsive.css. The title banner reuses .page-banner from style.css.
   Text sizes and colours follow the retired blog modal ("BLOG POST MODAL"
   in style.css), so a post reads the way it did in the modal.
   Mobile first: base rules are for phones, min-width queries scale up.
   =========================================== */

.blog-post-section {
  padding: 50px 0;
  background-color: var(--ti-bg-dark);
}

.blog-post-inner {
  max-width: 800px;
  margin: 0 auto;
}

/* Long unbroken strings (a pasted URL, a long word in a title) wrap instead
   of pushing the page wider than the screen. */
.blog-post-body,
.blog-post .page-banner-title {
  overflow-wrap: break-word;
}

.blog-post-hero {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 30px;
}

/* ---------- Body text ---------- */

.blog-post-body > :first-child {
  margin-top: 0;
}

.blog-post-body p,
.blog-post-body li {
  font-size: 15px;
  line-height: 1.7;
}

.blog-post-body h2 {
  font-size: 20px;
  margin-top: 35px;
  margin-bottom: 15px;
}

.blog-post-body h3 {
  font-size: 18px;
  margin-top: 30px;
  margin-bottom: 12px;
}

.blog-post-body h4,
.blog-post-body h5,
.blog-post-body h6 {
  font-size: 18px;
  margin-top: 25px;
  margin-bottom: 10px;
}

/* style.css removes list markers everywhere (ul, li { list-style: none }).
   A post body is prose, so the markers come back here. */
.blog-post-body ul,
.blog-post-body ol {
  margin: 0 0 20px;
  padding-left: 1.5em;
}

.blog-post-body ul {
  list-style: disc;
}

.blog-post-body ol {
  list-style: decimal;
}

.blog-post-body li {
  list-style: inherit;
  color: var(--ti-text-light);
  margin-bottom: 8px;
}

.blog-post-body li > ul,
.blog-post-body li > ol {
  margin: 8px 0 0;
}

.blog-post-body li > ul {
  list-style: circle;
}

.blog-post-body blockquote {
  border-left: 3px solid var(--ti-border-hover);
  padding-left: 20px;
  margin: 25px 0;
  font-style: italic;
  color: var(--ti-text-muted);
}

.blog-post-body strong {
  font-weight: 700;
  color: var(--ti-text-white);
}

.blog-post-body em {
  font-style: italic;
}

.blog-post-body code {
  background-color: var(--ti-bg-dark-lighter);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
}

.blog-post-figure {
  margin: 30px 0;
}

.blog-post-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* style.css sets a { text-decoration: none }, so a link inside a paragraph
   would differ from the words around it only by a faint colour shift.
   Underline links in prose so they read as links (WCAG 1.4.1). */
.blog-post-body a,
.blog-post-body a:hover,
.blog-post-body a:focus,
.blog-post-message-links a,
.blog-post-message-links a:hover,
.blog-post-message-links a:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 404 / 503 message links ---------- */

.blog-post-message-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 32px;
  margin-top: 30px;
}

.blog-post-message-links a {
  display: inline-block;
  padding: 8px 4px;
  font-size: 18px;
  font-weight: 700;
}

/* ---------- Larger screens ---------- */

@media screen and (min-width: 768px) {
  .blog-post-section {
    padding: 70px 0;
  }

  .blog-post-hero {
    border-radius: 12px;
    margin-bottom: 40px;
  }

  .blog-post-body p,
  .blog-post-body li {
    font-size: 16px;
    line-height: 1.8;
  }

  .blog-post-body h2 {
    font-size: 24px;
  }

  .blog-post-body h3 {
    font-size: 20px;
  }
}

@media screen and (min-width: 992px) {
  .blog-post-section {
    padding: 100px 0;
  }
}
