/* ==========================================================================
   Broker Forex Terbaik Malaysia — Stylesheet
   ========================================================================== */

:root {
  --navy: #0d2240;
  --navy-700: #163a63;
  --blue: #1f6feb;
  --blue-dark: #1a5fcc;
  --gold: #e3a008;
  --gold-soft: #fbeecb;
  --green: #0f9d58;
  --ink: #1a2330;
  --muted: #5a6778;
  --line: #e4e8ee;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-softer: #eef2f7;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(13, 34, 64, .08), 0 6px 20px rgba(13, 34, 64, .06);
  --shadow-sm: 0 1px 2px rgba(13, 34, 64, .08);
  --maxw: 1120px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

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

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; font-weight: 700; }
h1 { font-size: 2.1rem; margin: 0 0 .6rem; }
h2 { font-size: 1.6rem; margin: 2.4rem 0 1rem; }
h3 { font-size: 1.22rem; margin: 1.8rem 0 .7rem; }
p { margin: 0 0 1.1rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(13, 34, 64, .18);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: .2px;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-links a {
  color: #d7e2f2;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: .96rem;
  font-weight: 500;
  display: block;
}
.nav-links a:hover { background: var(--navy-700); color: #fff; text-decoration: none; }
.nav-links a.active { color: #fff; background: var(--navy-700); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid #39547d;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: .2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-700) 60%, #1d4a7e 100%);
  color: #eef4ff;
  padding: 56px 0 64px;
}
.hero h1 { color: #fff; font-size: 2.5rem; max-width: 760px; }
.hero p.lead { font-size: 1.18rem; color: #c6d6ec; max-width: 680px; margin-bottom: 1.6rem; }
.hero .kicker {
  display: inline-block;
  background: rgba(227, 160, 8, .16);
  color: var(--gold);
  border: 1px solid rgba(227, 160, 8, .4);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}
.hero-figure {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .12);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #3a2a00; }
.btn-gold:hover { background: #cf9207; }
.btn-ghost { background: transparent; border: 1px solid #4a6a96; color: #dceaff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }

/* ---------- Generic sections ---------- */
main { padding: 10px 0 40px; }
.section { padding: 10px 0; }
.section-soft { background: var(--bg-soft); padding: 46px 0; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 760px; }

.breadcrumbs { font-size: .85rem; color: var(--muted); padding: 16px 0 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span { margin: 0 6px; }

/* ---------- Cards grid ---------- */
.grid {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: .2rem; }
.card .icn {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-softer); border-radius: 10px; margin-bottom: 12px;
}
.card .icn svg { width: 24px; height: 24px; }

/* ---------- Broker ranking table / cards ---------- */
.broker-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.broker-card.top {
  border: 2px solid var(--gold);
  box-shadow: 0 6px 24px rgba(227, 160, 8, .16);
}
.broker-card .rank {
  width: 48px; height: 48px;
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.4rem;
}
.broker-card.top .rank { background: var(--gold); color: #3a2a00; }
.broker-card .b-body h3 { margin: 0 0 4px; font-size: 1.25rem; }
.broker-card .b-body .meta { color: var(--muted); font-size: .92rem; margin: 0; }
.broker-card .b-side { text-align: right; min-width: 160px; }
.broker-card .score {
  font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1;
}
.broker-card .score small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 1rem; margin: 4px 0 10px; }
.badge-best {
  position: absolute; top: -12px; left: 24px;
  background: var(--gold); color: #3a2a00;
  font-size: .72rem; font-weight: 700; letter-spacing: .5px;
  padding: 4px 12px; border-radius: 999px; text-transform: uppercase;
}

/* ---------- Comparison table ---------- */
.table-scroll { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table.cmp {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-size: .96rem;
}
table.cmp th, table.cmp td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
table.cmp thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  position: sticky; top: 0;
}
table.cmp tbody tr:nth-child(even) { background: var(--bg-soft); }
table.cmp tbody tr.highlight { background: var(--gold-soft); }
table.cmp tbody tr.highlight td:first-child { font-weight: 700; color: var(--navy); }

/* ---------- Figure / interface images ---------- */
figure.ui {
  margin: 1.6rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}
figure.ui figcaption {
  font-size: .86rem;
  color: var(--muted);
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

/* ---------- Pros / cons ---------- */
.pc {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 1.4rem 0;
}
.pc .box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.pc .box.pros { background: #f1faf4; border-color: #cce9d7; }
.pc .box.cons { background: #fdf3f3; border-color: #f0d4d4; }
.pc h4 { margin: 0 0 12px; }
.pc ul { margin: 0; padding-left: 18px; }
.pc li { margin-bottom: 8px; }

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  background: #fff;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--navy);
  font-size: 1.05rem;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.5rem; color: var(--blue); font-weight: 400; line-height: 1;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .answer { padding: 0 22px 18px; color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, #1d4a7e 100%);
  color: #fff;
  border-radius: 16px;
  padding: 38px 40px;
  margin: 40px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { color: #c6d6ec; margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Callout ---------- */
.callout {
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  padding: 16px 20px;
  border-radius: 8px;
  margin: 1.4rem 0;
}
.callout strong { color: var(--navy); }

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin: 1.4rem 0;
}
.toc h2 { margin: 0 0 10px; font-size: 1.1rem; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; }

.risk-note {
  font-size: .82rem;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 24px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #aebfd6;
  padding: 46px 0 26px;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 30px;
}
.site-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.site-footer a { color: #aebfd6; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.footer-bottom {
  border-top: 1px solid #22406a;
  padding-top: 20px;
  font-size: .82rem;
  color: #7f94b4;
}

/* ---------- Utilities ---------- */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stat-row { display: flex; gap: 30px; flex-wrap: wrap; margin: 24px 0; }
.stat { }
.stat .num { font-size: 2rem; font-weight: 700; color: var(--navy); }
.stat .lbl { font-size: .9rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 1.95rem; }
  h2 { font-size: 1.4rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .split-2 { grid-template-columns: 1fr; gap: 24px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .pc { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; align-items: stretch; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 10px 16px 18px;
    gap: 2px;
    box-shadow: 0 10px 20px rgba(0,0,0,.25);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .broker-card { grid-template-columns: 44px 1fr; }
  .broker-card .b-side { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; gap: 16px; }
  .broker-card .b-side .score { font-size: 1.5rem; }
}
@media (max-width: 520px) {
  .hero { padding: 40px 0 46px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 28px 22px; }
}
