/* ==========================================================================
   LAYANAN KEAGAMAAN DIGITAL (RELIGIUS) - gaya khusus komponen #rlg
   Dipakai: religius.php (publik) & modules/warga/religius.php (portal warga).
   Utilitas Tailwind ada di assets/css/religius.css (dibatasi #rlg).
   ========================================================================== */
/* ---- Reset ringan khusus #rlg (pengganti preflight Tailwind; Bootstrap di luar #rlg tidak tersentuh) ---- */
#rlg { --rlg-emas: #e9c77b; --rlg-hijau: #0f766e; font-family: 'Plus Jakarta Sans', sans-serif; color: #1e293b;
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(233,199,123,.10), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%230f766e' stroke-opacity='.06'%3E%3Ccircle cx='42' cy='42' r='21'/%3E%3Ccircle cx='21' cy='42' r='21'/%3E%3Ccircle cx='63' cy='42' r='21'/%3E%3Ccircle cx='31.5' cy='23.8' r='21'/%3E%3Ccircle cx='52.5' cy='23.8' r='21'/%3E%3Ccircle cx='31.5' cy='60.2' r='21'/%3E%3Ccircle cx='52.5' cy='60.2' r='21'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #f3faf6 0%, #f7fbf9 45%, #f2f7f5 100%); }
#rlg *, #rlg ::before, #rlg ::after { box-sizing: border-box; border: 0 solid #e2e8f0; }
#rlg h1, #rlg h2, #rlg h3, #rlg p, #rlg figure, #rlg blockquote { margin: 0; }
#rlg h1, #rlg h2, #rlg h3 { font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; }
#rlg button, #rlg select, #rlg input { font: inherit; color: inherit; margin: 0; line-height: inherit; }
#rlg button { background: transparent; padding: 0; cursor: pointer; }
#rlg a { color: inherit; text-decoration: inherit; }
#rlg ol, #rlg ul { margin: 0; padding: 0; list-style: none; }
#rlg .font-arab { font-family: 'Amiri', serif; line-height: 2.3; }
#rlg .font-sanskerta { font-family: 'Noto Serif Devanagari', serif; line-height: 2; }
#rlg .font-mandarin { font-family: 'Noto Serif SC', serif; line-height: 2; }
#rlg .font-serif-r { font-family: 'Noto Serif', Georgia, serif; }

/* ===================== HERO RELIGIUS ===================== */
#rlg .rlg-hero { position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background:
    radial-gradient(700px 380px at 78% 18%, rgba(233,199,123,.30), transparent 62%),
    radial-gradient(600px 400px at 8% 100%, rgba(45,212,191,.22), transparent 65%),
    linear-gradient(160deg, #052e2b 0%, #064e3b 38%, #0f5e57 70%, #134e4a 100%); }
#rlg .rlg-bintang { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .2;
  box-shadow: 0 0 6px rgba(255,255,255,.8); animation: rlgKelip var(--d) ease-in-out var(--t) infinite; z-index: -1; }
@keyframes rlgKelip { 0%,100% { opacity: .15; transform: scale(.8); } 50% { opacity: .95; transform: scale(1.25); } }
#rlg .rlg-cahaya { position: absolute; bottom: -20px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(253,230,138,.95) 0%, rgba(253,230,138,.35) 40%, transparent 72%);
  animation: rlgNaik var(--d) ease-in var(--t) infinite; opacity: 0; filter: blur(.3px); }
@keyframes rlgNaik { 0% { transform: translate(0,0) scale(.7); opacity: 0; } 15% { opacity: .85; }
  60% { transform: translate(14px,-260px) scale(1); opacity: .55; } 100% { transform: translate(-10px,-460px) scale(.6); opacity: 0; } }
#rlg .rlg-bunga { position: absolute; z-index: -1; opacity: .13; animation: rlgPutar 140s linear infinite; pointer-events: none; }
#rlg .rlg-sinar { position: absolute; inset: -40% -10% auto auto; width: 760px; height: 760px; z-index: -1; pointer-events: none;
  background: conic-gradient(from 200deg, transparent 0deg, rgba(253,230,138,.10) 12deg, transparent 26deg, rgba(253,230,138,.08) 40deg, transparent 54deg, rgba(253,230,138,.09) 70deg, transparent 86deg);
  border-radius: 50%; animation: rlgPutar 90s linear infinite; mask-image: radial-gradient(circle, #000 20%, transparent 68%); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 68%); }
@keyframes rlgPutar { to { transform: rotate(360deg); } }

/* Lingkar kerukunan: 6 simbol agama mengorbit cahaya di tengah */
#rlg .rlg-orbit { --r: 132px; position: relative; width: 340px; height: 340px; flex-shrink: 0; }
#rlg .rlg-halo { position: absolute; inset: 22%; border-radius: 50%;
  background: radial-gradient(circle, rgba(253,230,138,.55) 0%, rgba(253,230,138,.12) 45%, transparent 70%); animation: rlgNapas 6s ease-in-out infinite; }
@keyframes rlgNapas { 0%,100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.08); opacity: 1; } }
#rlg .rlg-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); }
#rlg .rlg-ring-1 { inset: calc(50% - var(--r)); border-style: dashed; border-color: rgba(233,199,123,.35); animation: rlgPutar 60s linear infinite reverse; }
#rlg .rlg-ring-2 { inset: calc(50% - var(--r) + 34px); border-color: rgba(255,255,255,.12); }
#rlg .rlg-pusat { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 0 40px rgba(253,230,138,.35), inset 0 1px 0 rgba(255,255,255,.35); text-align: center; }
#rlg .rlg-pusat i { font-size: 30px; color: var(--rlg-emas); filter: drop-shadow(0 0 10px rgba(253,230,138,.7)); }
#rlg .rlg-pusat span { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: rgba(255,255,255,.88); }
#rlg .rlg-putar { position: absolute; inset: 0; animation: rlgPutar 48s linear infinite; }
#rlg .rlg-sat { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px;
  transform: rotate(calc(var(--i) * 60deg)) translateY(calc(var(--r) * -1)) rotate(calc(var(--i) * -60deg)); }
#rlg .rlg-sat > span { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 19px; color: #fff;
  background: var(--w); border: 2px solid rgba(255,255,255,.55); box-shadow: 0 8px 20px -6px rgba(0,0,0,.45), 0 0 18px -2px var(--w);
  animation: rlgPutar 48s linear infinite reverse; }
#rlg .rlg-gelombang { position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; z-index: 0; pointer-events: none; }
#rlg .rlg-gelombang svg { position: absolute; bottom: 0; width: 200%; height: 100%; }
#rlg .rlg-gel-1 { animation: rlgGeser 26s linear infinite; opacity: .5; }
#rlg .rlg-gel-2 { animation: rlgGeser 18s linear infinite reverse; }
@keyframes rlgGeser { from { transform: translateX(0); } to { transform: translateX(-50%); } }
#rlg .rlg-masuk { animation: rlgMasuk .9s cubic-bezier(.2,.7,.2,1) both; }
#rlg .rlg-masuk-2 { animation-delay: .12s; } #rlg .rlg-masuk-3 { animation-delay: .24s; } #rlg .rlg-masuk-4 { animation-delay: .36s; }
@keyframes rlgMasuk { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Ornamen judul bagian */
#rlg .rlg-ornamen { display: flex; align-items: center; justify-content: center; gap: 10px; color: #b8913f; }
#rlg .rlg-ornamen::before, #rlg .rlg-ornamen::after { content: ''; height: 1px; width: 56px; background: linear-gradient(90deg, transparent, #d6b46a); }
#rlg .rlg-ornamen::after { transform: scaleX(-1); }

/* ===== Buku 3D ===== */
#rlg .book-scene { perspective: 1200px; }
#rlg .book-wrapper { position: relative; width: 100%; height: 268px; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.25,.8,.25,1); cursor: pointer; outline: none; }
#rlg .book-wrapper:hover, #rlg .book-wrapper:focus-visible { transform: translateY(-6px); }
#rlg .book-wrapper:focus-visible .book-cover { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #0d9488; }
#rlg .book-pages { position: absolute; inset: 4px 6px 4px 12px; background: linear-gradient(to right, #e2e8f0 0%, #fffbeb 8%, #ffffff 25%, #fefce8 95%, #e2e8f0 100%);
  border-radius: 4px 12px 12px 4px; box-shadow: inset 4px 0 10px rgba(0,0,0,.08), 0 10px 25px -5px rgba(0,0,0,.15); padding: 18px 16px 16px 22px;
  display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #cbd5e1; }
#rlg .book-cover { position: absolute; inset: 0; border-radius: 6px 14px 14px 6px; transform-origin: left center; transform-style: preserve-3d;
  transition: transform .65s cubic-bezier(.34,1.4,.64,1); box-shadow: 0 14px 28px -8px rgba(6,78,59,.38), inset 0 1px 1px rgba(255,255,255,.3);
  overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 18px 18px 18px 26px; color: #fff; }
#rlg .book-cover::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 16px; background: linear-gradient(to right, rgba(0,0,0,.45), rgba(255,255,255,.18) 45%, rgba(0,0,0,.35)); border-right: 1px solid rgba(255,255,255,.15); }
#rlg .book-cover::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.22) 48%, transparent 60%); transform: translateX(-120%); transition: transform 1.1s ease; }
#rlg .book-wrapper:hover .book-cover::after { transform: translateX(120%); }
#rlg .book-cover-frame { position: absolute; inset: 10px 10px 10px 22px; border: 1.5px solid rgba(233,199,123,.45); border-radius: 4px 10px 10px 4px; pointer-events: none; }
#rlg .book-cover-pola { position: absolute; right: -40px; bottom: -40px; width: 170px; height: 170px; opacity: .14; pointer-events: none; }
#rlg .book-wrapper:hover .book-cover, #rlg .book-wrapper:focus-visible .book-cover, #rlg .book-wrapper.is-opening .book-cover { transform: rotateY(-34deg); }
#rlg .rlg-emblem { transition: transform .7s ease, filter .7s ease; }
#rlg .book-wrapper:hover .rlg-emblem { transform: scale(1.12); filter: drop-shadow(0 0 12px rgba(255,255,255,.55)); }
#rlg .book-wrapper:hover .emblem-buddha { transform: rotate(90deg) scale(1.12); transition-duration: 1.2s; }
@media (max-width: 639.98px) {
  #rlg .book-wrapper { height: 222px; }
  #rlg .book-cover { padding: 14px 12px 14px 22px; }
  #rlg .book-cover-frame { inset: 8px 8px 8px 19px; }
  #rlg .rlg-orbit { --r: 104px; width: 270px; height: 270px; }
  #rlg .rlg-pusat { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
  #rlg .rlg-pusat i { font-size: 24px; }
  #rlg .rlg-sat { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
  #rlg .rlg-sat > span { font-size: 16px; }
}

/* ===== Kutipan kebajikan bergilir ===== */
#rlg .rlg-kutip-isi { transition: opacity .6s ease, transform .6s ease; }
#rlg .rlg-kutip-isi.ganti { opacity: 0; transform: translateY(8px); }
#rlg .rlg-titik { width: 8px; height: 8px; border-radius: 99px; background: #cbd5e1; transition: all .3s; }
#rlg .rlg-titik.aktif { width: 22px; background: #0f766e; }

/* ===== Pembaca ===== */
#rlg .ayat-sedang-dibaca { border-color: #0d9488 !important; background-color: #f0fdfa !important; box-shadow: 0 0 0 2px rgba(13,148,136,.35) !important; }
#rlg .rlg-nomor-arab { font-size: .7em; color: #0f766e; margin-right: .25em; white-space: nowrap; }
#rlg .custom-scrollbar::-webkit-scrollbar { width: 6px; }
#rlg .custom-scrollbar::-webkit-scrollbar-track { background: #f1f5f9; }
#rlg .custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
#rlg .rlg-kepala-modal { position: relative; overflow: hidden; }
#rlg .rlg-kepala-modal::after { content: ''; position: absolute; right: -30px; top: -60px; width: 220px; height: 220px; opacity: .12; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1'%3E%3Ccircle cx='50' cy='50' r='16'/%3E%3Ccircle cx='66' cy='50' r='16'/%3E%3Ccircle cx='34' cy='50' r='16'/%3E%3Ccircle cx='58' cy='36.1' r='16'/%3E%3Ccircle cx='42' cy='36.1' r='16'/%3E%3Ccircle cx='58' cy='63.9' r='16'/%3E%3Ccircle cx='42' cy='63.9' r='16'/%3E%3Ccircle cx='50' cy='50' r='32'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat; }
#rlg .rlg-sedang-putar i { animation: rlgDenyut 1.2s ease-in-out infinite; }
@keyframes rlgDenyut { 50% { transform: scale(1.25); } }
#rlg .toast-salin { transform: translate(-50%, 20px); opacity: 0; transition: all .3s ease; pointer-events: none; }
#rlg .toast-salin.tampil { transform: translate(-50%, 0); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  #rlg .rlg-bintang, #rlg .rlg-cahaya, #rlg .rlg-bunga, #rlg .rlg-sinar, #rlg .rlg-putar, #rlg .rlg-sat > span, #rlg .rlg-ring-1,
  #rlg .rlg-halo, #rlg .rlg-gel-1, #rlg .rlg-gel-2, #rlg .rlg-masuk { animation: none !important; }
  #rlg .rlg-cahaya { display: none; }
  #rlg .book-wrapper, #rlg .book-cover, #rlg .rlg-emblem { transition: none !important; }
}

/* ===== Portal warga (modules/warga/religius.php) ===== */
#rlg[data-hanya] { background: #f5f5f5; }
#rlg .rlg-sans { font-family: 'Plus Jakarta Sans', sans-serif; }
#rlg .rlg-warga-hero { isolation: isolate;
  background: radial-gradient(420px 240px at 90% 0%, rgba(253,230,138,.28), transparent 65%), linear-gradient(150deg, var(--w1) 0%, var(--w2) 100%); }
#rlg .rlg-warga-emblem { position: relative; width: 68px; height: 68px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(253,230,138,.5); box-shadow: 0 0 30px rgba(253,230,138,.35), inset 0 1px 0 rgba(255,255,255,.3); }
#rlg .rlg-warga-emblem::after { content: ''; position: absolute; inset: -8px; border-radius: 28px; border: 1px dashed rgba(253,230,138,.45); animation: rlgPutar 30s linear infinite; }
#rlg .rlg-warga-emblem i { color: #fef3c7; filter: drop-shadow(0 0 8px rgba(253,230,138,.6)); animation: rlgNapas 5s ease-in-out infinite; }
#rlg .rlg-warga-cta { transition: transform .2s ease, box-shadow .2s ease; box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--w1) 60%, transparent), 0 2px 8px rgba(0,0,0,.05); }
#rlg .rlg-warga-cta:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) { #rlg .rlg-warga-emblem::after, #rlg .rlg-warga-emblem i { animation: none !important; } }
/* Ayat yang terjemahan Indonesianya belum siap (ditampilkan teks sumber) */
#rlg .rlg-belum { color: #64748b !important; font-style: italic; }
