/*
 * Isi artikel /artikel/{slug} (app/Views/pages/artikel-baca.php) — diambil dari rumahquran-web, warna Tartila.
 * .rqa-prose = isi artikel dari WordPress (HTML sudah dibersihkan oleh HtmlSanitizer + ArtikelFormat)
 * .rqp-*     = kelas keluaran ArtikelFormat / yang boleh dipakai penulis di mode Kode WordPress
 */
:root { --rqa-red: #1D4ED8; --rqa-red-dk: #16337F; --rqa-navy: #16337F; --rqa-ink: #33456F; --rqa-mute: #6B7A99; --rqa-line: #E1ECFB; --rqa-cream: #F3F8FF; --rqa-gold: #93C5FD; --rqa-fs: 17.5px; }

/* ---------- Isi artikel ---------- */
.rqa-prose { font-size: var(--rqa-fs); line-height: 1.85; color: var(--rqa-ink); overflow-wrap: break-word; }
@media (max-width: 640px) { .rqa-prose { font-size: calc(var(--rqa-fs) - 1px); line-height: 1.8; } }
.rqa-prose > * { margin: 0 0 1.15em; }
.rqa-prose > *:last-child { margin-bottom: 0; }
.rqa-prose > p:first-child:not(.rqp-ar) { font-size: 1.08em; color: #1F2A44; }
.rqa-prose h2, .rqa-prose h3, .rqa-prose h4, .rqa-prose h5, .rqa-prose h6 { font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; color: var(--rqa-navy); line-height: 1.25; letter-spacing: -.01em; scroll-margin-top: 100px; text-wrap: balance; }
.rqa-prose h2 { position: relative; font-size: 1.62em; margin: 1.9em 0 .6em; padding-top: .55em; }
.rqa-prose h2::before { content: ""; position: absolute; left: 0; top: 0; width: 42px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--rqa-red) 0 70%, var(--rqa-gold) 70% 100%); }
.rqa-prose h3 { font-size: 1.32em; margin: 1.6em 0 .5em; }
.rqa-prose h4 { font-size: 1.14em; margin: 1.4em 0 .45em; }
.rqa-prose h5, .rqa-prose h6 { font-family: inherit; font-size: .95em; font-weight: 800; letter-spacing: .02em; margin: 1.3em 0 .4em; }
.rqa-prose > h2:first-child, .rqa-prose > h3:first-child { margin-top: 0; }
.rqa-prose a { color: var(--rqa-red); font-weight: 650; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(29, 78, 216, .35); }
.rqa-prose a:hover { color: var(--rqa-red-dk); text-decoration-color: currentColor; }
.rqa-prose strong, .rqa-prose b { color: #1B2440; font-weight: 750; }
.rqa-prose ul, .rqa-prose ol { padding-left: 1.4em; }
.rqa-prose li { margin: .4em 0; padding-left: .2em; }
.rqa-prose li::marker { color: var(--rqa-red); font-weight: 700; }
.rqa-prose li > ul, .rqa-prose li > ol { margin: .3em 0; }
.rqa-prose dl { display: grid; gap: .3em; }
.rqa-prose dt { font-weight: 800; color: var(--rqa-navy); }
.rqa-prose dd { margin: 0 0 .6em 1em; }
.rqa-prose hr { border: 0; height: 24px; margin: 2.2em 0; background: center / 88px 24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='24' viewBox='0 0 88 24'%3E%3Cg fill='none' stroke='%23C9A45C' stroke-width='1.2'%3E%3Cpath d='M0 12h30M58 12h30'/%3E%3Crect x='37' y='5' width='14' height='14'/%3E%3Crect x='37' y='5' width='14' height='14' transform='rotate(45 44 12)'/%3E%3C/g%3E%3C/svg%3E"); }
.rqa-prose mark { background: linear-gradient(180deg, transparent 45%, #FFE3A3 45%); color: inherit; padding: 0 .1em; }
.rqa-prose small { font-size: .85em; color: var(--rqa-mute); }
.rqa-prose sub, .rqa-prose sup { font-size: .72em; line-height: 0; }
.rqa-prose abbr[title] { text-decoration: underline dotted; cursor: help; }
.rqa-prose kbd { font: 600 .82em/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: .2em .45em; border: 1px solid #D8DDE6; border-bottom-width: 2px; border-radius: 6px; background: #F7F8FA; }
.rqa-prose .has-text-align-center { text-align: center; }
.rqa-prose .has-text-align-right { text-align: right; }
.rqa-prose .has-text-align-justify { text-align: justify; }
@media (max-width: 640px) { .rqa-prose .has-text-align-justify { text-align: left; } }

/* Kutipan */
.rqa-prose blockquote { position: relative; margin: 1.6em 0; padding: 1.1em 1.3em 1.1em 1.5em; border-left: 4px solid var(--rqa-red); background: var(--rqa-cream); border-radius: 0 18px 18px 0; font-family: 'Source Serif 4', Georgia, serif; font-size: 1.12em; font-style: italic; line-height: 1.65; color: #2A3554; }
.rqa-prose blockquote > *:last-child { margin-bottom: 0; }
.rqa-prose blockquote p { margin: 0 0 .7em; }
.rqa-prose blockquote cite { display: block; margin-top: .5em; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-style: normal; font-size: .72em; font-weight: 700; color: var(--rqa-mute); }
.rqa-prose blockquote cite::before { content: "— "; }

/* Teks Arab: ayat & hadits (dikenali otomatis) */
.rqa-prose .rqp-ar { font-family: 'Amiri', 'Traditional Arabic', serif; font-style: normal; font-size: 1.55em; line-height: 2.15; text-align: right; color: var(--rqa-navy); direction: rtl; }
.rqa-prose > p.rqp-ar, .rqa-prose > div.rqp-ar, .rqa-prose blockquote.rqp-ar, .rqa-prose blockquote > p.rqp-ar:only-child { position: relative; padding: .7em 1em .55em; border: 0; border-right: 4px solid var(--rqa-gold); background: linear-gradient(270deg, #EEF4FF 0%, #F8FBFF 100%); border-radius: 16px 0 0 16px; }
.rqa-prose blockquote > p.rqp-ar:only-child { padding: 0; border: 0; background: none; }
.rqa-prose blockquote:has(> p.rqp-ar) { border-left: 0; border-right: 4px solid var(--rqa-gold); border-radius: 18px 0 0 18px; background: linear-gradient(270deg, #EEF4FF 0%, #F8FBFF 100%); }
.rqa-prose li.rqp-ar { font-size: 1.35em; }
.rqa-prose h2.rqp-ar, .rqa-prose h3.rqp-ar { font-size: 1.7em; line-height: 1.8; }
.rqa-prose h2.rqp-ar::before { left: auto; right: 0; }
.rqa-prose .rqp-ar + p:not(.rqp-ar) { margin-top: -.4em; }
.rqa-prose .rqp-ar-i { font-family: 'Amiri', 'Traditional Arabic', serif; font-size: 1.28em; line-height: 1.4; color: var(--rqa-navy); font-style: normal; }

/* Kotak bawaan untuk penulis (mode Kode) */
.rqa-prose .rqp-ayat { margin: 1.8em 0; padding: 1.3em 1.4em 1.1em; border-radius: 20px; background: linear-gradient(160deg, #1846B8 0%, #16337F 100%); color: #E7EAF2; text-align: center; position: relative; overflow: hidden; }
.rqa-prose .rqp-ayat::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='66' height='66' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23C9A45C' stroke-opacity='.6' stroke-width='1'%3E%3Crect x='26' y='26' width='36' height='36'/%3E%3Crect x='26' y='26' width='36' height='36' transform='rotate(45 44 44)'/%3E%3Ccircle cx='44' cy='44' r='9'/%3E%3C/g%3E%3C/svg%3E"); -webkit-mask-image: radial-gradient(70% 90% at 100% 0%, #000 0%, transparent 70%); mask-image: radial-gradient(70% 90% at 100% 0%, #000 0%, transparent 70%); }
.rqa-prose .rqp-ayat > * { position: relative; margin: 0 0 .6em; }
.rqa-prose .rqp-ayat > *:last-child { margin-bottom: 0; }
.rqa-prose .rqp-ayat .rqp-ar, .rqa-prose .rqp-ayat.rqp-ar { color: #BFD4F7; text-align: center; padding: 0; border: 0; background: none; }
.rqa-prose .rqp-ayat .rqp-ar-i { color: #BFD4F7; }
.rqa-prose .rqp-ayat .rqp-terjemah { color: #fff; }
.rqa-prose .rqp-ayat .rqp-sumber { color: #9EA6B8; }
.rqa-prose .rqp-terjemah { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; font-size: 1.08em; line-height: 1.65; color: #3A4562; }
.rqa-prose .rqp-sumber { font-size: .8em; font-weight: 700; letter-spacing: .04em; color: var(--rqa-mute); }
.rqa-prose .rqp-catatan, .rqa-prose .rqp-penting, .rqa-prose .rqp-tips { position: relative; margin: 1.6em 0; padding: 2.4em 1.2em 1em; border-radius: 16px; font-size: .95em; line-height: 1.75; }
.rqa-prose .rqp-catatan > *:last-child, .rqa-prose .rqp-penting > *:last-child, .rqa-prose .rqp-tips > *:last-child { margin-bottom: 0; }
.rqa-prose .rqp-catatan > *, .rqa-prose .rqp-penting > *, .rqa-prose .rqp-tips > * { margin: 0 0 .7em; }
.rqa-prose .rqp-catatan::before, .rqa-prose .rqp-penting::before, .rqa-prose .rqp-tips::before { position: absolute; left: 1.35em; top: .95em; font-size: .72em; font-weight: 800; letter-spacing: .16em; }
.rqa-prose .rqp-catatan { background: #EFF4FF; border: 1px solid #D6E2FB; }
.rqa-prose .rqp-catatan::before { content: "ⓘ  CATATAN"; color: #2F5BC2; }
.rqa-prose .rqp-penting { background: #FFF1F0; border: 1px solid #F8D1D2; }
.rqa-prose .rqp-penting::before { content: "!  PENTING"; color: var(--rqa-red); }
.rqa-prose .rqp-tips { background: #EAF7F2; border: 1px solid #C8EBDD; }
.rqa-prose .rqp-tips::before { content: "✓  TIPS"; color: #14907A; }

/* Kode */
.rqa-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; font-size: .86em; padding: .15em .4em; border-radius: 6px; background: #F3F4F8; color: #B3121A; overflow-wrap: anywhere; }
.rqa-prose .rqp-code { margin: 1.6em 0; border-radius: 16px; overflow: hidden; background: #0F1830; box-shadow: 0 20px 40px -30px rgba(15, 24, 48, .8); }
.rqa-prose .rqp-code__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 6px 16px; background: #16337F; border-bottom: 1px solid rgba(255, 255, 255, .06); font: 700 11px/1 'Plus Jakarta Sans', system-ui, sans-serif; letter-spacing: .14em; color: #BFD4F7; }
.rqa-prose .rqp-copy { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #E7EAF2; font: 700 12px/1 'Plus Jakarta Sans', system-ui, sans-serif; cursor: pointer; }
.rqa-prose .rqp-copy:hover { background: rgba(255, 255, 255, .1); }
.rqa-prose .rqp-copy.is-done { background: #14907A; border-color: #14907A; color: #fff; }
.rqa-prose pre { margin: 0; padding: 16px 18px; overflow-x: auto; color: #E7EAF2; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; font-size: .8em; line-height: 1.7; tab-size: 2; -webkit-overflow-scrolling: touch; }
.rqa-prose > pre { border-radius: 16px; background: #0F1830; }
.rqa-prose pre code { padding: 0; background: none; color: inherit; font-size: 1em; overflow-wrap: normal; white-space: pre; }
.rqa-prose pre:focus-visible, .rqa-prose .rqp-table:focus-visible { outline: 3px solid rgba(29, 78, 216, .35); outline-offset: 2px; }

/* Tabel (bisa digeser di HP) */
.rqa-prose .rqp-table { margin: 1.6em 0; overflow-x: auto; border: 1px solid var(--rqa-line); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.rqa-prose table { width: 100%; border-collapse: collapse; font-size: .88em; line-height: 1.55; }
.rqa-prose .rqp-table table { min-width: 480px; }
.rqa-prose caption { caption-side: top; padding: 10px 14px; text-align: left; font-size: .9em; font-weight: 700; color: var(--rqa-mute); }
.rqa-prose th, .rqa-prose td { padding: 10px 14px; border-bottom: 1px solid var(--rqa-line); text-align: left; vertical-align: top; }
.rqa-prose th, .rqa-prose thead td { background: #F7F8FB; color: var(--rqa-navy); font-weight: 800; }
.rqa-prose tbody tr:nth-child(even) td { background: #FCFCFD; }
.rqa-prose tr:last-child td { border-bottom: 0; }
.rqa-prose td.rqp-ar, .rqa-prose th.rqp-ar { font-size: 1.3em; line-height: 1.8; text-align: right; }

/* Gambar, keterangan, galeri */
.rqa-prose img { max-width: 100%; height: auto; border-radius: 14px; cursor: zoom-in; }
.rqa-prose a img { cursor: pointer; }
.rqa-prose figure { margin: 1.8em 0; }
.rqa-prose figure img { margin: 0 auto; }
.rqa-prose figcaption, .rqa-prose .wp-caption-text, .rqa-prose .wp-element-caption { margin-top: 8px; font-size: .78em; line-height: 1.55; color: #8A93A6; text-align: center; }
.rqa-prose .wp-caption { max-width: 100% !important; }
.rqa-prose .aligncenter { margin-left: auto; margin-right: auto; display: block; text-align: center; }
@media (min-width: 700px) {
  .rqa-prose .alignleft { float: left; max-width: 46%; margin: .3em 1.4em 1em 0; }
  .rqa-prose .alignright { float: right; max-width: 46%; margin: .3em 0 1em 1.4em; }
  .rqa-prose h2, .rqa-prose h3, .rqa-prose hr, .rqa-prose .rqp-code, .rqa-prose .rqp-table { clear: both; }
}
.rqa-prose::after { content: ""; display: table; clear: both; }
.rqa-prose .wp-block-gallery, .rqa-prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.rqa-prose .wp-block-gallery figure, .rqa-prose .gallery dl, .rqa-prose .gallery dd { margin: 0; }
.rqa-prose .wp-block-gallery img, .rqa-prose .gallery img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.rqa-prose .gallery br { display: none; }

/* Video, audio, sematan */
.rqa-prose video, .rqa-prose audio { display: block; width: 100%; border-radius: 14px; }
.rqa-prose video { background: #000; }
.rqa-prose .rqp-embed { position: relative; margin: 1.8em 0; border-radius: 16px; overflow: hidden; background: #0F1830; aspect-ratio: 16 / 9; }
.rqa-prose .rqp-embed--map { aspect-ratio: 4 / 3; background: #EEF1F5; }
.rqa-prose .rqp-embed--audio { aspect-ratio: auto; height: 152px; background: transparent; }
.rqa-prose .rqp-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rqa-prose .wp-block-embed { margin: 1.8em 0; }
.rqa-prose .wp-block-embed .rqp-embed { margin: 0; }

/* Lipatan (details/summary) — cocok untuk tanya-jawab */
.rqa-prose details { border: 1px solid var(--rqa-line); border-radius: 14px; padding: 0 16px; background: #fff; }
.rqa-prose details + details { margin-top: -.6em; }
.rqa-prose summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 800; color: var(--rqa-navy); }
.rqa-prose summary::-webkit-details-marker { display: none; }
.rqa-prose summary::after { content: "+"; color: var(--rqa-red); font-size: 1.2em; line-height: 1; }
.rqa-prose details[open] summary::after { content: "−"; }
.rqa-prose details[open] { padding-bottom: 14px; }
.rqa-prose details > *:not(summary) { margin: 0 0 .8em; }

/* ---------- Pembesar gambar ---------- */
.rqa-zoom { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 14, 30, .88); cursor: zoom-out; animation: rqp-fade .2s ease-out; }
.rqa-zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px -20px #000; }
.rqa-zoom button { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 14px; width: 44px; height: 44px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; cursor: pointer; }

