/* ==========================================================================
   Broker Forex Terbaik Malaysia — stylesheet utama
   Mobile-first, responsive
   ========================================================================== */

:root {
  --navy: #0b1f3a;
  --navy-700: #11294b;
  --navy-600: #1b365d;
  --teal: #00b37e;
  --teal-dark: #009568;
  --gold: #f0a500;
  --gold-soft: #fff4d6;
  --ink: #15202b;
  --muted: #5b6b7b;
  --line: #e3e9f0;
  --bg: #f6f8fb;
  --white: #ffffff;
  --star: #f5a623;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(11, 31, 58, .08);
  --shadow: 0 10px 30px rgba(11, 31, 58, .10);
  --maxw: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, 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(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); font-weight: 700; }
h1 { font-size: 2rem; margin: 0 0 .6em; letter-spacing: -.02em; }
h2 { font-size: 1.55rem; margin: 2.2rem 0 .8rem; letter-spacing: -.01em; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 .6rem; }
p { margin: 0 0 1.1rem; }

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

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); font-size: 1.06rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span small { display: block; font-size: .64rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--navy); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { background: var(--bg); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--teal-dark); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 44px; height: 42px; cursor: pointer; padding: 0; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--navy); position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; background: var(--white);
    border-bottom: 1px solid var(--line); padding: 8px 16px 16px; gap: 2px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 10px; border-radius: 8px; }
  .site-header { position: relative; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem;
  padding: 13px 22px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: #042018; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); }
.btn-gold { background: var(--gold); color: #3a2800; }
.btn-gold:hover { background: #d99400; transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 500px at 80% -10%, #16365f 0%, var(--navy) 55%);
  color: #eaf1fb; padding: 54px 0 48px;
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 42px; align-items: center; }
.hero h1 { color: #fff; font-size: 2.35rem; }
.hero p.lead { font-size: 1.12rem; color: #c3d2e6; margin-bottom: 1.6rem; }
.hero .eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gold); background: rgba(240,165,0,.12);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-figure { border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 26px; font-size: .86rem; color: #a9bdd8; }
.hero-trust strong { color: #fff; display: block; font-size: 1.3rem; }

@media (max-width: 860px) {
  .hero { padding: 36px 0 34px; }
  .hero .container { grid-template-columns: 1fr; gap: 26px; }
  .hero h1 { font-size: 1.85rem; }
}

/* ---------- Sections / layout ---------- */
main { padding: 10px 0 40px; }
.section { padding: 26px 0; }
.lead-block { max-width: 760px; }
.section-intro { color: var(--muted); max-width: 720px; font-size: 1.02rem; }

.content { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 34px; box-shadow: var(--shadow-sm); }
.content + .content { margin-top: 22px; }
@media (max-width: 640px) { .content { padding: 22px 18px; } }

.layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }

/* ---------- Broker ranking cards ---------- */
.rank-list { display: grid; gap: 18px; margin: 20px 0; }
.broker-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px; display: grid;
  grid-template-columns: 56px 1fr auto; gap: 20px; align-items: center;
}
.broker-card.top { border-color: var(--teal); box-shadow: 0 10px 30px rgba(0,179,126,.14); position: relative; }
.broker-card .rank-num {
  width: 56px; height: 56px; border-radius: 12px; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800;
}
.broker-card.top .rank-num { background: var(--teal); color: #042018; }
.broker-body h3 { margin: 0 0 4px; font-size: 1.22rem; }
.broker-body .meta { color: var(--muted); font-size: .9rem; margin: 0; }
.broker-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.tag { font-size: .76rem; font-weight: 600; color: var(--navy-600); background: var(--bg); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; }
.broker-score { text-align: center; min-width: 108px; }
.broker-score .num { font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1; }
.broker-score .out { font-size: .78rem; color: var(--muted); }
.broker-score .btn { margin-top: 10px; padding: 9px 16px; font-size: .9rem; }
.badge-best {
  position: absolute; top: -11px; left: 20px; background: var(--gold); color: #3a2800;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: 4px 12px; border-radius: 999px; text-transform: uppercase;
}
.stars { color: var(--star); font-size: .95rem; letter-spacing: 1px; margin: 4px 0 0; }
.stars .muted { color: #d4dae1; }

@media (max-width: 680px) {
  .broker-card { grid-template-columns: 46px 1fr; row-gap: 14px; }
  .broker-card .rank-num { width: 46px; height: 46px; font-size: 1.25rem; }
  .broker-score { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; gap: 16px; }
  .broker-score .btn { margin-top: 0; }
}

/* ---------- Comparison table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--white); }
table.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .95rem; }
table.compare th, table.compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
table.compare thead th { background: var(--navy); color: #fff; font-weight: 600; font-size: .9rem; position: sticky; top: 0; }
table.compare tbody tr:nth-child(even) { background: #fafcfe; }
table.compare .broker-name { font-weight: 700; color: var(--navy); }
table.compare .highlight-row { background: var(--gold-soft) !important; }
table.compare .tick { color: var(--teal-dark); font-weight: 700; }
table.compare .cross { color: #c0423a; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.feature .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--gold-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.feature h3 { margin: 0 0 6px; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Figure / interface screenshots ---------- */
figure.shot { margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--white); }
figure.shot img { width: 100%; }
figure.shot figcaption { font-size: .85rem; color: var(--muted); padding: 10px 16px; background: var(--white); border-top: 1px solid var(--line); }

/* ---------- Callout / pros-cons ---------- */
.callout { border-left: 4px solid var(--teal); background: #f0fbf6; padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 20px 0; }
.callout.gold { border-color: var(--gold); background: var(--gold-soft); }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0; }
@media (max-width: 680px) { .proscons { grid-template-columns: 1fr; } }
.pc { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--white); }
.pc h4 { margin: 0 0 10px; font-size: 1rem; }
.pc ul { margin: 0; padding-left: 0; list-style: none; }
.pc li { padding: 5px 0 5px 26px; position: relative; font-size: .95rem; }
.pc.pros li::before { content: "+"; position: absolute; left: 4px; color: var(--teal-dark); font-weight: 800; }
.pc.cons li::before { content: "–"; position: absolute; left: 6px; color: #c0423a; font-weight: 800; }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 84px; display: grid; gap: 18px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 12px; font-size: 1.05rem; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 7px 0; color: var(--navy-600); font-size: .93rem; border-bottom: 1px dashed var(--line); }
.toc a:hover { color: var(--teal-dark); }
.card.promo { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-600) 100%); color: #e8f0fb; border: none; }
.card.promo h3 { color: #fff; }
.card.promo p { color: #c3d2e6; font-size: .92rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; margin: 20px 0; }
.faq details {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--navy); padding: 14px 28px 14px 0; position: relative;
  list-style: none; font-size: 1.03rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--teal-dark); font-weight: 700;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .84rem; color: var(--muted); padding: 16px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li::after { content: "/"; margin-left: 6px; color: #c4cdd8; }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%); color: #042018; border-radius: var(--radius); padding: 34px; text-align: center; margin: 32px 0; }
.cta-band h2 { color: #042018; margin: 0 0 10px; }
.cta-band p { color: #053a2b; max-width: 620px; margin: 0 auto 18px; }

/* ---------- Author / meta ---------- */
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; color: var(--muted); font-size: .88rem; margin: 0 0 8px; }
.article-meta .dot { color: #c4cdd8; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9c8de; padding: 44px 0 26px; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; letter-spacing: .02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: #b9c8de; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 32px; height: 32px; }
.footer-brand strong { color: #fff; font-size: 1.05rem; }
.disclaimer { font-size: .78rem; color: #8aa0bd; border-top: 1px solid #203a5f; }
.footer-bottom { border-top: 1px solid #203a5f; margin-top: 28px; padding-top: 18px; font-size: .8rem; color: #8aa0bd; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.risk-note { font-size: .78rem; color: #8aa0bd; line-height: 1.6; margin-top: 10px; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--muted); }
ul.clean { list-style: none; padding-left: 0; }
ul.check { list-style: none; padding-left: 0; }
ul.check li { position: relative; padding: 6px 0 6px 30px; }
ul.check li::before { content: "✓"; position: absolute; left: 0; top: 6px; color: var(--teal-dark); font-weight: 800; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.updated { font-size: .82rem; color: var(--muted); }
