/* =========================================================
   Halaman Artikel, SOP, dan Perjalanan SABIHA.
   Dasar tampilan (warna, navbar, tombol, footer) memakai
   css/style.css dari beranda ptsabiha.com; berkas ini hanya
   menambah komponen halaman baca.
   ========================================================= */

.nav__links a.is-current { color: var(--blue); background: var(--blue-tint); }

/* ---------- Kepala halaman ---------- */
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 56px 0 40px; }
.page-head h1 { color: var(--blue-deep); font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-head p { color: var(--text-muted); max-width: 640px; margin: 0; }
.page-head--center { text-align: center; }
.page-head--center p { margin: 0 auto; }
.page-body { padding-bottom: 80px; }
.crumb { font-size: .82rem; color: var(--text-muted); margin-bottom: 14px; }
.crumb a { color: var(--blue); font-weight: 600; }
.crumb a:hover { text-decoration: underline; }

/* ---------- Saringan + cari ---------- */
.page-head--plain { background: var(--white); border-bottom: 0; padding: 40px 0 4px; }
.page-head--plain h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: .3em; }
.head-row { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; }
.tools { margin: 24px 0 32px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; flex-wrap: wrap; column-gap: 20px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 12px 0 14px; font-size: .88rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; transition: color .15s; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--blue-deep); }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--blue); }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .8rem; background: var(--white); width: 260px; flex: none; margin-bottom: 4px; }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.search input { border: 0; outline: 0; font: inherit; font-size: .9rem; width: 100%; background: transparent; color: var(--text); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--text-muted); stroke-width: 2; flex: none; }
.search--full { margin-bottom: 16px; width: auto; }
.result-note { margin: -12px 0 24px; font-size: .9rem; color: var(--text-muted); }
.result-note a { color: var(--blue); font-weight: 600; }

/* ---------- Kartu artikel ---------- */
/* Sampul selalu 16:9 (ukuran baku 1280x720 / 1600x900) dan tidak dipotong. */
.card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.feature { position: relative; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-bottom: 40px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.feature__img { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; }
.feature__body { display: flex; flex-direction: column; align-items: flex-start; }
.feature__body h2 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); line-height: 1.25; margin: .45em 0 .55em; color: var(--blue-deep); transition: color .15s; }
.feature__body p { color: var(--text-muted); margin: 0 0 18px; line-height: 1.65; }
.feature:hover h2 { color: var(--blue); }
.section-label { font-size: .95rem; font-weight: 700; color: var(--text); margin: 0 0 20px; letter-spacing: 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.card { position: relative; display: flex; flex-direction: column; }
.card__img { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; transition: opacity .15s; }
.card:hover .card__img { opacity: .92; }
.card__body { padding: 14px 0 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__body h3 { margin: 0; font-size: 1.06rem; line-height: 1.4; letter-spacing: -.01em; transition: color .15s; }
.card:hover h3 { color: var(--blue); }
.card__body p { margin: 0; color: var(--text-muted); font-size: .9rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .8rem; color: var(--text-muted); margin-top: auto; padding-top: 4px; }
.meta strong { color: var(--text); font-weight: 600; }
.cover-img { object-fit: contain; background: var(--bg-soft); }

/* Label kategori di daftar artikel: teks berwarna, tanpa kapsul */
.kat { font-size: .8rem; font-weight: 700; color: var(--blue); }
.kat--hijau { color: #0B6A4A; }
.kat--kuning { color: #8A6500; }
.kat--merah { color: var(--red); }
.kat--ungu { color: #5B2F8F; }

.tag { display: inline-flex; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .22rem .6rem; border-radius: 999px; width: fit-content; margin-right: 4px; }
.tag--biru { background: var(--blue-tint); color: var(--blue); }
.tag--hijau { background: #E3F4EC; color: #0B6A4A; }
.tag--kuning { background: var(--yellow-tint); color: #8A6500; }
.tag--merah { background: var(--red-tint); color: var(--red); }
.tag--ungu { background: #EFE8F7; color: #5B2F8F; }

/* Latar pengganti bila artikel belum punya gambar sampul */
.ph { display: grid; place-items: center; }
.ph__logo { width: 64px; height: 64px; opacity: .9; background: rgba(255, 255, 255, .92); border-radius: 18px; padding: 8px; }
.ph--biru { background: linear-gradient(135deg, #1F4E8C, #0E2A4F); }
.ph--hijau { background: linear-gradient(135deg, #0F7B5F, #0A4F3D); }
.ph--kuning { background: linear-gradient(135deg, #F2B705, #C98A00); }
.ph--merah { background: linear-gradient(135deg, #C0262D, #7E1419); }
.ph--ungu { background: linear-gradient(135deg, #6B3FA0, #3F2263); }

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; font-size: .9rem; padding: 0 10px; }
.pager a:hover { border-color: var(--blue); color: var(--blue); }
.pager .on { background: var(--blue); color: var(--white); border-color: var(--blue); }
.pager .off { color: var(--line); }

.empty { text-align: center; padding: 56px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--text-muted); }
.empty h2 { color: var(--text); font-size: 1.4rem; }
.empty--page { border: 0; padding: 96px 16px; }
.empty--page h1 { color: var(--blue-deep); }

/* ---------- Halaman baca ---------- */
.preview-bar { background: var(--yellow-tint); border-bottom: 1px solid #EBD9A0; color: #5C4500; font-size: .9rem; padding: 10px 0; }
.preview-bar a { font-weight: 700; color: var(--blue); margin-left: 8px; }
.read { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-top: 44px; padding-bottom: 80px; }
.article { max-width: 720px; min-width: 0; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--blue-deep); margin: .35em 0 .45em; }
.byline { display: flex; align-items: center; gap: 12px; font-size: .86rem; color: var(--text-muted); padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.byline img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); object-fit: contain; flex: none; }
.byline strong { color: var(--text); display: block; }
.cover { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); margin-bottom: 28px; }
.cover-fig { margin: 0 0 28px; }
.cover-fig .cover { margin-bottom: 8px; }
.cover-cap { font-size: .8rem; line-height: 1.5; color: var(--text-muted); }
.cover-cap a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.prose { font-size: 1.06rem; line-height: 1.8; overflow-wrap: anywhere; }
.prose h2 { font-size: 1.45rem; margin: 1.6em 0 .5em; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.18rem; margin: 1.4em 0 .4em; }
.prose p { margin: 0 0 1.1em; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--yellow); background: var(--yellow-tint); border-radius: 0 12px 12px 0; font-weight: 600; }
.prose blockquote p:last-child { margin: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li p { margin: 0 0 .3em; }
.prose img { border-radius: 12px; margin: 1.2em auto; height: auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); }
.prose th p, .prose td p { margin: 0; }
.prose pre { background: var(--blue-deep); color: #E6EDF7; padding: 14px 16px; border-radius: 12px; overflow-x: auto; font-size: .9rem; }
.prose .video { position: relative; aspect-ratio: 16 / 9; margin: 1.4em 0; border-radius: 14px; overflow: hidden; background: #000; }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); align-items: center; font-size: .86rem; font-weight: 700; }
.share .btn { font-family: inherit; }

.aside { display: grid; gap: 18px; align-content: start; position: sticky; top: 96px; }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--white); }
.box__title { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; display: block; }
.box__text { margin: 0 0 12px; color: var(--text-muted); font-size: .9rem; }
.box ol { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; font-size: .9rem; }
.box ol a { color: var(--blue); font-weight: 600; }
.related { display: grid; gap: 12px; }
.related a { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; font-size: .88rem; font-weight: 700; line-height: 1.35; }
.related a:hover span { color: var(--blue); }
.related__img { width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; }
.related__img .ph__logo, .related__img.ph .ph__logo { width: 28px; height: 28px; border-radius: 8px; padding: 3px; }
.box--cta { background: var(--blue-deep); color: var(--white); border: 0; }
.box--cta .box__title { color: var(--yellow); }
.box--cta h3 { margin: 0 0 6px; }
.box--cta p { margin: 0 0 14px; color: #C9D6EA; font-size: .9rem; }

/* ---------- SOP ---------- */
.sop-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding-top: 36px; padding-bottom: 80px; }
.sop-nav { display: grid; gap: 6px; align-content: start; position: sticky; top: 96px; }
.sop-nav a { padding: .7rem 1rem; border-radius: 12px; border: 1px solid transparent; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.sop-nav a:hover { background: var(--bg-soft); }
.sop-nav a.on { background: var(--blue-tint); color: var(--blue); border-color: #C9D6EA; }
.sop-nav small { color: var(--text-muted); font-weight: 700; }
.sop-list { display: grid; gap: 12px; }
.sop { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: box-shadow .2s, border-color .2s; }
.sop:hover { box-shadow: var(--shadow); border-color: #C9D6EA; }
.sop__no { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; font-weight: 700; color: var(--red); background: var(--red-tint); padding: .35rem .6rem; border-radius: 8px; white-space: nowrap; }
.sop h3 { margin: 0 0 4px; font-size: 1.02rem; }
.sop p { margin: 0; font-size: .86rem; color: var(--text-muted); }
.sop__side { text-align: right; font-size: .78rem; color: var(--text-muted); white-space: nowrap; }
.sop__side b { display: block; color: var(--text); }
.lock { color: #8A6500; font-weight: 700; }
.note-internal { margin-top: 20px; font-size: .88rem; color: var(--text-muted); }
.note-internal a { color: var(--blue); font-weight: 700; }

.sop-page { padding-top: 40px; padding-bottom: 80px; }
.sop-doc { max-width: 820px; }
.sop-doc h1 { color: var(--blue-deep); font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin: .4em 0 .2em; }
.sop-doc h2 { font-size: 1.3rem; margin: 1.4em 0 .8em; }
.sop-purpose { color: var(--text-muted); margin: 0; }
.sop-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 22px 0 8px; }
.sop-card table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sop-card th, .sop-card td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sop-card th { width: 34%; background: var(--bg-soft); font-weight: 700; color: var(--text-muted); }
.sop-card tr:last-child th, .sop-card tr:last-child td { border-bottom: 0; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: langkah; }
.steps li { counter-increment: langkah; position: relative; padding: 0 0 22px 56px; }
.steps li::before { content: counter(langkah); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: var(--white); display: grid; place-items: center; font-weight: 800; }
.steps li::after { content: ""; position: absolute; left: 18px; top: 40px; bottom: 2px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps strong { display: block; margin-bottom: 2px; padding-top: 7px; }
.steps span { color: var(--text-muted); font-size: .95rem; }
.steps em { font-style: normal; font-size: .76rem; font-weight: 700; color: var(--blue); background: var(--blue-tint); padding: .1rem .5rem; border-radius: 6px; margin-left: 8px; white-space: nowrap; }
.sop-notes { background: var(--bg-soft); border-radius: 12px; padding: 14px 18px; font-size: .95rem; }
.sop-history { margin-top: 18px; font-size: .84rem; color: var(--text-muted); line-height: 1.7; }

/* ---------- Perjalanan (linimasa) ---------- */
.timeline { position: relative; max-width: 860px; margin: 48px auto 88px; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #C3D0E4; transform: translateX(-1px); }
.tl { position: relative; width: 50%; padding: 0 40px 36px 0; }
.tl:nth-child(even) { margin-left: 50%; padding: 0 0 36px 40px; }
.tl::before { content: ""; position: absolute; top: 18px; right: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow); border: 4px solid var(--white); box-shadow: 0 0 0 2px var(--yellow); }
.tl:nth-child(even)::before { right: auto; left: -9px; }
.tl__card { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--white); box-shadow: var(--shadow); }
.tl__date { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.tl__card h3 { margin: .3em 0 .35em; font-size: 1.08rem; }
.tl__card p { margin: 0 0 8px; color: var(--text-muted); font-size: .92rem; }
.tl__card a { color: var(--blue); font-weight: 700; font-size: .88rem; }

/* ---------- Layar kecil ---------- */
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 20px; padding-bottom: 32px; margin-bottom: 28px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 22px; }
  .head-row { flex-direction: column; align-items: stretch; gap: 16px; }
  .search { width: 100%; margin-bottom: 0; }
  .read { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
  .aside { position: static; }
  .sop-layout { grid-template-columns: 1fr; gap: 16px; padding-top: 24px; }
  .sop-nav { position: static; display: flex; overflow-x: auto; padding-bottom: 4px; }
  .sop-nav a { white-space: nowrap; border-color: var(--line); }
  .timeline::before { left: 8px; }
  .tl, .tl:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 28px 36px; }
  .tl::before, .tl:nth-child(even)::before { left: 0; right: auto; }
}
@media (max-width: 560px) {
  .page-head { padding: 40px 0 28px; }
  .page-head--plain { padding: 28px 0 0; }
  .tools { margin: 16px 0 24px; }
  .tabs { flex-wrap: nowrap; column-gap: 18px; }
  .grid { grid-template-columns: 1fr; gap: 32px; }
  .sop { grid-template-columns: 1fr; gap: 8px; }
  .sop__side { text-align: left; }
  .sop-card th { width: 40%; }
  .prose { font-size: 1rem; }
}

/* ---------- Cetak (SOP dan artikel) ---------- */
@media print {
  .navbar, .footer, .share, .aside, .preview-bar, .crumb, .toast, .sop-nav { display: none !important; }
  body { color: #000; }
  .read, .sop-layout { display: block; padding: 0; }
  .steps li::before { border: 1px solid #000; color: #000; background: none; }
  .sop-card th { background: none; }
  a { text-decoration: none; }
}
