/* ============================================================
   Reinwok Blog — Styles
   ============================================================ */

/* --- Design Tokens (shared with docs) --- */
:root {
  --primary-color: #0052CC;
  --primary-dark: #0747A6;
  --primary-light: #4C9AFF;
  --secondary-color: #36B37E;
  --text-primary: #172B4D;
  --text-secondary: #5E6C84;
  --text-light: #7A869A;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F4F5F7;
  --bg-dark: #091E42;
  --border-color: #DFE1E6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --gradient-primary: linear-gradient(135deg, #0052CC 0%, #4C9AFF 100%);
}

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background: var(--bg-secondary);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Fixed Header (injected by components.js) --- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-links {
  display: flex; gap: 32px; align-items: center; list-style: none;
}
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-weight: 500; font-size: 15px; transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--primary-color); }

.dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.dropdown-content {
  position: absolute; top: 100%; left: 0;
  background: white; border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 8px; min-width: 240px;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: all 0.3s ease; margin-top: 12px;
}
.dropdown:hover .dropdown-content { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-content a { display: block; padding: 12px 16px; border-radius: 8px; transition: background 0.2s ease; }
.dropdown-content a:hover { background: var(--bg-secondary); }

/* --- Page Header (gradient hero) --- */
.page-header {
  padding: 140px 0 60px;
  background: var(--gradient-primary);
  color: white;
  text-align: center;
}
.page-header h1 { font-size: 48px; font-weight: 800; margin-bottom: 16px; }
.page-header p { font-size: 18px; opacity: 0.95; max-width: 700px; margin: 0 auto; }

/* ================================================================
   BLOG 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(0, 82, 204, 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 PAGE — Layout
   ================================================================ */

.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;
}

/* --- Sidebar (TOC) --- */
.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; }

.sidebar-nav {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.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;
}

.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }

.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;
}

.sidebar-nav ul li a:hover {
  color: var(--primary-color);
  background: rgba(0, 82, 204, 0.04);
  border-left-color: var(--primary-color);
}

.sidebar-nav ul li a.active {
  color: var(--primary-color);
  font-weight: 600;
  border-left-color: var(--primary-color);
  background: rgba(0, 82, 204, 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(0, 82, 204, 0.04);
}

/* --- Main Article Content --- */
.blog-content {
  background: white;
  border-radius: 16px;
  padding: 48px;
  box-shadow: var(--shadow-md);
  min-width: 0;
}

/* Article metadata */
.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(0, 82, 204, 0.1);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

/* --- Key Takeaways Box --- */
.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 Sections --- */
.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 Images --- */
.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;
}

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

.comparison-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%;
}

.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:first-child {
  border-radius: 12px 0 0 0;
}

.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(0, 82, 204, 0.03);
}

.comparison-table .check {
  color: var(--secondary-color);
  font-weight: 700;
}

.comparison-table .cross {
  color: #DE350B;
  font-weight: 700;
}

.comparison-table .partial {
  color: #FF991F;
  font-weight: 600;
}

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

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

.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(0, 82, 204, 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;
}

/* --- Feature Highlight Boxes --- */
.feature-box {
  background: linear-gradient(135deg, rgba(0, 82, 204, 0.06) 0%, rgba(76, 154, 255, 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;
}

/* Competitor limitation box */
.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: #5E6C84;
  line-height: 1.6;
  margin-bottom: 4px;
}

/* --- CTA Section --- */
.cta-section {
  background: var(--gradient-primary);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  margin: 48px 0 0;
}

.cta-section h2 {
  color: white;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  border: none;
  padding: 0;
}

.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;
}

/* --- FAQ Section --- */
.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;
}

/* --- Trusted By Section --- */
.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;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.trusted-logos img:hover {
  filter: grayscale(0%);
}

/* --- Footer (injected by components.js) --- */
footer { background: var(--bg-dark); color: white; padding: 60px 0 30px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand h3 { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.7); line-height: 1.7; margin-bottom: 24px; }
.footer-links h4 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.3s ease; font-size: 15px; }
.footer-links a:hover { color: white; }
.footer-bottom {
  padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
}
.footer-bottom p { color: rgba(255,255,255,0.6); font-size: 14px; }

/* --- 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; }
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .page-header h1 { font-size: 32px; }
  .blog-content { padding: 32px 20px; }
  .article-meta { gap: 12px; }
  .cta-section { padding: 32px 24px; }
  .footer-content { grid-template-columns: 1fr; }
  .trusted-logos { gap: 24px; }
  .trusted-logos img { height: 24px; }
}

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

/* Docs nav dropdown shared styles */
.docs-nav-dropdown {
  min-width: 380px !important;
}

.docs-nav-dropdown a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.docs-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
}

.docs-nav-text {
  display: flex;
  flex-direction: column;
}

.docs-nav-text strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.docs-nav-text span {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 400;
}

.logo-image {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.dropdown-toggle {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
}
