/**
 * blog.css
 *
 * Styling for views/blog.php (index) and views/blog-post.php (single
 * post) — loaded on both (see layouts/head.php's own $page check). Same
 * container/palette convention as every other content page's own CSS
 * (css/mortgages.css's .mg-wrap, css/home-value.css, etc.): 1140px
 * max-width, #12233D headings, #4B5A70 body copy. .sr-grid/.sr-card (a
 * blog post's own [listings ...] shortcode embeds, see
 * blog-shortcodes.php) come from css/search.css, also loaded on this
 * page — not redefined here.
 */

.blog-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  color: #12233D;
}

.blog-heading {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 24px;
}

.blog-empty {
  font-size: 16px;
  color: #4B5A70;
}

/* ---- Index list (/blog) ---- */

.blog-index-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.blog-index-item {
  padding-bottom: 32px;
  border-bottom: 1px solid #E2E8F0;
}

.blog-index-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blog-index-title {
  display: block;
  font-size: 22px;
  font-weight: 600;
  color: #12233D;
  text-decoration: none;
  margin-bottom: 4px;
}

.blog-index-title:hover {
  text-decoration: underline;
}

.blog-index-date {
  font-size: 14px;
  color: #8A96A3;
  margin: 0 0 12px;
}

.blog-index-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: #4B5A70;
  margin: 0 0 12px;
}

.blog-index-readmore {
  font-size: 15px;
  font-weight: 600;
  color: #1D5FB8;
  text-decoration: none;
}

.blog-index-readmore:hover {
  text-decoration: underline;
}

/* ---- Single post (/blog/{slug}) ---- */

.blog-post-title {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 8px;
}

.blog-post-date {
  font-size: 14px;
  color: #8A96A3;
  margin: 0 0 32px;
}

/* Prose rendered from body_markdown via league/commonmark (see
   views/blog-post.php) — generic element selectors since the actual
   markup varies post to post, not a fixed set of classes. */
.blog-post-body {
  font-size: 16px;
  line-height: 1.6;
  color: #4B5A70;
}

.blog-post-body h2 {
  font-size: 24px;
  font-weight: 600;
  color: #12233D;
  margin: 32px 0 12px;
}

.blog-post-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: #12233D;
  margin: 24px 0 12px;
}

.blog-post-body p {
  margin: 0 0 16px;
}

.blog-post-body ul,
.blog-post-body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.blog-post-body li {
  margin-bottom: 6px;
}

.blog-post-body a {
  color: #1D5FB8;
}

.blog-post-body blockquote {
  margin: 0 0 16px;
  padding: 4px 16px;
  border-left: 3px solid #E2E8F0;
  color: #6B7A90;
}

.blog-post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* A [listings ...] shortcode's rendered grid — same .sr-grid the rest of
   the site uses (css/search.css), just with blog-post-specific vertical
   spacing since it sits inline between paragraphs of prose rather than
   as a page's own primary content. */
.blog-embedded-listings {
  margin: 8px 0 24px;
}

.blog-post-back {
  margin-top: 32px;
  font-size: 15px;
}

.blog-post-back a {
  color: #1D5FB8;
  text-decoration: none;
}

.blog-post-back a:hover {
  text-decoration: underline;
}

.blog-notfound {
  text-align: center;
  padding-top: 64px;
}
