/* PT Parama Nusa Utama — komponen tambahan di atas site.css (hasil turunan prototipe).
   Berisi: pemilih bahasa, tanda air logo PNU, animasi, merek, form, paginasi, artikel, penampil dokumen, video. */

[hidden] { display: none !important; }

/* ------------------------------------------------------------ bahasa (revisi #10: id / en / zh) */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; }
.lang-switch a { padding: 3px 8px; border-radius: 3px; font-weight: 600; color: #e3eae6; opacity: .82; text-decoration: none; line-height: 1.2; }
.lang-switch a:hover, .lang-switch a:focus-visible { opacity: 1; background: rgba(255, 255, 255, .12); }
.lang-switch a.is-current { background: var(--gold); color: #142e2d; opacity: 1; }
.utility-in a, .utility-in > span, .lang-switch a { white-space: nowrap; }
.utility-hours { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 680px) { .utility-hours { display: none; } .utility-in > span { gap: 4px; } }
.lang-zh, :lang(zh-Hans) { font-family: var(--body), "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif; }
.lang-zh h1, .lang-zh h2, .lang-zh h3, .lang-zh .eyebrow, .lang-zh .maker, .lang-zh .card-chip { letter-spacing: 0; }
.lang-zh .eyebrow, .lang-zh .maker { text-transform: none; }

/* ------------------------------------------------------------ tanda air logo PNU (revisi #9) */
.wm { position: relative; }
.wm::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: url("../img/logo.png") center / min(42%, 240px) auto no-repeat; opacity: .12;
}
.item-card.wm::after { content: none; }
.item-card.wm .card-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: url("../img/logo.png") center / min(46%, 170px) auto no-repeat; opacity: .12;
}
.doc-page.wm::after { content: none; }   /* halaman dokumen sudah bertanda air permanen di gambarnya */
.wm img { -webkit-user-drag: none; }

/* ------------------------------------------------------------ gambar bergerak (revisi #15) */
@media (prefers-reduced-motion: no-preference) {
  .item-card .card-art img { transition: transform .5s ease; }
  .item-card:hover .card-art img { transform: scale(1.05); }
}
@keyframes hero-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.085); } }

/* ------------------------------------------------------------ merek di katalog (revisi #7, #8) */
.makers a { max-width: none; flex: 1 1 0; flex-direction: column; gap: 6px; text-align: center; text-decoration: none; }
.makers img { max-width: 100%; height: auto; max-height: 46px; object-fit: contain; mix-blend-mode: multiply; filter: grayscale(1); opacity: .78; transition: opacity .2s, filter .2s; }
.makers a:hover img, .makers a:focus-visible img { opacity: 1; filter: none; }
.maker-kind { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; line-height: 1.25; }
.maker-name { font-weight: 700; color: var(--ink); }
@media (max-width: 760px) { .brand-row { flex-direction: column; align-items: flex-start; } .makers { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; } .makers a:nth-child(n) { grid-row: auto; } }
@media (max-width: 480px) { .makers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------ form kontak */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.c-alert { padding: 13px 16px; border-radius: 5px; margin: 0 0 20px; font-size: .95rem; }
.c-alert ul { margin: 6px 0 0; padding-left: 18px; }
.c-alert-ok { background: #e4f3eb; border: 1px solid #9cc9b0; color: #17482f; }
.c-alert-err { background: #fdecea; border: 1px solid #e3a8a2; color: #7a1f17; }

/* ------------------------------------------------------------ Cek Stok: filter server-side + jumlah per halaman (revisi #6) */
.c-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: 16px; align-items: end; }
.c-filters .c-search { grid-column: auto; }
.c-filter-actions { display: flex; align-items: center; gap: 14px; padding-bottom: 4px; }
.c-filter-actions .c-button { padding: 11px 18px; }
.c-filter-actions .c-reset { display: inline-block; text-decoration: underline; font-weight: 600; color: var(--teal); }
@media (max-width: 1000px) { .c-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .c-filters .c-search { grid-column: 1 / -1; } .c-filter-actions { grid-column: 1 / -1; } }
@media (max-width: 520px) { .c-filters { grid-template-columns: 1fr; } }
.c-paging { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.c-paging .c-button { display: inline-flex; align-items: center; padding: 8px 14px; font-size: .86rem; text-decoration: none; }
.c-paging .is-disabled { opacity: .45; pointer-events: none; }
.c-row-links a { text-decoration: none; }
.c-empty-note, #c-empty { padding: 36px 0; color: var(--muted); text-align: center; }
.c-table-frame #c-empty { padding: 32px 16px; }

/* ------------------------------------------------------------ artikel (revisi #5) */
.article-card .card-art { height: clamp(160px, 14vw, 205px); padding: 0; background: #e9efec; }
.article-card .card-art img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
.article-card .card-noimg { display: grid; place-items: center; color: #8fa79d; width: 100%; height: 100%; }
.article-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-wrap { max-width: 860px; }
.article-date { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 0; }
.article-cover { margin: 0 0 28px; border-radius: 6px; overflow: hidden; }
.article-cover img { display: block; width: 100%; height: auto; }
.article-body { font-size: 1.06rem; line-height: 1.78; color: #20353a; overflow-wrap: anywhere; }
.article-body h2, .article-body h3, .article-body h4 { margin: 1.8em 0 .5em; line-height: 1.25; color: var(--ink); }
.article-body img { max-width: 100%; height: auto; border-radius: 4px; }
.article-body a { color: var(--teal); text-underline-offset: 3px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.article-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--gold); color: var(--muted); }
.legacy-html { line-height: 1.7; }
.legacy-html img { max-width: 100%; height: auto; }

/* ------------------------------------------------------------ isi buatan editor (@wiliarko/wysiwyg-editor) di situs publik
   Kelas wy-* dihasilkan editor dan disaring Html::clean. Gaya di sini harus setara dengan tampilan di editor admin. */
.article-body, .legacy-html { display: flow-root; }                       /* gambar/video mengambang tidak keluar dari kotak */
.article-body p, .legacy-html p { margin: 0 0 1em; }
.article-body ul, .article-body ol, .legacy-html ul, .legacy-html ol { margin: 0 0 1em; padding-left: 1.5em; }
.article-body ul, .legacy-html ul { list-style: disc; }
.article-body ol, .legacy-html ol { list-style: decimal; }
.article-body ol[type="a"], .legacy-html ol[type="a"] { list-style-type: lower-alpha; }
.article-body li, .legacy-html li { margin: .25em 0; }
.article-body hr, .legacy-html hr { border: 0; border-top: 1px solid var(--line); margin: 1.8em 0; }
.article-body figure, .legacy-html figure { margin: 1.4em 0; }
.article-body figcaption, .legacy-html figcaption { margin-top: .5em; font-size: .9rem; color: var(--muted); text-align: center; }
.article-body pre, .legacy-html pre { overflow-x: auto; padding: 14px 16px; background: #f1f5f3; border-radius: 6px; font-size: .92rem; }
.article-body table, .legacy-html table { display: block; max-width: 100%; overflow-x: auto; }   /* tabel lebar bisa digeser di HP */
.article-body img.wy-img-align-center, .legacy-html img.wy-img-align-center { display: block; float: none; margin: .6em auto; }
.article-body img.wy-img-align-left, .legacy-html img.wy-img-align-left { float: left; margin: .25em 1.25em .6em 0; max-width: 50%; }
.article-body img.wy-img-align-right, .legacy-html img.wy-img-align-right { float: right; margin: .25em 0 .6em 1.25em; max-width: 50%; }
.article-body img.wy-img-align-block-left, .legacy-html img.wy-img-align-block-left { display: block; float: none; margin: .6em auto .6em 0; }
.article-body img.wy-img-align-block-right, .legacy-html img.wy-img-align-block-right { display: block; float: none; margin: .6em 0 .6em auto; }
.wy-video { margin: 1.4em 0; max-width: 100%; position: relative; }
.wy-video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; background: #000; }
.wy-video--center { margin-left: auto; margin-right: auto; }
.wy-video--block-left { margin-left: 0; margin-right: auto; }
.wy-video--block-right { margin-left: auto; margin-right: 0; }
.wy-video--left { float: left; margin: .4em 1.25em .8em 0; }
.wy-video--right { float: right; margin: .4em 0 .8em 1.25em; }
.wy-video--left:not([style*="width"]), .wy-video--right:not([style*="width"]) { width: 50%; }
@media (max-width: 640px) {                                               /* di HP: tidak ada teks yang menyempit di samping media */
  .article-body img.wy-img-align-left, .article-body img.wy-img-align-right,
  .legacy-html img.wy-img-align-left, .legacy-html img.wy-img-align-right { float: none; display: block; max-width: 100%; margin: .6em auto; }
  .wy-video--left, .wy-video--right { float: none; width: 100% !important; margin: 1.2em 0; }
  .wy-video[style*="width"] { max-width: 100%; }
}

/* ------------------------------------------------------------ penampil dokumen tanpa unduhan (revisi #13) */
.doc-wrap { max-width: 980px; }
.doc-notice { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); }
.doc-pages { display: grid; gap: 22px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.doc-page { margin: 0; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 16px rgba(16, 43, 43, .08); }
.doc-page img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.doc-page figcaption { font-size: .8rem; color: var(--muted); padding: 7px 12px; text-align: right; border-top: 1px solid var(--line); }
.doc-print-blocked { display: none; padding: 30px; text-align: center; }
.doc-copy { margin-top: 30px; }
@media print { .doc-pages { display: none !important; } .doc-print-blocked { display: block !important; } }

/* ------------------------------------------------------------ video & animasi produk */
.pd-media { display: grid; gap: 22px; min-width: 0; }
.pd-video { margin: 0; position: relative; }
.pd-video video { display: block; width: 100%; max-height: 70vh; background: #142823; border-radius: 6px; }
.pd-video figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.pd-anim { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.pd-anim .pd-video video { aspect-ratio: 800 / 920; object-fit: contain; background: #fff; border: 1px solid #dbe3dc; }
.pd-play { cursor: pointer; position: relative; }
.pd-play .play-badge { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; background: rgba(21, 75, 67, .92); color: #fff; display: grid; place-items: center; transition: opacity .2s; }
.pd-play.is-playing .play-badge { opacity: 0; }
.pd-vvideo { position: absolute; inset: 13px; width: calc(100% - 26px); height: calc(100% - 26px); object-fit: contain; background: #f3f6f3; z-index: 1; }
.pd-play:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ------------------------------------------------------------ halaman galat */
.error-page { padding-block: 90px 110px; max-width: 700px; }
.error-page h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1; margin: 10px 0 14px; color: var(--ink); }
.error-page p { color: var(--muted); margin: 0 0 24px; }

/* ------------------------------------------------------------ hero beranda: slide bertumpuk, transisi tirai, panah
   Semua animasi digerakkan site.js lewat Web Animations API (aman untuk CSP); di sini hanya keadaan dasar. */
.hero-slide { position: absolute; inset: 0; visibility: hidden; }
.hero-slide.is-active { visibility: visible; z-index: 2; }
.hero-slide.is-leaving { visibility: visible; z-index: 1; }
.hero-slide .hero-photo { display: block; transform-origin: 62% 50%; }
.hero-sweep { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, #f7c85a 16%, #ffe6a3 50%, #f7c85a 84%, transparent); box-shadow: 0 0 22px 3px #f7c85a59; }
.hero-content h1 .hero-line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hero-content h1 .hero-line > * { display: inline-block; }
.hero-home { touch-action: pan-y; container-type: inline-size; }   /* cqw = lebar hero tanpa scrollbar */

.slide-bar .hero-nav { display: flex; gap: 10px; order: 2; margin-left: auto; }
.slide-bar .slide-select { order: 1; }
.slide-bar .hero-caption { order: 3; }
.hero-arrow { --size: 44px; position: relative; display: inline-flex; align-items: center; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; font: inherit; }
.hero-arrow[hidden] { display: none; }
.hero-arrow-ring { display: grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%; border: 1px solid #ffffff5c;
  background: #0b1f2061; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 10px 26px -12px #000000b3;
  transition: background .25s, border-color .25s, color .25s, transform .3s cubic-bezier(.16,1,.3,1), box-shadow .25s; }
.hero-arrow .ico { transition: transform .3s cubic-bezier(.16,1,.3,1); }
.hero-arrow:hover .hero-arrow-ring, .hero-arrow:focus-visible .hero-arrow-ring { background: var(--gold); border-color: var(--gold); color: #1c2e25; transform: scale(1.06); box-shadow: 0 12px 30px -10px #f7c85a80; }
.hero-arrow.next:hover .ico, .hero-arrow.next:focus-visible .ico { transform: translateX(3px); }
.hero-arrow.prev:hover .ico, .hero-arrow.prev:focus-visible .ico { transform: translateX(-3px); }
.hero-arrow:active .hero-arrow-ring { transform: scale(.94); }
.hero-arrow:focus-visible { outline: none; }
.hero-arrow:focus-visible .hero-arrow-ring { outline: 3px solid #f7c85a99; outline-offset: 3px; }
.hero-peek { display: none; }
@media (min-width: 1420px) {
  /* Layar lebar: panah di tengah margin kiri/kanan hero, tidak menutupi teks. */
  .slide-bar .hero-nav { display: contents; }
  .hero-arrow { --size: 54px; position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; }
  .hero-arrow.prev { left: calc((100% - 100vw) / 4 - 27px); left: calc((100% - 100cqw) / 4 - 27px); }
  .hero-arrow.next { right: calc((100% - 100vw) / 4 - 27px); right: calc((100% - 100cqw) / 4 - 27px); }
  .hero-peek { display: flex; align-items: center; gap: 12px; position: absolute; top: 50%; padding: 6px 16px 6px 6px; border-radius: 12px; white-space: nowrap;
    background: #0b1f20c2; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid #ffffff2b; box-shadow: 0 22px 44px -18px #000000d9;
    opacity: 0; pointer-events: none; transform: translateY(-50%) translateX(var(--peek-x)) scale(.96); transition: opacity .3s ease, transform .45s cubic-bezier(.16,1,.3,1); }
  .hero-arrow.prev .hero-peek { left: calc(100% + 14px); --peek-x: -10px; }
  .hero-arrow.next .hero-peek { right: calc(100% + 14px); --peek-x: 10px; padding: 6px 6px 6px 16px; flex-direction: row-reverse; text-align: right; }
  .hero-arrow:hover .hero-peek, .hero-arrow:focus-visible .hero-peek { opacity: 1; transform: translateY(-50%) translateX(0) scale(1); }
  .hero-peek img { display: block; width: 84px; height: 56px; object-fit: cover; border-radius: 8px; }
  .hero-peek small { display: block; margin-bottom: 2px; font-size: .64rem; letter-spacing: .17em; text-transform: uppercase; color: #f5d37c; font-weight: 600; }
  .hero-peek b { display: block; font-size: .9rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: #fff; }
}
#slide-count { white-space: nowrap; }
@media (max-width: 640px) { .slide-bar .hero-caption { display: none; } }   /* HP: bilah bawah cukup titik, nomor, dan panah */
@media (max-width: 560px) { .hero-arrow { --size: 42px; } .slide-bar .hero-nav { gap: 8px; } }

/* ------------------------------------------------------------ beranda: angka (hitung naik saat terlihat) */
.stats { background: #fff; border-bottom: 1px solid #e3e9e4; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: clamp(30px, 3.4vw, 50px); }
.stats-item { position: relative; padding: 2px clamp(14px, 2.4vw, 36px) 14px; border-left: 1px solid var(--line); min-width: 0; }
.stats-item:first-child { border-left: 0; padding-left: 0; }
.stat-num { margin: 0; display: flex; align-items: flex-start; font-size: clamp(2.5rem, 4.2vw, 3.9rem); font-weight: 600; letter-spacing: -.05em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-num i { font-style: normal; color: #d7a836; font-size: .55em; margin: .05em 0 0 .05em; }
.stat-label { margin: 10px 0 0; color: var(--muted); font-size: .93rem; line-height: 1.4; max-width: 20ch; }
.stats-item::after { content: ""; position: absolute; left: clamp(14px, 2.4vw, 36px); bottom: 0; width: 28px; height: 2px; background: #d7a836; transform-origin: left center; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.stats-item:first-child::after { left: 0; }
.stats-item:hover::after { transform: scaleX(2.4); }
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; }
  .stats-item:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stats-item:nth-child(odd)::after { left: 0; }
}

/* ------------------------------------------------------------ animasi masuk saat digulir (kelas js-reveal dipasang site.js) */
.js-reveal [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform 1s cubic-bezier(.16,1,.3,1); transition-delay: var(--reveal-delay, 0ms); }
.js-reveal [data-reveal="fade"] { transform: none; }
.js-reveal [data-reveal="left"] { transform: translate3d(-36px, 0, 0); }
.js-reveal [data-reveal="right"] { transform: translate3d(36px, 0, 0); }
.js-reveal [data-reveal="zoom"] { transform: scale(.95); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ kartu: kemiringan 3D halus + kilau mengikuti kursor (hanya mouse) */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .item-card { transition: border-color .2s, box-shadow .35s, transform .7s cubic-bezier(.16,1,.3,1); }
  .item-card.is-tilting { transition: border-color .2s, box-shadow .35s, transform .12s linear; box-shadow: 0 26px 44px -24px #142e2a66; }
  .item-card .card-art::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .35s;
    background: radial-gradient(380px circle at var(--gx, 50%) var(--gy, 50%), #ffffff6b, transparent 46%); }
  .item-card:hover .card-art::before { opacity: 1; }
  .c-cert { transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .35s, border-color .2s; }
  .c-cert:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -26px #142e2a73; border-color: #a9bdb3; }
  .maker-link { transition: transform .4s cubic-bezier(.16,1,.3,1); }
  .maker-link:hover { transform: translateY(-3px); }
}

/* ------------------------------------------------------------ parallax halus gambar (animasi berbasis gulir, bila didukung browser) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .service-img img, .c-hero-pic img { animation: pnu-parallax linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  }
}
@keyframes pnu-parallax { from { transform: translate3d(0, -5%, 0) scale(1.1); } to { transform: translate3d(0, 5%, 0) scale(1.1); } }

/* ------------------------------------------------------------ tombol kembali ke atas + cincin progres gulir */
.to-top { position: fixed; right: clamp(16px, 2.2vw, 28px); bottom: clamp(16px, 2.2vw, 28px); z-index: 60; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--teal); cursor: pointer;
  box-shadow: 0 16px 32px -14px #0d3029b3, 0 2px 6px #0d302933; opacity: 0; visibility: hidden; transform: translateY(16px) scale(.88);
  transition: opacity .35s ease, transform .5s cubic-bezier(.16,1,.3,1), visibility 0s linear .5s, background .2s; }
.to-top[hidden] { display: none; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .5s cubic-bezier(.16,1,.3,1), visibility 0s, background .2s; }
.to-top:hover { background: #0f3a34; }
.to-top .ico { position: relative; z-index: 1; transition: transform .35s cubic-bezier(.16,1,.3,1); }
.to-top:hover .ico { transform: translateY(-3px); }
.to-top:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.to-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top-ring circle { fill: none; stroke-width: 2.5; }
.to-top-ring .track { stroke: #ffffff29; }
.to-top-ring .bar { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: var(--progress-offset, 100); transition: stroke-dashoffset .12s linear; }
@media (max-width: 560px) { .to-top { width: 46px; height: 46px; } }
@media print { .to-top { display: none !important; } }

