/* ============================================================
   Hammersmith Surveyors — Blog-Specific Stylesheet
   blog.css — imported on all blog pages
   ============================================================ */

/* ---------- Blog Listing Page ---------- */

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: 2.5rem;
  justify-content: center;
}

.filter-btn {
  padding: .5rem 1.25rem;
  border: 2px solid var(--light-grey);
  border-radius: 50px;
  background: var(--white);
  color: var(--dark-grey);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-main);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-dark); /* #1a252f – dark bg + white text = 16:1 ✓ */
  border-color: var(--primary-dark);
  color: var(--white);
}
.filter-btn:focus-visible { outline: 3px solid #ffd700; outline-offset: 3px; border-radius: 2px; }

/* ---------- Blog Post Article ---------- */

.blog-post {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Hero image */
.blog-hero {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}
.blog-featured-image {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

/* Article header */
.blog-header {
  margin-bottom: 2.5rem;
}
.blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: .82rem;
  color: var(--mid-grey);
}
.blog-category {
  background: var(--gold);
  color: var(--navy);
  font-size: .72rem;
  font-weight: 700;
  padding: .3rem .85rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.blog-excerpt {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--dark-grey);
  font-style: italic;
  border-left: 4px solid var(--gold);
  padding-left: 1.25rem;
  margin-top: 1.25rem;
}

/* Author info */
.author-info {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--off-white);
  border-radius: var(--radius);
}
.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
}
.author-details { display: flex; flex-direction: column; }
.author-name { font-weight: 700; font-size: .92rem; color: var(--navy); }
.author-title { font-size: .78rem; color: var(--mid-grey); }

/* Table of Contents */
.blog-toc {
  background: var(--off-white);
  border: 1px solid var(--light-grey);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}
.blog-toc h2 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.blog-toc ul {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  counter-reset: toc;
}
.blog-toc li {
  counter-increment: toc;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.blog-toc li::before {
  content: counter(toc) ".";
  font-weight: 700;
  color: var(--gold);
  font-size: .85rem;
  flex-shrink: 0;
  margin-top: .05rem;
}
.blog-toc a {
  color: var(--navy);          /* 18:1 vs off-white ✓ */
  font-size: .9rem;
  text-decoration: none;
  transition: color var(--transition);
  line-height: 1.4;
}
.blog-toc a:hover { color: #0066cc; }
.blog-toc a:focus-visible { outline: 3px solid #ffd700; outline-offset: 3px; border-radius: 2px; }

/* Blog content typography — full-width within parent column */
.blog-content {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 3rem;
  box-sizing: border-box;
}

.blog-content h2 {
  font-size: 1.55rem;
  color: var(--navy);
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--light-grey);
  scroll-margin-top: 90px;
}
.blog-content h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin: 1.75rem 0 .75rem;
  scroll-margin-top: 90px;
}
.blog-content h4 {
  font-size: 1.05rem;
  color: var(--navy);
  margin: 1.25rem 0 .5rem;
}
.blog-content p {
  color: var(--dark-grey);
  font-size: 1.04rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.blog-content ul,
.blog-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }
.blog-content li {
  color: var(--dark-grey);
  font-size: 1.02rem;
  margin-bottom: .6rem;
  line-height: 1.7;
}
/* Body-copy links: accent-blue #0066cc – 7.0:1 vs white ✓ (gold fails 4.5:1 on white bg) */
.blog-content a {
  color: #0066cc;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-content a:hover { color: #004499; }
.blog-content a:focus-visible { outline: 3px solid #ffd700; outline-offset: 3px; border-radius: 2px; }
.blog-content blockquote {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--navy-mid);
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--gold);
  background: var(--off-white);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}
.blog-content strong { color: var(--navy); }

/* Inline images */
.inline-image {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.75rem 0 .5rem;
  box-shadow: var(--shadow-sm);
  display: block;
}
.image-caption {
  font-size: .82rem !important;
  color: var(--mid-grey) !important;
  text-align: center;
  margin-top: .4rem !important;
  margin-bottom: 1.75rem !important;
  font-style: italic;
}

/* Callout box */
.callout-box {
  background: linear-gradient(135deg, rgba(201,168,76,0.1), rgba(201,168,76,0.05));
  border: 1px solid rgba(201,168,76,0.35);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.callout-box h4 {
  font-size: .95rem;
  color: var(--navy);
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.callout-box p {
  font-size: .95rem !important;
  margin: 0 !important;
  color: var(--dark-grey) !important;
}

/* Key takeaways */
.key-takeaways {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin: 2.5rem 0;
}
.key-takeaways h2 {
  color: var(--white) !important;
  border-bottom-color: rgba(255,255,255,.15) !important;
}
.key-takeaways ul {
  list-style: none !important;
  padding-left: 0 !important;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.key-takeaways li {
  color: rgba(255,255,255,.88) !important;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .95rem !important;
}
.key-takeaways li::before { display: none; }

/* FAQ Section */
.faq-section {
  margin: 2.5rem 0;
  border-top: 2px solid var(--light-grey);
  padding-top: 2rem;
}
.faq-section h2 {
  border-bottom-color: var(--light-grey) !important;
}
.faq-section .faq-item {
  border-bottom: 1px solid var(--light-grey);
}
.faq-section .faq-question {
  font-family: var(--font-head);
  font-size: 1rem;
}
.faq-section .faq-answer p {
  font-size: .95rem !important;
}

/* Conclusion / CTA */
.conclusion {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin-top: 2.5rem;
}
.conclusion h2 {
  border-bottom: none !important;
  margin-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Blog CTA box at bottom of article */
.blog-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  margin: 3rem 0;
}
.blog-cta h2 {
  color: var(--white) !important;
  font-size: 1.4rem !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: .75rem !important;
}
.blog-cta p {
  color: rgba(255,255,255,.82) !important;
  margin-bottom: 1.5rem !important;
}
.blog-cta .btn {
  display: inline-flex;
}

/* Related articles */
.related-articles {
  padding-top: 2.5rem;
  border-top: 2px solid var(--light-grey);
  margin-top: 2.5rem;
}
.related-articles h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--navy);
  border: none;
  padding: 0;
  margin-top: 0;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.related-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--light-grey);
}
.related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.related-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.related-card-body { padding: 1rem; }
.related-card h3 {
  font-size: .9rem;
  color: var(--navy);
  margin-bottom: .5rem;
  line-height: 1.35;
}
.related-card h3 a {
  color: var(--navy);          /* 18:1 vs white ✓ */
  text-decoration: none;
}
.related-card h3 a:hover { color: #0066cc; }
.related-card h3 a:focus-visible { outline: 3px solid #ffd700; outline-offset: 3px; border-radius: 2px; }
.related-card p {
  font-size: .8rem;
  color: var(--mid-grey);
  margin: 0;
  line-height: 1.5;
}

/* Progress bar inside article */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,.15);
  z-index: 1001;
}
.reading-progress-bar {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* Share buttons */
.share-section {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--light-grey);
  border-bottom: 1px solid var(--light-grey);
  margin: 2rem 0;
  flex-wrap: wrap;
}
.share-label {
  font-weight: 600;
  font-size: .88rem;
  color: var(--navy);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .9rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.share-btn-twitter { background: #1da1f2; color: var(--white); }
.share-btn-linkedin { background: #0077b5; color: var(--white); }
.share-btn-facebook { background: #1877f2; color: var(--white); }
.share-btn-copy { background: var(--off-white); color: var(--navy); border-color: var(--border-medium); cursor: pointer; font-family: var(--font-main); } /* navy on off-white – 16:1 ✓ */
.share-btn:hover { opacity: .85; transform: translateY(-2px); }

/* Blog listing featured article override */
@media (max-width: 900px) {
  .blog-post-featured { grid-template-columns: 1fr !important; }
  .blog-featured-image { height: 280px; }
}

/* ---------- Responsive Blog ---------- */
@media (max-width: 768px) {
  .blog-featured-image { height: 240px; }
  .blog-toc { padding: 1.25rem; }
  .blog-content h2 { font-size: 1.3rem; }
  .related-grid { grid-template-columns: 1fr; }
  .callout-box { padding: 1.25rem; }
  .key-takeaways { padding: 1.5rem; }
  .blog-cta { padding: 1.75rem 1.25rem; }
  .share-section { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .blog-featured-image { height: 200px; }
  .blog-toc ul { gap: .35rem; }
  .author-info { flex-direction: column; text-align: center; }
}

/* ============================================================
   Additional blog layout classes (articles + listing)
   ============================================================ */

/* Blog outer container — full width, no max-width restriction */
.blog-container {
  max-width: 100% !important;
  padding: 3rem 1.5rem !important;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .blog-container { padding: 2rem 1rem !important; }
}
@media (max-width: 480px) {
  .blog-container { padding: 1.5rem 0.75rem !important; }
}

/* Two-column layout: article + sidebar */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
  width: 100%;
}
@media (max-width: 1024px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { display: none; }
}

/* Responsive padding for old-style posts on small screens */
@media (max-width: 768px) {
  main.article-body {
    padding: 2rem 1.25rem 3rem;
  }
}
@media (max-width: 480px) {
  main.article-body {
    padding: 1.5rem 1rem 2.5rem;
  }
}

/* ============================================================
   GLOBAL BLOG CONTENT LAYOUT
   Applies to ALL blog posts — old (main.article-body) and new
   (.blog-layout > .blog-post > .article-body)
   ============================================================ */

/* Old-style posts: <main class="article-body"> — centered, readable max-width */
main.article-body {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  box-sizing: border-box;
}

/* New-style posts: fills full grid column — NO max-width restriction */
.blog-layout > article.blog-post,
.blog-layout > .blog-post {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

/* ============================================================
   Blog post article body — typography & spacing
   ============================================================ */
.article-body {
  line-height: 1.8;
  color: var(--dark-grey);
}
.article-body p {
  font-size: 1.04rem;
  line-height: 1.85;
  margin-bottom: 1.35rem;
  color: var(--dark-grey);
  max-width: 100%;
}
.article-body h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--light-grey);
  scroll-margin-top: 90px;
  font-family: var(--font-display);
  line-height: 1.25;
}
.article-body h3 {
  font-size: 1.18rem;
  color: var(--navy);
  margin: 1.75rem 0 .75rem;
  scroll-margin-top: 90px;
  line-height: 1.3;
}
.article-body h4 {
  font-size: 1.05rem;
  color: var(--navy);
  margin: 1.25rem 0 .5rem;
  font-weight: 600;
}
.article-body ul,
.article-body ol {
  padding-left: 1.6rem;
  margin-bottom: 1.5rem;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li {
  margin-bottom: .6rem;
  line-height: 1.7;
  font-size: 1rem;
}
/* Body-copy links: #0066cc – 7.0:1 vs white ✓ */
.article-body a {
  color: #0066cc;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body a:hover  { color: #004499; }
.article-body a:focus-visible { outline: 3px solid #ffd700; outline-offset: 3px; border-radius: 2px; }
.article-body strong { color: var(--navy); font-weight: 600; }
.article-body figure { margin: 2rem 0; }
.article-body figcaption {
  font-size: .82rem;
  color: var(--mid-grey);
  text-align: center;
  margin-top: .5rem;
  font-style: italic;
}
/* Tables inside article body */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .92rem;
  overflow-x: auto;
  display: block;
}
.article-body blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--gold);
  background: var(--off-white);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--navy);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Article intro lead paragraph */
.article-intro {
  font-size: 1.12rem !important;
  line-height: 1.85 !important;
  color: var(--navy) !important;
  border-left: 4px solid var(--gold);
  padding-left: 1.25rem;
  margin-bottom: 2rem !important;
  font-weight: 500;
}

/* ============================================================
   Article Header — fixed navbar offset fix
   Ensures breadcrumb is never hidden behind the fixed header
   ============================================================ */
.article-header {
  padding-top: 6.5rem !important; /* 75px fixed header + 2rem breathing room */
  padding-bottom: 3rem !important;
}
@media (max-width: 768px) {
  .article-header {
    padding-top: 5.5rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Article meta line */
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: .88rem;
  margin-top: 1rem;
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: .35rem;
}

/* Table of Contents */
.toc {
  background: var(--off-white);
  border: 1px solid var(--light-grey);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}
.toc-title {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 1rem !important;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}
.toc-list {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.toc-list li { margin: 0; font-size: .9rem; }
.toc-list a {
  color: var(--navy);          /* 18:1 vs off-white ✓ */
  text-decoration: none;
  transition: color var(--transition);
}
.toc-list a:hover { color: #0066cc; }
.toc-list a:focus-visible { outline: 3px solid #ffd700; outline-offset: 3px; border-radius: 2px; }

/* Callout boxes */
.callout {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  align-items: flex-start;
}
.callout-tip {
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.3);
  border-left: 4px solid var(--gold);
}
.callout-warning {
  background: rgba(220,53,69,0.06);
  border: 1px solid rgba(220,53,69,0.25);
  border-left: 4px solid #dc3545;
}
.callout-info {
  background: rgba(45,74,138,0.07);
  border: 1px solid rgba(45,74,138,0.2);
  border-left: 4px solid var(--navy);
}
.callout-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: .1rem;
}
.callout-tip .callout-icon { color: var(--gold); }
.callout-warning .callout-icon { color: #dc3545; }
.callout-info .callout-icon { color: var(--navy); }
.callout-content {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--dark-grey);
}
.callout-content strong { color: var(--navy); }

/* Key takeaways - override for article-body */
.key-takeaways {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin: 2.5rem 0;
}
.key-takeaways-title {
  color: #fff !important;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.25rem !important;
  border: none !important;
}
.key-takeaways-title i { color: var(--gold); }
.key-takeaways ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.key-takeaways li {
  color: rgba(255,255,255,.88) !important;
  font-size: .95rem !important;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.key-takeaways li::before {
  content: "✓";
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
}

/* FAQ section */
.faq-section {
  margin: 2.5rem 0;
}
.faq-title {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
}
.faq-title i { color: var(--gold); }
.faq-item {
  border-bottom: 1px solid var(--light-grey);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);          /* 18:1 vs white ✓ */
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-main);
  line-height: 1.45;
}
.faq-question:focus-visible { outline: 3px solid #ffd700; outline-offset: 3px; border-radius: 2px; }
.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform var(--transition);
  margin-left: 1rem;
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer p {
  font-size: .96rem;
  line-height: 1.75;
  color: var(--dark-grey);
  padding-bottom: 1rem;
  margin: 0;
}

/* Related articles section */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--light-grey);
}
.related-title {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.related-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-grey);
  text-decoration: none !important;
  transition: all var(--transition);
  display: block;
}
.related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.related-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.related-card-body { padding: .85rem 1rem; }
.related-category {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #0066cc;              /* 7:1 vs white – replaces var(--gold) which fails at this size ✓ */
  display: block;
  margin-bottom: .35rem;
}
.related-card h3 {
  font-size: .88rem;
  color: var(--navy);
  line-height: 1.35;
  margin: 0;
}

/* Author bio box */
.author-bio {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 3rem;
  border: 1px solid var(--light-grey);
}
.author-bio .author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
}
.author-bio .author-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .2rem;
}
.author-bio .author-role {
  font-size: .82rem;
  color: #0066cc;              /* 7:1 vs off-white ✓ (gold fails at this size on light bg) */
  font-weight: 700;
  margin-bottom: .6rem;
}
.author-bio-text {
  font-size: .9rem;
  color: var(--mid-grey);
  line-height: 1.65;
  margin: 0;
}

/* Blog listing grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* Blog card (listing) */
.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-grey);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.blog-card-featured {
  grid-column: 1 / -1;
  flex-direction: row;
  max-height: 380px;
}
@media (max-width: 768px) {
  .blog-card-featured { flex-direction: column; max-height: none; }
}
.blog-card-image-link {
  display: block;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.blog-card-featured .blog-card-image-link {
  width: 50%;
}
@media (max-width: 768px) {
  .blog-card-featured .blog-card-image-link { width: 100%; }
}
.blog-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.blog-card-featured .blog-card-img {
  height: 100%;
  min-height: 280px;
}
.blog-card:hover .blog-card-img { transform: scale(1.04); }
.blog-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-featured .blog-card-body { justify-content: center; }
.blog-card-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--mid-grey);
  margin-bottom: .75rem;
}
.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.blog-card-title {
  font-size: 1.05rem;
  font-family: var(--font-display);
  margin-bottom: .75rem;
  line-height: 1.3;
}
.blog-card-featured .blog-card-title { font-size: 1.4rem; }
.blog-card-title a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition);
}
.blog-card-title a:hover { color: var(--gold); }
.blog-card-excerpt {
  font-size: .9rem;
  color: var(--mid-grey);
  line-height: 1.65;
  flex: 1;
}
/* Read-more link: accent-blue = 7:1 vs white ✓ */
.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 700;
  color: #0066cc;              /* 7.0:1 vs white ✓ */
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 1rem;
  transition: gap var(--transition), color var(--transition);
}
.blog-read-more:hover { gap: .65rem; color: #004499; }
.blog-read-more:focus-visible { outline: 3px solid #ffd700; outline-offset: 3px; border-radius: 2px; }

/* Blog badges */
.blog-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .25rem .75rem;
  border-radius: 50px;
  z-index: 2;
}
.blog-badge-featured {
  background: var(--gold);
  color: var(--navy);
}
.blog-badge-category {
  background: var(--navy);
  color: #fff;
  left: 1rem;
}

/* Sidebar widgets */
.blog-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--gold);
}
.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.sidebar-links a {
  color: var(--dark-grey);     /* #2d3748 – 10.7:1 vs white ✓ */
  text-decoration: none;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: color var(--transition);
}
.sidebar-links a::before {
  content: "→";
  color: #0066cc;              /* accent-blue instead of gold (gold fails at small size on white) */
  font-size: .8rem;
}
.sidebar-links a:hover { color: #0066cc; }
.sidebar-links a:focus-visible { outline: 3px solid #ffd700; outline-offset: 3px; border-radius: 2px; }
.sidebar-cta {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
  text-align: center;
}
.sidebar-cta h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: .65rem;
}
.sidebar-cta p {
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  margin-bottom: 1.25rem;
}

/* Reading progress bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--gold);
  width: 0%;
  z-index: 9999;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* ============================================================
   Blog Responsive Breakpoints
   ============================================================ */

/* ---------- 968px: Tablet landscape ---------- */
@media (max-width: 968px) {
  /* Blog listing: 2-column grid */
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  /* Article layout: sidebar drops below */
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { display: none; }       /* hide sidebar; shown via sticky widget on desktop */
  /* Related articles: 2-up */
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  /* Featured card: stack vertically */
  .blog-card-featured { flex-direction: column; max-height: none; }
  .blog-card-featured .blog-card-image-link { width: 100%; }
  .blog-card-featured .blog-card-img { min-height: 260px; }
}

/* ---------- 768px: Tablet portrait ---------- */
@media (max-width: 768px) {
  /* Hero image height */
  .blog-featured-image { height: 320px; object-position: center; }
  /* Article header */
  .article-header { padding-block: 7rem 2rem; }
  .blog-header { margin-bottom: 2rem; }
  /* TOC */
  .blog-toc { padding: 1.25rem 1.5rem; }
  /* Author */
  .author-bio { flex-direction: column; align-items: center; text-align: center; }
  /* Content typography */
  .blog-content h2, .article-body h2 { font-size: 1.35rem; }
  .blog-content h3, .article-body h3 { font-size: 1.1rem; }
  /* Callout */
  .callout-box { padding: 1.25rem; }
  .callout     { padding: 1rem 1.25rem; }
  /* Key takeaways */
  .key-takeaways { padding: 1.5rem; }
  /* Blog content padding on mobile */
  .blog-content { padding-left: 1.25rem; padding-right: 1.25rem; }
  /* Blog CTA */
  .blog-cta { padding: 1.75rem 1.25rem; }
  /* Share */
  .share-section { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}

/* ---------- 600px: Small phones landscape / large portrait ---------- */
@media (max-width: 600px) {
  /* Blog listing: single column */
  .blog-grid { grid-template-columns: 1fr; gap: 1rem; }
  /* Blog card */
  .blog-card-body   { padding: 1.1rem; }
  .blog-card-img    { height: 200px; }
  .blog-card-title  { font-size: 1rem; }
  .blog-card-excerpt { font-size: 0.88rem; }
  /* Blog card image wrapper */
  .blog-card-image-link .blog-card-img { height: 200px; }
  /* Hero image */
  .blog-featured-image { height: 240px; }
  /* TOC */
  .toc          { padding: 1.1rem 1.25rem; }
  .toc-title    { font-size: 0.95rem; }
  .toc-list li  { font-size: 0.875rem; }
  /* Article body */
  .article-body h2  { font-size: 1.25rem; }
  .article-body h3  { font-size: 1.05rem; }
  .article-body p,
  .article-body li  { font-size: 0.975rem; }
  /* FAQ */
  .faq-question   { font-size: 0.95rem; }
  .faq-answer p   { font-size: 0.9rem; }
  /* Author bio */
  .author-bio     { padding: 1.25rem; }
  .author-bio .author-avatar { width: 64px; height: 64px; }
  /* Key takeaways */
  .key-takeaways         { padding: 1.25rem; border-radius: var(--radius); }
  .key-takeaways-title   { font-size: 1.05rem; }
  .key-takeaways li      { font-size: 0.9rem !important; }
  /* Related grid: single column */
  .related-grid  { grid-template-columns: 1fr; gap: 0.85rem; }
  /* Blog CTA */
  .blog-cta h2   { font-size: 1.2rem !important; }
  .blog-cta p    { font-size: 0.92rem !important; }
  /* Filter bar */
  .blog-filters { gap: 0.4rem; }
  .filter-btn   { font-size: 0.8rem; padding: 0.4rem 1rem; }
  /* Blog meta */
  .blog-meta, .article-meta { font-size: 0.78rem; gap: 0.6rem; }
  /* Share buttons */
  .share-btn { font-size: 0.75rem; padding: 0.35rem 0.75rem; }
  /* Blog post listing article */
  .blog-post { padding-inline: 0; }
}

/* ---------- 480px: Portrait phones ---------- */
@media (max-width: 480px) {
  /* Blog listing hero featured */
  .blog-card-featured .blog-card-img  { min-height: 200px; }
  .blog-card-featured .blog-card-body { padding: 1rem; }
  /* Article intro */
  .article-intro { font-size: 1rem !important; padding-left: 1rem; }
  /* TOC compact */
  .toc-list { gap: 0.3rem; }
  .toc-list li { font-size: 0.85rem; }
  /* Callout compact */
  .callout      { flex-direction: column; gap: 0.5rem; padding: 0.9rem 1rem; }
  .callout-icon { margin-top: 0; }
  /* Author info (header area) */
  .author-info { flex-direction: column; text-align: center; }
  /* Blog badges */
  .blog-badge { font-size: 0.65rem; padding: 0.2rem 0.55rem; }
  /* Inline images */
  .inline-image { border-radius: var(--radius); }
  /* Share section */
  .share-section { gap: 0.4rem; }
  /* Blog grid meta */
  .blog-card-meta { flex-wrap: wrap; gap: 0.4rem; }
}
