/*
 Theme Name:   GeneratePress Child (Nahwu.id)
 Theme URI:    https://nahwu.id
 Description:  Tema turunan resmi nahwu.id - Tipografi harmoni: Lora (Judul), Inter (Body), Amiri (Arab Non-Qur'an), LPMQ Isep Misbah (Al-Qur'an), tabel kaidah responsif, dan proteksi AdSense murni.
 Author:       Owner
 Author URI:   https://nahwu.id
 Template:     generatepress
 Version:      1.1.0
*/

/* ==========================================================================
   1. KEDAULATAN FONT RESMI SSOT (100% LOCAL WOFF2 - ZERO EXTERNAL CDN)
   ========================================================================== */

/* Font Judul Non-Arab: Lora Bold 700 (Fallback Lokal) */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/lora-700.woff2') format('woff2');
}

/* Font Body Non-Arab: Inter Regular 400 (Fallback Lokal) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/inter-regular.woff2') format('woff2');
}

/* Font Al-Qur'an: Mushaf Standar Kemenag RI (Khusus Kalamullah) */
@font-face {
  font-family: 'LPMQ Isep Misbah';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/subset-LPMQIsepMisbah.woff2') format('woff2');
}

/* Font Arab Non-Qur'an: Amiri Regular (Hadis, Matan, Syarah, Kaidah Nahwu) */
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/amiri-regular.woff2') format('woff2');
}

/* Font Arab Non-Qur'an: Amiri Bold (Judul Bab Arab, Kaidah Tebal, Header) */
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/amiri-700.woff2') format('woff2');
}

/* ==========================================================================
   3. CLASS UTILITY CSS & TIPOGRAFI NON-ARAB (LORA & INTER)
   ========================================================================== */

/* Class Utility CSS */
.article-title {
  font-family: 'Lora', Georgia, Cambria, serif;
  font-weight: 700;
}

.article-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
}

/* Penerapan Global Tipografi Latin (Clean, Modern, Readable) */
body,
.entry-content,
.article-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.75;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Judul Artikel dan Sub-Bab (Lora 700 Serif) */
h1, h2, h3, h4, h5, h6,
.entry-title,
.article-title {
  font-family: 'Lora', Georgia, Cambria, serif;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

h1.entry-title {
  font-size: 32px;
  margin-bottom: 0.6em;
}

.entry-content h2 {
  font-size: 24px;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid #f1f5f9;
}

.entry-content h3 {
  font-size: 20px;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

.entry-content p {
  margin-bottom: 1.3em;
}

/* ==========================================================================
   4. TIPOGRAFI ARAB PRESISI & ATURAN PEMBEDA TUNGGAL (THE SINGLE-CLASS RULE)
   Rujukan SSOT: D:\font\docs\05_standar_penandaan_ayat_dan_teks_artikel.md
   ========================================================================== */

/* KHUSUS KALAMULLAH (AL-QUR'AN) - WAJIB CLASS .quran DENGAN FONT LPMQ */
.quran,
span.quran,
p.quran,
blockquote.quran,
.quran-text,
.ayat-quran,
.teks-quran {
  font-family: 'LPMQ Isep Misbah', serif !important;
  font-style: normal !important;
  font-weight: 400;
  direction: rtl;
  text-align: right;
  font-size: 27px;
  line-height: 2.4;
  word-spacing: 2px;
  color: #0f172a;
}

span.quran {
  display: inline;
  padding: 0 4px;
  line-height: 2.2;
}

p.quran {
  margin-top: 0.8em;
  margin-bottom: 1.2em;
  padding: 4px 0;
}

/* TEKS ARAB NON-QUR'AN (HADIS, MATAN, SYARAH, KAIDAH NAHWU) - DEFAULT AMIRI */
.arabic,
.kitab,
.teks-arab,
.matan-arab,
[lang="ar"],
.entry-content [dir="rtl"] {
  font-family: 'Amiri', serif;
  direction: rtl;
  text-align: right;
  font-size: 23px;
  line-height: 2.1;
  color: #1e293b;
}

/* Backward Compatibility untuk Paragraf Rata Kanan Naskah Lama WordPress */
.entry-content p.has-text-align-right,
.entry-content .has-text-align-right {
  font-family: 'Amiri', 'LPMQ Isep Misbah', serif;
  direction: rtl;
  text-align: right;
  font-size: 25px;
  line-height: 2.3;
  word-spacing: 2px;
  margin-top: 0.6em;
  margin-bottom: 1.2em;
  padding: 4px 0;
}

/* Kata / Frasa Arab Inline di Dalam Paragraf Bahasa Indonesia */
.arabic-inline,
span.arab {
  font-family: 'Amiri', serif;
  direction: rtl;
  font-size: 1.2em;
  line-height: 1.2;
  display: inline-block;
  vertical-align: baseline;
  padding: 0 3px;
}

/* ==========================================================================
   5. KOMPONEN KONTEN ARTIKEL: TERJEMAHAN, KOTAK KAIDAH & TABEL RESPONSIF
   ========================================================================== */

/* Terjemahan Ayat / Matan / Hadis */
.terjemahan,
.arti-ayat,
.makna-kaidah {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  color: #475569;
  margin-top: -0.6em;
  margin-bottom: 1.4em;
  padding-left: 12px;
  border-left: 3px solid #cbd5e1;
}

/* Blok Kutipan Islami & Proteksi Anti-Italic Teks Arab */
.entry-content blockquote {
  border-left: 4px solid #16a34a !important; /* Hijau Khas Nahwuid */
  background-color: #f8fafc;
  padding: 16px 20px !important;
  margin: 1.6em 0 !important;
  border-radius: 0 6px 6px 0;
  font-size: 16px;
  line-height: 1.75;
}

/* Matikan paksaan miring GeneratePress pada teks Arab & kutipan di dalam blockquote */
.entry-content blockquote.quran,
.entry-content blockquote[dir="rtl"],
.entry-content blockquote [dir="rtl"],
.entry-content blockquote .arabic,
.entry-content blockquote .quran,
.entry-content blockquote strong,
.entry-content blockquote p[dir="rtl"],
blockquote.quran p {
  font-style: normal !important;
}

/* Kotak Kaidah Nahwu / Rumus / Catatan Penting */
.kotak-kaidah,
.rumus-nahwu {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0284c7;
  padding: 16px 20px;
  margin: 1.6em 0;
  border-radius: 0 6px 6px 0;
}

.kotak-kaidah h4,
.rumus-nahwu h4 {
  font-family: 'Lora', serif;
  margin-top: 0;
  margin-bottom: 8px;
  color: #0369a1;
  font-size: 18px;
  font-weight: 700;
}

/* ==========================================================================
   5. TABEL KAIDAH NAHWU: NATIVE ADAPTIF DUA TINGKAT (ADR-004 DIAMONDLAND STANDARD)
   - Mobile (<769px): display: block + overflow-x: auto (scroll horizontal alami)
   - Desktop (>=769px): display: table + width: 100% (zero empty void, distribusi rata)
   - Zero PHP Runtime Regex Overhead: functions.php murni tanpa filter runtime
   ========================================================================== */

/* 1. Mobile-First (<769px): Scroll horizontal mandiri tanpa pembungkus ekstra */
.entry-content table,
.table-responsive table,
table.tabel-kaidah {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  background-color: #ffffff;
  margin: 1.6em 0;
  font-size: 15px;
  line-height: 1.6;
}

.table-responsive {
  width: 100%;
  overflow-x: visible;
  margin-bottom: 1.5em;
}

.entry-content table th,
.entry-content table td,
.table-responsive table th,
.table-responsive table td {
  padding: 11px 15px !important;
  border: 1px solid #e2e8f0 !important;
  vertical-align: top;
}

.entry-content table th,
.table-responsive table th {
  font-family: 'Lora', serif;
  background-color: #f8fafc !important;
  color: #0f172a;
  font-weight: 700;
  text-align: left;
  border-bottom: 2px solid #cbd5e1 !important;
}

.entry-content table tr:nth-child(even),
.table-responsive table tr:nth-child(even) {
  background-color: #f8fafc;
}

/* Sel Tabel Berisi Teks Arab (Kaidah, Wazan, I'rob, Tashrif) */
.entry-content table td[dir="rtl"],
.entry-content table th[dir="rtl"],
.entry-content table td.td-arab,
.entry-content table th.td-arab,
.table-responsive table td[dir="rtl"],
.table-responsive table th[dir="rtl"] {
  font-family: 'Amiri', serif !important;
  font-size: 20px;
  direction: rtl;
  text-align: right;
  line-height: 1.9;
  padding: 10px 14px !important;
}

/* 2. Desktop & Tablet Viewport (>=768px): Kembalikan ke display: table (W3C Zero Empty Void) */
@media (min-width: 768px) {
  .entry-content table,
  .table-responsive table,
  table.tabel-kaidah {
    display: table;
    width: 100%;
    table-layout: auto;
  }
}

/* ==========================================================================
   6. BREADCRUMBS SEMANTIK (RANK MATH & GENERATEPRESS HOOK)
   ========================================================================== */

.nahwuid-breadcrumb-wrapper {
  margin-top: 0;
  margin-bottom: 14px;
  line-height: 1.4;
}

.rank-math-breadcrumb,
.nahwuid-breadcrumb-wrapper .rank-math-breadcrumb {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  padding: 0;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.rank-math-breadcrumb::-webkit-scrollbar {
  display: none;
}

.rank-math-breadcrumb p {
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
}

.rank-math-breadcrumb a {
  color: #475569;
  text-decoration: none;
  transition: color 0.15s ease;
  font-weight: 400;
}

.rank-math-breadcrumb a:hover {
  color: #16a34a;
  text-decoration: underline;
}

.rank-math-breadcrumb .separator {
  margin: 0 7px;
  color: #94a3b8;
  font-size: 13px;
  user-select: none;
}

.rank-math-breadcrumb .last {
  color: #1e293b;
  font-weight: 500;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .rank-math-breadcrumb .last {
    max-width: 480px;
  }
}

/* ==========================================================================
   7. CATATAN KEPATUHAN ADSENSE:
   DILARANG MENAMBAHKAN CSS ATAU WADAH KHUSUS YANG MEMANIPULASI
   IKLAN GOOGLE. BIARKAN GOOGLE AUTO ADS MENEMPATKAN SECARA ALAMI.
   ========================================================================== */

/* ==========================================================================
   8. PDF VIEWER & RESPONSIVE IFRAME (PORT IDENTIK DARI LIVE LAMA)
   ========================================================================== */
.taxonomy-description {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.responsive-pdf {
  position: relative;
  padding-bottom: 85%; /* Rasio bawaan live lama */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin-top: 1.5em;
  margin-bottom: 2em;
  border-radius: 4px;
}

.responsive-pdf iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
