/* ═══════════════════════════════════════════════════════
   BLOG — listing + single post
   Matches the site-wide purple/pink theme (style.css, oncologist.css)
   ═══════════════════════════════════════════════════════ */

.blog-page {
  --b-cream: #f8f9fc;
  --b-cream-deep: #eef0f8;
  --b-paper: #FFFFFF;
  --b-ink: #0F172A;
  --b-teal: #4a3faa;
  --b-teal-soft: #7c72ff;
  --b-gold: #7c72ff;
  --b-muted: #64748B;
  --b-line: rgba(124, 114, 255, 0.16);
  --b-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.blog-page .section-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--b-teal-soft);
  margin-bottom: 0.8rem;
}

.blog-section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem clamp(3.5rem, 7vw, 6.5rem);
}

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

/* ═══ Listing hero ═══ */
.blog-hero {
  background: linear-gradient(135deg, #f0eeff 0%, #e8f0ff 100%);
  padding: clamp(3rem, 7vw, 5rem) 1.25rem clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.blog-hero h1 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: var(--b-ink);
  margin: 0 0 0.9rem;
  letter-spacing: -0.02em;
}

.blog-hero p {
  color: var(--b-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto;
}

/* ═══ Category filter pills ═══ */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 2rem 0 0;
}

.blog-filter-pill {
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: var(--b-paper);
  border: 1px solid var(--b-line);
  color: var(--b-teal);
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.blog-filter-pill:hover { background: var(--b-cream-deep); text-decoration: none; }

.blog-filter-pill.active {
  background: var(--b-teal-soft);
  border-color: var(--b-teal-soft);
  color: #fff;
}

/* ═══ Listing grid (reuses o-blog-card visual language, own namespace) ═══ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--b-paper);
  border: 1px solid var(--b-line);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--b-shadow);
  text-decoration: none;
}

.blog-card-thumb {
  /* No fixed aspect-ratio: migrated posts have banner-style images with
     inconsistent shapes (e.g. ~2.8:1), and forcing a box (whether via
     cover-cropping or contain-with-gaps) either cut off content or left
     large empty padding. Each thumbnail keeps its own natural height. */
  background: var(--b-cream-deep);
  overflow: hidden;
  line-height: 0;
}

.blog-card-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-thumb img { transform: scale(1.04); }

.blog-card-body {
  padding: 1.35rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-cat {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--b-teal-soft);
  margin-bottom: 0.6rem;
}

.blog-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--b-ink);
  margin: 0 0 0.6rem;
  line-height: 1.4;
  transition: color 0.22s ease;
}

.blog-card:hover h3 { color: var(--b-teal-soft); }

.blog-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--b-muted);
  margin: 0 0 1rem;
  flex: 1;
}

.blog-card-meta {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 500;
}

.blog-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--b-muted);
}

/* ═══ Pagination ═══ */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.blog-pagination a, .blog-pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--b-line);
  color: var(--b-teal);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.blog-pagination a:hover { background: var(--b-cream-deep); text-decoration: none; }

.blog-pagination .active {
  background: var(--b-teal-soft);
  border-color: var(--b-teal-soft);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════════ */
.post-hero {
  background: linear-gradient(135deg, #f0eeff 0%, #e8f0ff 100%);
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem clamp(2rem, 4vw, 3rem);
}

.post-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.post-breadcrumb {
  font-size: 0.8rem;
  color: var(--b-muted);
  margin-bottom: 1.4rem;
}

.post-breadcrumb a { color: var(--b-teal-soft); text-decoration: none; }
.post-breadcrumb a:hover { text-decoration: underline; }

.post-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, #EC4899, #BE185D);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.post-title {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  font-weight: 800;
  color: var(--b-ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--b-muted);
}

.post-meta strong { color: var(--b-ink); }

.post-featured-img {
  max-width: 900px;
  margin: -1.5rem auto 0;
  padding: 0 1.25rem;
}

.post-featured-img img {
  width: 100%;
  height: auto;
  max-height: 520px;
  border-radius: 16px;
  box-shadow: var(--b-shadow);
  display: block;
  object-fit: contain;
  background: var(--b-cream-deep);
  margin: 0 auto;
}

/* ── Layout: content + sticky TOC sidebar ── */
.post-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) 1.25rem clamp(3.5rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.post-toc-aside {
  position: sticky;
  top: 1.5rem;
}

.post-toc {
  background: var(--b-paper);
  border: 1px solid var(--b-line);
  border-radius: 16px;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.post-toc-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--b-teal);
  margin: 0 0 1rem;
}

.post-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-toc li { margin: 0; }

.post-toc li.toc-h3 { padding-left: 0.9rem; }

.post-toc a {
  display: block;
  padding: 0.5rem 0.6rem;
  border-left: 2px solid var(--b-line);
  color: var(--b-muted);
  font-size: 0.84rem;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.post-toc a:hover { color: var(--b-teal-soft); text-decoration: none; }

.post-toc a.active {
  color: var(--b-teal);
  font-weight: 600;
  border-left-color: var(--b-teal-soft);
  background: var(--b-cream);
}

.post-toc-cta {
  margin-top: 1.4rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--b-line);
  text-align: center;
}

.post-toc-cta p {
  font-size: 0.8rem;
  color: var(--b-muted);
  margin: 0 0 0.8rem;
  line-height: 1.5;
}

.post-toc-cta button {
  width: 100%;
  padding: 0.7rem 0.5rem;
  border: none;
  border-radius: 9px;
  background: linear-gradient(90deg, #EC4899, #BE185D);
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-toc-cta button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(190, 24, 93, 0.28);
}

/* ── Article body typography ── */
.post-content {
  font-size: 1rem;
  line-height: 1.85;
  color: #334155;
}

.post-content h2 {
  font-family: "Poppins", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--b-ink);
  margin: 2.6rem 0 1.1rem;
  scroll-margin-top: 1.5rem;
}

.post-content h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--b-ink);
  margin: 2rem 0 0.9rem;
  scroll-margin-top: 1.5rem;
}

.post-content p { margin: 0 0 1.3rem; }

.post-content ul, .post-content ol {
  margin: 0 0 1.3rem;
  padding-left: 1.4rem;
}

.post-content li { margin-bottom: 0.5rem; }

.post-content a { color: var(--b-teal-soft); text-decoration: underline; }

.post-content img {
  width: 100%;
  border-radius: 12px;
  margin: 1.6rem 0;
}

.post-content blockquote {
  margin: 1.8rem 0;
  padding: 1.2rem 1.5rem;
  border-left: 3px solid var(--b-teal-soft);
  background: var(--b-cream);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--b-ink);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.9rem;
}

.post-content th, .post-content td {
  border: 1px solid var(--b-line);
  padding: 0.65rem 0.9rem;
  text-align: left;
}

.post-content th { background: var(--b-cream); font-weight: 700; }

/* ── Author byline card (end of article) ── */
.post-author-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 2.4rem 0 0;
  padding: 1.4rem 1.6rem;
  background: var(--b-cream);
  border: 1px solid var(--b-line);
  border-radius: 16px;
  text-decoration: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.post-author-card:hover {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.post-author-avatar {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--b-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.post-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-author-info .post-author-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--b-teal-soft);
  margin-bottom: 0.2rem;
}

.post-author-info strong {
  display: block;
  font-size: 1.02rem;
  color: var(--b-ink);
  margin-bottom: 0.15rem;
}

.post-author-info span {
  display: block;
  font-size: 0.83rem;
  color: var(--b-muted);
}

.post-author-arrow {
  margin-left: auto;
  flex: none;
  color: var(--b-teal-soft);
}

/* ── Inline CTA block (usable inside post content) ── */
.post-inline-cta {
  margin: 2.2rem 0;
  background: linear-gradient(135deg, #4a3faa, #7c72ff);
  border-radius: 16px;
  padding: 1.8rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.post-inline-cta p {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.post-inline-cta button {
  padding: 0.85rem 1.6rem;
  border: none;
  border-radius: 8px;
  background: #fff;
  color: #4a3faa;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-inline-cta button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* ── Bottom CTA banner ── */
.post-bottom-cta {
  margin-top: 3rem;
  background: var(--b-cream);
  border: 1px solid var(--b-line);
  border-radius: 18px;
  padding: 2.2rem;
  text-align: center;
}

.post-bottom-cta h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--b-ink);
  margin: 0 0 0.7rem;
}

.post-bottom-cta p {
  color: var(--b-muted);
  margin: 0 0 1.4rem;
}

.post-bottom-cta button {
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #EC4899, #BE185D);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-bottom-cta button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(190, 24, 93, 0.28);
}

/* ── Related posts ── */
.post-related {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem clamp(3.5rem, 7vw, 6rem);
}

.post-related h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--b-ink);
  margin: 0 0 1.8rem;
}

/* ═══ Mobile TOC toggle ═══ */
.post-toc-mobile-toggle { display: none; }

@media (max-width: 980px) {
  .post-layout { grid-template-columns: 1fr; }

  .post-toc-aside {
    position: static;
    order: -1;
  }

  .post-toc-mobile-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.2rem;
    background: var(--b-paper);
    border: 1px solid var(--b-line);
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--b-teal);
    cursor: pointer;
  }

  .post-toc-aside .post-toc { display: none; margin-top: 0.7rem; }
  .post-toc-aside.open .post-toc { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-page * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
