/* ================================================================
   JEMIXO BLOG — listing, category and article pages
   Uses the site tokens from style.css (--font-h, --text-*, --border)
   ================================================================ */

/* ── Hero ── */
.blog-hero {
  position: relative;
  padding: 132px 0 48px;
  background: #F7F8F5;
  border-bottom: 1px solid #E3E8E1;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -100px;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 181, 116, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: 100px;
  background: #FFFFFF;
  border: 1px solid #DCE4DA;
  font-size: 0.75rem; font-weight: 700;
  color: #1E6B37;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
.blog-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #5BB574; }
.blog-hero h1 {
  font-family: var(--font-h);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  color: #0A0D0D;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 16px 0 12px;
  max-width: 820px;
}
.blog-hero-sub {
  font-size: 1.05rem;
  color: #4A5550;
  line-height: 1.65;
  max-width: 680px;
}

/* ── Toolbar: categories + search ── */
.blog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-top: 28px;
}
.blog-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid #DCE4DA;
  background: #FFFFFF;
  color: #4A5550;
  font-size: 0.84rem; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.blog-chip:hover { border-color: #5BB574; color: #182C25; }
.blog-chip.active { background: #182C25; border-color: #182C25; color: #FFFFFF; }
.blog-chip .count { font-size: 0.72rem; opacity: 0.7; }
.blog-search { display: flex; gap: 6px; flex: 0 1 320px; }
.blog-search input {
  flex: 1; min-width: 0;
  padding: 9px 14px;
  border: 1px solid #DCE4DA;
  border-radius: 100px;
  background: #FFFFFF;
  font-size: 0.88rem;
  color: #0A0D0D;
  outline: none;
}
.blog-search input:focus { border-color: #5BB574; box-shadow: 0 0 0 3px rgba(91, 181, 116, 0.15); }
.blog-search button {
  padding: 9px 16px;
  border-radius: 100px;
  background: #182C25; color: #FFFFFF;
  font-size: 0.84rem; font-weight: 700;
}

/* ── Listing ── */
.blog-section { padding: 48px 0 80px; background: #FFFFFF; }
.blog-results-note { font-size: 0.92rem; color: #4A5550; margin-bottom: 24px; }
.blog-results-note a { color: #2E8549; font-weight: 600; }

.blog-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  border: 1px solid #E3E8E1;
  border-radius: 20px;
  overflow: hidden;
  background: #FFFFFF;
  margin-bottom: 40px;
  text-decoration: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.blog-featured:hover { box-shadow: 0 18px 48px rgba(24, 44, 37, 0.10); transform: translateY(-2px); }
.blog-featured .bf-media { background: #EDF1EB; min-height: 300px; }
.blog-featured .bf-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-featured .bf-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.blog-featured .bf-label { font-size: 0.72rem; font-weight: 800; color: #1E6B37; letter-spacing: 0.08em; text-transform: uppercase; }
.blog-featured h2 { font-family: var(--font-h); font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; color: #0A0D0D; line-height: 1.25; letter-spacing: -0.02em; }
.blog-featured p { color: #4A5550; line-height: 1.65; font-size: 0.98rem; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card {
  display: flex; flex-direction: column;
  border: 1px solid #E3E8E1;
  border-radius: 16px;
  overflow: hidden;
  background: #FFFFFF;
  text-decoration: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.blog-card:hover { box-shadow: 0 14px 36px rgba(24, 44, 37, 0.09); transform: translateY(-3px); border-color: #DCE3D9; }
.blog-card .bc-media { aspect-ratio: 16 / 9; background: #EDF1EB; overflow: hidden; }
.blog-card .bc-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.blog-card:hover .bc-media img { transform: scale(1.03); }
.bc-placeholder, .bf-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #EAF4EC 0%, #D4E9D0 100%);
  color: #182C25;
  font-family: var(--font-h); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em;
}
.bc-placeholder .j, .bf-placeholder .j { color: #5BB574; }
.blog-card .bc-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card h3 { font-family: var(--font-h); font-size: 1.08rem; font-weight: 700; color: #0A0D0D; line-height: 1.4; }
.blog-card p { font-size: 0.88rem; color: #55625B; line-height: 1.6; flex: 1; }

.blog-cat-tag {
  align-self: flex-start;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  background: #E1F4E7; color: #1E6B37;
  border: 1px solid #C4E7CE;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 0.8rem; color: #738078; }
.blog-meta span { display: inline-flex; align-items: center; gap: 5px; }

.blog-empty { text-align: center; padding: 70px 20px; border: 1px dashed #DCE4DA; border-radius: 16px; color: #4A5550; }
.blog-empty .be-icon { font-size: 2.4rem; margin-bottom: 10px; }
.blog-empty h3 { font-family: var(--font-h); font-size: 1.25rem; color: #0A0D0D; margin-bottom: 6px; }
.blog-empty a { color: #2E8549; font-weight: 700; }

.blog-pagination { margin-top: 44px; }
.blog-pagination .pagination { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.blog-pagination .pagination a, .blog-pagination .pagination span {
  min-width: 40px; height: 40px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid #DCE4DA;
  font-size: 0.88rem; font-weight: 700;
  color: #4A5550; text-decoration: none;
}
.blog-pagination .pagination a:hover { border-color: #5BB574; color: #182C25; }
.blog-pagination .pagination .active { background: #182C25; border-color: #182C25; color: #FFFFFF; }

/* ── Article ── */
.post-hero { padding: 128px 0 36px; background: #F7F8F5; border-bottom: 1px solid #E3E8E1; }
/* Same width as .post-layout so the title lines up with the article text */
.post-hero-inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.post-hero-inner > * { max-width: 800px; }
.post-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.8rem; color: #738078; margin-bottom: 18px; }
.post-crumbs a { color: #4A5550; text-decoration: none; font-weight: 600; }
.post-crumbs a:hover { color: #2E8549; }
.post-hero h1 {
  font-family: var(--font-h);
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  font-weight: 800;
  color: #0A0D0D;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin: 14px 0 16px;
}
.post-lead { font-size: 1.1rem; color: #4A5550; line-height: 1.7; margin-bottom: 20px; }
.post-author { display: flex; align-items: center; gap: 12px; }
.post-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #182C25; color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; flex-shrink: 0;
}
.post-author-name { font-weight: 700; color: #0A0D0D; font-size: 0.92rem; }

.preview-banner {
  position: sticky; top: 0; z-index: 900;
  background: #FEF3C7; color: #78350F;
  border-bottom: 1px solid #FCD34D;
  text-align: center;
  font-size: 0.85rem; font-weight: 600;
  padding: 10px 16px;
}
.preview-banner a { color: #78350F; text-decoration: underline; }

.post-cover { max-width: 1080px; margin: 32px auto 0; padding: 0 24px; }
.post-cover img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 18px; display: block; border: 1px solid #E3E8E1; }

.post-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 56px;
  align-items: start;
}
.post-layout.no-toc { grid-template-columns: minmax(0, 760px); justify-content: center; }

.post-toc { position: sticky; top: 110px; }
.post-toc-title { font-size: 0.72rem; font-weight: 800; color: #738078; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.post-toc ol { list-style: none; border-left: 2px solid #E3E8E1; padding: 0; margin: 0; }
.post-toc li a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 0.84rem; line-height: 1.45;
  color: #55625B; text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.post-toc li.lvl-3 a { padding-left: 26px; font-size: 0.8rem; }
.post-toc li a:hover, .post-toc li a.active { color: #182C25; border-left-color: #5BB574; font-weight: 600; }
.post-toc-mobile { display: none; }

/* Article typography */
.post-content { font-size: 1.06rem; line-height: 1.8; color: #2A3530; overflow-wrap: break-word; }
.post-content > *:first-child { margin-top: 0; }
.post-content h2 {
  font-family: var(--font-h);
  font-size: 1.6rem; font-weight: 800;
  color: #0A0D0D;
  letter-spacing: -0.02em; line-height: 1.3;
  margin: 2.2em 0 0.7em;
  scroll-margin-top: 110px;
}
.post-content h3 {
  font-family: var(--font-h);
  font-size: 1.25rem; font-weight: 700;
  color: #0A0D0D; line-height: 1.35;
  margin: 1.8em 0 0.6em;
  scroll-margin-top: 110px;
}
.post-content h4 { font-size: 1.08rem; font-weight: 700; color: #0A0D0D; margin: 1.5em 0 0.5em; }
.post-content p { margin: 0 0 1.25em; }
.post-content a { color: #2E8549; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: #182C25; }
.post-content strong { color: #0A0D0D; }
.post-content ul, .post-content ol { margin: 0 0 1.25em; padding-left: 1.5em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.45em; }
.post-content li::marker { color: #5BB574; }
.post-content blockquote {
  margin: 1.6em 0;
  padding: 16px 22px;
  border-left: 4px solid #5BB574;
  background: #F4F7F2;
  border-radius: 0 12px 12px 0;
  color: #26362C;
  font-size: 1.04rem;
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid #E3E8E1; margin: 0.6em 0; display: block; }
.post-content hr { border: none; border-top: 1px solid #E3E8E1; margin: 2.4em 0; }
.post-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86em;
  background: #EDF1EB; color: #182C25;
  padding: 2px 6px; border-radius: 6px;
}
.post-content pre {
  background: #0E1B16; color: #E2EAE4;
  padding: 18px 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 0 0 1.4em;
  font-size: 0.88rem; line-height: 1.6;
}
.post-content pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.post-content .table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid #E3E8E1; border-radius: 12px; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.post-content th { background: #F4F7F2; color: #0A0D0D; font-weight: 700; text-align: left; }
.post-content th, .post-content td { padding: 10px 14px; border-bottom: 1px solid #E3E8E1; }
.post-content tr:last-child td { border-bottom: none; }

/* Share + CTA */
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; padding-top: 24px; border-top: 1px solid #E3E8E1; }
.post-share-label { font-size: 0.82rem; font-weight: 700; color: #4A5550; margin-right: 4px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid #DCE4DA;
  background: #FFFFFF;
  font-size: 0.8rem; font-weight: 700;
  color: #182C25; text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.share-btn:hover { border-color: #5BB574; background: #F0F9F3; }

.post-cta {
  margin-top: 40px;
  padding: 28px;
  border-radius: 18px;
  background: #182C25;
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.post-cta h3 { font-family: var(--font-h); font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; color: #FFFFFF; }
.post-cta p { color: #CBD4C8; font-size: 0.92rem; line-height: 1.55; max-width: 460px; }
.post-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.post-cta-actions a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px;
  border-radius: 100px;
  font-size: 0.88rem; font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.post-cta-actions .primary { background: #5BB574; color: #0A0D0D; }
.post-cta-actions .primary:hover { background: #6DC986; }
.post-cta-actions .ghost { border: 1px solid rgba(255, 255, 255, 0.25); color: #FFFFFF; }
.post-cta-actions .ghost:hover { background: rgba(255, 255, 255, 0.08); }

.related-section { background: #F7F8F5; border-top: 1px solid #E3E8E1; padding: 56px 0 72px; }
.related-section h2 { font-family: var(--font-h); font-size: 1.6rem; font-weight: 800; color: #0A0D0D; margin-bottom: 24px; letter-spacing: -0.02em; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 808px; }
  .post-toc { display: none; }
  .post-toc-mobile {
    display: block;
    margin-bottom: 28px;
    border: 1px solid #E3E8E1;
    border-radius: 12px;
    background: #F7F8F5;
  }
  .post-toc-mobile summary { padding: 12px 16px; font-weight: 700; font-size: 0.9rem; color: #182C25; cursor: pointer; }
  .post-toc-mobile ol { list-style: none; padding: 0 16px 12px; margin: 0; }
  .post-toc-mobile li a { display: block; padding: 6px 0; font-size: 0.88rem; color: #4A5550; text-decoration: none; }
  .post-toc-mobile li.lvl-3 a { padding-left: 14px; }
}
@media (max-width: 768px) {
  .blog-hero { padding: 116px 0 36px; }
  .post-hero { padding: 112px 0 28px; }
  .post-hero-inner { padding: 0 16px; }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured .bf-media { min-height: 0; aspect-ratio: 16 / 9; }
  .blog-featured .bf-body { padding: 22px; }
  .blog-search { flex: 1 1 100%; }
  .post-cover { margin-top: 20px; padding: 0 16px; }
  .post-cover img { border-radius: 12px; }
  .post-layout { padding: 28px 16px 56px; }
  .post-content { font-size: 1rem; line-height: 1.75; }
  .post-content h2 { font-size: 1.35rem; }
  .post-content h3 { font-size: 1.15rem; }
  .post-cta { padding: 22px; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-section { padding: 32px 0 60px; }
}
