/* ==========================================================================
   JPG ke PDF — blog.css
   Daftar blog, kartu, filter kategori, paginasi, dan tampilan pos tunggal.
   ========================================================================== */

/* ---------- Filter kategori ---------- */
.blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: var(--space-7);
}
.blog-cats__btn {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--slate-700);
  font-weight: 600;
  font-size: 0.88rem;
  font-family: var(--font-display);
  transition: all var(--dur) var(--ease);
}
.blog-cats__btn:hover { border-color: var(--indigo); color: var(--indigo-deep); }
.blog-cats__btn.is-active { background: var(--indigo); color: var(--white); border-color: var(--indigo); }

/* ---------- Grid blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.blog-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--slate-100); }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.blog-card:hover .blog-card__media img { transform: scale(1.05); }
.blog-card__cat {
  position: absolute;
  top: 0.85rem; left: 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--white);
  background: rgba(5, 26, 127, 0.85);
  backdrop-filter: blur(4px);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
}
.blog-card__body { display: flex; flex-direction: column; gap: 0.6rem; padding: var(--space-5); flex: 1; }
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.blog-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--slate-400); }
.blog-card__title { font-size: 1.18rem; line-height: 1.3; }
.blog-card__title a { color: var(--navy); }
.blog-card__title a:hover { color: var(--indigo-deep); }
.blog-card__excerpt { font-size: 0.9rem; color: var(--text-muted); flex: 1; }
.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--indigo-deep);
  font-family: var(--font-display);
  margin-top: 0.25rem;
}
.blog-card__link svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.blog-card__link:hover svg { transform: translateX(3px); }

.blog-empty { text-align: center; padding: var(--space-8); color: var(--text-muted); }

/* ---------- Paginasi ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-8);
}
.pagination a, .pagination span {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate-700);
  font-family: var(--font-display);
  transition: all var(--dur) var(--ease);
}
.pagination a:hover { border-color: var(--indigo); color: var(--indigo-deep); }
.pagination [aria-current="page"] { background: var(--indigo); color: var(--white); border-color: var(--indigo); }
.pagination .is-disabled { opacity: 0.45; pointer-events: none; }
.pagination svg { width: 18px; height: 18px; }

/* ---------- Home: strip blog ---------- */
.home-blog__foot { text-align: center; margin-top: var(--space-7); }

/* ---------- Pos tunggal ---------- */
.post-hero {
  background:
    radial-gradient(50rem 30rem at 20% -20%, rgba(87, 93, 199, 0.25), transparent 60%),
    var(--slate-900);
  color: var(--text-on-dark);
  padding-block: var(--space-7) var(--space-8);
}
.post-hero__inner { max-width: var(--container-narrow); margin-inline: auto; text-align: center; }
.post-hero__cat {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #B7BCFF;
  background: rgba(87, 93, 199, 0.25);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
}
.post-hero__title { font-size: var(--fs-post-h1); line-height: 1.2; color: var(--white); margin-bottom: var(--space-4); }
.post-hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-on-dark);
  font-family: var(--font-mono);
}
.post-hero__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--slate-400); }
.post-hero .breadcrumb { justify-content: center; margin-bottom: var(--space-4); }
.post-hero .breadcrumb a { color: #B7BCFF; }
.post-hero .breadcrumb [aria-current="page"] { color: var(--text-on-dark); }

.post-featured { max-width: 1080px; margin: calc(-1 * var(--space-7)) auto var(--space-7); position: relative; z-index: 2; }
.post-featured img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ---------- Tata letak pos: isi + sidebar lengket ---------- */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-7);
  align-items: start;
  max-width: 1080px;
  margin-inline: auto;
  padding-bottom: var(--space-8);
}
.post-main { min-width: 0; }

.post-sidebar { position: sticky; top: calc(var(--header-h) + 1.25rem); align-self: start; }
.post-sidebar__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-height: calc(100vh - var(--header-h) - 2.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  /* bilah gulir disembunyikan, gulir tetap berfungsi */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.post-sidebar__inner::-webkit-scrollbar { width: 0; height: 0; }

.post-sidebar .post-toc {
  margin: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.post-toc__title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.post-toc__list { display: flex; flex-direction: column; gap: 0.15rem; margin: 0; counter-reset: toc; list-style: none; }
.post-toc__list li { counter-increment: toc; }
.post-toc__list a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--slate-700);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.post-toc__list a::before { content: counter(toc) ". "; color: var(--slate-400); font-family: var(--font-mono); font-size: 0.78rem; }
.post-toc__list a:hover { background: var(--indigo-soft); color: var(--indigo-deep); }
.post-toc__list a.is-active {
  background: var(--indigo-soft);
  border-left-color: var(--indigo);
  color: var(--indigo-deep);
  font-weight: 600;
}

.post-aside-cta {
  background: linear-gradient(140deg, var(--indigo), var(--navy));
  color: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-align: center;
}
.post-aside-cta h2 { font-size: 1.02rem; color: var(--white); margin-bottom: 0.4rem; }
.post-aside-cta p { font-size: 0.85rem; color: rgba(255, 255, 255, 0.85); margin-bottom: var(--space-4); line-height: 1.6; }
.post-aside-cta .btn { width: 100%; background: var(--white); color: var(--navy); box-shadow: none; }
.post-aside-cta .btn:hover { background: var(--indigo-soft); color: var(--navy); }

.post-body { max-width: 100%; }
.post-body > p, .post-body > ul, .post-body > ol { font-size: var(--fs-post-body); line-height: 1.8; }
.post-body h2 { font-size: var(--fs-post-h2); line-height: 1.3; margin-top: var(--space-7); margin-bottom: var(--space-3); }
.post-body h2:first-child { margin-top: 0; }
.post-body h3 { font-size: var(--fs-post-h3); line-height: 1.35; margin-top: var(--space-5); margin-bottom: var(--space-2); }
.post-body p { margin-bottom: var(--space-4); color: var(--text-body); }
.post-body ul, .post-body ol { margin: 0 0 var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: 0.55rem; }
.post-body ul li { position: relative; padding-left: 1.6rem; list-style: none; }
.post-body ul li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 2px; background: var(--indigo); }
.post-body ol { list-style: decimal; margin-left: var(--space-5); }
.post-body ol li { padding-left: 0.35rem; }
.post-body a { color: var(--indigo-deep); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.post-body strong { color: var(--navy); }
.post-body blockquote {
  border-left: 4px solid var(--indigo);
  padding: var(--space-4) var(--space-5);
  background: var(--indigo-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-5) 0;
  font-size: 1.05rem;
  color: var(--slate-700);
}
.post-body img { border-radius: var(--radius-md); margin: var(--space-5) 0; box-shadow: var(--shadow-sm); }
.post-body figure { margin: var(--space-5) 0; }
.post-body figcaption { font-size: 0.82rem; color: var(--text-muted); text-align: center; margin-top: 0.5rem; }

.post-callout {
  display: flex;
  gap: var(--space-4);
  background: var(--green-soft);
  border: 1px solid #B7E7C6;
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin: var(--space-6) 0;
}
.post-callout__icon { flex-shrink: 0; color: var(--green-deep); }
.post-callout__icon svg { width: 26px; height: 26px; }
.post-callout p { margin: 0; font-size: 0.94rem; color: var(--slate-700); }
.post-callout strong { color: var(--green-deep); }

/* tabel dalam pos */
.post-body .table-wrap { overflow-x: auto; margin: var(--space-5) 0; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 480px; }
.post-body th, .post-body td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.post-body th { background: var(--indigo-soft); color: var(--navy); font-family: var(--font-display); font-weight: 600; }
.post-body tr:nth-child(even) td { background: var(--slate-100); }

/* bagikan */
.post-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}
.post-share__label { font-weight: 600; font-size: 0.88rem; color: var(--navy); font-family: var(--font-display); }
.post-share__buttons { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.post-share a,
.post-share__btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--slate-700);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.post-share a:hover,
.post-share__btn:hover { background: var(--indigo); color: var(--white); border-color: var(--indigo); transform: translateY(-2px); }
.post-share a svg,
.post-share__btn svg { width: 18px; height: 18px; }

/* pos terkait */
.related-posts { background: var(--slate-100); padding-block: var(--space-8); border-top: 1px solid var(--border); }
.related-posts__title { font-size: var(--fs-h2); text-align: center; margin-bottom: var(--space-6); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

/* author box */
.author-box {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-top: var(--space-6);
  max-width: 100%;
}
.author-box__avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--magenta));
  color: var(--white);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.author-box__name { font-family: var(--font-display); font-weight: 700; color: var(--navy); }
.author-box__role { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.author-box__bio { font-size: 0.9rem; color: var(--text-muted); }

/* toc di dalam badan artikel (opsional) */
.post-body .post-toc {
  background: var(--indigo-soft);
  border: 1px solid #D5D8F6;
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin: var(--space-6) 0;
}
.post-body .post-toc h2 { font-size: 1.05rem; margin: 0 0 var(--space-3); font-family: var(--font-display); }
.post-body .post-toc ol { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; counter-reset: toc; }
.post-body .post-toc li { counter-increment: toc; }
.post-body .post-toc a { color: var(--indigo-deep); font-size: 0.9rem; font-weight: 500; }
.post-body .post-toc a::before { content: counter(toc) ". "; color: var(--slate-400); }
