/* ==========================================================================
   bantuanrakyat-my.my — laman informasi tidak rasmi
   Satu stylesheet dikongsi. Reka bentuk asli, rasa institusi/civic.
   ========================================================================== */

:root {
  --c-primary: #0A4D68;
  --c-primary-dark: #083D54;
  --c-primary-light: #0d6a8f;
  --c-accent: #0F8A5F;          /* hijau bantuan — CTA */
  --c-accent-dark: #0c6f4c;
  --c-ink: #1c2733;
  --c-muted: #4b5563;
  --c-bg: #ffffff;
  --c-surface: #f4f7f9;
  --c-surface-2: #eaf0f4;
  --c-border: #d8e0e6;
  /* kotak notis */
  --c-info-bg: #e8f1fb;
  --c-info-bd: #1e5aa8;
  --c-warn-bg: #fff4e5;
  --c-warn-bd: #b7791f;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(16, 42, 67, .08), 0 4px 14px rgba(16, 42, 67, .06);
  --wrap: 1080px;
  --read: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans",
          "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

a { color: var(--c-primary-light); text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--c-primary-dark); }

h1, h2, h3, h4 { line-height: 1.25; color: var(--c-primary-dark); font-weight: 700; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.4rem); margin: 0 0 .6em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.7rem); margin: 2em 0 .5em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 .4em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--c-primary-dark);
  color: #fff; padding: 10px 16px; z-index: 1000; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-primary); color: #fff;
  box-shadow: 0 2px 6px rgba(8, 61, 84, .25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand:hover, .brand:focus { color: #fff; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span b { color: #fff; }
.brand span small { display: block; font-size: .68rem; font-weight: 500; letter-spacing: .04em; opacity: .85; text-transform: uppercase; }

.nav-toggle {
  display: none; background: transparent; border: 1.5px solid rgba(255,255,255,.6);
  color: #fff; border-radius: var(--radius-sm); padding: 8px 12px; font: inherit; font-size: .9rem; cursor: pointer;
}
.site-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.site-nav a, .site-nav summary {
  display: block; color: #eaf3f7; text-decoration: none; padding: 9px 12px;
  border-radius: var(--radius-sm); font-size: .95rem; cursor: pointer;
}
.site-nav a:hover, .site-nav summary:hover, .site-nav a[aria-current="page"] { background: var(--c-primary-dark); color: #fff; }
.site-nav a[aria-current="page"] { font-weight: 700; }

.dropdown { position: relative; }
.dropdown > summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary::after { content: "▾"; font-size: .8em; }
.dropdown[open] > summary { background: var(--c-primary-dark); }
.dropdown-menu {
  position: absolute; top: 100%; inset-inline-end: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; margin-top: 6px;
}
.dropdown-menu li { width: 100%; }
.dropdown-menu a { color: var(--c-ink); padding: 9px 12px; }
.dropdown-menu a:hover, .dropdown-menu a[aria-current="page"] { background: var(--c-surface); color: var(--c-primary-dark); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--c-surface); border-bottom: 1px solid var(--c-border); font-size: .88rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 10px 0; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; color: var(--c-muted); }
.breadcrumb li + li::before { content: "›"; color: var(--c-muted); }
.breadcrumb a { color: var(--c-primary-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(160deg, var(--c-primary) 0%, var(--c-primary-dark) 100%); color: #fff; }
.hero .wrap { padding-block: 40px 44px; }
.hero h1 { color: #fff; max-width: 22ch; }
.hero p { color: #dceaf1; max-width: var(--read); font-size: 1.08rem; margin-bottom: 0; }
.hero-media { margin-top: 22px; }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Main / layout ---------- */
main { display: block; }
.section { padding-block: 8px; }
.content { max-width: var(--read); }
.content ul, .content ol { padding-inline-start: 1.3em; margin: 0 0 1em; }
.content li { margin-bottom: .4em; }
.lead { font-size: 1.12rem; color: var(--c-ink); }

/* ---------- Notice boxes ---------- */
.notice { border-inline-start: 5px solid; border-radius: var(--radius-sm); padding: 14px 16px; margin: 1.3em 0; background: var(--c-surface); }
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: inherit; }
.notice--info { background: var(--c-info-bg); border-color: var(--c-info-bd); }
.notice--warn { background: var(--c-warn-bg); border-color: var(--c-warn-bd); }
.notice--info .notice-title { color: #14417e; }
.notice--warn .notice-title { color: #8a5a12; }
.notice-title { font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.notice-title svg { width: 20px; height: 20px; flex: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 420px; }
table.data caption { text-align: start; font-weight: 700; color: var(--c-primary-dark); padding: 10px 12px; background: var(--c-surface-2); }
table.data th, table.data td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--c-border); vertical-align: top; }
table.data thead th { background: var(--c-primary); color: #fff; font-weight: 600; }
table.data tbody tr:nth-child(even) { background: var(--c-surface); }
table.data tbody tr:last-child td { border-bottom: none; }

/* ---------- Buttons / CTA ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; border-radius: var(--radius-sm); padding: 12px 20px; font-size: 1rem; line-height: 1.2; border: 2px solid transparent; cursor: pointer; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--c-accent); color: #fff; }
.btn--primary:hover, .btn--primary:focus { background: var(--c-accent-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--c-primary-dark); border-color: var(--c-primary); }
.btn--ghost:hover, .btn--ghost:focus { background: var(--c-surface); color: var(--c-primary-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 22px 22px; margin: 1.8em 0; }
.cta-band h2 { margin-top: 0; }
.cta-band p:last-of-type { margin-bottom: 0; }

/* ---------- Card grid ---------- */
.cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding: 0; margin: 1.4em 0; }
.card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card h3 { margin: 0 0 .35em; font-size: 1.12rem; }
.card p { color: var(--c-muted); font-size: .95rem; margin-bottom: .8em; }
.card .card-link { margin-top: auto; font-weight: 700; text-decoration: none; color: var(--c-accent-dark); }
.card .card-link:hover { text-decoration: underline; }
.card .card-ico { width: 38px; height: 38px; margin-bottom: 10px; color: var(--c-primary); }

/* ---------- Next-step block ---------- */
.next-steps { border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; margin: 2em 0; }
.next-steps .ns-head { background: var(--c-primary); color: #fff; padding: 12px 18px; font-weight: 700; }
.next-steps ul { list-style: none; margin: 0; padding: 0; }
.next-steps li { border-bottom: 1px solid var(--c-border); }
.next-steps li:last-child { border-bottom: none; }
.next-steps a { display: block; padding: 14px 18px; text-decoration: none; color: var(--c-ink); }
.next-steps a:hover, .next-steps a:focus { background: var(--c-surface); }
.next-steps a b { color: var(--c-primary-dark); display: block; }
.next-steps a span { color: var(--c-muted); font-size: .92rem; }

/* ---------- FAQ ---------- */
.faq { margin: 1.2em 0; }
.faq details { border: 1px solid var(--c-border); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--c-primary-dark); list-style: none; position: relative; padding-inline-end: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; line-height: 1; color: var(--c-accent); }
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 16px 14px; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Steps ---------- */
ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.2em 0; }
ol.steps > li { position: relative; padding: 4px 0 16px 52px; margin: 0; }
ol.steps > li::before { counter-increment: step; content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--c-accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
ol.steps > li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 16.5px; top: 34px; bottom: 2px; width: 2px; background: var(--c-border); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-primary-dark); color: #cfe0e8; margin-top: 40px; font-size: .93rem; }
.site-footer .wrap { padding-block: 34px 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px; }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 .7em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5em; }
.site-footer a { color: #d7e6ee; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus { color: #fff; text-decoration: underline; }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,.15); margin-top: 24px; padding-top: 18px; color: #aecad6; font-size: .86rem; line-height: 1.6; }
.footer-disclaimer strong { color: #fff; }
.footer-copy { margin-top: 14px; color: #8fb2c0; font-size: .82rem; }

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding-block: 60px; }
.page-404 .code { font-size: 4rem; font-weight: 800; color: var(--c-primary); margin: 0; }

/* ---------- Utility ---------- */
.mt0 { margin-top: 0; }
.text-center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; top: 62px; inset-inline: 0; background: var(--c-primary); padding: 8px 12px 16px; box-shadow: 0 8px 16px rgba(8,61,84,.3); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a, .site-nav summary { padding: 12px 14px; }
  .dropdown { position: static; }
  .dropdown-menu { position: static; box-shadow: none; border: none; background: rgba(255,255,255,.06); margin: 4px 0 4px 10px; min-width: 0; }
  .dropdown-menu a { color: #eaf3f7; }
  .dropdown-menu a:hover, .dropdown-menu a[aria-current="page"] { background: var(--c-primary-dark); color: #fff; }
}
