/* Komponen <k-featured-carousel> (V54): Sorotan sebagai karusel (berita.html). Mengikuti karusel adobe.com:
   slide di wadah lebar (di 1920: 160–1760), tetangga mengintip di kiri-kanan dengan jarak 8 px,
   panah bulat putih, titik 8 px di dalam slide, blok teks 640 di kiri. Tinggi kira-kira 2,4 : 1, paling tinggi 560 px;
   ponsel 4 : 5. Slide selalu bergeser, juga dengan "kurangi gerak" (pengecualian di AGENTS.md §4).
   Dimuat setelah ui/button.css.
     .nk-karusel__bingkai  full width: holds the track, the arrows and the dots (their % edges need a full-width parent)
     .nk-karusel__trek     the slide box on the wide container (--wadah-tepi)
     .nk-karusel__slide    one story; --o = its place (0 shown, -1 / 1 the neighbours, 2 / -2 off screen) */
.nk-karusel{padding:24px 0 32px;overflow:clip;background:#fff}
.nk-karusel__bingkai{position:relative}
.nk-karusel__trek{position:relative;width:calc(100% - 2 * var(--wadah-tepi));margin:0 auto;aspect-ratio:12/5;min-height:400px;   /* a set width, so the height cap does not narrow it */
  max-height:min(560px, 100svh - var(--head-h) - 72px);touch-action:pan-y}   /* fits under the header on 1366 × 768: 24 above, 48 below */
.nk-karusel__trek[data-seret]{user-select:none}

.nk-karusel__slide{position:absolute;inset:0;overflow:hidden;border-radius:12px;background:var(--forest-deep);   /* --r-lg */
  transform:translateX(calc(var(--o, 2) * (100% + 8px)));transition:transform .5s var(--ease)}   /* --dur-3 */
.nk-karusel__slide[data-lompat]{transition:none}
/* one slide only (data-tunggal, featured-carousel.js; proyek-daftar.html since 12 Nov 2026): it is simply there, with no
   slide-in from the right on load (user, 11 Nov 2026: "remove the sliding animation of the map") */
.nk-karusel[data-tunggal] .nk-karusel__slide{transition:none}
.nk-karusel__slide[data-jauh]{visibility:hidden}
.nk-karusel__foto{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.nk-karusel__slide::after{content:"";position:absolute;inset:0;background:linear-gradient(to right, rgba(20,30,22,.78) 0%, rgba(20,30,22,.1) 100%);pointer-events:none}

.nk-karusel__isi{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;
  padding:40px 96px;color:#fff;transition:opacity .3s ease-out}   /* --dur-2 */
.nk-karusel__judul{margin:0;max-width:var(--measure-lede);font:700 var(--fs-display)/var(--lh-display) var(--font);letter-spacing:-.02em;
  text-wrap:balance;overflow-wrap:break-word;color:#fff}
.nk-karusel__label{margin:8px 0 0;font:700 16px/20px var(--font)}   /* --fs-body */
.nk-karusel__meta{margin:0;font:400 16px/20px var(--font)}
.nk-karusel__tombol{margin-top:24px}
.nk-karusel__kredit{position:absolute;right:24px;bottom:16px;z-index:1;margin:0;font:400 12px/16px var(--font);color:var(--night-text);transition:opacity .3s ease-out}   /* --fs-xs */
/* the neighbours show only their photo */
.nk-karusel__slide:not([data-aktif]) .nk-karusel__isi,.nk-karusel__slide:not([data-aktif]) .nk-karusel__kredit{opacity:0}

/* arrows: inside the slide's edges while the side space is narrow (up to 1760 the peek is only the 40 px gutter minus
   the gap), in the side space like Adobe's once it is wide enough */
.nk-karusel__panah{position:absolute;top:50%;z-index:2;transform:translateY(-50%)}
.nk-karusel__panah[data-arah="kiri"]{left:calc(var(--wadah-tepi) + 24px)}
.nk-karusel__panah[data-arah="kanan"]{right:calc(var(--wadah-tepi) + 24px)}
.nk-karusel__panah[data-arah="kiri"] svg{transform:scaleX(-1)}
@media (min-width:1761px){   /* component-specific: from here the side space is at least 72 px (40 px arrow + 2 × 16) */
  .nk-karusel__panah[data-arah="kiri"]{left:calc(var(--wadah-tepi) / 2 - 20px)}
  .nk-karusel__panah[data-arah="kanan"]{right:calc(var(--wadah-tepi) / 2 - 20px)}
  .nk-karusel__isi{padding-right:64px;padding-left:64px}
}

/* dots: 8 px, inside the bottom of the slide; the button around each is the 24 px target (44 on touch) */
.nk-karusel__titik{position:absolute;bottom:12px;left:50%;z-index:2;display:flex;margin:0;padding:0;list-style:none;transform:translateX(-50%)}
.nk-karusel__titik button{display:grid;place-items:center;width:24px;height:24px;margin:0;padding:0;border:0;border-radius:999px;background:none;cursor:pointer;touch-action:manipulation}
.nk-karusel__titik button::before{content:"";width:8px;height:8px;border-radius:999px;background:rgba(255,255,255,.64)}
.nk-karusel__titik button[aria-current="true"]::before{background:#fff}
.nk-karusel__titik button:focus-visible{outline:3px solid var(--leaf-light);outline-offset:-3px}
@media (pointer:coarse){ .nk-karusel__titik button{width:44px;height:44px} }

/* phone: 4 : 5, text at the bottom over a dark fade, no arrows (swipe, or the dots under the slide) */
@media (max-width:760px){
  .nk-karusel{padding-top:16px}
  .nk-karusel__trek{aspect-ratio:4/5;min-height:360px}
  .nk-karusel__slide::after{background:linear-gradient(to top, rgba(20,30,22,.85) 0%, rgba(20,30,22,.1) 70%)}
  .nk-karusel__isi{justify-content:flex-end;padding:24px 24px 32px}
  .nk-karusel__judul{font-size:var(--fs-h1);line-height:var(--lh-h1)}
  .nk-karusel__panah{display:none}
  .nk-karusel__titik{position:static;justify-content:center;margin-top:8px;transform:none}
  .nk-karusel__titik button::before{background:var(--line)}
  .nk-karusel__titik button[aria-current="true"]::before{background:var(--ink)}
  .nk-karusel__titik button:focus-visible{outline:3px solid var(--forest)}
}
/* the section under it starts close: 32 px below the carousel instead of the band's full section space */
.nk-karusel + .nk-pita > .nk-kabar{padding-top:32px}

/* the map slide (peta="…" on the tag, 23 Oct 2026, proyek-daftar.html): the project map fills the whole slide (data-penuh,
   project-map-draw.js keeps the project area in the right part, or the top part on phones), with a fade of the map's
   own light green under the text on the left (from the bottom on phones); the text is in ink. No inset, no caption */
.nk-karusel__slide--peta{background:var(--leaf-wash)}
.nk-karusel__slide--peta::after{background:linear-gradient(to right, var(--leaf-wash) 0%, var(--leaf-wash) 28%, rgba(233,238,219,0) 52%)}   /* --leaf-wash */
.nk-karusel__slide--peta .nk-karusel__isi{right:auto;width:44%;color:var(--ink)}
.nk-karusel__slide--peta .nk-karusel__judul{color:var(--ink)}
.nk-karusel__peta,.nk-karusel__peta .nk-peta,.nk-karusel__peta .nk-peta__bingkai{position:absolute;inset:0;margin:0;border-radius:0;background:none}
.nk-karusel__peta .nk-peta__svg{width:100%;height:100%;aspect-ratio:auto;border-radius:0}
.nk-karusel__peta .nk-peta:not(.nk-peta--siap)::before{aspect-ratio:auto;height:100%;border-radius:0}
.nk-karusel__peta .nk-peta__inset,.nk-karusel__peta .nk-peta__keterangan{display:none}   /* the slide's title says it; the figure keeps its aria-label */
.nk-karusel:has(.nk-karusel__slide--peta[data-aktif]) .nk-karusel__titik button::before{background:rgba(36,48,40,.32)}   /* --ink at 32 % on the light slide */
.nk-karusel:has(.nk-karusel__slide--peta[data-aktif]) .nk-karusel__titik button[aria-current="true"]::before{background:var(--ink)}
.nk-karusel:has(.nk-karusel__slide--peta[data-aktif]) .nk-karusel__titik button:focus-visible{outline-color:var(--forest)}
@media (min-width:761px) and (max-width:1100px){   /* tablets: a wider text column and the h2 size, so the title keeps whole words per line */
  .nk-karusel__slide--peta .nk-karusel__isi{width:48%;padding-right:24px}
  .nk-karusel__slide--peta .nk-karusel__judul{font-size:var(--fs-h2);line-height:var(--lh-h2)}
}
@media (max-width:760px){
  .nk-karusel__slide--peta .nk-karusel__isi{right:0;width:auto}
  .nk-karusel__slide--peta::after{background:linear-gradient(to top, var(--leaf-wash) 0%, var(--leaf-wash) 34%, rgba(233,238,219,0) 58%)}
}
