/* =============================================
   ForexColombia.co — Main Stylesheet
   ============================================= */

/* ---------- CSS Variables ---------- */
:root {
  --color-primary:     #0057B8;
  --color-primary-dk:  #003d82;
  --color-accent:      #F5A623;
  --color-success:     #27ae60;
  --color-danger:      #e74c3c;
  --color-warning:     #f39c12;

  --color-bg:          #f7f9fc;
  --color-surface:     #ffffff;
  --color-border:      #e1e7f0;

  --color-text:        #1a2332;
  --color-text-muted:  #637082;
  --color-text-light:  #8fa0b4;

  --color-hero-bg:     #0a1628;
  --color-hero-text:   #ffffff;

  --font-sans:  'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:  'Consolas', 'Courier New', monospace;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.14);

  --transition: 180ms ease;
  --max-width:  1200px;
}

/* ---------- 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.6;
}
img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Typography ---------- */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

.section-title {
  text-align: center;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  font-size: .95rem;
}
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-header-row .section-title { margin-bottom: 0; text-align: left; }

.year { color: var(--color-primary); }
.highlight { color: var(--color-accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  min-height: 44px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dk);
  border-color: var(--color-primary-dk);
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  background: rgba(245,166,35,.18);
  color: var(--color-accent);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 16px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-text);
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo-icon { color: var(--color-primary); font-size: 1.1em; }
.logo-tld { color: var(--color-primary); }
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: .9rem;
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover, .nav-link.active {
  background: #edf2fb;
  color: var(--color-primary);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text);
  margin-left: auto;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--color-hero-bg);
  color: var(--color-hero-text);
  padding: 72px 0 80px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-text .hero-sub {
  color: rgba(255,255,255,.75);
  font-size: 1.05rem;
  margin: 16px 0 28px;
  max-width: 480px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-accent);
}
.stat-label {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
}

/* ---------- Page Hero (small) ---------- */
.page-hero {
  background: var(--color-hero-bg);
  color: #fff;
  padding: 48px 0;
}
.page-hero p { color: rgba(255,255,255,.7); margin-top: 8px; font-size: 1rem; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.quick-filters { background: var(--color-surface); padding: 56px 0; }
.top-brokers { background: var(--color-bg); }
.why-section { background: var(--color-surface); }
.blog-preview { background: var(--color-bg); }

/* ---------- Filter Cards ---------- */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.filter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 12px;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.filter-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.filter-icon { font-size: 1.8rem; }
.filter-card strong { font-size: .9rem; }
.filter-card span { font-size: .78rem; color: var(--color-text-muted); }

/* ---------- Brokers Table ---------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.brokers-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  font-size: .9rem;
}
.brokers-table thead tr {
  background: var(--color-primary);
  color: #fff;
}
.brokers-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.brokers-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.brokers-table tbody tr:last-child td { border-bottom: none; }
.brokers-table tbody tr:hover { background: #f0f5ff; }
.broker-rank {
  font-weight: 800;
  color: var(--color-primary);
  font-size: 1.1rem;
}
.broker-name-cell { display: flex; align-items: center; gap: 10px; }
.broker-logo-placeholder {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: var(--color-text-muted); text-align: center;
  flex-shrink: 0;
  font-weight: 700;
}
.broker-name { font-weight: 700; }
.broker-tagline { font-size: .75rem; color: var(--color-text-muted); }
.reg-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  background: #e8f5e9;
  color: var(--color-success);
}
.reg-badge--offshore {
  background: #fff3e0;
  color: var(--color-warning);
}
.stars { color: var(--color-accent); font-size: .95rem; letter-spacing: 1px; }
.score { font-weight: 800; font-size: 1rem; color: var(--color-primary); }
.disclaimer {
  font-size: .78rem;
  color: var(--color-text-muted);
  margin-top: 12px;
  text-align: center;
}

/* ---------- Why Section ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.why-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--color-border);
}
.why-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.why-card h3 { margin-bottom: 8px; font-size: 1rem; }
.why-card p { font-size: .875rem; color: var(--color-text-muted); line-height: 1.65; }

/* ---------- Blog Preview ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}
.blog-card:hover { box-shadow: var(--shadow-md); }
.blog-card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dk));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.blog-card-body { padding: 20px; }
.blog-cat {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.blog-card h3 { font-size: .95rem; margin-bottom: 8px; line-height: 1.4; }
.blog-card p { font-size: .83rem; color: var(--color-text-muted); }
.blog-card-meta { font-size: .75rem; color: var(--color-text-light); margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-hero-bg);
  color: rgba(255,255,255,.75);
  padding: 56px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.55); max-width: 260px; }
.footer-links h4 { color: #fff; margin-bottom: 14px; font-size: .9rem; }
.footer-links ul li { margin-bottom: 8px; }
.footer-links a {
  color: rgba(255,255,255,.6);
  font-size: .875rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
}
.footer-bottom p {
  font-size: .78rem;
  color: rgba(255,255,255,.4);
  text-align: center;
  margin-bottom: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; z-index: 100; background: var(--color-surface); padding: 16px; box-shadow: var(--shadow-md); gap: 4px; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; }
  .btn { white-space: normal; text-align: center; }
}
