/* =========================================================
   IIPE 2027 - Halaman News (daftar) + News Detail
   Dimuat setelah bottom.css (np-card, np-grid, badge, px-btn, judul pixel).
   ========================================================= */

/* ---------------- HERO (merah) ---------------- */
.nw-hero {
  --t: min(7vw, 100px);
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(40px, 6vw, 96px) 6vw calc(var(--t) + clamp(36px, 5vw, 72px));
  background:
    linear-gradient(90deg, #FF6A6F 50%, transparent 50%) left bottom / calc(var(--t) * 2) var(--t) repeat-x,
    #FF424E;
}
.nw-hero .badge { margin-bottom: 18px; }
.nw-hero .px-title { --oc: #AF2432; --pv: .4vw; --pmax: 5px; max-width: 12em; margin: 0 auto; }
.nw-sub { max-width: 540px; margin: 22px auto 0; font: 400 clamp(16px, 1.5vw, 20px)/1.5 'Funnel Display', system-ui, sans-serif; color: #FFFFDA; }
.nw-prop { position: absolute; bottom: calc(var(--t) - 2px); width: clamp(64px, 10vw, 150px); pointer-events: none; }
.nw-prop.l { left: 6%; }
.nw-prop.r { right: 6%; }
.nw-prop img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.nw-prop .coin { position: absolute; left: 50%; top: 0; width: 48%; transform: translate(-50%, -58%); animation: bBob 2.4s steps(4) infinite; }
.nw-prop.r .coin { animation-delay: -1.2s; }

/* ---------------- FILTER ---------------- */
.nw-filter {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  padding: clamp(18px, 2.4vw, 32px) 5vw;
  background: #FFFFDA; border-bottom: 4px solid #4B28A1;
}
.nw-tab {
  --bd: #3B2290; --bg: #FFFFDA; --bgd: #C9C0F5; --tx: #5B3CC4;
  font-size: clamp(18px, 1.8vw, 24px); padding: .5em 1.1em .7em;
  border: 0; cursor: pointer; white-space: nowrap;
}
.nw-tab::after { content: none; }
.nw-tab.active { --bd: #C2F08A; --bg: #44C27B; --bgd: #009880; --tx: #FFFFDA; }

/* ---------------- ISI (checker kuning) ---------------- */
.nw-main {
  --tile: min(5.6vw, 105px);
  min-height: 50vh;
  padding: clamp(32px, 5vw, 80px) 5vw clamp(56px, 8vw, 120px);
  background: conic-gradient(#FFF3AE 25%, #FFFFDA 0 50%, #FFF3AE 0 75%, #FFFFDA 0)
              0 0 / calc(var(--tile) * 2) calc(var(--tile) * 2);
}
.nw-inner { max-width: 1200px; margin: 0 auto; }
.nw-label { margin: clamp(28px, 3.6vw, 48px) 0 20px; }
.nw-label .badge { margin: 0; }

/* kartu utama (featured) */
.np-card.feat { flex-direction: row; }
.np-card.feat .np-card-img { flex: 1.25; aspect-ratio: auto; min-height: clamp(220px, 26vw, 380px); }
.np-card.feat .np-card-body { flex: 1; justify-content: center; gap: 12px; padding: clamp(20px, 2.6vw, 38px); }
.np-card.feat .np-card-title { font-size: clamp(22px, 2.6vw, 36px); }
.np-card.feat .np-card-excerpt { font-size: clamp(15px, 1.3vw, 17px); -webkit-line-clamp: 5; }
.np-card.feat .np-card-link { margin-top: 8px; }

/* meta: kategori + tanggal */
.nw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nw-tag {
  --tg: #5B3CC4;
  padding: 2px 8px 4px; background: var(--tg); color: #FFFFDA;
  font: 400 17px/1 var(--px-font); letter-spacing: .06em; text-transform: uppercase;
}
.nw-tag[data-src="update"] { --tg: #009880; }

/* ---------------- DETAIL: style sama persis dengan news_detail 2026 ---------------- */
:root {
  --nd-black: #0a0a0a; --nd-white: #f5f4f0; --nd-purple: #6779F4; --nd-lime: #DAFF2B;
  --nd-gray: #888; --nd-light: #ebebeb;
  --nd-display: 'Bebas Neue', sans-serif; --nd-body: 'Inter', sans-serif;
}
.nd-main { background: var(--nd-white); color: var(--nd-black); font-family: var(--nd-body); overflow-x: hidden; min-height: 60vh; }

/* HERO */
.nd-hero { min-height: 80vh; background: var(--nd-black); display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; padding: 100px 48px 60px; }
.nd-hero[hidden] { display: none; }
.nd-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; }
.nd-hero-ov { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,1) 0%, rgba(10,10,10,.4) 60%, rgba(10,10,10,.2) 100%); }
.nd-hero-in { position: relative; z-index: 2; max-width: 860px; }
.nd-tag { display: inline-block; background: var(--nd-purple); color: var(--nd-white); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; padding: 5px 14px; margin-bottom: 24px; font-weight: 600; }
.nd-title { margin: 0 0 20px; font: 400 clamp(48px, 7vw, 100px)/.95 var(--nd-display); color: var(--nd-white); letter-spacing: 2px; overflow-wrap: anywhere; }
.nd-meta { display: flex; gap: 28px; align-items: center; }
.nd-date { font-size: 12px; color: rgba(255,255,255,.45); letter-spacing: 1px; text-transform: uppercase; }

/* BREADCRUMB */
.nd-crumb { padding: 20px 48px; border-bottom: 1px solid var(--nd-light); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--nd-gray); }
.nd-crumb a { color: var(--nd-gray); text-decoration: none; transition: color .2s; }
.nd-crumb a:hover { color: var(--nd-purple); }
.nd-crumb span[aria-hidden] { color: var(--nd-light); }
.nd-crumb span:last-child { color: var(--nd-black); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* BODY */
.nd-wrap { max-width: 760px; margin: 0 auto; padding: 72px 48px 100px; }
.nd-excerpt { margin: 0 0 48px; font-size: 18px; font-weight: 300; color: #444; line-height: 1.7; border-left: 3px solid var(--nd-purple); padding-left: 24px; font-style: italic; }

/* BAHASA */
.nd-lang { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.nd-lang-label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--nd-gray); font-weight: 600; }
.nd-lang-sw { display: inline-flex; border: 1.5px solid var(--nd-light); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.nd-lang-btn { background: transparent; border: none; color: var(--nd-gray); font-family: var(--nd-body); font-size: 12px; font-weight: 700; letter-spacing: 1px; padding: 7px 18px; cursor: pointer; transition: background .15s, color .15s; }
.nd-lang-btn.active { background: var(--nd-purple); color: #fff; }
.nd-lang-btn:not(.active):hover { color: var(--nd-black); background: var(--nd-light); }

/* ISI */
.nd-content p { margin: 0 0 24px; font-size: 15px; line-height: 1.85; color: #2a2a2a; }
.nd-content h2 { margin: 48px 0 16px; font: 400 clamp(28px, 3vw, 42px)/1.1 var(--nd-display); letter-spacing: 2px; text-transform: none; color: var(--nd-black); }
.nd-content blockquote { position: relative; margin: 36px 0; padding: 28px 32px 22px 52px; background: #1a1a1a; color: #d4d0c8; font-style: italic; font-size: 16px; line-height: 1.75; border: none; }
.nd-content blockquote::before { content: '\201C'; position: absolute; top: 10px; left: 16px; font: 400 72px/1 var(--nd-display); color: var(--nd-purple); pointer-events: none; }
.nd-content img, .nd-content .nd-img { display: block; width: 100%; max-width: 100%; height: auto; margin: 32px 0; border: 1px solid var(--nd-light); border-radius: 0; cursor: zoom-in; }
.nd-content ul, .nd-content ol { margin: 0 0 24px 22px; padding: 0; font-size: 15px; line-height: 1.85; color: #2a2a2a; }
.nd-content li { margin-bottom: 8px; }
.nd-content a { color: var(--nd-purple); text-decoration: underline; }

/* GALERI */
.gl { margin-top: 60px; padding-top: 48px; border-top: 1px solid var(--nd-light); }
.nd-gl-label { margin-bottom: 20px; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--nd-purple); font-weight: 600; }
.gl-view { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #111; overflow: hidden; cursor: zoom-in; margin-bottom: 10px; }
.gl-view:focus-visible { outline: 3px solid var(--nd-purple); outline-offset: 3px; }
.gl-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(18px); transform: scale(1.14); opacity: 0; transition: opacity .4s ease; pointer-events: none; z-index: 0; }
.gl-bg.active { opacity: .38; }
.gl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .4s ease; z-index: 1; }
.gl-img.active { opacity: 1; }
.gl-count { position: absolute; bottom: 12px; right: 14px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; letter-spacing: 1px; padding: 4px 10px; border-radius: 2px; z-index: 2; pointer-events: none; }
.gl-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background: rgba(0,0,0,.5); color: #fff; border: none; border-radius: 2px; font-size: 18px; line-height: 1; cursor: pointer; transition: background .2s; touch-action: manipulation; }
.gl-btn:hover { background: var(--nd-purple); }
.gl-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gl-view .gl-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; }
.gl-view .gl-btn.prev { left: 12px; }
.gl-view .gl-btn.next { right: 12px; }
.gl-thumbs { position: relative; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: var(--nd-purple) var(--nd-light); }
.gl-thumbs::-webkit-scrollbar { height: 4px; }
.gl-thumbs::-webkit-scrollbar-thumb { background: var(--nd-purple); border-radius: 2px; }
.gl-thumbs::-webkit-scrollbar-track { background: var(--nd-light); }
.gl-thumb { flex: 0 0 calc((100% - 50px) / 6); min-width: 72px; max-width: 110px; aspect-ratio: 4 / 3; padding: 0; background: none; border: 2px solid transparent; cursor: pointer; opacity: .55; transition: border-color .2s, opacity .2s; }
.gl-thumb.active { border-color: var(--nd-purple); opacity: 1; }
.gl-thumb:hover { opacity: .85; }
.gl-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* LINK SUMBER */
.nd-source { margin: 0; }
.nd-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 48px; padding: 16px 32px; border: 1.5px solid var(--nd-black); font-size: 13px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--nd-black); text-decoration: none; transition: all .2s; }
.nd-link:hover { background: var(--nd-black); color: var(--nd-white); }

/* MORE NEWS */
.nd-more { padding: 80px 48px; background: var(--nd-black); }
.nd-more[hidden] { display: none; }
.nd-more-label { margin-bottom: 16px; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--nd-purple); }
.nd-more-title { margin: 0 0 48px; font: 400 clamp(40px, 5vw, 72px)/1.1 var(--nd-display); color: var(--nd-white); letter-spacing: 2px; text-transform: uppercase; text-align: left; }
.nd-more-title span { color: var(--nd-lime); }
.nd-mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #1a1a1a; }
.nd-mcard { display: block; background: #111; overflow: hidden; text-decoration: none; transition: background .2s; }
.nd-mcard:hover { background: #1a1a1a; }
.nd-mimg { aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #222, #111); }
.nd-mimg img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.nd-mcard:hover .nd-mimg img { transform: scale(1.04); }
.nd-mbody { padding: 20px; }
.nd-mtag { margin-bottom: 8px; font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--nd-purple); }
.nd-mtitle { font-size: 14px; font-weight: 500; color: var(--nd-white); line-height: 1.4; }
.nd-mdate { margin-top: 6px; font-size: 11px; color: rgba(255,255,255,.35); }

/* LIGHTBOX */
.nd-lb { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.92); }
.nd-lb[hidden] { display: none; }
.nd-lb-img { max-width: 90vw; max-height: 88vh; object-fit: contain; }
.nd-lb-close { position: absolute; top: 20px; right: 24px; background: none; border: none; color: rgba(255,255,255,.6); font-size: 28px; line-height: 1; cursor: pointer; }
.nd-lb-close:hover { color: #fff; }
.nd-lb .gl-btn { position: absolute; top: 50%; transform: translateY(-50%); }
.nd-lb .gl-btn.prev { left: 20px; }
.nd-lb .gl-btn.next { right: 20px; }
.nd-lb .gl-btn[hidden] { display: none; }
.nd-lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.5); font-size: 12px; letter-spacing: 1px; }

/* LOADING / NOT FOUND */
.nd-spin { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.nd-spinner { width: 32px; height: 32px; border: 2px solid var(--nd-light); border-top-color: var(--nd-purple); border-radius: 50%; animation: ndSpin .7s linear infinite; }
@keyframes ndSpin { to { transform: rotate(360deg); } }
.nd-nf { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.nd-nf h2 { margin: 0; font: 400 80px/1 var(--nd-display); letter-spacing: 4px; color: var(--nd-light); }
.nd-nf p { margin: 8px 0 28px; font-size: 14px; color: var(--nd-gray); }
.nd-nf a { display: inline-flex; align-items: center; gap: 8px; background: var(--nd-purple); color: var(--nd-white); padding: 14px 28px; font-size: 13px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; text-decoration: none; }

/* muncul pelan saat discroll */
.nd-fade-on { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.nd-fade-on.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nd-hero { padding: 90px 24px 48px; min-height: 60vh; }
  .nd-crumb { padding: 14px 24px; }
  .nd-wrap { padding: 48px 24px 72px; }
  .gl-thumb { min-width: 60px; flex: 0 0 calc((100% - 30px) / 4); }
  .nd-more { padding: 60px 24px; }
  .nd-mgrid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { .nw-prop .coin, .gl-img, .gl-bg, .nd-fade-on { animation: none; transition: none; } .gl-btn:hover::before { animation: none; } }

/* ---------------- MOBILE ---------------- */
@media (max-width: 720px) {
  .nw-hero { --t: 12vw; }
  .nw-hero { padding-bottom: calc(var(--t) + 24vw + 16px); }   /* box 20vw + koin menonjol di atasnya, di bawah teks */
  .nw-prop { width: 20vw; }
  .nw-prop.l { left: 3%; }
  .nw-prop.r { right: 3%; }
  .nw-main { --tile: 12vw; }
  .nw-filter { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 20px; }
  .nw-filter::-webkit-scrollbar { display: none; }
  .np-card.feat { flex-direction: column; }
  .np-card.feat .np-card-img { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
}