/* Komponen bersama: linimasa (V54, 18 Nov 2026; sebelumnya halaman Sejarah: pages/sejarah/milestone.css,
   sejarah-linimasa.css, sejarah-geser.css, kini di archive/sejarah/components/halaman/). Markup dan perilaku: shared/timeline.js.
   Like dub.co/about: one row that slides sideways (drag, swipe, the arrows on the photos), a round dot on a thin line
   above each photo, then the green year, the title, the accent and the story. The row starts at the wide container's edge
   (--wadah-tepi, dasar.css) and runs on to the screen edge with faded ends: its full width comes from margin
   calc(50% - 50vw), so place it in a centred column (a page section), not in a narrower column or a card.
   Phones (<= 760 px): the list runs down the page, the same cards and dots on a thin line at the left; no arrows, the
   photos are only pictures. Load after core/dasar.css, ui/button.css and shared/dialog.css. */
/* --sjg-tepi: where the row starts, the left edge of the section's content column (the section's own inline padding,
   komponen.css: 1300 by default, 1600 on a Wide section or page, 810 on a Narrow one); history.html sets the wide one */
.sj-linimasa{--honey:#E3B341;--sjg-tepi:max(var(--nk-tepi), (100vw - var(--nk-wadah)) / 2);--sjg-kolom:380px;--sjg-sela:40px;--sjg-pudar:calc(var(--sjg-tepi) + 48px);
  position:relative;margin-inline:calc(50% - 50vw)}   /* --honey: illustration only (the "now" dot) */
.nk-seksi--lebar > .sj-linimasa,.nk-komponen--lebar > .nk-seksi:not(.nk-seksi--normal,.nk-seksi--sempit) > .sj-linimasa{--sjg-tepi:max(var(--nk-tepi), (100vw - var(--wadah)) / 2)}
.nk-seksi--sempit > .sj-linimasa,.nk-komponen--sempit > .nk-seksi:not(.nk-seksi--normal,.nk-seksi--lebar) > .sj-linimasa{--sjg-tepi:max(var(--nk-tepi), (100vw - 810px) / 2)}
.nk-seksi:has(> .sj-linimasa){overflow-x:clip}   /* 100vw counts a desktop scrollbar too: the section clips what passes the page edge */
.sj-wadah{position:relative;padding:0 var(--sjg-tepi)}
.sj-daftar{margin:0;padding:0;list-style:none}

/* ---------- one milestone: the dot and the line, the photo (a button that opens the larger view), the year, title, accent, story ---------- */
.sj-item{position:relative;min-width:0;padding-top:40px}
html{scroll-padding-top:calc(var(--head-h-s) + 16px)}   /* a jump to #1998 stops below the sticky header */
.sj-titik{position:absolute;z-index:1;top:0;left:0;width:17px;height:17px;border-radius:50%;box-sizing:border-box;border:1px solid var(--line);
  background:radial-gradient(circle,var(--forest) 0 3.5px,var(--paper) 4px)}
.sj-item--kini .sj-titik{background:radial-gradient(circle,var(--honey) 0 3.5px,var(--paper) 4px)}
.sj-item:target .sj-titik{border-color:var(--forest)}
.sj-ruas{position:absolute;top:8px;right:0;left:0;height:1px;background:var(--line)}

.sj-foto{position:relative;display:block;width:100%;margin:0;padding:0;border:0;border-radius:12px;overflow:hidden;aspect-ratio:16 / 10;background:#E4EBD9;cursor:zoom-in;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.sj-foto img{display:block;width:100%;height:100%;object-fit:cover;-webkit-user-drag:none;transition:transform .3s var(--ease)}   /* --dur-2: photo zoom */
.sj-foto::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(36,48,40,.08);pointer-events:none}
.sj-foto:focus-visible{outline:3px solid var(--forest);outline-offset:3px}
.sj-foto__zoom{position:absolute;right:10px;bottom:10px;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:rgba(247,250,241,.92);color:var(--forest);box-shadow:0 1px 0 rgba(36,48,40,.08),0 8px 20px -12px rgba(36,48,40,.45);opacity:0;transform:translateY(4px);transition:opacity .3s ease,transform .3s var(--ease)}   /* --shadow-2 */
.sj-foto__zoom svg{width:16px;height:16px}
.sj-foto:focus-visible .sj-foto__zoom{opacity:1;transform:none}
@media (hover:hover){
  .sj-foto:hover img{transform:scale(1.04)}
  .sj-foto:hover .sj-foto__zoom{opacity:1;transform:none}
}
@media (hover:none){ .sj-foto__zoom{opacity:1;transform:none} }   /* touch: the hint is always there */
/* no photo yet: a quiet frame that says so */
.sj-foto__kosong{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px;color:var(--ink-soft);font-size:14px;line-height:20px;font-weight:600;text-align:center;background:repeating-linear-gradient(135deg,#E4EBD9 0 14px,#E9EEDB 14px 28px)}   /* --fs-sm; stripes #E4EBD9 / --leaf-wash (§9.13) */
.sj-foto__kosong svg{width:44px;height:44px;opacity:.7}   /* §9.13 placeholder icon */

.sj-kepala{margin:20px 0 0;font-size:18px;line-height:26px;font-weight:700;color:var(--ink);overflow-wrap:anywhere}   /* R11: a long word wraps instead of pushing the page sideways */
.sjg-tahun{display:block;margin-bottom:4px;font-size:30px;line-height:34px;font-weight:700;letter-spacing:-.02em;color:var(--forest);font-variant-numeric:tabular-nums}
.sj-nama{display:block}
.sj-item:target .sjg-tahun{text-decoration:underline;text-decoration-color:var(--ochre);text-decoration-thickness:4px;text-underline-offset:6px}
.sj-aksen{display:block;width:40px;height:3px;margin:12px 0;border-radius:2px;background:var(--leaf)}
.sj-cerita{margin:0;font-size:16px;line-height:26px;color:var(--ink-soft);text-wrap:pretty;overflow-wrap:break-word}

/* ---------- the row (761 px and wider) ---------- */
@media (min-width:761px){
.sjg-bingkai{position:relative}
.sj-wadah{display:flex;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;
  scroll-padding-inline:var(--sjg-tepi);padding-bottom:8px;scrollbar-width:none;cursor:grab}
.sj-wadah::-webkit-scrollbar{display:none}
.sj-wadah:focus-visible{outline:3px solid var(--forest);outline-offset:-3px}
.sj-wadah.is-seret{cursor:grabbing;scroll-snap-type:none;user-select:none;-webkit-user-select:none}
.sj-wadah.is-seret *{cursor:grabbing}
.sj-daftar{display:flex;flex:none}
/* one milestone: a column; the space after it (--sjg-sela) is part of it, so the line runs on to the next dot */
.sj-item{flex:none;width:var(--sjg-kolom);padding-right:var(--sjg-sela);box-sizing:border-box;scroll-snap-align:start}
.sj-item:last-child{width:calc(var(--sjg-kolom) - var(--sjg-sela));padding-right:0}

/* the faded edges: the right one while there is more to see, the left one once the row has moved; mirror images */
.sjg-bingkai::before,.sjg-bingkai::after{content:"";position:absolute;z-index:3;top:0;bottom:0;width:var(--sjg-pudar);pointer-events:none;transition:opacity .3s ease}
.sjg-bingkai::before{left:0;background:linear-gradient(to left,rgba(247,250,241,0),var(--paper));opacity:0}
.sjg-bingkai::after{right:0;background:linear-gradient(to right,rgba(247,250,241,0),var(--paper))}
.sjg-bingkai.is-kiri::before{opacity:1}
.sjg-bingkai.is-ujung::after{opacity:0}

/* the arrows: on the photos at the row's two edges, above the fades (--sjg-panah-y = the photos' middle, set by the script);
   one that has nowhere to go fades out and leaves the tab order (ui/button.css outline icon-lg, round like shadcn's Carousel) */
.sjg-nav .nk-btn{position:absolute;z-index:4;top:var(--sjg-panah-y,168px);margin-top:-20px;border-radius:999px;transition:opacity .3s ease,visibility .3s}
.sjg-prev{left:max(8px, var(--sjg-tepi) - 20px)}
.sjg-next{right:max(8px, var(--sjg-tepi) - 20px)}
.sjg-nav .nk-btn:disabled{opacity:0;visibility:hidden}
}
.sjg-nav[hidden]{display:none}

/* ---------- phones: the list runs down the page, the line on the left through the dots ---------- */
@media (max-width:760px){
  .sj-item{padding:0 0 48px 40px}
  .sj-item:last-child{padding-bottom:0}
  .sj-ruas{top:8px;bottom:0;left:8px;right:auto;width:1px;height:auto}
  .sj-item:last-child .sj-ruas{display:none}
  .sj-foto{margin-bottom:20px;cursor:default}   /* only a picture here: tapping it opens nothing (timeline.js) */
  .sj-foto__zoom{display:none}
  .sj-foto:hover img{transform:none}
  .sj-kepala{margin-top:0}
  .sjg-nav{display:none}
}

/* ---------- the photo window: the shared lightbox (shared/dialog.css .nk-dialog--foto, data-tema="gelap") ---------- */
.sj-dialog__isi{position:relative;display:grid;place-items:center;width:100%;height:100%;padding:64px 88px 40px}
.sj-dialog__fig{display:flex;flex-direction:column;align-items:center;gap:16px;width:min(1100px,100%);margin:0}
.sj-dialog__gambar{position:relative;width:100%;max-height:calc(100vh - 200px);max-height:calc(100dvh - 200px);aspect-ratio:4 / 3;border-radius:12px;overflow:hidden;background:#2E3A32}
.sj-dialog__gambar img{display:block;width:100%;height:100%;object-fit:contain}
.sj-dialog__gambar .sj-foto__kosong{font-size:16px;line-height:22px;color:#C9D3C3;background:repeating-linear-gradient(135deg,#2E3A32 0 18px,#334037 18px 36px)}
.sj-dialog__cap{max-width:720px;margin:0;font-size:16px;line-height:24px;text-align:center;text-wrap:balance}
.sj-dialog__cap b{margin-right:8px;font-size:18px;color:#B9D88F;font-variant-numeric:tabular-nums}   /* --leaf-light */
.sj-dialog__nav{position:absolute;top:50%;transform:translateY(-50%)}
.sj-dialog__nav--prev{left:20px}
.sj-dialog__nav--next{right:20px}
@media (max-width:760px){
  .sj-dialog__isi{padding:72px 16px 96px}
  .sj-dialog__nav{top:auto;bottom:calc(24px + env(safe-area-inset-bottom));transform:none}
  .sj-dialog__nav--prev{left:calc(50% - 60px)}
  .sj-dialog__nav--next{right:calc(50% - 60px)}
}

@media (prefers-reduced-motion:reduce){
  html:not(.nk-gerak) .sj-foto img,html:not(.nk-gerak) .sj-foto__zoom,html:not(.nk-gerak) .sjg-bingkai::before,
  html:not(.nk-gerak) .sjg-bingkai::after,html:not(.nk-gerak) .sjg-nav .nk-btn{transition:none}
}   /* html.nk-gerak: motion allowed (shared/dialog.js; ?gerak=1 for review) */
