/* ==========================================================================
   Syarat dan Ketentuan v3 (resources/views/term-and-conds/v3/index.blade.php)
   Semua aturan berada di bawah .terms-v3 supaya tidak bentrok dengan CSS situs.
   ========================================================================== */

.terms-v3 {
  --terms-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --terms-ink: #0f1c2e;
  --terms-body: #334155;
  --terms-muted: #5b6474;
  --terms-line: #e6ebf2;
  --terms-soft: #f5f8fc;
  --terms-primary: #00699F;
  --terms-navy: #003152;
  /* Jarak dari atas layar untuk header situs yang menempel */
  --terms-offset: 110px;
  color: var(--terms-body);
  -webkit-font-smoothing: antialiased;
}

/* Font dipasang ke semua elemen di halaman ini karena CSS situs mengatur font per elemen (h1, p, li, a) */
.terms-v3,
.terms-v3 * {
  font-family: var(--terms-font);
}

/* CSS situs juga memberi warna, ukuran, dan tinggi baris sendiri ke p/li; samakan dengan isi dokumen */
.terms-v3 .terms-content p,
.terms-v3 .terms-content li {
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  color: var(--terms-body);
}

/* ---------- Header halaman ---------- */
.terms-v3 .terms-hero {
  padding: 56px 0 40px;
  background: var(--terms-soft);
  border-bottom: 1px solid var(--terms-line);
}

.terms-v3 .terms-eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terms-primary);
}

.terms-v3 .terms-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--terms-ink);
}

.terms-v3 .terms-lead {
  max-width: 640px;
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--terms-muted);
}

.terms-v3 .terms-doc-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.terms-v3 .terms-doc-switch a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--terms-line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 15px;
  font-weight: 600;
  color: var(--terms-navy);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.terms-v3 .terms-doc-switch a:hover {
  border-color: var(--terms-primary);
  color: var(--terms-primary);
}

/* ---------- Tata letak: daftar isi + isi ---------- */
.terms-v3 .terms-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  padding: 48px 0 80px;
}

.terms-v3 .terms-toc-box {
  position: sticky;
  top: var(--terms-offset);
  max-height: calc(100vh - var(--terms-offset) - 24px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--terms-line);
  border-radius: 12px;
  background: #ffffff;
}

.terms-v3 .terms-toc-box summary {
  display: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--terms-ink);
}

.terms-v3 .terms-toc-heading {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.terms-v3 .terms-toc-heading a {
  color: var(--terms-ink);
}

.terms-v3 .terms-toc-box ol {
  margin: 0 0 20px;
  padding-left: 20px;
}

.terms-v3 .terms-toc-box ol:last-child {
  margin-bottom: 0;
}

.terms-v3 .terms-toc-box li {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--terms-muted);
}

.terms-v3 .terms-toc-box li a {
  color: var(--terms-muted);
  transition: color 0.2s ease;
}

.terms-v3 .terms-toc-box li a:hover,
.terms-v3 .terms-toc-box li a[aria-current="true"] {
  color: var(--terms-primary);
}

.terms-v3 .terms-toc-box li a[aria-current="true"] {
  font-weight: 600;
}

/* ---------- Isi dokumen ---------- */
.terms-v3 .terms-content {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.75;
}

.terms-v3 .terms-doc {
  counter-reset: terms-section;
}

.terms-v3 .terms-doc + .terms-doc {
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1px solid var(--terms-line);
}

.terms-v3 .terms-doc-title {
  margin: 0 0 20px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--terms-ink);
  scroll-margin-top: var(--terms-offset);
}

.terms-v3 .terms-doc,
.terms-v3 .terms-section {
  scroll-margin-top: var(--terms-offset);
}

.terms-v3 .terms-intro p {
  margin: 0 0 16px;
}

.terms-v3 .terms-section {
  margin-top: 40px;
}

/* Nomor bagian otomatis: 1., 2., 3. ... per dokumen */
.terms-v3 .terms-section h3 {
  display: flex;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--terms-ink);
}

.terms-v3 .terms-section h3::before {
  counter-increment: terms-section;
  content: counter(terms-section) ".";
  flex-shrink: 0;
  color: var(--terms-primary);
}

.terms-v3 .terms-section p {
  margin: 0 0 14px;
}

.terms-v3 .terms-section ol,
.terms-v3 .terms-section ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.terms-v3 .terms-section li {
  margin: 0 0 10px;
  padding-left: 4px;
}

.terms-v3 .terms-section li::marker {
  font-weight: 600;
  color: var(--terms-primary);
}

.terms-v3 .terms-section li > ol,
.terms-v3 .terms-section li > ul,
.terms-v3 .terms-section li > p {
  margin-top: 10px;
}

.terms-v3 .terms-section ul li::marker {
  color: var(--terms-muted);
}

.terms-v3 .terms-content a {
  color: var(--terms-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.terms-v3 .terms-content strong {
  color: var(--terms-ink);
}

/* ---------- Responsif ---------- */
@media (max-width: 991px) {
  .terms-v3 .terms-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 28px;
  }

  /* Di layar kecil daftar isi jadi menu lipat di atas isi */
  .terms-v3 .terms-toc-box {
    position: static;
    max-height: none;
  }

  .terms-v3 .terms-toc-box summary {
    display: list-item;
  }

  .terms-v3 .terms-toc-box[open] summary {
    margin-bottom: 16px;
  }
}

@media (max-width: 575px) {
  .terms-v3 .terms-hero {
    padding: 36px 0 28px;
  }

  .terms-v3 .terms-content {
    font-size: 15px;
  }

  .terms-v3 .terms-doc-title {
    font-size: 25px;
  }

  .terms-v3 .terms-section h3 {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .terms-v3 * {
    transition: none !important;
  }
}

/* ---------- Cetak: hanya isi dokumen ---------- */
@media print {
  .rbt-header,
  .sga-site-footer,
  .terms-v3 .terms-toc,
  .terms-v3 .terms-doc-switch {
    display: none !important;
  }

  .terms-v3 .terms-hero {
    padding: 0 0 16px;
    background: none;
  }

  .terms-v3 .terms-layout {
    display: block;
    padding: 0;
  }

  .terms-v3 .terms-content {
    max-width: none;
    font-size: 12pt;
  }

  .terms-v3 .terms-section {
    break-inside: avoid-page;
  }
}
