/* =========================
   CONTENT TYPOGRAPHY
========================= */

.post-body {
  font-size: 17px;
  line-height: 1.8;
  color: #374151;
  margin-top: 1.2rem;
}

/* Paragraph */
.post-body p {
  margin-bottom: 1.4em;
  font-size: 18px;
}

/* Heading */
.post-body h2 {
  margin-bottom: 1.2rem;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  font-family: "Exo2";
}

.post-body h3 {
  margin-top: 2.4rem;
  margin-bottom: 0.8rem;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  font-family: "Exo2";
}

/* List spacing */
.post-body ul,
.post-body ol {
  margin: 1.2em 0 1.6em 1.4em;
}

.post-body li {
  margin-bottom: 0.6em;
  line-height: 1.7;
}

/* Blockquote */
.post-body blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.6rem;
  background: #f8fafc;
  border-left: 4px solid #6366f1;
  color: #475569;
  font-style: italic;
}

/* Image spacing */
.post-body img {
  margin: 2.4rem 0;
  border-radius: 12px;
}

/* Code */
.post-body pre {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  background: #0f172a;
  color: #e5e7eb;
  overflow-x: auto;
}

.post-body code {
  background: #f1f5f9;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* Horizontal rule */
.post-body hr {
  margin: 3rem 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

/* Table */
.post-body table {
  margin: 2.5rem 0;
  width: 100%;
  border-collapse: collapse;
}

.post-body th,
.post-body td {
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
}

.post-body th {
  background: #f9fafb;
  font-weight: 600;
}

/* PROGRESS BAR */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  z-index: 9999;
  transition: width 0.15s ease-out;
}

/* LAYOUT */
.single-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* =========================
   TOC SIDEBAR
========================= */

.toc-sidebar {
  position: sticky;
  top: 125px;
  max-height: calc(100vh - 120px);
}

.toc-box {
  padding-left: 16px;
  border-left: 4px solid #e5e7eb;
}

.toc-box h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.toc-list {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 8px;
}

/* scrollbar */
.toc-list::-webkit-scrollbar {
  width: 4px;
}
.toc-list::-webkit-scrollbar-thumb {
  background: #c7d2fe;
  border-radius: 4px;
}

/* =========================
   TOC ITEM
========================= */

.toc-item {
  padding: 14px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.toc-parent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #475569;
}

.toc-parent .arrow {
  transition: transform 0.3s ease;
  font-size: 14px;
}

.toc-parent.open .arrow {
  transform: rotate(180deg);
}

/* =========================
   MOBILE TOC
========================= */

.toc-mobile {
  display: none;
}

@media (max-width: 1024px) {
  .toc-mobile {
    display: block;
    position: sticky;
    top: 85px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
  }

  .toc-mobile-toggle {
    width: 100%;
    padding: 14px 16px;
    background: #f1f5ff;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: #4f46e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }

  .toc-mobile-toggle svg {
    transition: transform 0.3s ease;
  }

  .toc-mobile.open .toc-mobile-toggle svg {
    transform: rotate(180deg);
  }

  .toc-mobile-panel {
    display: none;
    background: #fff;
    max-height: 70vh;
    overflow-y: auto;
    padding: 8px 16px 16px;
  }

  .toc-mobile.open .toc-mobile-panel {
    display: block;
  }

  /* TOC ITEM MOBILE */
  #toc-mobile .toc-item {
    padding: 12px 0;
    border-bottom: 1px dashed #e5e7eb;
  }

  #toc-mobile .toc-parent {
    font-size: 16px;
    font-weight: 500;
    color: #475569;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  #toc-mobile .toc-parent.active {
    background: #eef2ff;
    padding: 10px 12px;
    border-radius: 12px;
    color: #1d4ed8;
    font-weight: 600;
  }

  #toc-mobile .toc-children {
    margin-top: 10px;
  }

  #toc-mobile .toc-children a {
    display: block;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 14px;
    color: #64748b;
    border-radius: 8px;
  }

  #toc-mobile .toc-children a.active {
    background: #f1f1f1;
    color: #000000;
    font-weight: 600;
  }

  /* hide desktop sidebar */
  .toc-sidebar {
    display: none;
  }
}

/* =========================
   ACTIVE H2 (PARENT)
========================= */

/* ACTIVE H2 */
.toc-parent.active {
  color: #000000;
  font-weight: 600;
}

.toc-parent.active .toc-title {
  background: #f1f1f1;
  padding: 6px 8px;
  border-radius: 6px;
  width: 100%;
}

.toc-parent.active-parent {
  color: #000000;
  font-weight: 600;
}

.toc-parent.active-parent .toc-title {
  position: relative;
}

.toc-parent.active-parent .toc-title::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 6px;
  width: 6px;
  height: 6px;
  background: #6366f1;
  border-radius: 50%;
}

/* =========================
   SUB (H3)
========================= */

.toc-children {
  display: none;
  margin-top: 12px;
  max-height: 220px;
  overflow-y: auto;
}

.toc-children::-webkit-scrollbar {
  width: 3px;
}
.toc-children::-webkit-scrollbar-thumb {
  background: #000;
}

.toc-children a {
  display: block;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  width: 95%;
  border-bottom: 1px dashed #e5e7eb;
  font-family: "Exo2";
}

.toc-children a:hover {
  background: #f1f1f1;
  width: 95%;
}

.toc-children a.active {
  background: #f1f1f1;
  color: #000000;
  font-weight: 600;
  width: 95%;
}

/* CONTENT */
.post-title {
  font-size: 38px;
  line-height: 1.2;
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
  font-family: "Conthrax";
}

#post-category,
a {
  text-decoration: none;
  color: #000;
  font-family: "Exo2";
}

.featured-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-top: 24px;
}

.post-body h2,
.post-body h3 {
  scroll-margin-top: 100px;
}

/* SHARE */
.share-sidebar {
  position: sticky;
  top: 100px;
}

.share-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share {
  text-align: center;
  padding: 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-weight: 600;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .single-container {
    grid-template-columns: 1fr;
  }
  .toc-sidebar,
  .share-sidebar {
    display: none;
  }
}

/* ============================= */
/* RELATED POSTS */
/* ============================= */

.related-posts {
  margin-top: 0px;
  padding-top: 25px;
  border-top: 1px solid #eee;
}

.related-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
  font-family: "Exo2";
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.related-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,.05);
  transition: transform .25s ease, box-shadow .25s ease;
}

.related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0,0,0,.08);
}

.related-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.related-content {
  padding: 18px;
}

.related-category {
  font-size: 12px;
  text-transform: uppercase;
  color: #1f5b3f;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.related-heading {
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 10px;
}

.related-heading a {
  text-decoration: none;
  color: #222;
}

.related-heading a:hover {
  color: #1f5b3f;
}

.related-date {
  font-size: 13px;
  color: #777;
}

@media (max-width: 1024px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: 1fr;
  }

  .related-title {
    font-size: 22px;
  }
}

.hero-blog {
  padding: 80px 5%;
  background: #e8e5e1;
  font-family: Inter, sans-serif;
}

.hero-blog-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 60px;
}

/* LEFT SIDE */
.hero-blog-content h1 {
  font-size: 48px;
  line-height: 1.2;
  margin: 20px 0;
}

.hero-blog-content h1 span {
  color: #1f5b3f;
}

.hero-blog-content p {
  color: #666;
  max-width: 420px;
  margin-bottom: 28px;
}

.hero-badge {
  display: inline-block;
  background: #fff;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 14px;
  box-shadow: 0 5px 15px rgba(0,0,0,.05);
}

.hero-actions {
  display: flex;
  gap: 20px;
}

@media (max-width: 1024px) {
  .hero-blog-container {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .hero-blog-slider {
    order: 2;
  }

  .blog-card {
    min-width: 85%;
  }
  .latest-articles{
      padding:20px !important;
  }
}

@media (max-width: 640px) {
  .hero-blog-content h1 {
    font-size: 32px;
  }

  .blog-card {
    min-width: 92%;
  }

  .slider-arrow {
    bottom: -70px;
  }
}

.btn-primary {
  background: #1f5b3f;
  color: #fff;
  padding: 14px 26px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
}

.btn-link {
  align-self: center;
  color: #333;
  text-decoration: underline;
}

/* RIGHT SLIDER */
.hero-blog-slider {
  position: relative;
  overflow: hidden;
  padding-bottom: 70px; /* space for arrows */
}

.blog-track {
  display: flex;
  gap: 24px;
  will-change: transform;
}

.blog-track.dragging {
  cursor: grabbing;
  transition: none;
}

.blog-card {
  min-width: 75%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  user-select: none;
}


.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 9; /* atau 4 / 3 kalau mau lebih tinggi */
  object-fit: cover;
  display: block;
}

.blog-info {
  padding: 16px 18px 20px;
}

.blog-info h4 {
  margin: 0 0 6px;
}

.blog-info span {
  color: #777;
  font-size: 14px;
}

/* ARROWS */
.slider-arrow {
  position: absolute;
  bottom: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  cursor: pointer;
  z-index: 5;
}

.prev {
  left: 0px;
  background: #a4896c;
  color: #fff;
}

.next {
  left: 70px;
  background: #a4896c;
  color: #fff;
}

.latest-articles {
  padding: 80px 80px;
  background: #dad9d7;
  font-family: "Inter", sans-serif;
  padding-bottom: 80px;
}

.container {
  margin: auto;
}

/* HEADER */
.articles-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 50px;
  gap: 40px;
}

.badge {
  display: inline-block;
  background: #d8f5df;
  color: #1b6b3a;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 15px;
}

.articles-header h2 {
  font-size: 40px;
  line-height: 1.2;
  margin: 0;
  color: #103d52;
  max-width: 600px;
}

.articles-header p {
  max-width: 420px;
  color: #5f7c8a;
  font-size: 15px;
  line-height: 1.7;
}

/* GRID */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* CARD */
.article-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.05);
  transition: transform .25s ease, box-shadow .25s ease;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}

.article-card img {
  width: 100%;
  aspect-ratio: 16 / 9; /* atau 4 / 3 kalau mau lebih tinggi */
  object-fit: cover;
  display: block;
}

.article-content {
  padding: 18px 20px 22px;
}

.article-content a {
  color: #000000;
  text-decoration: none;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.category {
  background: #e6f2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 12px;
}

.date {
  font-size: 12px;
  color: #7c8b95;
}

.article-content h3 {
  font-size: 15px;
  line-height: 1.6;
  color: #163b4d;
  margin: 0;
}

@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .articles-header {
    flex-direction: column;
  }

  .articles-header p {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .articles-header h2 {
    font-size: 28px;
  }
}

.pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination .dots {
  pointer-events: none;
  background: transparent;
}

/* Default style */
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  background: #f5f5f5;
  color: #222;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Hover */
.pagination .page-numbers:hover {
  background: #000;
  color: #fff;
}

/* Active page */
.pagination .page-numbers.current {
  background: #000;
  color: #fff;
  font-weight: 600;
}

/* Prev / Next */
.pagination .prev,
.pagination .next {
  padding: 0 18px;
}

@media (max-width: 992px) {
  .pagination {
    gap: 8px;
  }

  .pagination .page-numbers {
    min-width: 38px;
    height: 38px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .pagination {
    gap: 6px;
  }

  .pagination .page-numbers {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
    padding: 0 10px;
    border-radius: 6px;
  }

  .pagination .prev,
  .pagination .next {
    padding: 0 12px;
  }
}