/* ============================================================
   CEKJURNAL SHELL — header, navigasi, drawer, hero, footer
   ------------------------------------------------------------
   Butuh cj-design-system.css (token) sudah dimuat lebih dulu.
   Satu markup untuk semua ukuran layar; drawer menggantikan
   navigasi horizontal di bawah 1024px.
   ============================================================ */

/* ============================================================
   2. HEADER
   ============================================================ */

.cj-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--cj-surface);
  border-bottom: 1px solid var(--cj-line);
  transition: box-shadow 0.2s ease;
}

.cj-header.is-stuck { box-shadow: var(--cj-shadow); }

.cj-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--cj-header-h);
}

/* --- Logo --- */
.cj-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}

.cj-brand img {
  display: block;
  width: auto;
  height: 26px;
}

@media (min-width: 768px) { .cj-brand img { height: 30px; } }
@media (min-width: 1024px) { .cj-brand img { height: 32px; } }

/* Wordmark navy tak terbaca di header gelap; versi putih dipakai
   sebagai gantinya. Tanda centang hijau tetap utuh (bukan filter). */
.cj-brand img.cj-brand__dark { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cj-brand img.cj-brand__light { display: none; }
  :root:not([data-theme="light"]) .cj-brand img.cj-brand__dark  { display: block; }
}

:root[data-theme="dark"] .cj-brand img.cj-brand__light { display: none; }
:root[data-theme="dark"] .cj-brand img.cj-brand__dark  { display: block; }

/* --- Navigasi desktop --- */
.cj-nav { display: none; }

.cj-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cj-nav__list > li { position: relative; margin: 0; }

.cj-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--cj-r-sm);
  background: none;
  color: var(--cj-ink);
  font-family: var(--cj-font-body);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.cj-nav__link:hover,
.cj-nav__link:focus-visible {
  background: var(--cj-surface-alt);
  color: var(--cj-brand-text);
  text-decoration: none;
}

.cj-nav__link.is-active { color: var(--cj-brand-text); font-weight: 600; }

.cj-nav__caret {
  width: 10px;
  height: 7px;
  color: var(--cj-muted-soft);
  transition: transform 0.2s ease;
}

.cj-nav__list > li.has-sub:hover > .cj-nav__link .cj-nav__caret,
.cj-nav__list > li.has-sub:focus-within > .cj-nav__link .cj-nav__caret {
  transform: rotate(180deg);
}

/* --- Submenu --- */
.cj-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  padding-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.cj-submenu ul {
  min-width: 288px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--cj-surface);
  border: 1px solid var(--cj-line);
  border-radius: var(--cj-r-lg);
  box-shadow: var(--cj-shadow-lg);
}

.cj-nav__list > li.has-sub:hover > .cj-submenu,
.cj-nav__list > li.has-sub:focus-within > .cj-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cj-submenu li { margin: 0; }

.cj-submenu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--cj-r-sm);
  color: var(--cj-ink);
  text-decoration: none;
  transition: background-color 0.16s ease;
}

.cj-submenu a:hover,
.cj-submenu a:focus-visible { background: var(--cj-surface-alt); text-decoration: none; }

.cj-submenu a.is-active { background: rgba(var(--cj-navy-rgb), 0.06); }

.cj-submenu__label {
  display: block;
  color: var(--cj-brand-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.cj-submenu__desc {
  display: block;
  margin-top: 2px;
  color: var(--cj-muted);
  font-size: 12.5px;
  line-height: 1.4;
}

@media (min-width: 1024px) {
  .cj-nav { display: block; }
}

/* --- Aksi kanan --- */
.cj-header__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}

/* --- Tombol tema terang / gelap --- */
.cj-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--cj-tap);
  height: var(--cj-tap);
  padding: 0;
  border: 1px solid var(--cj-line);
  border-radius: var(--cj-r-md);
  background: var(--cj-surface);
  color: var(--cj-brand-text);
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.cj-theme:hover { background: var(--cj-surface-alt); color: var(--cj-gold); }

.cj-theme svg { width: 19px; height: 19px; }

/* Terang: tampilkan bulan (ajakan ke gelap). Gelap: tampilkan matahari. */
.cj-theme__sun  { display: none; }
.cj-theme__moon { display: block; }

:root[data-theme="dark"] .cj-theme__sun  { display: block; }
:root[data-theme="dark"] .cj-theme__moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cj-theme__sun  { display: block; }
  :root:not([data-theme="light"]) .cj-theme__moon { display: none; }
}

/* --- Tombol hamburger --- */
.cj-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--cj-tap);
  height: var(--cj-tap);
  padding: 0;
  border: 1px solid var(--cj-line);
  border-radius: var(--cj-r-md);
  background: var(--cj-surface);
  color: var(--cj-brand-text);
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.cj-burger:hover { background: var(--cj-surface-alt); }

.cj-burger__bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
}

.cj-burger__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

@media (min-width: 1024px) { .cj-burger { display: none; } }

/* ============================================================
   3. DRAWER MOBILE
   ============================================================ */

.cj-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.cj-drawer-overlay.is-open { opacity: 1; visibility: visible; }

.cj-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1010;
  width: min(86vw, 340px);
  display: flex;
  flex-direction: column;
  background: var(--cj-surface);
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overscroll-behavior: contain;
}

.cj-drawer.is-open { transform: translateX(0); }

.cj-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cj-line);
  background: var(--cj-navy);
}

.cj-drawer__head img { height: 32px; width: auto; }

.cj-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--cj-r-sm);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.cj-drawer__close svg { width: 14px; height: 14px; }
.cj-drawer__close:hover { background: rgba(255, 255, 255, 0.22); }

.cj-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px calc(16px + env(safe-area-inset-bottom, 0px));
}

.cj-drawer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cj-drawer__list li { margin: 0; }

.cj-drawer__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--cj-tap);
  padding: 12px 12px;
  border-radius: var(--cj-r-md);
  color: var(--cj-ink);
  font-size: 15px;
  font-weight: 500;
}

.cj-drawer__link:hover { background: var(--cj-surface-alt); color: var(--cj-brand-text); }

.cj-drawer__link.is-active {
  /* Latar hanya tint emas — di mode gelap latar ini gelap, jadi
     teksnya harus ikut --cj-brand-text, bukan navy pekat. */
  background: rgba(var(--cj-gold-rgb), 0.14);
  color: var(--cj-brand-text);
  font-weight: 600;
}


/* Grup dengan submenu */
.cj-drawer__group > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--cj-tap);
  padding: 12px;
  border-radius: var(--cj-r-md);
  list-style: none;
  cursor: pointer;
  color: var(--cj-ink);
  font-size: 15px;
  font-weight: 500;
}

.cj-drawer__group > summary::-webkit-details-marker { display: none; }


.cj-drawer__group > summary::after {
  content: "";
  flex: 0 0 auto;
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--cj-muted);
  border-bottom: 2px solid var(--cj-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.22s ease;
}

.cj-drawer__group[open] > summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.cj-drawer__group[open] > summary { background: var(--cj-surface-alt); }

.cj-drawer__sub {
  margin: 2px 0 6px;
  padding: 0 0 0 32px;
  list-style: none;
}

.cj-drawer__sub a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--cj-r-sm);
  color: var(--cj-muted);
  font-size: 14px;
}

.cj-drawer__sub a:hover { background: var(--cj-surface-alt); color: var(--cj-brand-text); }
.cj-drawer__sub a.is-active { color: var(--cj-brand-text); font-weight: 600; }

body.cj-drawer-open { overflow: hidden; }

/* ============================================================
   4. HERO
   ============================================================ */

.cj-hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--cj-navy-deep);
  color: #fff;
}

.cj-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.cj-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--cj-navy-deep) 0%,
    rgba(var(--cj-navy-rgb), 0.93) 52%,
    rgba(var(--cj-navy-rgb), 0.78) 100%
  );
}

.cj-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 44px 0 52px;
}

.cj-hero__inner-grid {
  display: grid;
  gap: 28px;
  align-items: start;
}

.cj-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 5.6vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}

.cj-hero h1 em { font-style: normal; color: var(--cj-gold); }

.cj-hero__lead {
  max-width: 52ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.7;
}

.cj-hero .cj-eyebrow {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

/* --- Kotak pilihan --- */
.cj-choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.cj-choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--cj-r-lg);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.cj-choice:hover,
.cj-choice:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(var(--cj-gold-rgb), 0.55);
  color: #fff;
  transform: translateY(-2px);
}

.cj-choice__ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--cj-r-md);
  background: rgba(var(--cj-gold-rgb), 0.18);
  color: var(--cj-gold);
  font-size: 15px;
  transition: background-color 0.18s ease;
}

.cj-choice:hover .cj-choice__ico { background: rgba(var(--cj-gold-rgb), 0.3); }

.cj-choice__body { flex: 1 1 auto; min-width: 0; }

.cj-choice__title {
  display: block;
  font-family: var(--cj-font-head);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.cj-choice__desc {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12.5px;
  line-height: 1.5;
}

/* Panah dibuat dari border, bukan ikon font */
.cj-choice__go {
  flex: 0 0 auto;
  align-self: center;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(255, 255, 255, 0.5);
  border-right: 2px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.cj-choice:hover .cj-choice__go {
  border-color: var(--cj-gold);
  transform: rotate(45deg) translate(2px, -2px);
}

@media (min-width: 560px) {
  .cj-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

@media (min-width: 768px) {
  .cj-hero__inner { padding: 60px 0 72px; }
  .cj-hero__lead { font-size: 16.5px; }
}

@media (min-width: 1024px) {
  .cj-hero__inner { padding: 76px 0 88px; }
  .cj-hero__inner-grid { grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
  .cj-choices { grid-template-columns: 1fr; }
  .cj-choice { padding: 17px 20px; }
}

/* Pemisah gelombang di bawah hero */
.cj-hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 3;
  display: block;
  width: 100%;
  height: 40px;
  color: var(--cj-surface-alt);
}

@media (min-width: 768px) {
  .cj-hero__wave { height: 58px; }
}

/* ============================================================
   5. HEADING HALAMAN DALAM (pengganti hero di sub-halaman)
   ============================================================ */

.cj-pagehead {
  position: relative;
  padding: 22px 0 26px;
  background: linear-gradient(135deg, var(--cj-navy) 0%, var(--cj-navy-deep) 100%);
  color: #fff;
  overflow: hidden;
}

/* Lapisan foto opsional — pasang lewat style="background-image:…" */
.cj-pagehead__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.cj-pagehead__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--cj-navy-deep) 0%,
    rgba(var(--cj-navy-rgb), 0.94) 55%,
    rgba(var(--cj-navy-rgb), 0.8) 100%
  );
}

.cj-pagehead > .cj-container { position: relative; z-index: 2; }


.cj-pagehead h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
}

.cj-pagehead h1 em { font-style: normal; color: var(--cj-gold); }

/* Poin ringkas di bawah lead — memberi isi pada area yang tadinya kosong */
.cj-pagehead__facts {
  display: flex;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0 0 2px;
  list-style: none;
  /* Satu baris yang bisa digeser di layar kecil — kalau dibiarkan
     membungkus, tinggi pagehead bertambah ~100px di mobile. */
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cj-pagehead__facts::-webkit-scrollbar { display: none; }

/* Tanpa ini tautan di dalam pil fakta memakai biru bawaan Bootstrap,
   yang gagal kontras di atas latar navy. */
.cj-pagehead__facts a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cj-pagehead__facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 6px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--cj-r-pill);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.cj-pagehead__facts i { color: var(--cj-gold); font-size: 11.5px; }

@media (min-width: 768px) {
  .cj-pagehead__facts { flex-wrap: wrap; overflow-x: visible; gap: 9px 10px; }
  .cj-pagehead__facts li { font-size: 13px; padding: 7px 15px; }
}

.cj-pagehead__lead {
  max-width: 68ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13.5px;
  line-height: 1.6;
}

.cj-pagehead__lead a { color: var(--cj-gold); font-weight: 600; }
.cj-pagehead__lead a:hover { color: var(--cj-gold-light); }

.cj-pagehead .cj-eyebrow {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (min-width: 768px) {
  .cj-pagehead { padding: 46px 0 52px; }
  .cj-pagehead__lead { font-size: 16px; line-height: 1.65; }
}

/* Remah roti */
.cj-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
}

.cj-crumbs li { margin: 0; display: inline-flex; align-items: center; gap: 7px; }
.cj-crumbs li + li::before { content: "/"; opacity: 0.5; }
.cj-crumbs a { color: rgba(255, 255, 255, 0.82); }
.cj-crumbs a:hover { color: var(--cj-gold); }
.cj-crumbs [aria-current] { color: #fff; }

/* ============================================================
   6. FOOTER
   ============================================================ */

.cj-footer {
  position: relative;
  background: linear-gradient(135deg, var(--cj-navy) 0%, var(--cj-navy-deep) 100%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.cj-footer__top {
  display: grid;
  gap: 28px;
  padding: 40px 0 30px;
}

.cj-footer__brand img { height: 40px; width: auto; margin-bottom: 14px; }

.cj-footer__about {
  max-width: 46ch;
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13.5px;
  line-height: 1.7;
}

.cj-footer__title {
  margin: 0 0 12px;
  color: var(--cj-gold);
  font-family: var(--cj-font-head);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cj-footer__list { margin: 0; padding: 0; list-style: none; }
.cj-footer__list li { margin: 0; }

.cj-footer__list a {
  display: block;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  line-height: 1.5;
}

.cj-footer__list a:hover { color: var(--cj-gold); }

.cj-footer__contact {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cj-footer__contact li {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  line-height: 1.6;
}

.cj-footer__contact a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}
.cj-footer__contact a:hover { color: var(--cj-gold); }

.cj-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cj-footer__links li { margin: 0; }

.cj-footer__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--cj-r-md);
  background: rgba(255, 255, 255, 0.08);
  color: var(--cj-gold);
  font-size: 15px;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.cj-footer__links a:hover {
  background: var(--cj-gold);
  border-color: var(--cj-gold);
  color: var(--cj-navy);
}

.cj-footer__bottom {
  padding: 16px 0 calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12.5px;
  text-align: center;
}

.cj-footer__bottom p { margin: 0; }

@media (min-width: 640px) {
  .cj-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .cj-footer__top {
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: 36px;
    padding: 56px 0 40px;
  }
}

/* ============================================================
   7. TOMBOL WHATSAPP MENGAMBANG
   ============================================================ */

.cj-wa {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease;
}

.cj-wa svg { width: 26px; height: 26px; }
.cj-wa:hover { transform: scale(1.06); color: #fff; }

@media print {
  .cj-header, .cj-drawer, .cj-drawer-overlay, .cj-wa { display: none !important; }
}
