/* ============================================
   TradingLatam.net — Global Styles
   Dark #080a06 | Emerald #16a34a | Gold #eab308 | Blue #0ea5e9
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark: #080a06;
  --dark-lighter: #111510;
  --dark-card: #151a12;
  --dark-border: #1e2a18;
  --primary: #16a34a;
  --primary-light: #22c55e;
  --primary-dark: #15803d;
  --secondary: #eab308;
  --secondary-light: #facc15;
  --accent: #0ea5e9;
  --accent-light: #38bdf8;
  --text: #e8e8e8;
  --text-muted: #9ca3af;
  --text-heading: #f5f5f5;
  --white: #ffffff;
  --gradient-primary: linear-gradient(135deg, #16a34a 0%, #0ea5e9 100%);
  --gradient-warm: linear-gradient(135deg, #16a34a 0%, #eab308 100%);
  --gradient-hero: linear-gradient(160deg, #080a06 0%, #111510 40%, #0d1a0d 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(22,163,74,0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--dark);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-heading);
  line-height: 1.25;
  font-weight: 700;
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--secondary); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5rem; }

/* --- Utility --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.text-primary { color: var(--primary-light); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-primary { background: rgba(22,163,74,0.15); color: var(--primary-light); border: 1px solid rgba(22,163,74,0.3); }
.badge-secondary { background: rgba(234,179,8,0.15); color: var(--secondary); border: 1px solid rgba(234,179,8,0.3); }
.badge-accent { background: rgba(14,165,233,0.15); color: var(--accent-light); border: 1px solid rgba(14,165,233,0.3); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(22,163,74,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(22,163,74,0.45);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-light);
  border: 2px solid var(--primary);
}
.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gradient-warm);
  color: var(--dark);
  box-shadow: 0 4px 15px rgba(234,179,8,0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(234,179,8,0.45);
  color: var(--dark);
}

.btn-sm { padding: 0.6rem 1.4rem; font-size: 0.85rem; }
.btn-lg { padding: 1.1rem 2.8rem; font-size: 1.05rem; }

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8,10,6,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dark-border);
  transition: background var(--transition);
}

.site-header.scrolled {
  background: rgba(8,10,6,0.97);
  box-shadow: var(--shadow-md);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}
.logo span { color: var(--primary-light); }

.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; padding: 0; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta { margin-left: 0.5rem; }

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: 5rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(22,163,74,0.08) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14,165,233,0.06) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  background: rgba(22,163,74,0.12);
  border: 1px solid rgba(22,163,74,0.25);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero h1 .highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--dark-border);
}
.hero-stat h3 {
  font-size: 2rem;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

/* --- Section --- */
.section { padding: 5rem 0; }
.section-dark { background: var(--dark-lighter); }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}
.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.section-line {
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
  margin: 1rem auto 0;
}

/* --- Cards --- */
.card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}
.card:hover {
  border-color: rgba(22,163,74,0.3);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: rgba(22,163,74,0.1);
  color: var(--primary-light);
  border: 1px solid rgba(22,163,74,0.2);
}

.card h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* --- Feature Cards (larger) --- */
.feature-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card:hover { border-color: rgba(22,163,74,0.3); box-shadow: var(--shadow-glow); }
.feature-card:hover::before { opacity: 1; }
.feature-card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.feature-card p { color: var(--text-muted); }

/* --- Article Cards --- */
.article-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.article-card:hover {
  border-color: rgba(22,163,74,0.3);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}
.article-card-img {
  height: 200px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.article-card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(transparent, var(--dark-card));
}
.article-card-body { padding: 1.5rem; }
.article-card-body h3 { font-size: 1.1rem; margin-bottom: 0.75rem; line-height: 1.35; }
.article-card-body h3 a { color: var(--text-heading); }
.article-card-body h3 a:hover { color: var(--primary-light); }
.article-card-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.article-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Broker Table --- */
.broker-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--dark-border);
}
.broker-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}
.broker-table thead { background: rgba(22,163,74,0.08); }
.broker-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-light);
  border-bottom: 1px solid var(--dark-border);
}
.broker-table td {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--dark-border);
}
.broker-table tbody tr { transition: background var(--transition); }
.broker-table tbody tr:hover { background: rgba(22,163,74,0.04); }
.broker-table .broker-name {
  font-weight: 700;
  color: var(--text-heading);
  font-family: 'Montserrat', sans-serif;
}
.broker-table .rating {
  color: var(--secondary);
  font-weight: 700;
}

/* --- CTA Section --- */
.cta-section {
  background: var(--dark-lighter);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(22,163,74,0.1) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.cta-box {
  text-align: center;
  position: relative;
  z-index: 2;
}
.cta-box h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
}
.cta-box p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* --- Risk Disclaimer --- */
.risk-disclaimer {
  background: rgba(234,179,8,0.06);
  border: 1px solid rgba(234,179,8,0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.risk-disclaimer strong { color: var(--secondary); }

/* --- Article Layout --- */
.article-hero {
  padding: 8rem 0 3rem;
  background: var(--gradient-hero);
  position: relative;
}
.article-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(transparent, var(--dark));
}
.article-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
  max-width: 800px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.article-meta span { display: flex; align-items: center; gap: 0.35rem; }

.article-content {
  padding: 3rem 0 5rem;
}
.article-content h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--dark-border);
}
.article-content h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}
.article-content p {
  margin-bottom: 1rem;
  font-size: 1.02rem;
}
.article-content ul, .article-content ol {
  margin-bottom: 1.25rem;
}
.article-content li {
  margin-bottom: 0.4rem;
}
.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(22,163,74,0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-style: italic;
}

.article-content .info-box {
  background: rgba(14,165,233,0.08);
  border: 1px solid rgba(14,165,233,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.article-content .info-box h4 {
  color: var(--accent-light);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* --- Table of Contents --- */
.toc {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
}
.toc h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
}
.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: 0.4rem; }
.toc a { color: var(--text-muted); font-size: 0.92rem; }
.toc a:hover { color: var(--primary-light); }

/* --- Footer --- */
.site-footer {
  background: var(--dark-lighter);
  border-top: 1px solid var(--dark-border);
  padding: 4rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 1rem; max-width: 320px; }
.footer-col h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid var(--dark-border);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }
.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 1.5rem 0;
  border-top: 1px solid var(--dark-border);
  margin-top: 1rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 2rem; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(8,10,6,0.98);
    border-top: 1px solid var(--dark-border);
    padding: 1.5rem;
    gap: 1rem;
  }
  .nav-links.active { display: flex; }
  .nav-cta { margin-left: 0; }

  .hero { min-height: auto; padding: 7rem 0 4rem; }
  .hero-stats { flex-direction: column; gap: 1.5rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { text-align: center; justify-content: center; }

  .cards-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .container { padding: 0 1rem; }
  .container-narrow { padding: 0 1rem; }
  .card { padding: 1.5rem; }
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Scroll to top --- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  box-shadow: var(--shadow-md);
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--primary-light); transform: translateY(-3px); }
