/* =====================
   ARTICLE PAGE BASE STYLE
===================== */

.article-content {
  max-width: 760px;   /* sebelumnya 800, ini lebih enak baca */
  margin: 60px auto;
  padding: 0 20px 40px;
  line-height: 1.7;
  color: #222;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 14px;
  margin-bottom: 15px;
  color: #777;
}

.breadcrumb a {
  text-decoration: none;
  color: #1c377e;
}

.breadcrumb span {
  margin-left: 5px;
}

/* Judul artikel */
#judul-artikel {
  font-size: 30px;
  line-height: 1.3;
  margin-bottom: 15px;
  color: #1c377e;
}

.article-content[dir="rtl"] #judul-artikel {
  direction: rtl;
  text-align: right;
}

/* Meta info */
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 14px;
  color: #666;
  margin-bottom: 25px;
}

/* =========================
   ARTICLE PAGE BACKGROUND
========================= */
body.article-page {
  background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 25%, #14b8a6 50%, #0d9488 75%, #115e59 100%);
  background-attachment: fixed;
}

body.article-page::before {
  display: none;
}

.meta .category {
  background: #1c377e;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}

/* View count (local estimate) — beside date */
.meta .article-view-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(28, 55, 126, 0.09);
  color: #1c377e;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(28, 55, 126, 0.12);
}

.meta .article-view-stat .fa-eye {
  font-size: 0.88em;
  opacity: 0.88;
}

#isi-artikel h3 {
  margin: 30px 0 15px;
  color: #1c377e;
}

/* Prev / Next */
.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.article-nav .nav-link {
  text-decoration: none;
  color: #1c377e;
  font-weight: 600;
}

/* Not found */
#not-found {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 40px;
}

/* =====================
   RELATED ARTICLES
===================== */

.related-articles {
  margin-top: 50px;
  border-top: 1px solid #ddd;
  padding-top: 30px;
}

.related-articles h3 {
  margin-bottom: 20px;
  color: #1c377e;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.related-card {
  background: #a883136b;
  border-radius: 10px;
  padding: 15px;
}

.related-card .category {
  display: inline-block;
  font-size: 12px;
  background: #1c377e;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.related-card h4 {
  font-size: 15px;
  margin: 10px 0;
}

.related-card a {
  text-decoration: none;
  color: #1c377e;
  font-weight: 600;
}

/* =====================
   ARTIKEL TERKAIT
===================== */
.related-articles {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #7995cf;
}

.related-articles h3 {
  margin-bottom: 18px;
  font-size: 20px;
  color: #314268;
}

.related-articles .articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

/* =====================
   SHARE BUTTONS
===================== */
.share-buttons {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.share-btn {
  background: #0f172a;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.share-btn.wa {
  background: #22c55e;
}

.share-btn:hover {
  transform: translateY(-1px);
}

/* Dark mode */
body.dark .share-btn {
  background: #1e293b;
}


.related-card a.related-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.related-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
}

.related-read {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: #2563eb;
  font-weight: 500;
}

/* =====================
   HERO SECTION
===================== */

.hero {
  position: relative;
  height: 420px;
  background: url("..assets/images/header.jpg") center / cover no-repeat;
  display: flex;
  align-items: center;
  padding: 40px 60px;
  color: #fff;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(2, 6, 23, 0.85),
    rgba(2, 6, 23, 0.4)
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.hero-content h1 {
  font-size: 44px;
  margin-bottom: 14px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #e5e7eb;
  margin-bottom: 22px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: #facc15;
  color: #1f2933;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(250, 204, 21, 0.35);
}

.btn-secondary {
  display: inline-block;
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ===== DARK MODE ===== */
body.dark {
  background: #0f172a;
  color: #e5e7eb;
}

body.dark .article-content {
  background: #020617;
}

body.dark .navbar {
  background: #020617;
}

body.dark a {
  color: #93c5fd;
}

body.dark .category,
body.dark .meta span {
  background: #1e293b;
  color: #e5e7eb;
}

body.dark .meta .article-view-stat {
  background: rgba(30, 41, 59, 0.95);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.22);
}

/* =========================
   RELATED ARTICLES DARK MODE
========================= */

body.dark .related-articles h3{

color:#1083f6;

margin-bottom:20px;

}


/* CARD */

body.dark .related-card{

background:linear-gradient(180deg,#0f172a,#020617);

border-radius:16px;

overflow:hidden;

border:1px solid rgba(56,189,248,0.25);

box-shadow:
0 10px 25px rgba(0,0,0,0.7);

transition:all .35s ease;

}


/* hover */

body.dark .related-card:hover{

transform:translateY(-6px);

border-color:#38bdf8;

box-shadow:
0 18px 35px rgba(0,0,0,0.8),
0 0 12px rgba(56,189,248,0.35);

}

/* gambar */

.related-thumb{

width:100%;

height:140px;

object-fit:cover;

display:block;

}


/* teks */

body.dark .related-card h4{

color:#e2df29;

font-size:16px;

margin-top:8px;

}


/* kategori */

body.dark .related-card .category{

color:#38bdf8;

font-size:12px;

}


/* tombol baca */

body.dark .related-read{

color:#38bdf8;

font-size:13px;

}

body.dark .related-read:hover{

color:#7dd3fc;

}


/* grid */

.related-list{

display:grid;

grid-template-columns:repeat(auto-fit,minmax(220px,1fr));

gap:20px;

margin-top:20px;

}

.quote-box {
  position: fixed;
  bottom: 90px;
  right: 16px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  z-index: 999;
  animation: fadeUp .25s ease;
}

.quote-box button {
  background: #22c55e;
  color: #052e16;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================
   DARK MODE - GLOBAL
===================== */
body.dark {
  background: #0b1220;
  color: #e5e7eb;
}

/* Navbar */
body.dark .navbar {
  background: linear-gradient(135deg, #020617, #0b2c5f);
  color: #fff;
}

/* Artikel Card */
body.dark .article-content {
  background: #020617;
}

/* Judul */
body.dark #judul-artikel {
  color: #f9fafb;
}

/* Isi Artikel */
body.dark #article-body {
  color: #e5e7eb;
  line-height: 1.85;
}

/* Paragraf */
body.dark #article-body p {
  color: #d1d5db;
}

/* Heading di artikel */
body.dark #article-body h2,
body.dark #article-body h3 {
  color: #facc15;
}

/* Breadcrumb */
body.dark .breadcrumb a {
  color: #93c5fd;
}

/* Category badge */
body.dark .category {
  background: #1e293b;
  color: #93c5fd;
}

/* Smooth transition */
body,
.article-content,
.navbar,
.reader-btn,
.category {
  transition: background 0.3s ease, color 0.3s ease;
}

/* Card artikel */
body.dark .article-content {
  background: #020617;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

/* Meta info */
body.dark .meta span {
  color: #9ca3af;
}

/* Link */
body.dark a {
  color: #93c5fd;
}

body.dark a:hover {
  color: #bfdbfe;
}

/* =====================
   TEKS ARTIKEL RAPI (JUSTIFY)
===================== */

#isi-artikel {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.85;
  font-size: 16px;
  color: #1f2937;
}

/* AR: rata kiri–kanan seperti ID/EN, baca tetap RTL */
#isi-artikel[dir="rtl"],
#isi-artikel[lang="ar"] {
  text-align: justify;
  text-justify: inter-word;
}

#isi-artikel p {
  margin-bottom: 1.1em;
}

#isi-artikel h2,
#isi-artikel h3 {
  text-align: left;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

/* DARK MODE ARTICLE TEXT */

body.dark #isi-artikel {
  color: #e5e7eb;
}

body.dark #isi-artikel p {
  color: #d1d5db;
}

/* =====================
   QUOTE BOX
===================== */

.quote-box {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 18px;
  max-width: 520px;
  width: calc(100% - 32px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  display: none;
  z-index: 9999;
}

.quote-box p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
  color: #1f2937;
}

.quote-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.quote-actions button {
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

#copyQuote {
  background: #e5e7eb;
}

#waQuote {
  background: #22c55e;
  color: white;
}

#closeQuote {
  background: #ef4444;
  color: white;
}

/* DARK MODE */
body.dark .quote-box {
  background: #020617;
}

body.dark .quote-box p {
  color: #e5e7eb;
}

.remove-bookmark {
  position: absolute;
  top: 10px;
  right: 10px;

  border: none;
  background: #ef4444;
  color: #fff;

  width: 28px;
  height: 28px;
  border-radius: 50%;

  font-size: 0.9rem;
  cursor: pointer;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bookmark-item.active .remove-bookmark {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

body.dark .remove-bookmark {
  background: #dc2626;
}

.nav-bookmark {
  position: relative;
  font-size: 1.1rem;
  color: inherit;
  text-decoration: none;
}

.bookmark-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #2563eb;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 999px;
  display: none;
}

body.dark .bookmark-badge {
  background: #60a5fa;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.dark .toast {
  background: #020617;
}

.nav-bookmark.has-bookmark .bookmark-icon {
  color: #facc15; /* kuning emas */
}

/* tombol selalu ada */
.toc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  z-index: 1202;
}

.toc-toggle-icon,
.toc-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* wrapper tombol + toc */
.toc-wrap {
  position: sticky;
  top: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  margin: 14px 0 20px;
  z-index: 1200;
}

.toc.toc-float-panel {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 32px));
  margin-top: 0;
  z-index: 3000;
  max-height: min(420px, 40vh);
}

/* TOC DEFAULT */
.toc {
  display: none;
  position: sticky;
  top: 58px;
  width: 100%;
  box-sizing: border-box;
  height: 30vh;
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  z-index: 1201;

  -ms-overflow-style: none;
  scrollbar-width: none;
}

.toc::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.toc.active {
  display: block;
}

.toc h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 8px;
  color: #0b2c5f;
}

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

.toc li {
  margin-bottom: 5px;
}

.toc li.h3,
.toc li.h4 {
  padding-left: 14px;
  opacity: 0.85;
}

.toc a {
  display: block;
  font-size: 13px;
  text-decoration: none;
  color: #334155;
  line-height: 1.5;
}

.toc a:hover {
  color: #2563eb;
}

.toc a.active {
  color: #2563eb;
  font-weight: 700;
}

body.dark .toc {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(0,0,0,0.45);
}

body.dark .toc h3 {
  color: #0b2c5f;
}

body.dark .toc a {
  color: #0f172a;
}

body.dark .toc a:hover,
body.dark .toc a.active {
  color: #1d4ed8;
}

/* scrollbar desktop */
@media (min-width: 1024px) {
  .toc::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .toc::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
  }

  .toc::-webkit-scrollbar-track {
    background: transparent;
  }
}

/* mobile */
@media (max-width: 768px) {
  .toc-wrap {
    width: 100%;
  }

  .toc {
    width: 100%;
    position: static;
    height: 30vh;
    max-height: 30vh;
    padding: 12px 14px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  }
}

/* =====================
   AUTO ARABIC TEXT
===================== */

/* Default paragraf */
#isi-artikel p {
  direction: ltr;
  text-align: left;
}

/* Paragraf yang hanya berisi huruf Arab */
#isi-artikel p:lang(ar),
#isi-artikel p[dir="rtl"] {
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
  font-family: "Amiri", "Scheherazade", serif;
  font-size: 0.99em;
  line-height: 2;
}
/* === PARAGRAF === */
#isi-artikel p {
  margin: 0 0 14px 0;
  line-height: 1.8;
  text-align: justify;
}

/* === LIST (UMUM) === */
#isi-artikel ul,
#isi-artikel ol {
  margin: 8px 0 18px 0;
  padding-left: 24px;
}

/* === ITEM LIST === */
#isi-artikel li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* === LIST SETELAH PARAGRAF === */
#isi-artikel p + ul,
#isi-artikel p + ol {
  margin-top: 6px;
}

/* === LIST SEBELUM PARAGRAF === */
#isi-artikel ul + p,
#isi-artikel ol + p {
  margin-top: 12px;
}

/* === BLOCKQUOTE / DALIL === */
#isi-artikel blockquote {
  margin: 22px 0;
  padding: 18px 20px;
  background: rgba(37, 99, 235, 0.06);
  border-left: 4px solid #2563eb;
  border-radius: 14px;
}

#isi-artikel blockquote .quote-arabic {
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
  font-family: "Amiri", "Scheherazade New", serif;
  font-size: 1.35em;
  line-height: 1.9;
  color: #0f172a;
  margin: 0;
}

#isi-artikel blockquote .quote-translation {
  direction: ltr;
  text-align: left;
  font-style: italic;
  line-height: 1.8;
  color: #475569;
  margin-top: 12px;
  white-space: pre-line;
}


/* =========================
   DARK MODE
   ========================= */
body.dark {

  /* === TEKS ARAB === */
  .arabic-text {
    color: #e5e7eb;                 /* abu terang */
  }

  .arabic-text p {
    color: #e5e7eb;
  }

  /* === PARAGRAF UMUM === */
  #isi-artikel p {
    color: #d1d5db;
  }

  /* === LIST === */
  #isi-artikel ul,
  #isi-artikel ol {
    color: #d1d5db;
  }

  #isi-artikel li {
    color: #d1d5db;
  }

  #isi-artikel blockquote {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #60a5fa;
  }

  #isi-artikel blockquote .quote-arabic {
    color: #f8fafc;
  }

  #isi-artikel blockquote .quote-translation {
    color: #cbd5e1;
  }

  /* === REFERENSI ILMIAH === */
  #isi-artikel sub {
    color: #9ca3af;
    border-left: 3px solid #60a5fa; /* biru soft dark */
    opacity: 0.9;
  }

  #isi-artikel sub em {
    color: #f3f4f6;
  }
}

.related-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

/* KHUSUS badge ID di navbar artikel (desktop; mobile: logo di tengah — style.css) */
@media (min-width: 521px) {
  .navbar .logo {
    position: relative;
    padding-left: 10px;
  }

  .navbar .logo .lang-badge {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}

/* =========================
   BACK BUTTON SPACING
========================= */
.back-btn {
  position: relative;
  z-index: 20;

  /* ATUR JARAK DI SINI */
  margin-left: 25px;   /* jarak dari kiri */
  margin-right: 5px; /* jarak ke logo */
  top: 0;             /* naik turun tombol */
}

/* Tombol back — chip glass selaras dengan logo; jarak ke teks Portal Literasi */
body.article-page .navbar .back-btn.back-btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 28px rgba(2, 6, 23, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f8fbff;
  margin-right: 14px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

body.article-page .navbar .back-btn.back-btn-glass:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
}

body.dark.article-page .navbar .back-btn.back-btn-glass {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.58);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #e5e7eb;
}

body.dark.article-page .navbar .back-btn.back-btn-glass:hover {
  background: rgba(30, 41, 59, 0.75);
}


/* ===== MOBILE LANG BADGE FIX ===== */
@media (max-width: 768px) {
  .long-badge,
  .lang-badge {
    position: static;
    margin-left: 8px;
    transform: none;
  }

  .navbar {
    display: flex;
    align-items: center;
    gap: 8px;
  }
}

/* Halaman Bookmark & Offline — bahasa di nav: hanya ikon globe */
body.bookmark-page .navbar .nav-lang-dropdown,
body.offline-page .navbar .nav-lang-dropdown {
  position: relative;
  flex-shrink: 0;
  z-index: 30;
}

body.bookmark-page .navbar .nav-lang-dropdown .lang-btn.lang-btn--globe-only,
body.offline-page .navbar .nav-lang-dropdown .lang-btn.lang-btn--globe-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 40px;
  padding: 6px 10px;
}

body.bookmark-page .navbar .nav-lang-dropdown .lang-btn.lang-btn--globe-only .lang-btn-icon,
body.offline-page .navbar .nav-lang-dropdown .lang-btn.lang-btn--globe-only .lang-btn-icon {
  font-size: 18px;
  line-height: 1;
}

body.bookmark-page .navbar .nav-lang-dropdown .lang-btn-code,
body.offline-page .navbar .nav-lang-dropdown .lang-btn-code {
  display: none !important;
}

/* Navbar artikel — mobile: back + logo rapat di kiri; tema & bookmark di kanan */
@media (max-width: 640px) {
  body.article-page .navbar {
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) auto auto auto;
    grid-template-rows: auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 0;
    padding: 14px 8px 12px !important;
    flex-wrap: nowrap !important;
  }

  body.article-page .navbar .back-btn {
    grid-column: 1;
    grid-row: 1;
    margin-left: 6px;
    margin-right: 0;
    flex-shrink: 0;
  }

  body.article-page .navbar .back-btn.back-btn-glass {
    margin-right: 0;
  }

  body.article-page .navbar .logo {
    grid-column: 2;
    grid-row: 1;
    position: static !important;
    transform: none !important;
    justify-self: start;
    margin-left: 0;
    min-width: 0;
    max-width: min(260px, calc(100vw - 200px));
    font-size: 12px;
    padding-left: 0 !important;
    pointer-events: auto;
  }

  body.article-page .navbar .logo .logo-glass {
    padding: 5px 8px;
    gap: 5px;
    max-width: 100%;
  }

  body.article-page .navbar .logo .logo-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.article-page .navbar .logo-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
  }

  body.article-page .navbar #themeToggle {
    grid-column: 4;
    grid-row: 1;
    flex-shrink: 0;
    justify-self: end;
  }

  body.article-page .navbar .nav-bookmark-icon {
    grid-column: 5;
    grid-row: 1;
    margin-left: 0 !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 17px !important;
  }

  body.article-page .navbar .nav-bookmark {
    grid-column: 6;
    grid-row: 1;
    margin-right: 4px;
    flex-shrink: 0;
  }
}

.reader-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0;
}

.article-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0;
}

.article-translate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.article-translate button {
  border: 1px solid rgba(15, 23, 42, 0.22);
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.font-size-control {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.font-size-control button {
  border: 1px solid rgba(15, 23, 42, 0.22);
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

@media (max-width: 520px) {
  .article-tools {
    justify-content: flex-start;
  }

  .article-translate {
    width: 100%;
  }

  .font-size-control {
    width: 100%;
  }

  .nav-bookmark {
    display: none;
  }
}

.focus-btn {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

/* =========================
   MODE FOKUS â€” FULL WIDTH
   ========================= */
body.focus-mode .article-content {
  max-width: 1100px;
  width: 95%;
}

body.focus-mode #article-body {
  max-width: none;
  width: 100%;
}

/* Background lebih tenang saat fokus */
body.focus-mode {
  background: #0f172a;
}

/* Artikel seperti kartu baca */
body.focus-mode #article-body {
  background: white;
  padding: 40px 50px;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

/* ============================= */
/* PROGRESS BAR ATAS ARTIKEL */
/* ============================= */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #4cd457, #2dd07f);
  z-index: 9999;
  transition: width 0.15s linear;
}

/* ===============================
   DARK + FOCUS MODE
=============================== */

body.dark.focus-mode {
  background: #0b1220;
}

/* area artikel */
body.dark.focus-mode .article-content {
  background: transparent;
}

/* kartu artikel */
body.dark.focus-mode #article-body {
  background: #0f172a;
  color: #e5e7eb;
  box-shadow: none;
}

/* paragraf */
body.dark.focus-mode #article-body p {
  color: #cbd5f5;
}

/* judul */
body.dark.focus-mode #article-body h1,
body.dark.focus-mode #article-body h2,
body.dark.focus-mode #article-body h3 {
  color: #f8fafc;
}

/* kutipan */
body.dark.focus-mode blockquote {
  background: rgba(59, 130, 246, 0.08);
  border-left: 4px solid #3b82f6;
  color: #dbeafe;
}

/* teks arab */
body.dark.focus-mode .arabic-text {
  color: #f1f5f9;
}

/* link */
body.dark.focus-mode a {
  color: #60a5fa;
}

/* garis */
body.dark.focus-mode hr {
  border-color: rgba(255, 255, 255, 0.08);
}

/* tombol & tools agak redup */
body.dark.focus-mode .article-tools,
body.dark.focus-mode .reader-controls {
  opacity: 0.6;
}

/* ===============================
   RECOMMENDED ARTICLES â€“ COLOR CARDS
=============================== */

.recommended-section {
  margin-top: 48px;
}

.recommended-section h3 {
  margin-bottom: 18px;
}

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

/* CARD DASAR */
.recommended-card {
  position: relative;
  display: block;
  padding: 22px;
  border-radius: 18px;
  text-decoration: none;
  color: #0f172a;
  transition: all 0.25s ease;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

/* GRADIENT WARNA OTOMATIS */
.recommended-card:nth-child(1) {
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
}

.recommended-card:nth-child(2) {
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
}

.recommended-card:nth-child(3) {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
}

/* HOVER */
.recommended-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 40px rgba(0,0,0,0.15);
}

/* KATEGORI BADGE */
.rec-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  margin-bottom: 10px;
}

/* JUDUL */
.recommended-card h4 {
  font-size: 17px;
  line-height: 1.4;
  margin: 6px 0 10px;
  font-weight: 600;
}

/* TANGGAL */
.recommended-card p {
  font-size: 13px;
  opacity: 0.65;
}

/* EFEK GLOW HALUS */
.recommended-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(255,255,255,0.35),
    transparent 60%
  );
  pointer-events: none;
}

/* DARK MODE */
body.dark .recommended-card {
  color: #f1f5f9;
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}

body.dark .recommended-card:nth-child(1) {
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

body.dark .recommended-card:nth-child(2) {
  background: linear-gradient(135deg, #4c1d95, #020617);
}

body.dark .recommended-card:nth-child(3) {
  background: linear-gradient(135deg, #065f46, #020617);
}

/* Grid Artikel Direkomendasikan — cincin biru terang (dark) */
body.dark.article-page .recommended-section .recommended-card {
  border: 1px solid rgba(56, 189, 248, 0.32);
  animation: article-dark-blue-pulse 3.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

body.dark.article-page .recommended-section .recommended-card:nth-child(1) {
  animation-delay: 0s;
}
body.dark.article-page .recommended-section .recommended-card:nth-child(2) {
  animation-delay: 0.1s;
}
body.dark.article-page .recommended-section .recommended-card:nth-child(3) {
  animation-delay: 0.2s;
}
body.dark.article-page .recommended-section .recommended-card:nth-child(4) {
  animation-delay: 0.3s;
}
body.dark.article-page .recommended-section .recommended-card:nth-child(5) {
  animation-delay: 0.4s;
}
body.dark.article-page .recommended-section .recommended-card:nth-child(6) {
  animation-delay: 0.5s;
}
body.dark.article-page .recommended-section .recommended-card:nth-child(7) {
  animation-delay: 0.6s;
}
body.dark.article-page .recommended-section .recommended-card:nth-child(8) {
  animation-delay: 0.7s;
}

body.dark .rec-cat {
  background: rgba(255,255,255,0.15);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .recommended-list {
    grid-template-columns: 1fr;
  }
}

.arabic-list {
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
  list-style-position: inside; /* bullet ikut ke kanan */
  padding-right: 20px;
}

.arabic-list li {
  margin-bottom: 6px;
}

/* =========================
   MOBILE FULL WIDTH SAFE
========================= */
@media (max-width: 768px) {

  /* jangan sentuh html/body */
  body {
    overflow-x: hidden;
  }

  /* teks lebih nyaman dibaca */
  #isi-artikel {
    font-size: 16px;
    line-height: 1.8;
  }

}

/* Jangan pakai text-align di wrapper: supaya breadcrumb/toolbar tidak ikut justify */
.article-content[dir="rtl"] {
  direction: rtl;
}

.article-content[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

.referensi {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  font-size: 14px;          /* Diperkecil */
  color: #555;              /* Lebih soft */

  padding-bottom: 22px;
  position: relative;
}

.referensi::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.35), transparent);
}

.referensi::before {
  top: -1px;
}

.referensi h3 {
  font-size: 16px;          /* Judul sedikit lebih besar */
  margin-bottom: 12px;
  font-weight: 600;
}

.referensi ul {
  padding-left: 18px;
  line-height: 1.7;
}

.referensi li {
  margin-bottom: 6px;
}

/* =====================
   ARTICLE THUMBNAIL
===================== */

#article-thumb {
  width: 100%;
  max-width: 900px;      /* biar gak kepanjangan */
  height: 420px;         /* tinggi tetap */
  object-fit: cover;     /* biar crop rapi */
  border-radius: 18px;
  display: block;
  margin: 20px auto 30px auto;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.12);
}

/* ==========================================
   MOBILE & SMALL TABLET FIX (â‰¤ 728px)
========================================== */
@media (max-width: 728px) {

  .article-content {
    width: 100%;
    max-width: 100%;
    padding: 18px;
  }

  #article-thumb {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 16px 0;
  }

  /* ===== Referensi Anti Melebar ===== */
  .referensi {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .referensi a {
    word-break: break-all; /* paksa link panjang turun */
    font-size: 13px;
  }

}

.dalil{
  border-left:4px solid #2c6ed5;
  padding:12px 16px;
  margin:18px 0;
  background:#f8f9fb;
}

.dalil .arab{
  direction:rtl !important;
  text-align:justify !important;
  text-justify: inter-word;
  font-size:22px;
  line-height:1.9;
  font-family:"Amiri","Scheherazade New","Noto Naskh Arabic",serif;
}

.dalil .arti{
  direction:ltr !important;
  text-align:left !important;
  margin-top:6px;
  color:#444;
}



/* AR artikel: RTL + justify (isi paragraf); judul subbab tetap rata kanan (awal baca) */
#isi-artikel[dir="rtl"],
#isi-artikel[lang="ar"],
.article-content[dir="rtl"] #isi-artikel {
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
}

.article-content[dir="rtl"] #isi-artikel p,
.article-content[dir="rtl"] #isi-artikel blockquote,
.article-content[dir="rtl"] #isi-artikel ul,
.article-content[dir="rtl"] #isi-artikel ol,
.article-content[dir="rtl"] #isi-artikel li,
#isi-artikel .arabic-text {
  direction: rtl !important;
  text-align: justify !important;
  text-justify: inter-word;
}

.article-content[dir="rtl"] #isi-artikel h1,
.article-content[dir="rtl"] #isi-artikel h2,
.article-content[dir="rtl"] #isi-artikel h3,
.article-content[dir="rtl"] #isi-artikel h4,
.article-content[dir="rtl"] #isi-artikel h5,
.article-content[dir="rtl"] #isi-artikel h6 {
  direction: rtl !important;
  text-align: right !important;
}

.article-content[dir="rtl"] #isi-artikel ul,
.article-content[dir="rtl"] #isi-artikel ol {
  padding-right: 24px;
  padding-left: 0;
}

/* RTL: garis biru AI/blockquote tetap di tepi (kanan = awal baca) */
.article-content[dir="rtl"] #isi-artikel blockquote {
  border-left: none;
  border-right: 4px solid #2563eb;
}

body.dark .article-content[dir="rtl"] #isi-artikel blockquote {
  border-left: none;
  border-right: 4px solid #60a5fa;
}

body.dark.focus-mode .article-content[dir="rtl"] blockquote {
  border-left: none;
  border-right: 4px solid #3b82f6;
}

.article-content[dir="rtl"] #isi-artikel sub {
  border-left: none;
  border-right: 3px solid #60a5fa;
}

.article-content[dir="rtl"] .dalil {
  border-left: none;
  border-right: 4px solid #2c6ed5;
}

/* ========== Dark article: cincin biru terang mengelilingi kotak baca ========== */
@keyframes article-dark-blue-pulse {
  0%,
  100% {
    box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(56, 189, 248, 0.32),
      0 0 14px rgba(56, 189, 248, 0.14),
      inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    border-color: rgba(56, 189, 248, 0.38);
  }
  25%,
  75% {
    box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(96, 200, 245, 0.44),
      0 0 20px rgba(56, 189, 248, 0.26),
      0 0 34px rgba(14, 165, 233, 0.09),
      inset 0 0 0 1px rgba(56, 189, 248, 0.04);
    border-color: rgba(96, 200, 245, 0.48);
  }
  50% {
    box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(125, 211, 252, 0.52),
      0 0 26px rgba(56, 189, 248, 0.34),
      0 0 40px rgba(14, 165, 233, 0.11),
      inset 0 0 0 1px rgba(56, 189, 248, 0.06);
    border-color: rgba(125, 211, 252, 0.52);
  }
}

body.dark.article-page:not(.focus-mode) .article-content {
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  animation: article-dark-blue-pulse 3.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

body.dark.article-page.focus-mode #article-body {
  border: 1px solid rgba(56, 189, 248, 0.35);
  animation: article-dark-blue-pulse 3.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@media (prefers-reduced-motion: reduce) {
  body.dark.article-page:not(.focus-mode) .article-content,
  body.dark.article-page.focus-mode #article-body,
  body.dark.article-page .recommended-section .recommended-card {
    animation: none !important;
  }
}

/* ========== Banner sponsor in-article (hanya jika dirender oleh js/article-ads.js) ========== */
.article-sponsor-slot {
  margin: 1.25rem 0;
  max-width: 100%;
}

.article-sponsor-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 0.4rem;
  line-height: 1.3;
}

.article-sponsor-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.article-sponsor-link:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

.article-sponsor-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

.article-sponsor-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  vertical-align: top;
}

body.dark .article-sponsor-label {
  color: #94a3b8;
}

body.dark .article-sponsor-link:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .article-sponsor-link {
    transition: none;
  }

  .article-sponsor-link:hover {
    transform: none;
  }
}

