/*
 * Navbar kapsul liquid glass, dipakai bersama oleh semua halaman yang memuatnya
 * (beranda, /jadwal/). Tanpa Tailwind, supaya tampilannya identik di halaman mana pun.
 *
 * Perpindahan halaman: View Transitions lintas dokumen. Kapsul punya nama transisi
 * sendiri sehingga tidak ikut berganti; pil menu aktif bergeser ke tautan halaman baru.
 * Browser tanpa dukungan cukup berpindah halaman seperti biasa.
 */
@view-transition { navigation: auto; }

.tkn {
  position: fixed; z-index: 50;
  top: 12px; left: 12px; right: 12px;
  max-width: 1152px; margin: 0 auto;
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  view-transition-name: tk-navbar;
  background: linear-gradient(135deg, rgba(255, 255, 255, .80), rgba(255, 255, 255, .66));
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow:
    inset 1.5px 1.5px 0 -.5px rgba(255, 255, 255, .95),
    inset -1.5px -1.5px 0 -.5px rgba(255, 255, 255, .7),
    inset 0 0 0 1px rgba(255, 255, 255, .18),
    inset 0 -10px 18px -8px rgba(255, 255, 255, .55),
    inset 0 12px 20px -10px rgba(255, 255, 255, .7),
    0 12px 36px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .08);
}
.tk-lg-svg .tkn { -webkit-backdrop-filter: url(#tk-lg); backdrop-filter: url(#tk-lg); }
.tkn::before, .tkn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; }
.tkn::before {
  background: radial-gradient(70% 120% at 12% -10%, rgba(255, 255, 255, .55), transparent 55%),
              radial-gradient(60% 100% at 92% 120%, rgba(255, 255, 255, .35), transparent 60%);
}
.tkn::after {
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0) 65%, rgba(255, 255, 255, .8));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}

.tkn-bar {
  position: relative; z-index: 2;
  height: 56px; padding: 0 10px 0 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.tkn a { text-decoration: none; }
.tkn :focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

/* Merek */
.tkn-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #0f172a; justify-self: start; }
.tkn-logo {
  width: 36px; height: 36px; flex: none; padding: 2px; border-radius: 12px;
  background: #2563eb; box-shadow: 0 1px 2px rgba(37, 99, 235, .2);
  display: flex; align-items: center; justify-content: center; transition: transform .2s;
}
.tkn-brand:hover .tkn-logo { transform: scale(1.05); }
.tkn-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; background: #fff; padding: 4px; box-sizing: border-box; }
.tkn-name { display: flex; flex-direction: column; min-width: 0; }
.tkn-name b { font-size: 16px; font-weight: 700; letter-spacing: -.025em; line-height: 1.25; color: #0f172a; text-shadow: 0 0 8px rgba(255, 255, 255, .9), 0 0 2px rgba(255, 255, 255, .9); }
.tkn-name small { font-size: 11px; font-weight: 500; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 8px rgba(255, 255, 255, .9), 0 0 2px rgba(255, 255, 255, .9); }

/* Menu desktop */
.tkn-nav {
  display: none; align-items: center; gap: 2px; padding: 4px; border-radius: 9999px;
  background: rgba(255, 255, 255, .35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.tkn-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 9999px; color: #334155;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.tkn-nav a:hover { background: rgba(255, 255, 255, .85); color: #2563eb; box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.tkn-nav a[aria-current="page"] { color: #fff; }
.tkn-nav a[aria-current="page"]::before {
  /* pil aktif: bergeser antar halaman lewat view transition */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: #17376B; box-shadow: 0 2px 8px rgba(23, 55, 107, .35);
  view-transition-name: tk-nav-active;
}
.tkn-nav a[aria-current="page"]:hover { background: transparent; color: #fff; box-shadow: none; }
.tkn-nav a { isolation: isolate; }
.tkn-live { width: 6px; height: 6px; border-radius: 50%; background: #dc2626; }
.tkn-xl { display: none !important; }

/* Tombol unduh */
.tkn-end { display: none; align-items: center; justify-content: flex-end; }
.tkn-cta {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 20px; border-radius: 9999px;
  background: #2563eb; color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, .3), inset 0 0 0 1px rgba(255, 255, 255, .3);
  transition: background-color .2s, transform .2s;
}
.tkn-cta:hover { background: #1d4ed8; transform: translateY(-2px); }
.tkn-cta:active { background: #1e40af; }
.tkn-cta svg { width: 16px; height: 16px; flex: none; }

/* Tombol menu ponsel */
.tkn-burger {
  appearance: none; cursor: pointer; flex: none;
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 9999px;
  background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .7); color: #334155;
  transition: background-color .2s;
}
.tkn-burger:hover { background: rgba(255, 255, 255, .9); }
.tkn-burger svg { width: 20px; height: 20px; }
.tkn-burger .tkn-x { display: none; }
.tkn-burger[aria-expanded="true"] .tkn-x { display: block; }
.tkn-burger[aria-expanded="true"] .tkn-lines { display: none; }

.tkn-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  max-height: calc(100vh - 6rem); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 12px 16px; border-radius: 24px;
  /* blur di dalam elemen ber-backdrop-filter tidak bekerja di Chromium, jadi latar hampir pekat */
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
}
.tkn-menu[hidden] { display: none; }
.tkn-menu a {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px;
  color: #334155; font-size: 15px; font-weight: 500; transition: background-color .15s, color .15s;
}
.tkn-menu a + a { margin-top: 4px; }
.tkn-menu a:hover { background: #eff6ff; color: #2563eb; }
.tkn-menu a[aria-current="page"] { background: #17376B; color: #fff; }
.tkn-menu .tkn-cta { justify-content: center; margin-top: 10px; min-height: 48px; color: #fff; }
.tkn-menu .tkn-cta:hover { background: #1d4ed8; color: #fff; }

/* Ruang di bawah navbar untuk halaman yang kontennya tidak berada di bawah kapsul */
.tkn-space { height: 80px; }

@media (min-width: 640px) {
  .tkn-space { height: 100px; }
  .tkn { top: 16px; left: 24px; right: 24px; }
  .tkn-bar { height: 68px; padding: 0 12px 0 16px; }
  .tkn-brand { gap: 12px; }
  .tkn-logo { width: 40px; height: 40px; }
  .tkn-name b { font-size: 18px; }
  .tkn-name small { font-size: 12px; }
}
@media (min-width: 1024px) {
  .tkn-bar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .tkn-nav, .tkn-end { display: flex; }
  .tkn-burger, .tkn-menu { display: none !important; }
}
@media (min-width: 1280px) { .tkn-xl { display: inline-flex !important; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tkn, .tkn-menu { background: rgba(255, 255, 255, .97); }
}

/* ---------- Transisi antar halaman ---------- */
::view-transition-group(tk-navbar) { animation: none; }
::view-transition-old(tk-navbar), ::view-transition-new(tk-navbar) { animation: none; mix-blend-mode: normal; }
::view-transition-group(tk-nav-active) { animation-duration: .38s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
::view-transition-old(root) { animation: tkn-out .22s cubic-bezier(.7, 0, .84, 0) both; }
::view-transition-new(root) { animation: tkn-in .34s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes tkn-out { to { opacity: 0; transform: scale(.985); filter: blur(4px); } }
@keyframes tkn-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Kebal terhadap gaya tautan halaman (legal.css, artikel.css, Tailwind) */
.tkn a, .tkn a:visited { text-decoration: none; }
.tkn .tkn-brand, .tkn .tkn-brand:hover { color: #0f172a; }
.tkn .tkn-nav a { color: #334155; }
.tkn .tkn-nav a:hover { color: #2563eb; }
.tkn .tkn-nav a[aria-current="page"], .tkn .tkn-nav a[aria-current="page"]:hover { color: #fff; }
.tkn .tkn-cta, .tkn .tkn-cta:hover, .tkn .tkn-cta:visited { color: #fff; }
.tkn .tkn-menu a { color: #334155; }
.tkn .tkn-menu a:hover { color: #2563eb; }
.tkn .tkn-menu a[aria-current="page"] { color: #fff; }
.tkn .tkn-menu .tkn-cta, .tkn .tkn-menu .tkn-cta:hover { color: #fff; }
