/* =============================================================================
   MAKRIFAT — Custom Stylesheet  |  Tema Bakoh (OJS 3.4), gaya Modern
   Makrifat: Journal of Islamic Studies — Bakoh Academy and Research
   https://jurnal.bakoh.org/index.php/makrifat

   Pasang: Appearance > Advanced > Journal style sheet.

   Catatan:
   - Semua warna memakai variabel tema (--bk-p-* biru, --bk-a-* toska,
     --bk-ink-* netral). Ganti warna di Appearance > Theme, file ini ikut.
   - Link di blok custom jurnal ini dibuat dari editor dengan gaya inline
     (tombol hijau tua #022c22 → #064e3b, garis kiri #22c55e) yang tidak
     senada dengan tema biru. !important dipakai hanya untuk mengalahkan
     gaya inline tersebut.
   ========================================================================== */

.bk-theme {
  --mk-line: linear-gradient(90deg, var(--bk-a-600) 0%, var(--bk-a-300) 50%, var(--bk-a-600) 100%);
  --mk-band: linear-gradient(110deg, var(--bk-p-900) 0%, var(--bk-p-700) 55%, var(--bk-p-600) 100%);
  --mk-hover: linear-gradient(90deg, rgba(var(--bk-p-rgb), 0.1), rgba(var(--bk-p-rgb), 0.02));
  --mk-fast: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --mk-base: 240ms cubic-bezier(0.22, 0.7, 0.2, 1);
}

/* =============================================================================
   1. DASAR
   ========================================================================== */

html {
  scrollbar-color: var(--bk-p-600, #1d3fae) var(--bk-ink-100, #eff0f3);
}

.bk-theme ::selection {
  background: var(--bk-a-300);
  color: var(--bk-p-950);
}

.bk-theme :focus-visible {
  outline: 2px solid var(--bk-a-600);
  outline-offset: 3px;
}

/* =============================================================================
   2. SIDEBAR — kartu blok
   Padding dipindah dari kartu ke .content supaya kepala blok menempel penuh
   ke tepi kartu tanpa margin negatif.
   ========================================================================== */

.bk-theme .pkp_structure_content .pkp_structure_sidebar > .pkp_block:not(.bk-block-submit) {
  padding: 0;
  overflow: hidden;
  border-color: rgba(var(--bk-p-rgb), 0.14);
  box-shadow: var(--bk-shadow-sm);
  transition:
    box-shadow var(--mk-base),
    border-color var(--mk-base);
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar > .pkp_block:not(.bk-block-submit):hover,
.bk-theme .pkp_structure_content .pkp_structure_sidebar > .pkp_block:not(.bk-block-submit):focus-within {
  border-color: rgba(var(--bk-a-rgb), 0.6);
  box-shadow: var(--bk-shadow-md);
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar > .pkp_block:not(.bk-block-submit) > .content {
  padding: 12px 16px 16px;
}

/* --- Kepala blok: pita biru, garis toska, ikon dalam chip ----------------- */

.bk-theme .pkp_structure_content .pkp_structure_sidebar .pkp_block > .title:not(.pkp_screen_reader) {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 11px 16px 14px;
  background:
    var(--mk-line) bottom / 100% 3px no-repeat,
    radial-gradient(200px 90px at 100% 0%, rgba(var(--bk-a-rgb), 0.55), transparent 65%),
    var(--mk-band);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar .pkp_block > .title:not(.pkp_screen_reader)::before {
  content: "\f02e"; /* bookmark — ikon bawaan */
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  color: var(--bk-a-300);
  font: normal 14px/1 FontAwesome;
  letter-spacing: 0;
}

/* Ikon per blok (FontAwesome 4.7 bawaan OJS) */
.bk-theme .pkp_structure_sidebar .bk-block-links > .title::before { content: "\f129" !important; } /* info */
.bk-theme .pkp_structure_sidebar .block_web_feed > .title::before { content: "\f09e" !important; } /* rss */
.bk-theme .pkp_structure_sidebar .block_information > .title::before { content: "\f05a" !important; } /* info-circle */
.bk-theme .pkp_structure_sidebar #customblock-editorial-board > .title::before { content: "\f0c0" !important; } /* users */
.bk-theme .pkp_structure_sidebar #customblock-submissions > .title::before { content: "\f1d8" !important; } /* paper-plane */
.bk-theme .pkp_structure_sidebar #customblock-police > .title::before { content: "\f132" !important; } /* shield */
.bk-theme .pkp_structure_sidebar #customblock-journal-template > .title::before { content: "\f15c" !important; } /* file-text */
.bk-theme .pkp_structure_sidebar #customblock-collaboration-publisher > .title::before { content: "\f2b5" !important; } /* handshake */
.bk-theme .pkp_structure_sidebar #customblock-tools > .title::before { content: "\f0ad" !important; } /* wrench */

/* =============================================================================
   3. SIDEBAR — Informasi Jurnal (blok bawaan tema)
   ========================================================================== */

.bk-theme .pkp_structure_sidebar .pkp_block .content .bk-link-list {
  margin: 0;
}

.bk-theme .pkp_structure_sidebar .pkp_block .content .bk-link-list li + li {
  border-top: 1px solid var(--bk-ink-100);
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar .pkp_block .content .bk-link-list a {
  margin: 2px 0;
  font-size: 14px;
  transition:
    background-color var(--mk-fast),
    color var(--mk-fast);
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar .pkp_block .content .bk-link-list a:hover,
.bk-theme .pkp_structure_content .pkp_structure_sidebar .pkp_block .content .bk-link-list a:focus {
  background: var(--mk-hover);
}

/* =============================================================================
   4. SIDEBAR — blok custom: daftar link
   (Editorial Board, Submissions, Police)
   Tombol hijau inline diganti baris daftar yang senada dengan tema.
   ========================================================================== */

/* Pembungkus kelompok link */
.bk-theme .pkp_structure_sidebar .block_custom .content > div[style]:not(.pkp_block) {
  gap: 0 !important;
  padding: 0 !important;
}

.bk-theme .pkp_structure_sidebar .block_custom .content > div[style]:not(.pkp_block) + div[style] {
  background: linear-gradient(var(--bk-ink-100), var(--bk-ink-100)) top center / calc(100% - 10px) 1px no-repeat !important;
}

/* <span> pembungkus link ("Generative AI Policies") */
.bk-theme .pkp_structure_sidebar .block_custom .content > div[style] > span {
  display: block;
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img)) {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  margin: 2px 0;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--bk-ink-900) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  transition:
    background-color var(--mk-fast),
    color var(--mk-fast),
    box-shadow var(--mk-fast) !important;
}

/* Garis pemisah antarlink: garis 1px di tepi atas link kedua dan seterusnya */
.bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content > div[style] > a:not(:has(img)) + a {
  background: linear-gradient(var(--bk-ink-100), var(--bk-ink-100)) top / 100% 1px no-repeat !important;
}

/* Titik toska di kiri */
.bk-theme .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img))::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin: 0 2px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--bk-a-500), var(--bk-p-500));
  transform: rotate(45deg);
  transition: transform var(--mk-base);
}

/* Panah di kanan */
.bk-theme .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img))::after {
  content: "\f105";
  flex: none;
  margin-left: auto;
  color: var(--bk-ink-300);
  font: normal 14px/1 FontAwesome;
  transition:
    transform var(--mk-fast),
    color var(--mk-fast);
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img)):hover,
.bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img)):focus {
  background: var(--mk-hover) !important;
  box-shadow: inset 3px 0 0 var(--bk-a-500) !important;
  color: var(--bk-p-700) !important;
}

.bk-theme .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img)):hover::before,
.bk-theme .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img)):focus::before {
  transform: rotate(135deg) scale(1.25);
}

.bk-theme .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img)):hover::after,
.bk-theme .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img)):focus::after {
  color: var(--bk-p-600);
  transform: translateX(3px);
}

.bk-theme .pkp_structure_sidebar .block_custom .content > div[style] a span {
  color: inherit !important;
}

/* --- "Online Submission" sebagai aksi utama (blok Submissions, link pertama) */

.bk-theme .pkp_structure_content .pkp_structure_sidebar #customblock-submissions .content > div[style]:first-child > a:first-child {
  margin: 4px 0 10px;
  padding: 11px 14px !important;
  border-radius: 12px !important;
  background: var(--bk-gradient) !important;
  box-shadow: 0 10px 22px -12px rgba(var(--bk-p-rgb), 0.9) !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.bk-theme .pkp_structure_sidebar #customblock-submissions .content > div[style]:first-child > a:first-child::before {
  content: "\f1d8";
  width: auto;
  height: auto;
  margin: 0;
  background: none;
  color: inherit;
  font: normal 14px/1 FontAwesome;
  transform: none !important;
}

.bk-theme .pkp_structure_sidebar #customblock-submissions .content > div[style]:first-child > a:first-child::after {
  content: "\f061";
  color: inherit !important;
  font-size: 12px;
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar #customblock-submissions .content > div[style]:first-child > a:first-child:hover,
.bk-theme .pkp_structure_content .pkp_structure_sidebar #customblock-submissions .content > div[style]:first-child > a:first-child:focus {
  background: var(--bk-gradient) !important;
  box-shadow: 0 14px 26px -10px rgba(var(--bk-p-rgb), 1) !important;
  color: #fff !important;
  filter: brightness(1.1);
}

/* Link tepat di bawah tombol — tanpa garis pemisah */
.bk-theme .pkp_structure_content .pkp_structure_sidebar #customblock-submissions .content > div[style]:first-child > a:first-child + a {
  background: none !important;
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar #customblock-submissions .content > div[style]:first-child > a:first-child + a:hover,
.bk-theme .pkp_structure_content .pkp_structure_sidebar #customblock-submissions .content > div[style]:first-child > a:first-child + a:focus {
  background: var(--mk-hover) !important;
}

/* =============================================================================
   5. SIDEBAR — blok custom: gambar
   (Journal Template, Collaboration Publisher, Tools)
   ========================================================================== */

.bk-theme .pkp_structure_sidebar .block_custom .content p {
  margin: 0;
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

/* Gambar ber-link → ubin berbingkai yang terangkat saat disorot */
.bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content a:has(img) {
  display: block;
  padding: 10px;
  border: 1px solid var(--bk-ink-200);
  border-radius: 14px;
  background: var(--bk-ink-50);
  transition:
    transform var(--mk-base),
    box-shadow var(--mk-base),
    border-color var(--mk-base),
    background-color var(--mk-base);
}

.bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content a:has(img):hover,
.bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content a:has(img):focus {
  border-color: var(--bk-a-500);
  background: var(--bk-surface);
  box-shadow: 0 14px 26px -16px rgba(var(--bk-p-rgb), 0.55);
  transform: translateY(-2px);
}

.bk-theme .pkp_structure_sidebar #customblock-journal-template > .content,
.bk-theme .pkp_structure_sidebar #customblock-collaboration-publisher > .content,
.bk-theme .pkp_structure_sidebar #customblock-tools > .content {
  padding-top: 16px;
}

/* --- Tools: blok bersarang dari editor diratakan --------------------------- */

.bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content .content,
.bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content .pkp_block {
  margin: 0;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  opacity: 1;
  transform: none;
}

.bk-theme .pkp_structure_sidebar .block_custom .content center:empty {
  display: none;
}

.bk-theme .pkp_structure_sidebar .block_custom .content center:has(img) + center:has(img) {
  margin-top: 10px;
}

/* =============================================================================
   6. BERANDA — "Tentang Jurnal Ini" / Journal Information
   Isi bagian ini dibuat dari editor dengan gaya inline (kotak indigo #eef2ff
   di dalam kartu, tabel berbayang, huruf Segoe UI). Di sini diratakan dan
   diwarnai ulang dengan variabel tema.
   ========================================================================== */

/* Kotak pembungkus indigo → rata, supaya tidak ada kartu di dalam kartu */
.bk-theme .homepage_about .bk-prose > div[style] {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  font-family: inherit !important;
}

/* Judul "Journal Information" → label kecil dengan ikon dan garis */
.bk-theme .homepage_about .bk-prose > div[style] > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--bk-p-800) !important;
  font-family: var(--bk-font-body) !important;
  font-size: 12.5px !important;
  font-weight: 800;
  letter-spacing: 0.14em !important;
  line-height: 1.3;
}

.bk-theme .homepage_about .bk-prose > div[style] > h3::before {
  content: "\f02d"; /* book */
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--bk-gradient);
  color: #fff;
  font: normal 14px/1 FontAwesome;
  letter-spacing: 0;
}

.bk-theme .homepage_about .bk-prose > div[style] > h3::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--bk-ink-200), transparent);
}

/* --- Tabel ----------------------------------------------------------------- */

.bk-theme .homepage_about .bk-prose table[style] {
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  border: 1px solid var(--bk-ink-200);
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 16px !important;
  background: var(--bk-surface) !important;
  box-shadow: var(--bk-shadow-xs) !important;
  font-size: 14.5px;
  line-height: 1.6;
}

.bk-theme .homepage_about .bk-prose table[style] tr {
  height: auto !important;
  border: 0 !important;
  background: none !important;
  transition: background-color var(--mk-fast);
}

.bk-theme .homepage_about .bk-prose table[style] td {
  padding: 12px 18px !important;
  border: 0;
  border-top: 1px solid var(--bk-ink-100);
  color: var(--bk-ink-900);
  vertical-align: middle;
}

/* Kolom label: latar lembut, garis toska di kiri */
.bk-theme .homepage_about .bk-prose table[style] td:first-child {
  width: 32% !important;
  background: var(--bk-p-50);
  box-shadow: inset 3px 0 0 var(--bk-a-500);
  color: var(--bk-p-800) !important;
  font-size: 13px;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
}

.bk-theme .homepage_about .bk-prose table[style] td:last-child {
  width: auto !important;
}

.bk-theme .homepage_about .bk-prose table[style] tr:not(:first-child):hover {
  background: var(--bk-ink-50) !important;
}

/* Baris pertama (judul jurnal): pita biru seperti kepala blok sidebar */
.bk-theme .homepage_about .bk-prose table[style] tr:first-child {
  background:
    radial-gradient(320px 120px at 100% 0%, rgba(var(--bk-a-rgb), 0.55), transparent 65%),
    var(--mk-band) !important;
}

.bk-theme .homepage_about .bk-prose table[style] tr:first-child td {
  padding: 16px 18px !important;
  border-top: 0;
  background: none;
  box-shadow: none;
  color: #fff !important;
}

.bk-theme .homepage_about .bk-prose table[style] tr:first-child td:first-child {
  color: var(--bk-a-300) !important;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bk-theme .homepage_about .bk-prose table[style] tr:first-child td:last-child {
  font-family: var(--bk-font-display);
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.3;
}

/* Link di dalam tabel */
.bk-theme .homepage_about .bk-prose table[style] a {
  padding: 0 !important;
  border: 0 !important;
  color: var(--bk-p-600) !important;
  font-weight: 700 !important;
  text-decoration: underline;
  text-decoration-color: rgba(var(--bk-a-rgb), 0.6);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--mk-fast);
}

.bk-theme .homepage_about .bk-prose table[style] a:hover,
.bk-theme .homepage_about .bk-prose table[style] a:focus {
  color: var(--bk-a-700) !important;
}

/* Link tunggal di sel (mis. "Dimension") → pil dengan ikon tautan luar */
.bk-theme .homepage_about .bk-prose table[style] td > a:only-child[style] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px !important;
  border-radius: 999px;
  background: var(--bk-p-50);
  box-shadow: inset 0 0 0 1px rgba(var(--bk-p-rgb), 0.22);
  font-size: 13.5px;
  text-decoration: none !important;
  transition:
    background-color var(--mk-fast),
    color var(--mk-fast),
    box-shadow var(--mk-fast);
}

.bk-theme .homepage_about .bk-prose table[style] td > a:only-child[style]::after {
  content: "\f08e"; /* external-link */
  font: normal 12px/1 FontAwesome;
}

.bk-theme .homepage_about .bk-prose table[style] td > a:only-child[style]:hover,
.bk-theme .homepage_about .bk-prose table[style] td > a:only-child[style]:focus {
  background: var(--bk-p-600);
  box-shadow: none;
  color: #fff !important;
}

/* --- Paragraf deskripsi di bawah tabel ------------------------------------- */

.bk-theme .homepage_about .bk-prose > div[style] > div[style] {
  position: relative;
  margin: 18px 0 0 !important;
  padding: 18px 20px 18px 24px !important;
  border: 1px solid var(--bk-ink-200) !important;
  border-radius: 16px !important;
  background: var(--bk-ink-50) !important;
  box-shadow: none !important;
  overflow: hidden;
}

.bk-theme .homepage_about .bk-prose > div[style] > div[style]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--bk-p-600), var(--bk-a-500));
}

.bk-theme .homepage_about .bk-prose > div[style] > div[style] p {
  margin: 0 !important;
  color: var(--bk-ink-700) !important;
  font-size: 14.5px !important;
  line-height: 1.75 !important;
  text-align: justify;
  hyphens: auto;
}

.bk-theme .homepage_about .bk-prose > div[style] > div[style] strong {
  color: var(--bk-p-800);
}

/* HP: label di atas, isi di bawah */
@media (max-width: 560px) {
  .bk-theme .homepage_about .bk-prose table[style],
  .bk-theme .homepage_about .bk-prose table[style] tbody,
  .bk-theme .homepage_about .bk-prose table[style] tr,
  .bk-theme .homepage_about .bk-prose table[style] td {
    display: block;
    width: 100% !important;
  }

  .bk-theme .homepage_about .bk-prose table[style] {
    overflow: hidden;
  }

  .bk-theme .homepage_about .bk-prose table[style] td:first-child {
    padding-bottom: 6px !important;
  }

  .bk-theme .homepage_about .bk-prose table[style] td:last-child {
    padding-top: 8px !important;
    border-top: 0;
  }

  .bk-theme .homepage_about .bk-prose table[style] tr:first-child td:first-child {
    padding-bottom: 0 !important;
  }

  .bk-theme .homepage_about .bk-prose > div[style] > div[style] p {
    text-align: left;
  }
}

/* =============================================================================
   7. RESPONSIVE
   Tablet: sidebar turun ke bawah konten — blok disusun dua kolom supaya
   tidak jadi satu kolom panjang.
   ========================================================================== */

@media (min-width: 640px) and (max-width: 991px) {
  .bk-theme .pkp_structure_content .pkp_structure_sidebar {
    columns: 2;
    column-gap: 20px;
  }

  .bk-theme .pkp_structure_content .pkp_structure_sidebar > .pkp_block {
    break-inside: avoid;
  }
}

/* =============================================================================
   8. AKSESIBILITAS — kurangi animasi
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content a:has(img):hover,
  .bk-theme .pkp_structure_content .pkp_structure_sidebar .block_custom .content a:has(img):focus,
  .bk-theme .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img)):hover::before,
  .bk-theme .pkp_structure_sidebar .block_custom .content > div[style] a:not(:has(img)):hover::after {
    transform: none;
  }
}
