/* ==========================================================================
   BPRS Barkah Gemadana — "Teduh Banua"
   CSS situs publik. Tanpa build step: file ini langsung dipakai.
   ========================================================================== */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/fraunces-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/fraunces-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }

/* ==========================================================================
   Token warna.
   Palet mentah (--green-*, --gold-*) TIDAK dipakai langsung oleh komponen untuk
   hal yang berbeda makna. Komponen memakai token semantik di bawah ini, sehingga
   mode gelap cukup mendefinisikan ulang token semantik tanpa efek samping:
   --surface   latar kartu/panel/header   --raised   chip/segmen aktif
   --brand     isian tombol/kepala tabel (teks di atasnya selalu putih)
   --accent    teks tautan/aksen hijau    --tint     latar hijau lembut
   --deep      latar hijau tua (hero, footer, util bar) — teks di atasnya terang
   --white     SELALU putih (teks di atas --brand/--deep, pelat logo)
   ========================================================================== */
:root {
  color-scheme: light;

  /* Palet hijau tua & teks di atasnya (sama untuk kedua mode, nilai --deep beda) */
  --deep: #0B3B25;
  --green-line: #2E5E45;
  --green-text-soft: #D5E3DA;
  --green-text-muted: #A8C4B3;
  --on-deep: #E6F0EA;

  --brand: #0E5C35;
  --brand-strong: #0B3B25;
  --accent: #0E5C35;
  --accent-strong: #0B3B25;
  --tint: #E6F0EA;
  --tint-line: #B8D4C3;
  --success-text: #0B3B25;

  --gold-500: #D4AF37;
  --gold-400: #E3C877;
  --on-gold: #1B2420;
  --gold-text: #7D5F12;
  --gold-tag-text: #7A5A0F;
  --gold-100: #F6EDD3;
  --gold-050: #FFF8E8;
  --gold-line: #EBD9A6;
  --focus: #A07A10;

  --ivory: #FAF7F0;      /* latar halaman */
  --sand: #F1EDE3;       /* pita section */
  --surface: #FFFFFF;
  --raised: #FFFFFF;
  --track: #EFEBE1;      /* wadah segmen/toggle */
  --line: #E4DFD2;
  --line-soft: #EEEAE0;
  --field-line: #948C7B; /* batas input/pill: kontras ≥3:1 terhadap putih (WCAG 1.4.11) */
  --ink: #1B2420;
  --ink-2: #3F4A45;
  --ink-muted: #55605B;
  --placeholder: #6B6457;
  --white: #FFFFFF;
  --danger: #9A3412;
  --danger-bg: #FEF2F2;
  --danger-line: #FECACA;
  --danger-text: #7F1D1D;
  --wa: #177E44;         /* hijau WhatsApp yang lolos kontras teks putih */

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-soft: 0 8px 24px rgba(10, 30, 20, 0.08);
  --shadow-float: 0 12px 32px rgba(10, 30, 20, 0.10);
  --shadow-strong: 0 16px 40px rgba(6, 30, 18, 0.28);
  --shadow-chip: 0 1px 3px rgba(0, 0, 0, .08);

  --container: 1280px;
  --gutter: 24px;
  --section-gap: 104px;
}

/* Mode gelap. Atribut data-theme dipasang oleh js/theme-init.js sebelum CSS
   dirender: pilihan tersimpan pengunjung, atau tema perangkat bila belum memilih.
   Semua pasangan warna di bawah sudah dihitung ≥4,5:1 (teks) / ≥3:1 (batas). */
:root[data-theme="dark"] {
  color-scheme: dark;

  --deep: #0A2A1C;
  --on-deep: #E6F0EA;

  --brand: #1E7A4B;
  --brand-strong: #176B41;
  --accent: #6FCB98;
  --accent-strong: #9ADDB7;
  --tint: #1A3325;
  --tint-line: #2F5A43;
  --success-text: #BFE6CF;

  --gold-text: #E0C36F;
  --gold-tag-text: #EBD597;
  --gold-100: #2B2514;
  --gold-050: #1E1B10;
  --gold-line: #4A3F1E;
  --focus: #E3C877;

  --ivory: #111611;
  --sand: #151B15;
  --surface: #1A211B;
  --raised: #2E392E;
  --track: #0C100C;
  --line: #2B342B;
  --line-soft: #232B23;
  --field-line: #677466;
  --ink: #E6ECE5;
  --ink-2: #C3CCC1;
  --ink-muted: #9AA697;
  --placeholder: #8A9687;
  --danger: #F2917A;
  --danger-bg: #2A1714;
  --danger-line: #5C2B22;
  --danger-text: #F8C0B2;

  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.30);
  --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.40);
  --shadow-strong: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-chip: 0 1px 3px rgba(0, 0, 0, .4);
}

/* Tombol ganti tema di header */
.theme-toggle {
  width: 44px; height: 44px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink); transition: background-color .15s, border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Logo: versi teks gelap untuk mode terang, versi teks terang untuk mode gelap */
.logo-on-dark { display: none; }
:root[data-theme="dark"] .brand .logo-on-light { display: none; }
:root[data-theme="dark"] .brand .logo-on-dark { display: block; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Di atas latar hijau tua, emas terang lebih kontras. */
.pattern-bg :focus-visible, .site-footer :focus-visible, .util-bar :focus-visible { outline-color: var(--gold-400); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
  color: inherit;
}

p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--gold-500); color: var(--on-gold); padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-text);
}
.on-dark .eyebrow, .eyebrow.on-dark { color: var(--gold-400); }

.muted { color: var(--ink-muted); }
.small { font-size: 13px; line-height: 1.6; }

/* --- Tombol ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  border-radius: 12px; border: 1.5px solid transparent;
  font: 700 16px/1.2 var(--font-body);
  text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-strong); color: var(--white); }
.btn-gold { background: var(--gold-500); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-400); color: var(--on-gold); }
.btn-outline { border-color: var(--field-line); color: var(--ink); background: var(--surface); font-weight: 600; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost-light { border-color: var(--green-text-muted); color: var(--white); font-weight: 600; background: transparent; }
.btn-ghost-light:hover { border-color: var(--white); color: var(--white); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; border-radius: 10px; }

.link-arrow { font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: ' →'; }

.tag {
  display: inline-block; align-self: flex-start;
  font-size: 12px; font-weight: 700; line-height: 1.4;
  padding: 5px 10px; border-radius: 99px;
  color: var(--accent); background: var(--tint);
}
.tag-gold { color: var(--gold-tag-text); background: var(--gold-100); }

/* --- Header ------------------------------------------------------------------ */

.util-bar { background: var(--deep); color: var(--on-deep); font-size: 13px; }
.util-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.util-bar a { color: #F3E9CF; text-decoration: none; }
.util-bar a:hover { color: var(--white); text-decoration: underline; }
.util-bar .sep { opacity: .7; }
.util-group { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 44px; height: 44px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.brand-sub { font-size: 11px; color: var(--ink-muted); letter-spacing: .05em; text-transform: uppercase; }
.brand-logo { height: 52px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.main-nav a, .main-nav .nav-parent {
  display: block; padding: 10px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px;
  background: none; border: 0; font-family: inherit; cursor: pointer;
}
.main-nav a:hover, .main-nav .nav-parent:hover { background: var(--ivory); color: var(--accent); }
.main-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.main-nav .has-sub { position: relative; }
.main-nav .sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
  box-shadow: var(--shadow-float); flex-direction: column; gap: 0;
}
.main-nav .has-sub:hover .sub, .main-nav .has-sub:focus-within .sub { display: flex; }
.main-nav .sub a { padding: 10px 12px; }
.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}

/* --- Hero beranda ------------------------------------------------------------ */

.pattern-bg {
  position: relative;
  background-color: var(--deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke='%23F3E9CF' stroke-width='1.2' opacity='0.09'%3E%3Cpath d='M48 10 L57 39 L86 48 L57 57 L48 86 L39 57 L10 48 L39 39 Z'/%3E%3Crect x='31' y='31' width='34' height='34' transform='rotate(45 48 48)'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--white);
}

.hero { padding: 88px 0 136px; }
.hero .container { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.08; }
.hero-lead { font-size: 19px; color: var(--green-text-soft); max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero-visual { position: relative; }

/* Kartu nisbah bulan ini di hero: data nyata, bukan hiasan. */
.rate-card {
  justify-self: end; width: 100%; max-width: 520px;
  background: var(--surface); color: var(--ink); border-radius: 24px; padding: 28px;
  box-shadow: var(--shadow-strong); display: flex; flex-direction: column; gap: 18px;
}
.rate-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rate-card-head a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.rate-card-top { display: flex; flex-direction: column; gap: 2px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.rate-card .big { font-family: var(--font-display); font-size: 44px; font-weight: 600; color: var(--accent); line-height: 1.1; }
.rate-card .big small { font-family: var(--font-body); font-size: 16px; color: var(--ink-muted); font-weight: 500; }
.rate-card-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.rate-list-title { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.rate-list dl { margin: 0; }
.rate-list dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.rate-list dl div:last-child { border-bottom: 0; }
.rate-list dt { color: var(--ink-2); }
.rate-list dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- Akses cepat -------------------------------------------------------------- */

.quick { margin-top: -56px; position: relative; z-index: 2; }
.quick-grid {
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-float);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden;
}
.quick-item {
  display: flex; gap: 16px; align-items: center; padding: 28px;
  text-decoration: none; color: var(--ink); border-right: 1px solid var(--line-soft);
}
.quick-item:last-child { border-right: 0; }
.quick-item:hover { background: var(--ivory); color: var(--ink); }
.quick-item svg { flex-shrink: 0; color: var(--accent); }
.quick-item strong { display: block; font-size: 16px; }
.quick-item span { font-size: 13px; color: var(--ink-muted); }

/* --- Section umum ---------------------------------------------------------- */

.section { padding-top: var(--section-gap); }
.section-band { margin-top: var(--section-gap); padding: 88px 0; background: var(--sand); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.section-head .titles { display: flex; flex-direction: column; gap: 12px; max-width: 700px; }
.section-head h2, .section-title { font-size: clamp(30px, 3.4vw, 42px); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.section-head.flush { margin-bottom: 0; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 14px; color: var(--ink); text-decoration: none;
}
a.card:hover { border-color: var(--accent); color: var(--ink); box-shadow: var(--shadow-float); }
.card h3 { font-size: 24px; }
.card p { font-size: 15px; color: var(--ink-muted); }
.card-foot {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 12px; font-size: 14px;
}
.card-foot strong { text-align: right; }

.product-card { overflow: hidden; }
.product-thumb { margin: -28px -28px 4px; aspect-ratio: 16 / 10; background: var(--tint); overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
a.product-card:hover .product-thumb img { transform: scale(1.03); }
.thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--tint); }
.thumb-placeholder .brand-mark { width: 56px; height: 56px; opacity: .55; }
:root[data-theme="dark"] .thumb-placeholder .brand-mark { opacity: .85; }
.product-figure { margin: 8px 0 0; border-radius: 20px; overflow: hidden; background: var(--tint); }
.product-figure img { width: 100%; max-height: 460px; object-fit: cover; }

.segmented { display: inline-flex; gap: 6px; background: var(--track); box-shadow: inset 0 0 0 1px var(--line-soft); padding: 6px; border-radius: 12px; }
.segmented a {
  padding: 10px 20px; border-radius: 8px; font-weight: 500; font-size: 15px;
  color: var(--ink-muted); text-decoration: none;
}
.segmented a[aria-current="page"] { background: var(--raised); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-chip); }
.segmented a:not([aria-current]):hover { color: var(--ink); }

/* --- Nisbah & simulasi --------------------------------------------------- */

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 15px; }
table.data th { background: var(--brand); color: var(--white); text-align: left; font-weight: 600; padding: 14px 20px; }
table.data td { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { font-weight: 700; }
table.data tbody th { background: transparent; color: var(--ink); padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
table.data tr.group-row th { background: var(--tint); color: var(--accent); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; padding: 10px 20px; }
table.data.history th, table.data.history td { white-space: nowrap; }
table.data.history .num { font-weight: 700; }
.d-block { display: block; }

.panel { background: var(--surface); border-radius: 20px; padding: 36px; box-shadow: var(--shadow-soft); border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 22px; }
.panel h3 { font-size: 26px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 13px; color: var(--ink-muted); }
.field .error { font-size: 13px; color: var(--danger); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 50px; border: 1.5px solid var(--field-line); border-radius: 12px;
  padding: 12px 16px; font: 500 16px/1.4 var(--font-body); color: var(--ink); background: var(--surface);
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); opacity: 1; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint); }
.input.lg { font-size: 20px; font-weight: 600; }
.textarea { min-height: 150px; resize: vertical; }
.is-invalid { border-color: var(--danger); }

.pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.pill { padding: 8px 10px; line-height: 1.25; }
.sim-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.toggle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: var(--track); box-shadow: inset 0 0 0 1px var(--line-soft); padding: 6px; border-radius: 12px; }
.toggle button {
  min-height: 44px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font: 600 15px var(--font-body); color: var(--ink-muted);
}
.toggle button[aria-pressed="true"] { background: var(--raised); color: var(--accent); font-weight: 700; box-shadow: var(--shadow-chip); }
.toggle button[aria-pressed="false"]:hover { color: var(--ink); }
[hidden] { display: none !important; }
.pill {
  min-height: 48px; border: 1.5px solid var(--field-line); background: var(--surface); border-radius: 10px;
  font: 700 15px var(--font-body); color: var(--ink); cursor: pointer;
}
.pill:hover { border-color: var(--accent); }
.pill[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); color: var(--accent); }

.result { background: var(--ivory); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.result-row { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.result-row span:first-child { color: var(--ink-muted); }
.result-row strong.accent { color: var(--accent); font-size: 18px; }

.checkbox { display: flex; gap: 12px; align-items: flex-start; background: var(--ivory); border-radius: 12px; padding: 14px 16px; }
.checkbox input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex-shrink: 0; }
.checkbox label { font-size: 14px; line-height: 1.6; color: var(--ink-2); font-weight: 400; }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* --- Laporan -------------------------------------------------------------- */

.doc-card { display: flex; flex-direction: row; gap: 18px; align-items: flex-start; }
.doc-icon {
  width: 52px; height: 64px; flex-shrink: 0; border-radius: 8px; background: var(--gold-100);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
  font-size: 11px; font-weight: 700; color: var(--gold-tag-text);
}
.doc-card .meta { display: flex; flex-direction: column; gap: 4px; }
.doc-card .meta strong { font-size: 18px; line-height: 1.3; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.tabs a {
  padding: 10px 18px; border-radius: 99px; border: 1px solid var(--field-line);
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; background: var(--surface);
}
.tabs a:not([aria-current]):hover { border-color: var(--accent); color: var(--accent); }
.tabs a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--white); font-weight: 600; }

/* --- Berita --------------------------------------------------------------- */

.news-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); }
.news-card:hover { color: var(--accent); }
.news-card .thumb { aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: var(--line); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card h3 { font-size: 22px; line-height: 1.3; }
.news-card .date { font-size: 13px; color: var(--ink-muted); }

.dps-panel { border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.dps-panel h3 { font-size: 28px; line-height: 1.25; }
.dps-panel h3 a { color: var(--white); text-decoration: none; }
.dps-panel h3 a:hover { text-decoration: underline; }
.dps-panel p { color: var(--green-text-soft); font-size: 15px; }
.dps-panel .date { font-size: 13px; color: var(--green-text-muted); }
.dps-panel .more { margin-top: auto; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--green-line); padding-top: 18px; }
.dps-panel .more a { color: #F3E9CF; text-decoration: none; font-size: 15px; }
.dps-panel .more a:hover { text-decoration: underline; }
.dps-panel .more a.link-arrow { color: var(--gold-400); }

/* --- Kantor --------------------------------------------------------------- */

.office-list { display: flex; flex-direction: column; }
.office-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.office-row strong { font-weight: 700; }
.office-row .addr { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.office-row .addr a { font-size: 14px; font-weight: 600; }
.hours { display: flex; gap: 40px; font-size: 15px; flex-wrap: wrap; }
.hours div { display: flex; flex-direction: column; gap: 4px; }
.map-card {
  border-radius: 20px; background: var(--tint); min-height: 360px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; padding: 40px;
}
.map-card h3 { font-size: 28px; }
.map-card.has-photo { justify-content: flex-start; overflow: hidden; padding: 0 0 36px; min-height: 0; }
.map-card.has-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.map-card.has-photo > :not(img) { margin: 0 36px; }
.page-banner { margin: 0 0 40px; border-radius: 20px; overflow: hidden; max-width: 960px; }

/* --- Mitra --------------------------------------------------------------- */

.partner-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.partner-grid li, .partner-grid a { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; min-height: 128px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.partner-grid li:has(a) { padding: 0; border: 0; background: none; }
.partner-grid a { width: 100%; height: 100%; }
.partner-grid a:hover { border-color: var(--accent); }
.partner-grid img { height: 56px; width: auto; max-width: 100%; object-fit: contain; }
/* Logo mitra dibuat untuk latar putih: di mode gelap diberi pelat putih agar tetap terbaca. */
:root[data-theme="dark"] .partner-grid img { background: var(--white); width: min(100%, 200px); height: 80px; padding: 12px 16px; border-radius: 10px; object-fit: contain; }
.partner-grid span { font-size: 13px; color: var(--ink-muted); text-align: center; }

/* --- Pembiayaan umrah ----------------------------------------------------- */

.umrah-table td { vertical-align: top; }
.umrah-table td.actions { text-align: right; white-space: nowrap; }
.umrah-sim { margin-top: 28px; }
.umrah-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; }
.result-table { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); }
.result-table th { background: var(--ivory) !important; color: var(--ink-2) !important; font-weight: 500; width: 55%; }
.result-table td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-table tr.highlight th, .result-table tr.highlight td { background: var(--tint) !important; color: var(--accent) !important; font-size: 17px; font-weight: 700; }

.cta-band {
  margin-top: var(--section-gap); background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 44px 48px; display: flex; align-items: center; justify-content: space-between; gap: 48px;
}
.cta-band h2 { font-size: 32px; margin-bottom: 12px; }
.cta-band p { color: var(--ink-2); max-width: 700px; }
.cta-actions { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }

/* --- Footer --------------------------------------------------------------- */

.site-footer { margin-top: var(--section-gap); background: var(--deep); color: var(--green-text-soft); padding: 64px 0 40px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-grid h2 { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--white); margin-bottom: 10px; letter-spacing: 0; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-grid a { color: var(--green-text-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--white); text-decoration: underline; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand .name { font-family: var(--font-display); font-size: 22px; color: var(--white); }
.footer-legal { margin-top: 40px; border-top: 1px solid var(--green-line); padding-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.footer-legal p { font-size: 13px; color: var(--green-text-muted); max-width: 820px; }
.partner-logos { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.partner-logos span {
  min-width: 64px; height: 48px; border-radius: 10px; background: var(--white);
  display: flex; align-items: center; justify-content: center; padding: 8px 12px;
}
.partner-logos img { height: 32px; width: auto; }
.footer-logo { height: 56px; width: auto; margin-bottom: 4px; }
.footer-social { display: inline-flex; align-items: center; gap: 8px; }

.policy-card {
  margin-top: 18px; display: flex; gap: 14px; align-items: center;
  padding: 12px; border-radius: 14px; border: 1px solid var(--green-line); background: rgba(255,255,255,.04);
  text-decoration: none; color: var(--green-text-soft);
}
.policy-card:hover { border-color: var(--gold-400); background: rgba(255,255,255,.08); text-decoration: none !important; }
.policy-card img { width: 60px; height: auto; border-radius: 6px; flex-shrink: 0; background: var(--white); }
.policy-card strong { display: block; color: var(--white); font-size: 15px; line-height: 1.3; }
.policy-card span span { font-size: 13px; color: var(--green-text-muted); }

.doc-dialog {
  width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0;
  border-radius: 20px; box-shadow: var(--shadow-strong); background: var(--surface); color: var(--ink);
}
.doc-dialog[open] { display: flex; flex-direction: column; }
.doc-dialog::backdrop { background: rgba(6, 30, 18, .6); }
.doc-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.doc-dialog-head h2 { font-size: 22px; }
.doc-dialog-close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0; }
.doc-dialog-body { flex: 1; overflow: auto; background: var(--sand); min-height: 0; }
.doc-dialog-body iframe { display: block; width: 100%; height: 72vh; border: 0; background: var(--white); }
.doc-dialog-body img { margin: 0 auto; max-width: 600px; width: 100%; }
.doc-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }

/* --- Halaman dalam ---------------------------------------------------------- */

.page-hero { padding: 64px 0; }
.page-hero .container { display: flex; flex-direction: column; gap: 16px; }
.page-hero h1 { font-size: clamp(34px, 4.4vw, 52px); max-width: 900px; }
.page-hero p { font-size: 18px; color: var(--green-text-soft); max-width: 820px; }

.breadcrumb { font-size: 14px; color: var(--ink-muted); display: flex; gap: 8px; flex-wrap: wrap; padding-top: 28px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.layout-main { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px; padding-top: 28px; }
.layout-main .main { grid-column: span 7; }
.layout-main .aside { grid-column: span 5; }
.layout-main .main.wide { grid-column: span 8; }
.layout-main .aside.narrow { grid-column: span 4; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.fact span { font-size: 13px; color: var(--ink-muted); }
.fact strong { font-size: 19px; line-height: 1.3; }

.note { background: var(--gold-050); border: 1px solid var(--gold-line); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.note h2, .note h3 { font-size: 24px; }

.prose { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 30px; color: var(--ink); margin-top: 1.6em; }
.prose h3 { font-size: 24px; color: var(--ink); margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose img { border-radius: 14px; margin: 1.5em 0; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold-500); color: var(--ink); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose a { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }

.article-head { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.article-head h1 { font-size: clamp(32px, 4vw, 48px); }
.article-cover { border-radius: 20px; overflow: hidden; margin: 32px 0; }
.article-body { max-width: 760px; }

.alert { border-radius: 12px; padding: 14px 18px; font-size: 15px; }
.alert-error { background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-text); }
.alert-success { background: var(--tint); border: 1px solid var(--tint-line); color: var(--success-text); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  width: 40px; height: 40px; border-radius: 99px; background: var(--brand); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.steps li:last-child::before { background: var(--gold-500); color: var(--on-gold); }
.steps strong { font-size: 18px; }
.steps span { font-size: 15px; color: var(--ink-muted); }

.kv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.kv div:last-child { border-bottom: 0; }
.kv dt { font-weight: 700; }
.kv dd { margin: 0; color: var(--ink-2); text-align: right; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.person .photo { aspect-ratio: 4 / 5; background: var(--sand); }
.person .photo img { width: 100%; height: 100%; object-fit: cover; }
.person .info { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.person .info span { font-size: 14px; color: var(--ink-muted); }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.gallery figcaption { padding: 12px 16px; font-size: 14px; }

.empty { background: var(--surface); border: 1px dashed var(--field-line); border-radius: var(--radius-lg); padding: 40px; text-align: center; color: var(--ink-muted); }

.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 40px; list-style: none; padding: 0; }
.pagination a, .pagination span {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); padding: 0 12px;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination [aria-current="page"] span { background: var(--brand); border-color: var(--brand); color: var(--white); font-weight: 700; }
.pagination .disabled span { color: var(--ink-muted); background: var(--ivory); }

.thanks { max-width: 720px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.ticket { font-family: var(--font-display); font-size: 40px; color: var(--accent); letter-spacing: .02em; }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px;
  border-radius: 99px; background: var(--wa); color: var(--white); text-decoration: none; font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 24px rgba(6, 30, 18, .28);
}
.wa-float:hover { background: var(--brand-strong); color: var(--white); }

/* --- Responsif -------------------------------------------------------------- */

@media (max-width: 1180px) {
  .main-nav a, .main-nav .nav-parent { padding: 10px 8px; font-size: 14px; }
}

@media (max-width: 1024px) {
  :root { --section-gap: 80px; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-float);
    padding: 12px var(--gutter) 20px; max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a, .main-nav .nav-parent { padding: 14px 8px; font-size: 16px; width: 100%; text-align: left; }
  .main-nav .sub { display: flex; position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; min-width: 0; }
  .main-nav .mobile-cta { display: block; margin-top: 12px; }
  .util-bar .hide-sm { display: none; }
  .util-bar .container { justify-content: flex-end; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .rate-card { justify-self: stretch; max-width: none; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-item:nth-child(2) { border-right: 0; }
  .quick-item:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .grid-3, .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .layout-main { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .layout-main .main, .layout-main .aside, .layout-main .main.wide, .layout-main .aside.narrow { grid-column: auto; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .umrah-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (min-width: 1025px) {
  .main-nav .mobile-cta { display: none; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --section-gap: 56px; }
  .util-bar .container { justify-content: center; }
  .site-header .container { min-height: 64px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-logo { height: 40px; }
  .map-card.has-photo > :not(img) { margin: 0 24px; }
  .doc-dialog-head { padding: 14px 16px; }
  .doc-dialog-head h2 { font-size: 18px; }
  .doc-dialog-foot { padding: 12px 16px; }
  /* Tabel lebar menjadi kartu bertumpuk di ponsel. */
  table.stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.stack-sm td { border: 0; padding: 6px 16px; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  table.stack-sm td::before { content: attr(data-label); color: var(--ink-muted); font-size: 13px; text-align: left; flex-shrink: 0; }
  table.stack-sm td .cell { display: block; }
  table.stack-sm td.actions { justify-content: stretch; }
  table.stack-sm td.actions .btn { width: 100%; }
  .brand-name { font-size: 18px; }
  .brand-sub { display: none; }
  .hero { padding: 40px 0 96px; }
  .hero-lead { font-size: 16px; }
  .hero-actions .btn { width: 100%; }
  .rate-card { padding: 22px; border-radius: 20px; }
  .rate-card .big { font-size: 36px; }
  .rate-card-cols { gap: 16px; }
  .rate-list dl div { font-size: 14px; }
  .page-hero { padding: 40px 0 44px; }
  .page-hero p { font-size: 16px; }
  .quick-item { flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 16px; }
  .quick-item span { display: none; }
  .grid-2, .grid-3, .grid-4, .gallery, .facts, .steps { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-band { padding: 48px 0; }
  .panel { padding: 24px; }
  .office-row { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .cta-band { padding: 24px; }
  .cta-actions .btn { width: 100%; }
  .wa-float { right: 14px; bottom: 14px; padding: 13px; }
  .wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .kv div { flex-direction: column; gap: 2px; }
  .kv dd { text-align: left; }
  table.data th, table.data td { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .util-bar, .site-header, .site-footer, .cta-band, .quick, .wa-float, .doc-dialog { display: none; }
  body { background: #fff; }
}
