/* ==============================================
   BrokerForexMalaysia - Main Stylesheet
   Edit colors in :root to restyle the site
   ============================================== */

:root {
  --color-primary: #0b1e3d;
  --color-primary-light: #112952;
  --color-accent: #e8b84b;
  --color-accent-hover: #d4a33a;
  --color-success: #10b981;
  --color-text: #1a1a2e;
  --color-text-muted: #5a6478;
  --color-border: #e2e8f0;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-card-bg: #ffffff;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 12px;
  --radius-sm: 7px;
  --shadow: 0 2px 14px rgba(11,30,61,0.10);
  --shadow-lg: 0 8px 36px rgba(11,30,61,0.16);
  --transition: 0.22s ease;
  --max-width: 1160px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--color-text); background: var(--color-bg); line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-accent); }
ul { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.25; color: var(--color-primary); }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---- Layout ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4.5rem 0; }
.section-alt { background: var(--color-bg-alt); }
.section-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.5rem; }
.section-heading { margin-bottom: 0.75rem; }
.section-subheading { color: var(--color-text-muted); max-width: 640px; margin-bottom: 2.5rem; font-size: 1.05rem; }
.text-center { text-align: center; }
.text-center .section-subheading { margin-left: auto; margin-right: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.68rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  text-align: center;
  border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary { background: var(--color-accent); color: var(--color-primary); border-color: var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: var(--color-primary); box-shadow: 0 4px 18px rgba(232,184,75,0.38); }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline-white:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-sm { padding: 0.42rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 0.88rem 1.9rem; font-size: 1.05rem; }

/* ---- Header ---- */
.site-header { background: rgba(11,30,61,0.97); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 16px rgba(11,30,61,0.22); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.25rem; max-width: var(--max-width); margin: 0 auto; }
.site-logo { font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.site-logo span { color: var(--color-accent); }
.site-logo:hover { color: #fff; }
.nav-links { display: flex; gap: 0.2rem; align-items: center; }
.nav-links a { color: rgba(255,255,255,0.8); font-size: 0.9rem; font-weight: 500; padding: 0.45rem 0.85rem; border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition); }
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,0.1); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }

/* ---- HERO with Particle Canvas ---- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #060f20 0%, #0b1e3d 45%, #0d2a52 100%);
  overflow: hidden;
  padding: 5rem 0 4rem;
}
#particle-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.hero h1 { color: #fff; margin-bottom: 1.25rem; text-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.hero-sub { font-size: 1.15rem; color: rgba(255,255,255,0.78); max-width: 560px; margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.6); margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 0.09em; }
.hero-badge::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 8px var(--color-accent); animation: pulse 2s infinite; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-stat-val { font-size: 1.6rem; font-weight: 800; color: var(--color-accent); line-height: 1; }
.hero-stat-lbl { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-top: 0.2rem; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* ---- Risk Banner ---- */
.risk-banner { background: #fffbeb; border: 1px solid #f59e0b; border-radius: var(--radius-sm); padding: 0.85rem 1.25rem; font-size: 0.82rem; color: #78350f; margin-bottom: 2rem; line-height: 1.5; }
.risk-banner strong { font-weight: 700; }

/* ---- Broker Cards ---- */
.broker-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
.broker-card { background: var(--color-card-bg); border: 1.5px solid var(--color-border); border-radius: var(--radius); padding: 1.85rem 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: box-shadow var(--transition), transform var(--transition); position: relative; }
.broker-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.broker-card.featured { border: 2.5px solid var(--color-accent); box-shadow: 0 6px 32px rgba(232,184,75,0.18); }
.broker-badge { position: absolute; top: -13px; left: 1.5rem; background: var(--color-accent); color: var(--color-primary); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.22rem 0.8rem; border-radius: 20px; }
.broker-rank { font-size: 0.76rem; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.4rem; }
.broker-name { font-size: 1.35rem; font-weight: 800; color: var(--color-primary); margin-bottom: 0.6rem; }
.broker-desc { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 1rem; flex-grow: 1; }
.broker-highlights { margin-bottom: 1.25rem; }
.broker-highlights li { font-size: 0.87rem; color: var(--color-text); padding: 0.28rem 0; padding-left: 1.3rem; position: relative; border-bottom: 1px solid var(--color-border); }
.broker-highlights li:last-child { border-bottom: none; }
.broker-highlights li::before { content: '✓'; position: absolute; left: 0; color: var(--color-success); font-weight: 700; }
.broker-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: auto; }
.broker-actions .btn { flex: 1; min-width: 100px; }
.broker-risk { font-size: 0.7rem; color: var(--color-text-muted); margin-top: 0.75rem; line-height: 1.4; }

/* ---- Info Grid ---- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.info-card { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.info-card-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.info-card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.info-card p { font-size: 0.87rem; color: var(--color-text-muted); }

/* ---- Steps ---- */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.step-card { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; }
.step-num { width: 38px; height: 38px; border-radius: 50%; background: var(--color-primary); color: #fff; font-weight: 800; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.step-card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.step-card p { font-size: 0.87rem; color: var(--color-text-muted); }

/* ---- Article Cards ---- */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.article-card { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow var(--transition), transform var(--transition); display: flex; flex-direction: column; }
.article-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.article-card-body { padding: 1.25rem 1.5rem 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.article-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--color-accent); margin-bottom: 0.5rem; }
.article-card h3 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.article-card h3 a { color: var(--color-primary); }
.article-card h3 a:hover { color: var(--color-accent); }
.article-card p { font-size: 0.87rem; color: var(--color-text-muted); flex-grow: 1; }
.article-card-footer { padding: 0.75rem 1.5rem; border-top: 1px solid var(--color-border); font-size: 0.78rem; color: var(--color-text-muted); }
.article-img-placeholder { height: 130px; background: linear-gradient(135deg, #e2e8f0, #cbd5e1); display: flex; align-items: center; justify-content: center; font-size: 2rem; }

/* ---- Pros/Cons ---- */
.pros-cons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0; }
.pros-box, .cons-box { border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.pros-box { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cons-box { background: #fff1f2; border: 1px solid #fecdd3; }
.pros-box h3 { color: #166534; font-size: 1rem; margin-bottom: 0.75rem; }
.cons-box h3 { color: #9f1239; font-size: 1rem; margin-bottom: 0.75rem; }
.pros-box li, .cons-box li { font-size: 0.9rem; padding: 0.3rem 0; padding-left: 1.3rem; position: relative; }
.pros-box li::before { content: '+'; position: absolute; left: 0; color: #16a34a; font-weight: 800; }
.cons-box li::before { content: '−'; position: absolute; left: 0; color: #e11d48; font-weight: 800; }

/* ---- Review Page ---- */
.review-header { background: linear-gradient(135deg, #060f20, #0b1e3d); color: #fff; padding: 3.5rem 0 2.5rem; }
.review-header h1 { color: #fff; }
.review-meta { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: 0.5rem; }
.breadcrumb { font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255,255,255,0.65); text-decoration: underline; }
.breadcrumb a:hover { color: var(--color-accent); }
.review-summary-box { background: var(--color-bg-alt); border: 1.5px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem 1.75rem; margin: 2rem 0; }
.review-summary-box h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; padding: 0.45rem 0; border-bottom: 1px solid var(--color-border); font-size: 0.92rem; }
.summary-row:last-child { border-bottom: none; }
.summary-label { color: var(--color-text-muted); }
.summary-value { font-weight: 600; }

/* ---- Blog ---- */
.blog-hero { background: linear-gradient(135deg, #060f20, #0b1e3d); color: #fff; padding: 3.5rem 0; }
.blog-hero h1 { color: #fff; }
.blog-hero p { color: rgba(255,255,255,0.7); margin-top: 0.5rem; }

/* ---- Article Page ---- */
.article-hero { background: linear-gradient(135deg, #060f20, #0b1e3d); color: #fff; padding: 3rem 0 2.5rem; }
.article-hero h1 { color: #fff; font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
.article-hero p { color: rgba(255,255,255,0.68); font-size: 0.9rem; margin-top: 0.5rem; }
.article-body { max-width: 760px; margin: 2.5rem auto; padding: 0 1.25rem; }
.article-body h2 { margin: 2rem 0 0.75rem; }
.article-body h3 { margin: 1.5rem 0 0.5rem; }
.article-body ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body ul li { margin-bottom: 0.35rem; font-size: 0.95rem; }
.article-body p { font-size: 0.97rem; line-height: 1.8; }
.article-cta-box { background: var(--color-bg-alt); border: 1.5px solid var(--color-accent); border-radius: var(--radius); padding: 1.5rem; margin: 2rem 0; text-align: center; }
.article-cta-box h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.article-cta-box p { font-size: 0.87rem; color: var(--color-text-muted); margin-bottom: 1rem; }

/* ---- Static Pages ---- */
.page-hero { background: linear-gradient(135deg, #060f20, #0b1e3d); color: #fff; padding: 3rem 0 2.5rem; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,0.68); margin-top: 0.5rem; }
.page-body { max-width: 840px; margin: 0 auto; padding: 3rem 1.25rem; }
.page-body h2 { margin: 2rem 0 0.75rem; }
.page-body h3 { margin: 1.5rem 0 0.5rem; }
.page-body ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.page-body ul li { margin-bottom: 0.35rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.contact-box { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; }
.contact-box h3 { font-size: 1rem; margin-bottom: 0.5rem; }

/* ---- CTA Section ---- */
.cta-section { background: linear-gradient(135deg, #060f20, #0b1e3d); color: #fff; padding: 4.5rem 0; text-align: center; }
.cta-section h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-section p { color: rgba(255,255,255,0.72); margin-bottom: 2rem; font-size: 1.05rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- Disclaimer Box ---- */
.disclaimer-box { background: #fffbeb; border: 1px solid #fbbf24; border-radius: var(--radius-sm); padding: 1rem 1.25rem; font-size: 0.82rem; color: #78350f; margin: 1.5rem 0; line-height: 1.5; }

/* ---- Malaysia Regulation Box ---- */
.regulation-box { background: #eff6ff; border: 1.5px solid #93c5fd; border-radius: var(--radius); padding: 1.5rem 1.75rem; margin: 2rem 0; }
.regulation-box h3 { color: #1e40af; margin-bottom: 0.75rem; font-size: 1.05rem; }
.regulation-box p { font-size: 0.9rem; color: #1e3a8a; }
.regulation-box ul { list-style: disc; padding-left: 1.5rem; }
.regulation-box ul li { font-size: 0.9rem; color: #1e3a8a; margin-bottom: 0.35rem; }

/* ---- Footer ---- */
.site-footer { background: #050e1e; color: rgba(255,255,255,0.65); padding: 3.5rem 0 0; font-size: 0.87rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-brand .site-logo { font-size: 1.2rem; margin-bottom: 0.75rem; display: block; }
.footer-brand p { font-size: 0.82rem; color: rgba(255,255,255,0.45); line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col ul a { color: rgba(255,255,255,0.55); font-size: 0.84rem; }
.footer-col ul a:hover { color: var(--color-accent); }
.footer-risk { background: rgba(255,255,255,0.03); border-top: 1px solid rgba(255,255,255,0.07); padding: 1.25rem 0; font-size: 0.76rem; color: rgba(255,255,255,0.38); text-align: center; }
.footer-risk a { color: rgba(255,255,255,0.55); text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding: 1.25rem 0; text-align: center; font-size: 0.76rem; color: rgba(255,255,255,0.3); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .broker-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pros-cons-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 4rem 0 3rem; }
}
@media (max-width: 640px) {
  .broker-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(11,30,61,0.99); padding: 1rem 1.25rem; gap: 0.25rem; border-top: 1px solid rgba(255,255,255,0.1); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .broker-actions { flex-direction: column; }
  .broker-actions .btn { width: 100%; }
  .section { padding: 2.75rem 0; }
  .hero-stats { gap: 1.25rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
