/* ============================================================
   Jurnal Halal Insight — daftar edisi & pembaca flipbook
   ============================================================ */

/* ------------------------- Daftar edisi */
.jrn-page { padding-top: 8px; }
.jrn-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 34px 28px; max-width: 1080px; margin: 0 auto;
}
.jrn-card {
  background: #fff; border: 1px solid var(--c-line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.jrn-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.jrn-cover { position: relative; aspect-ratio: 3 / 4; background: #0B5A3C; overflow: hidden; }
.jrn-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jrn-cover-ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0B5A3C, #0E7A50); color: var(--c-gold); font-size: 56px;
}
.jrn-badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(6, 46, 32, .82); color: #fff; font-family: var(--font-head);
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, .55); backdrop-filter: blur(4px);
}
.jrn-cover-cta {
  position: absolute; inset: auto 0 0 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; color: #fff; font-weight: 600; font-size: 14px; text-decoration: none;
  background: linear-gradient(0deg, rgba(6, 46, 32, .88), rgba(6, 46, 32, 0));
  opacity: 0; transition: opacity .25s ease;
}
.jrn-cover-cta .bi { color: var(--c-gold); }
.jrn-card:hover .jrn-cover-cta { opacity: 1; }
.jrn-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.jrn-title { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 17.5px; line-height: 1.35; }
.jrn-title a { color: var(--c-text); text-decoration: none; transition: color .2s ease; }
.jrn-title a:hover { color: var(--c-primary, #087A50); }
.jrn-desc { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--c-text-soft); flex: 1; }
.jrn-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.jrn-actions .btn-primary, .jrn-actions .btn-ghost { font-size: 13px; padding: 9px 16px; }

.jrn-empty {
  max-width: 560px; margin: 30px auto; text-align: center;
  border: 2px dashed rgba(8, 122, 80, .35); border-radius: 18px;
  background: linear-gradient(160deg, #F2FAF6, #FAF7EF); padding: 52px 28px;
}
.jrn-empty-ic { font-size: 44px; color: var(--c-primary, #087A50); display: block; margin-bottom: 14px; }
.jrn-empty-title { font-weight: 600; font-family: var(--font-head); margin: 0 0 8px; }
.jrn-empty-note { margin: 0; font-size: 13.5px; color: var(--c-text-soft); line-height: 1.6; }

/* ------------------------- Pembaca flipbook */
.jrb-page {
  min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 500px at 50% -10%, #10482F, #07301F 60%, #052417);
}
.jrb-topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 32px); border-bottom: 1px solid rgba(212, 175, 55, .25);
}
.jrb-back, .jrb-unduh {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  color: #E8F2EF; font-size: 13.5px; font-weight: 500;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  padding: 9px 16px; border-radius: 999px; transition: all .2s ease;
}
.jrb-back:hover, .jrb-unduh:hover { border-color: var(--c-gold); color: var(--c-gold-soft); }
.jrb-back .bi, .jrb-unduh .bi { color: var(--c-gold); }
.jrb-meta { flex: 1; text-align: center; color: #fff; line-height: 1.35; min-width: 200px; }
.jrb-meta strong { font-family: var(--font-head); font-size: 15px; display: block; }
.jrb-meta span { font-size: 12.5px; color: var(--c-gold-soft); }
.jrb-langnote {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: #BFD6CF;
  border: 1px solid rgba(212, 175, 55, .35); border-radius: 999px;
  padding: 3px 10px; margin-top: 4px;
}

.jrb-stage {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: center;
  padding: clamp(14px, 3vw, 34px); overflow: hidden;
}
.jrb-book {
  position: relative; width: min(960px, 100%); aspect-ratio: 2 / 1.42;
  perspective: 2200px; outline: none;
}
.jrb-sheet {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center;
}
.jrb-sheet img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jrb-left { left: 0; border-radius: 10px 4px 4px 10px; }
.jrb-right { right: 0; border-radius: 4px 10px 10px 4px; }
.jrb-ph { color: #9FB4AD; font-size: 44px; }
.jrb-ph-blank { visibility: hidden; }

.jrb-leaf {
  position: absolute; top: 0; bottom: 0; width: 50%;
  transform-style: preserve-3d;
  z-index: 5; pointer-events: none; opacity: 0;
}
.jrb-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  background: #fff; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.jrb-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jrb-face-back { transform: rotateY(180deg); }

.jrb-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; color: #CFE3DC;
}
.jrb-loading p { font-size: 14px; letter-spacing: .3px; }
.jrb-spin {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(212, 175, 55, .25); border-top-color: var(--c-gold);
  animation: jrb-spin 1s linear infinite;
}
@keyframes jrb-spin { to { transform: rotate(360deg); } }

.jrb-error {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  color: #F3D7D7; text-align: center; padding: 24px;
}
.jrb-error .jrb-empty-ic { font-size: 40px; color: var(--c-gold); }
.jrb-error-note { font-size: 13px; color: #CFE3DC; }
.jrb-fallback { width: min(860px, 94%); height: 70vh; border: 1px solid rgba(212, 175, 55, .3); border-radius: 12px; background: #fff; }

.jrb-controls {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 16px 0 6px;
}
.jrb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  color: #E8F2EF; font-size: 18px; transition: all .2s ease;
}
.jrb-btn:hover:not(:disabled) { border-color: var(--c-gold); color: var(--c-gold-soft); }
.jrb-btn:disabled { opacity: .35; cursor: default; }
.jrb-btn-wide { width: auto; border-radius: 999px; padding: 0 18px; font-size: 14px; }
.jrb-counter {
  min-width: 86px; text-align: center; color: #fff; font-family: var(--font-head);
  font-size: 14px; font-weight: 600; letter-spacing: 1px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  padding: 9px 14px; border-radius: 999px;
}
.jrb-hint {
  text-align: center; color: #9DBBB4; font-size: 12.5px;
  padding: 0 20px 22px; margin: 0;
}
.jrb-hint .bi { color: var(--c-gold); }

.jrb-stage.is-fallback { padding-top: 12px; }
.jrb-stage.is-fallback .jrb-book { display: none; }

/* Mobile: halaman tunggal */
@media (max-width: 720px) {
  .jrb-book { aspect-ratio: 3 / 4; width: min(560px, 100%); }
  .jrb-sheet, .jrb-leaf { width: 100%; }
  .jrb-left { left: 0; }
  .jrb-right, .jrb-leaf-right { display: none; }
  .jrb-leaf { left: 0; width: 100%; }
  .jrn-grid { grid-template-columns: 1fr; max-width: 420px; }
}
@media (min-width: 721px) and (max-width: 1020px) {
  .jrn-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .jrb-meta { order: 3; flex-basis: 100%; }
}
