/* ============================================================
   blog.css — Shared styles for blog posts and listing pages
   Used on: /en/blog/, /en/blog/<slug>/, /en/blog/category/*, /en/blog/tag/*
   Load after main.css
   ============================================================ */

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--primary); }
.breadcrumb-sep { margin: 0 0.35rem; }
.breadcrumb-current { color: var(--text); }

/* ── Layout ───────────────────────────────────────────────── */
.blog-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .blog-layout { grid-template-columns: 1fr; } }
.blog-main { min-width: 0; }
.blog-sidebar { position: sticky; top: 6rem; }

/* ── Sidebar ───────────────────────────────────────────────── */
.blog-sidebar .sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.blog-sidebar .sidebar-card h3 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--subtle); }
.blog-sidebar .sidebar-list { list-style: none; margin: 0; padding: 0; }
.blog-sidebar .sidebar-list li { margin: 0.35rem 0; }
.blog-sidebar .sidebar-list a { color: var(--text); font-size: 0.95rem; }
.blog-sidebar .sidebar-list a:hover { color: var(--primary); }
.sidebar-cta-card { text-align: center; }
.sidebar-cta-btn { display: block; width: 100%; text-align: center; box-sizing: border-box; }
.sidebar-view-all { margin-top: 0.75rem; font-size: 0.9rem; }
.sidebar-view-all a { font-weight: 500; }

/* ── Blog post (article) ───────────────────────────────────── */
.blog-title { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-bottom: 0.75rem; line-height: 1.25; }
.post-date { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.blog-meta { margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.blog-category { font-weight: 600; color: var(--primary); }
.blog-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.tag-pill { display: inline-block; padding: 0.25rem 0.65rem; border-radius: 999px; background: var(--border); color: var(--text); font-size: 0.85rem; }
.tag-pill:hover { background: var(--primary); color: var(--white); }
.blog-content.prose { max-width: 72ch; }
.blog-content.prose h2 { margin-top: 1.75rem; margin-bottom: 0.6rem; font-size: 1.35rem; }
.blog-content.prose h3 { margin-top: 1.25rem; margin-bottom: 0.5rem; font-size: 1.15rem; }
.blog-content.prose ul, .blog-content.prose ol { margin: 0.75rem 0; padding-left: 1.5rem; }
.blog-content.prose li { margin: 0.25rem 0; }
.blog-cta { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.cta-button { display: inline-block; padding: 0.75rem 1.25rem; background: var(--primary); color: var(--white); border-radius: var(--radius-sm); font-weight: 600; }
.cta-button:hover { background: var(--accent); }
.blog-share-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.blog-related-posts { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.blog-related-title { font-size: 1.2rem; margin-bottom: 1rem; color: var(--subtle); }
.blog-related-view-all { margin-top: 1rem; font-size: 0.95rem; }
.blog-related-view-all a { font-weight: 600; }

/* ── Index & listing page titles ───────────────────────────── */
.blog-index-title { font-size: clamp(1.5rem, 3vw, 1.85rem); margin-bottom: 1rem; }
.blog-listing-title { font-size: clamp(1.5rem, 3vw, 1.85rem); margin-bottom: 1rem; }
.blog-listing-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.blog-category-block { margin-bottom: 2.5rem; }
.blog-category-block h2 { font-size: 1.2rem; color: var(--primary); margin-bottom: 1rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--border); }

/* ── Blog index filter nav ─────────────────────────────────── */
.blog-filter-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.blog-filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid #007bff;
  background: transparent;
  color: #007bff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.blog-filter-btn:hover { background: rgba(0, 123, 255, 0.1); color: #007bff; }
.blog-filter-btn.active { background: #007bff; color: #fff; }

/* ── Cards (posts grid) ────────────────────────────────────── */
.blog-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
@media (max-width: 900px) { .blog-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .blog-cards { grid-template-columns: 1fr; } }
.blog-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: box-shadow 0.2s, transform 0.2s; }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.blog-card a { display: block; color: inherit; }
.blog-card-img { aspect-ratio: 16/10; background: var(--border); overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 1rem 1.25rem; }
.blog-card-title { font-size: 1rem; font-weight: 600; line-height: 1.35; color: var(--text); }
.blog-card:hover .blog-card-title { color: var(--primary); }













/* .chart-container {
  max-width: 800px;
  margin: 20px auto;
  font-family: sans-serif;
}


.chart-legend {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 14px;
}
.legend-item { display: flex; align-items: center; }
.box { width: 12px; height: 12px; margin-right: 6px; border-radius: 2px; }


.table-chart {
  display: block; 
  width: 100%;
}

.table-chart thead { display: none; } 

.table-chart tr {
  display: grid;
 
  grid-template-columns: 80px 80px repeat(5, 1fr);
  gap: 2px;
  margin-bottom: 10px;
  align-items: center;
}


.table-chart td:nth-child(1),
.table-chart td:nth-child(2) {
  font-weight: bold;
  font-size: 13px;
  color: #555;
}


.table-chart td:nth-child(n+3) {
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: bold;
  border-radius: 2px;
  transition: transform 0.2s;
}


.table-chart td:nth-child(n+3):hover {
  transform: scaleY(1.1);
  filter: brightness(1.2);
  cursor: pointer;
}


.table-chart td:nth-child(3) { background: #3498db; } 
.table-chart td:nth-child(4) { background: #2ecc71; } 
.table-chart td:nth-child(5) { background: #f1c40f; } 
.table-chart td:nth-child(6) { background: #e67e22; }
.table-chart td:nth-child(7) { background: #e74c3c; }  */