/* Base blog post styles – shared by all posts.
   Keep it minimal, readable, and easy to override per-post.
*/

/* Blog container - centers the post */
.blog-container {
  display: flex;
  justify-content: center;
  padding: 40px 24px;
}

@media (min-width: 768px) {
  .blog-container {
    padding: 40px 32px;
  }
}

@media (min-width: 1200px) {
  .blog-container {
    padding: 40px 48px;
  }
}

/* Layout */
.post {
  width: 100%;
  max-width: 1100px;
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: 0 0 16px rgba(0,0,0,0.04);
}

@media (min-width: 768px) {
  .post {
    padding: 32px 40px;
  }
}

@media (min-width: 1200px) {
  .post {
    padding: 40px 48px;
  }
}

.post__hero img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin-bottom: 18px;
}

.post__title {
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.post__meta {
  color: #6b7280;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.post__dot::before {
  content: "•";
}

/* Author / Reviewer Byline */
.post__byline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.byline-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.byline-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.byline-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-weight: 600;
  font-size: 16px;
}

.byline-info {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.3;
}

.byline-label {
  color: #6b7280;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.byline-name {
  color: #0f172a;
}

.byline-creds {
  color: #64748b;
  font-size: 13px;
}

/* Callouts */
.post__callout {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0 18px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.post__callout--info {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 1em 1.2em;
  margin: 1.5em 0;
}

/* Two-column content with sticky TOC on wide screens */
.post__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 1200px) {
  .post__layout {
    grid-template-columns: 240px 1fr;
  }
  .post__toc {
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding-right: 12px;
  }
}

/* TOC */
.post__toc {
  font-size: 14px;
  border-left: 2px solid #e5e7eb;
  padding-left: 12px;
}

.post__toc a {
  color: #374151;
  text-decoration: none;
}

.post__toc a:hover {
  text-decoration: underline;
}

/* --- Fix text layout for blog posts --- */
.wysiwyg {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #111827;
  max-width: 100%;
  margin: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Fix paragraphs */
.wysiwyg p {
  margin: 1em 0;
  white-space: normal;
}

/* Fix headings */
.wysiwyg h1,
.wysiwyg h2,
.wysiwyg h3 {
  font-weight: 700;
  margin: 2em 0 0.5em;
  line-height: 1.3;
  color: #0f172a;
}

.wysiwyg h2 {
  font-size: 24px;
}

.wysiwyg h3 {
  font-size: 20px;
}

/* Lists */
.wysiwyg ul,
.wysiwyg ol {
  margin: 1em 0 1em 1.5em;
}

.wysiwyg li {
  margin: 6px 0;
}

/* Links */
.wysiwyg a {
  color: #2563eb;
  text-decoration: underline;
}

.wysiwyg a:hover {
  text-decoration: none;
}

/* Blockquotes */
.wysiwyg blockquote {
  border-left: 4px solid #cbd5e1;
  padding-left: 1em;
  color: #475569;
  font-style: italic;
  margin: 1.5em 0;
}

.wysiwyg img {
  max-width: 100%;
  border-radius: 12px;
}

.wysiwyg table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.wysiwyg th,
.wysiwyg td {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  text-align: left;
}

/* CTA Banner — links to ranking page */
.post__cta-banner {
  margin-top: 40px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 12px;
  padding: 32px 28px;
  text-align: center;
}

.cta-banner__inner {
  max-width: 520px;
  margin: 0 auto;
}

.cta-banner__heading {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.cta-banner__sub {
  font-size: 15px;
  color: #94a3b8;
  margin: 0 0 20px;
  line-height: 1.5;
}

.cta-banner__btn {
  display: inline-block;
  padding: 12px 28px;
  background: #0ea5e9;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}

.cta-banner__btn:hover {
  background: #0284c7;
}

/* Sources and Related */
.post__sources,
.post__related {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.post__sources h2,
.post__related h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.post__sources ol {
  padding-left: 24px;
}

.post__sources li {
  margin-bottom: 8px;
}

.post__related ul {
  list-style: none;
  padding-left: 0;
}

.post__related li {
  margin-bottom: 8px;
}

.post__related a {
  color: #2563eb;
  text-decoration: none;
}

.post__related a:hover {
  text-decoration: underline;
}

/* Footer */
.post__footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.share {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  text-decoration: none;
  color: #111827;
}

.share:hover {
  background: #f3f4f6;
}

/* Section variants */
.section {
  margin-bottom: 28px;
}

.section--tip {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 12px 14px;
}

.section--warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 12px 14px;
}

.section--quote {
  border-left: 4px solid #cbd5e1;
  padding-left: 14px;
  color: #475569;
}

.section__image img {
  max-width: 100%;
  border-radius: 12px;
  margin: 16px 0;
}

.section__cta .btn {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #111827;
  border-radius: 999px;
  text-decoration: none;
  color: #111827;
  font-weight: 600;
}

.section__cta .btn:hover {
  background: #111827;
  color: #fff;
}

.subsection {
  margin-top: 16px;
  margin-left: 16px;
}

