/* ============================================================================
   reinwok.com — blog.css
   Loaded on /blog/** only, AFTER site.css.

   From blog/blog-styles.css with everything that moved into site.css removed
   (design tokens, reset, .container, header/nav/dropdown, .logo-image,
   .page-header, footer, .docs-nav-dropdown). What remains is the listing grid
   and the article chrome.
   ============================================================================ */

/* --------------------------------------------------------- Listing page -- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: -40px auto 60px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.blog-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.blog-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-tag {
  display: inline-block;
  background: rgba(12, 114, 136, 0.1);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
}

.blog-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-card-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-light);
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}
.blog-card-meta i { margin-right: 4px; }

/* ------------------------------------------- Article chrome (blog.njk) -- */
/* layouts/blog.njk renders .blog-article > .blog-article-header (gradient hero
   with breadcrumb / h1 / lead / date) + .blog-article-body (the white card).
   The breadcrumb colors for this hero live in site.css next to .page-header. */
/* `position: relative` is load-bearing, not decoration: this is a <header>
   element, and any bare `header {}` rule in site.css would otherwise take it
   out of flow. It also gives .blog-article-body (z-index 1) something to
   overlap. Padding mirrors .page-header (132/56) plus the 24px the body card
   pulls up, so the overlap eats padding, never text. */
.blog-article-header {
  position: relative;
  z-index: 0;
  padding: 132px 0 80px;
  background: var(--gradient-primary);
  color: white;
  text-align: center;
}
.blog-article-header h1 {
  font-size: 40px;
  font-weight: var(--fw-heading);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-wrap: balance;
}

.blog-article-lead {
  font-size: 18px;
  line-height: 1.7;
  opacity: 0.95;
  max-width: 720px;
  margin: 0 auto;
}

.blog-article-meta {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 16px;
}

/* Overrides the .container defaults it also carries. */
.blog-article-body {
  max-width: 880px;
  margin: -24px auto 72px;
  padding: 48px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}

/* ------------------------------- Legacy sidebar layout (still supported) -- */
.blog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: -40px auto 60px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.blog-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.blog-sidebar::-webkit-scrollbar { width: 4px; }
.blog-sidebar::-webkit-scrollbar-track { background: transparent; }
.blog-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

/* Scoped to .blog-sidebar so the shared .sidebar-nav name cannot collide with
   the docs sidebar rules in docs.css. */
.blog-sidebar .sidebar-nav {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
}
.blog-sidebar .sidebar-nav .nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 0 8px 8px;
}
.blog-sidebar .sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.blog-sidebar .sidebar-nav ul li a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}
.blog-sidebar .sidebar-nav ul li a:hover {
  color: var(--primary-color);
  background: rgba(12, 114, 136, 0.04);
  border-left-color: var(--primary-color);
}
.blog-sidebar .sidebar-nav ul li a.active {
  color: var(--primary-color);
  font-weight: 600;
  border-left-color: var(--primary-color);
  background: rgba(12, 114, 136, 0.06);
}

.sidebar-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.sidebar-back:hover {
  color: var(--primary-color);
  background: rgba(12, 114, 136, 0.04);
}

/* -------------------------------------------------------- Article content -- */
.blog-content {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 48px;
  box-shadow: var(--shadow-md);
  min-width: 0;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--bg-secondary);
  flex-wrap: wrap;
}
.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-light);
}
.article-meta-item i { color: var(--primary-color); }

.article-tag {
  display: inline-block;
  background: rgba(12, 114, 136, 0.1);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.key-takeaways {
  background: linear-gradient(135deg, rgba(54, 179, 126, 0.08) 0%, rgba(0, 135, 90, 0.04) 100%);
  border-left: 4px solid var(--secondary-color);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 40px;
}
.key-takeaways h3 {
  font-size: 18px;
  font-weight: 700;
  color: #006644;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.key-takeaways ol { padding-left: 20px; margin: 0; }
.key-takeaways li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}
.key-takeaways li strong { color: var(--text-primary); }

.article-section { margin-bottom: 48px; scroll-margin-top: 100px; }
.article-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-secondary);
}
.article-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 14px;
}
.article-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.article-section ul,
.article-section ol { padding-left: 24px; margin-bottom: 16px; }
.article-section li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.article-section li strong { color: var(--text-primary); }

.article-image {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin: 24px 0;
  border: 1px solid var(--border-color);
}

.image-caption {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin-top: -16px;
  margin-bottom: 24px;
  font-style: italic;
}

/* ------------------------------------------------------------ Data tables -- */
.comparison-table-wrapper,
.pricing-table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.comparison-table,
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.comparison-table thead th {
  background: var(--bg-dark);
  color: white;
  padding: 14px 12px;
  font-weight: 600;
  text-align: left;
}
.comparison-table thead th:first-child { width: 22%; border-radius: 12px 0 0 0; }
.comparison-table thead th:nth-child(2),
.comparison-table thead th:nth-child(3),
.comparison-table thead th:nth-child(4) { width: 26%; }
.comparison-table thead th:last-child { border-radius: 0 12px 0 0; }
.comparison-table thead th.highlight-col { background: var(--primary-color); }

.comparison-table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: top;
  word-wrap: break-word;
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody td:first-child { font-weight: 600; color: var(--text-primary); }
.comparison-table tbody td.highlight-col { background: rgba(12, 114, 136, 0.03); }
.comparison-table .check { color: var(--secondary-color); font-weight: 700; }
.comparison-table .cross { color: #C0392B; font-weight: 700; }
.comparison-table .partial { color: #A85C06; font-weight: 600; }

.pricing-table thead th {
  background: var(--bg-dark);
  color: white;
  padding: 14px 16px;
  font-weight: 600;
  text-align: center;
}
.pricing-table thead th:first-child {
  text-align: left;
  border-radius: 12px 0 0 0;
}
.pricing-table thead th:last-child { border-radius: 0 12px 0 0; }
.pricing-table thead th.highlight-col { background: var(--primary-color); }

.pricing-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
}
.pricing-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}
.pricing-table tbody td.highlight-col {
  background: rgba(12, 114, 136, 0.03);
  font-weight: 600;
  color: var(--primary-color);
}
.pricing-table .free-badge {
  display: inline-block;
  background: var(--secondary-color);
  color: white;
  padding: 2px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
}

/* --------------------------------------------------------------- Callouts -- */
.feature-box {
  background: linear-gradient(135deg, rgba(12, 114, 136, 0.06) 0%, rgba(81, 181, 207, 0.03) 100%);
  border-left: 4px solid var(--primary-color);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 24px 0;
}
.feature-box h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feature-box p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0;
}

.limitation-box {
  background: rgba(222, 53, 11, 0.04);
  border-left: 4px solid #DE350B;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
}
.limitation-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: #BF2600;
  margin-bottom: 8px;
}
.limitation-box ul { padding-left: 20px; margin: 0; }
.limitation-box li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 4px;
}

.faq-item {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.faq-item h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.faq-item p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }

/* ---------------------------------------------------------- In-article CTA -- */
/* Scoped to .blog-content: site.css owns the full-bleed marketing
   .cta-section and this one is a rounded card inside the article. */
.blog-content .cta-section,
.blog-article-body .cta-section {
  background: var(--gradient-primary);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  margin: 48px 0 0;
  overflow: visible;
}
.blog-content .cta-section::before,
.blog-content .cta-section::after,
.blog-article-body .cta-section::before,
.blog-article-body .cta-section::after { content: none; }
.blog-content .cta-section h2,
.blog-article-body .cta-section h2 {
  color: white;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  border: none;
  padding: 0;
}
.blog-content .cta-section p,
.blog-article-body .cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  margin-bottom: 28px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--primary-color);
  padding: 14px 36px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  margin-top: 16px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
.cta-secondary:hover { opacity: 1; }

/* ------------------------------------------------------------- Trusted by -- */
.trusted-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 24px 0;
  opacity: 0.6;
}
.trusted-logos img {
  height: 32px; width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}
.trusted-logos img:hover { filter: grayscale(0%); }

/* ------------------------------------------------------------- Responsive -- */
@media (max-width: 1024px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: relative; top: auto; max-height: none; }
  .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .blog-content,
  .blog-article-body { padding: 32px 20px; }
  .blog-article-header { padding: 104px 0 64px; }
  .blog-article-header h1 { font-size: 30px; }
  .article-meta { gap: 12px; }
  .blog-content .cta-section,
  .blog-article-body .cta-section { padding: 32px 24px; }
  .trusted-logos { gap: 24px; }
  .trusted-logos img { height: 24px; width: auto; }
}

@media (max-width: 480px) {
  .article-section h2 { font-size: 22px; }
  .blog-article-header h1 { font-size: 26px; }
  .blog-content,
  .blog-article-body { padding: 24px 16px; }
  .comparison-table,
  .pricing-table { font-size: 13px; }
  .key-takeaways { padding: 20px; }
}
