/* Blog index and article pages. Loaded after style.css on blog pages only. */

/* ---------- Hero (shared) ---------- */
.blog-hero {
  padding-top: calc(var(--nav-h) + 3.5rem);
  padding-bottom: 3.5rem;
  background: linear-gradient(135deg, #f3eaff 0%, #e9d5ff 50%, #f0e8ff 100%);
}
.blog-hero.center { text-align: center; }
.blog-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(71, 19, 150, 0.1);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 2rem;
  border: 1px solid rgba(71, 19, 150, 0.2);
  margin-bottom: 1.25rem;
}
.blog-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 1rem;
  line-height: 1.2;
}
@media (min-width: 640px) { .blog-hero h1 { font-size: 2.85rem; } }
.blog-hero .blog-lead {
  font-size: 1.1rem;
  color: var(--gray-600);
  line-height: 1.65;
  max-width: 44rem;
  margin: 0;
}
.blog-hero.center .blog-lead { margin: 0 auto; }

/* ---------- Article hero ---------- */
.post-hero-inner { max-width: 48rem; margin: 0 auto; }
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--gray-600);
}
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 0.35rem; color: #b9a3d9; }
.breadcrumbs a { color: var(--secondary); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover, .breadcrumbs a:focus-visible { text-decoration: underline; }
.breadcrumbs [aria-current="page"] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 22rem;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.5rem;
  color: var(--gray-600);
  font-size: 0.95rem;
}
.post-meta span { display: inline-flex; align-items: center; gap: 0.45rem; }
.post-meta i { color: var(--secondary); }

/* ---------- Article body ---------- */
.post-main { background: #fff; padding: 3.5rem 0 4.5rem; }
.post-body {
  max-width: 48rem;
  margin: 0 auto;
  color: var(--gray-700);
  font-size: 1.075rem;
  line-height: 1.8;
}
.post-body > p, .post-body section > p { margin: 0 0 1.15rem; }
.post-body h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
  margin: 2.75rem 0 0.9rem;
}
.post-body h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.75rem 0 0.6rem;
}
.post-body ul, .post-body ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.post-body li { margin-bottom: 0.5rem; }
.post-body li::marker { color: var(--secondary); }
.post-body a { color: var(--secondary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover, .post-body a:focus-visible { color: var(--primary); }
.post-body strong { color: var(--gray-900); }

.key-takeaways {
  background: #fcfaff;
  border: 1px solid #efe4ff;
  border-left: 4px solid var(--secondary);
  border-radius: 0 1rem 1rem 0;
  padding: 1.5rem 1.75rem;
  margin: 0 0 2.25rem;
}
.post-body .key-takeaways h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.key-takeaways ul { margin: 0; }
.key-takeaways li { margin-bottom: 0.35rem; }

.post-table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  min-width: 32rem;
}
.post-body th, .post-body td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid #efe4ff;
  vertical-align: top;
}
.post-body th { color: var(--primary); font-family: var(--font-heading); background: #fcfaff; }

.post-note {
  font-size: 0.95rem;
  color: var(--gray-600);
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}

/* FAQ */
.post-faq { margin-top: 3rem; }
.post-faq details {
  border: 1px solid #efe4ff;
  border-radius: 0.85rem;
  margin-bottom: 0.75rem;
  background: #fff;
}
.post-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after {
  content: '+';
  font-size: 1.4rem;
  line-height: 1;
  color: var(--secondary);
  flex-shrink: 0;
}
.post-faq details[open] summary::after { content: '\2212'; }
.post-faq details p { margin: 0; padding: 0 1.25rem 1.1rem; }

/* CTA */
.post-cta {
  margin-top: 3rem;
  padding: 2.25rem 1.75rem;
  border-radius: 1.25rem;
  background: var(--primary);
  color: #fff;
  text-align: center;
}
.post-body .post-cta h2 { color: #fff; margin: 0 0 0.6rem; font-size: 1.5rem; }
.post-cta p { color: rgba(255, 255, 255, 0.88); margin: 0 0 1.5rem; }
.post-cta .cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.post-body .post-cta a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}
.post-body .post-cta a.primary { background: #fff; color: var(--primary); }
.post-body .post-cta a.primary:hover, .post-body .post-cta a.primary:focus-visible { background: #f3eaff; }
.post-body .post-cta a.secondary { color: #fff; border: 2px solid rgba(255, 255, 255, 0.5); }
.post-body .post-cta a.secondary:hover, .post-body .post-cta a.secondary:focus-visible { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
@media (max-width: 639px) {
  .post-cta .cta-actions a { flex: 1 1 100%; }
}

/* ---------- Blog index + related-articles wrappers (cards live in style.css) ---------- */
.blog-list { background: #fff; padding: 4rem 0 5rem; }
.related-posts { background: #fcfaff; padding: 4rem 0 4.5rem; }
.related-posts h2, .blog-list .list-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 1.75rem;
  text-align: center;
}
