﻿/* Blog post page styles — used for every /blog/<slug>.html */

.blog-post { padding: 50px 0 24px; }
.post-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--sage-dark); text-decoration: none; margin-bottom: 28px; }
.post-back:hover { color: var(--sage-deep); }

.post-meta-top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cat-badge { background: var(--sage-light); color: var(--sage-deep); padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.post-title { font-size: clamp(1.8rem, 4.5vw, 2.6rem); color: var(--sage-deep); line-height: 1.18; letter-spacing: -0.02em; margin-bottom: 18px; }
.post-excerpt { font-family: 'Fraunces', serif; font-size: clamp(1.05rem, 2vw, 1.18rem); font-style: italic; color: var(--ink); line-height: 1.6; margin-bottom: 28px; }

.post-author-bar { display: flex; align-items: center; gap: 14px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 36px; }
.author-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--sage-light); display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-weight: 600; color: var(--sage-deep); font-size: 1.05rem; overflow: hidden; flex-shrink: 0; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.author-name { font-weight: 600; color: var(--sage-dark); font-size: 0.95rem; }
.author-name a { color: var(--sage-dark); text-decoration: none; border-bottom: 1px solid var(--peach-deep); }
.author-name a:hover { color: var(--sage-deep); }
.author-meta { font-size: 0.82rem; color: var(--ink-mute); margin-top: 2px; }

.post-body { padding: 0 0 60px; }
.post-content { font-size: 1.08rem; line-height: 1.85; color: var(--ink-soft); }
.post-content > p:first-of-type::first-letter { font-family: 'Fraunces', serif; font-size: 3.6em; line-height: 0.85; float: left; margin: 8px 12px 0 0; color: var(--sage-deep); font-weight: 500; }
.post-content p { margin-bottom: 20px; }
.post-content h2 { font-family: 'Fraunces', serif; font-size: clamp(1.4rem, 2.8vw, 1.8rem); color: var(--sage-deep); margin: 40px 0 16px; font-weight: 500; line-height: 1.25; }
.post-content h3 { font-family: 'Fraunces', serif; font-size: clamp(1.15rem, 2.2vw, 1.35rem); color: var(--sage-deep); margin: 28px 0 12px; font-weight: 500; }
.post-content ul, .post-content ol { margin: 0 0 24px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote { font-family: 'Fraunces', serif; font-style: italic; font-size: 1.15rem; color: var(--sage-deep); border-left: 3px solid var(--peach-deep); padding: 4px 0 4px 22px; margin: 30px 0; }
.post-content a:not(.btn) { color: var(--sage-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--peach-deep); }
.post-content a:not(.btn):hover { color: var(--sage-deep); }
.post-content a.btn { text-decoration: none; }
.post-content a.btn-primary { color: var(--cream); }
.post-content a.btn-primary:hover { color: var(--white); }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 24px 0; display: block; }
.post-content figure { margin: 28px 0; }
.post-content figcaption { font-size: 0.85rem; color: var(--ink-mute); text-align: center; margin-top: 8px; font-style: italic; }
.post-content strong { color: var(--sage-deep); font-weight: 600; }

/* Mid-article CTA — inserted programmatically */
.mid-article-cta {
  background: linear-gradient(135deg, var(--cream-warm), var(--sage-light));
  border-left: 4px solid var(--peach-deep);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  margin: 36px 0;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.mid-article-cta p { margin: 0; flex: 1 1 280px; font-size: 1.02rem; line-height: 1.55; color: var(--ink); }
.mid-article-cta p strong { color: var(--sage-deep); display: block; margin-bottom: 4px; font-size: 1.06rem; }
.mid-article-cta .btn { flex-shrink: 0; }
@media (max-width: 560px) { .mid-article-cta { flex-direction: column; align-items: flex-start; } }

/* Bottom CTA section + cta-card styles moved to main.css (shared with doctor pages) */

/* Related posts */
.related-posts { padding: 50px 0 60px; background: var(--cream); }
.related-posts h2 { font-family: 'Fraunces', serif; font-weight: 500; color: var(--sage-deep); margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .related-grid { grid-template-columns: 1fr; } }
.related-card { display: block; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-decoration: none; transition: all 0.2s; }
.related-card:hover { border-color: var(--sage-light); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.related-card h4 { font-family: 'Fraunces', serif; font-weight: 500; color: var(--sage-dark); margin-bottom: 10px; font-size: 1.05rem; line-height: 1.35; }
.related-card .related-meta { font-size: 0.78rem; color: var(--ink-mute); }

/* Featured image at top of article body — natural aspect ratio, capped height */
.post-featured-img { margin: 20px auto 30px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--cream-warm); text-align: center; max-width: 780px; }
.post-featured-img img { max-width: 100%; max-height: 520px; width: auto; height: auto; display: block; margin: 0 auto; }
/* Hero variant for tall/portrait artwork: fill the column, crop from the top */
.post-featured-img--fill { background: none; box-shadow: none; }
.post-featured-img--fill img { width: 100%; height: 440px; max-height: none; object-fit: cover; object-position: top center; border-radius: var(--radius); }
@media (max-width: 640px) { .post-featured-img--fill img { height: 300px; } }
