/* ==========================================================================
   HorseFil — blog.css   (loads after style.css)
   ========================================================================== */

/* ---------- Reading progress ---------- */
.progress-track {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  height: 5px; background: rgba(18, 24, 56, .12);
}
.progress-bar { height: 100%; width: 0; background: var(--gold); transition: width .08s linear; }

/* ---------- Breadcrumbs ---------- */
.crumbs { padding: 22px 0 0; }
.crumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px;
}
.crumbs li { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--text); }
.crumbs li + li::before { content: "/"; color: var(--label); }
.crumbs a { color: var(--gold-ink); text-decoration: none; padding: 4px 0; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { font-weight: 600; }

/* ---------- Post header ---------- */
.post-header { padding: 34px 0 8px; }
.post-header h1 { font-size: clamp(2rem, 4.6vw, 3rem); max-width: 22ch; }
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  font-size: 17px; color: var(--text); margin: 0 0 22px; font-weight: 500;
}
.post-meta span { display: flex; align-items: center; gap: 8px; }
.post-meta svg { color: var(--gold-ink); flex: none; }
.post-hero {
  margin: 0 0 40px; background: var(--off-white);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 34px 24px; text-align: center;
}
.post-hero img { margin: 0 auto; }
.post-hero figcaption { font-size: 17px; margin-top: 16px; font-weight: 500; }

/* ---------- Post layout ---------- */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; padding-bottom: 80px; }
@media (max-width: 980px) { .post-layout { grid-template-columns: 1fr; gap: 36px; } }

article.post { max-width: 68ch; font-size: 18px; line-height: 1.75; }
article.post h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-top: 52px; scroll-margin-top: 110px; }
article.post h2:first-child { margin-top: 0; }
article.post h3 { margin-top: 34px; }
article.post ul, article.post ol { margin-bottom: 1.3em; }
article.post li { line-height: 1.75; }
article.post strong { font-weight: 600; }
article.post .callout { margin: 36px 0; }
article.post hr { border: 0; border-top: 1px solid var(--border); margin: 44px 0; }

/* ---------- Table of contents ---------- */
.toc {
  position: sticky; top: 104px;
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 26px 24px;
}
.toc h2 {
  font-size: 17px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-ink); margin: 0 0 14px;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; counter-increment: toc; }
.toc a {
  display: flex; gap: 12px; padding: 9px 0; font-size: 17px; line-height: 1.5;
  color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border);
  min-height: 44px; align-items: center;
}
.toc li:last-child a { border-bottom: 0; }
.toc a::before { content: counter(toc); color: var(--gold-ink); font-weight: 700; flex: none; min-width: 18px; }
.toc a:hover { color: var(--gold-ink); text-decoration: underline; }
.toc a.is-current { color: var(--gold-ink); font-weight: 600; }
@media (max-width: 980px) { .toc { position: static; } }

/* ---------- In-post CTA ---------- */
.post-cta {
  background: var(--navy);
  background-image: radial-gradient(100% 140% at 50% 0%, #23305C 0%, #121838 60%, #0C1128 100%);
  color: #FFFFFF; border-radius: var(--r);
  padding: 44px 32px; text-align: center; margin: 52px 0;
}
.post-cta img { margin: 0 auto 24px; }
.post-cta h2 { color: #FFFFFF; margin-top: 0 !important; font-size: clamp(1.6rem, 3vw, 2rem); }
.post-cta p { color: #FFFFFF; max-width: 48ch; margin-left: auto; margin-right: auto; }
.post-cta .btn { margin-top: 12px; }
.post-cta .fine { font-size: 17px; margin: 20px 0 0; color: #FFFFFF; }

/* ---------- Post FAQ ---------- */
.post-faq { margin-top: 52px; }
.post-faq .faq { max-width: none; }

/* ---------- Prev / next ---------- */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 52px; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav a {
  display: block; padding: 22px 24px; border: 1px solid var(--border);
  border-radius: var(--r); text-decoration: none; background: var(--white); box-shadow: var(--shadow);
}
.post-nav a:hover { border-color: var(--gold); }
.post-nav .dir {
  display: block; font-size: 17px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold-ink); margin-bottom: 8px;
}
.post-nav strong { display: block; color: var(--navy); font-size: 19px; line-height: 1.45; font-weight: 600; }
.post-nav .next { text-align: right; }

/* ---------- Related ---------- */
.post-related { border-top: 1px solid var(--border); margin-top: 56px; padding-top: 44px; }
.post-related h2 { margin-top: 0 !important; }

/* ---------- Blog index ---------- */
.blog-hero { background: var(--navy); background-image: radial-gradient(100% 150% at 70% 0%, #23305C 0%, #121838 60%, #0C1128 100%); color: #FFFFFF; padding: 64px 0 68px; }
.blog-hero h1 { max-width: 18ch; }
.blog-hero .lead { max-width: 56ch; color: #FFFFFF; }
.blog-hero .eyebrow { color: var(--gold); }
.post-card .post-thumb {
  border-radius: var(--r-sm); background: var(--off-white);
  border: 1px solid var(--border); padding: 20px; margin: 0 0 20px; text-align: center;
}
.post-card .post-thumb img { margin: 0 auto; }
.post-card--wide { grid-column: 1 / -1; }
@media (min-width: 901px) {
  .post-card--wide { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: center; }
  .post-card--wide .post-thumb { margin: 0; }
}
