/* Estilos compartidos de las páginas de funcionalidades.
   Mismo lenguaje visual que la landing (landingpage.html, CSS inline):
   si se cambia un color o el menú allí, replicarlo aquí. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0d1117; color: #c9d1d9; line-height: 1.6;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  --accent: #58a6ff; --accent-bg: rgba(88,166,255,0.1); --accent-line: rgba(88,166,255,0.3);
}
body.f-backtesting  { --accent: #58a6ff; --accent-bg: rgba(88,166,255,0.1);  --accent-line: rgba(88,166,255,0.3); }
body.f-journal      { --accent: #2dd4bf; --accent-bg: rgba(45,212,191,0.1);  --accent-line: rgba(45,212,191,0.3); }
body.f-copiador     { --accent: #bc8cff; --accent-bg: rgba(188,140,255,0.1); --accent-line: rgba(188,140,255,0.3); }
body.f-simulador    { --accent: #3fb950; --accent-bg: rgba(63,185,80,0.1);   --accent-line: rgba(63,185,80,0.3); }
body.f-estadisticas { --accent: #e3b341; --accent-bg: rgba(227,179,65,0.1);  --accent-line: rgba(227,179,65,0.3); }
body.f-disparadores { --accent: #f85149; --accent-bg: rgba(248,81,73,0.1);   --accent-line: rgba(248,81,73,0.3); }
body.f-academias    { --accent: #79c0ff; --accent-bg: rgba(121,192,255,0.1); --accent-line: rgba(121,192,255,0.3); }
body.f-finanzas     { --accent: #56d364; --accent-bg: rgba(86,211,100,0.1);  --accent-line: rgba(86,211,100,0.3); }
body.f-comunidad    { --accent: #f0883e; --accent-bg: rgba(240,136,62,0.1);  --accent-line: rgba(240,136,62,0.3); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.accent-blue { color: #58a6ff; } .accent-green { color: #3fb950; } .accent-red { color: #f85149; }
.accent-purple { color: #bc8cff; } .accent-teal { color: #2dd4bf; } .accent-yellow { color: #e3b341; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; } .reveal-delay-2 { transition-delay: 0.2s; }

/* ── Menú (igual que la landing) ── */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(13,17,23,0.9); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid rgba(48,54,61,0.6); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links > a, .nav-drop-btn { font-size: 14px; font-weight: 500; color: #8b949e; transition: color 0.2s; }
.nav-links > a:hover, .nav-drop-btn:hover { color: #e6edf3; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.btn-ghost { padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #c9d1d9; border: 1px solid #30363d; transition: all 0.2s; display: inline-block; }
.btn-ghost:hover { border-color: #58a6ff; color: #58a6ff; }
.btn-primary { padding: 8px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #fff; background: #58a6ff; transition: all 0.3s; display: inline-block; }
.btn-primary:hover { background: #79b8ff; box-shadow: 0 4px 24px rgba(88,166,255,0.3); }
.hamburger { display: none; background: none; color: #c9d1d9; padding: 4px; }
.hamburger svg { width: 24px; height: 24px; }
.nav-drop { position: relative; }
.nav-drop-btn { display: inline-flex; align-items: center; gap: 5px; background: none; padding: 20px 0; }
.nav-drop-btn svg { width: 12px; height: 12px; transition: transform 0.2s; }
.nav-drop:hover .nav-drop-btn svg, .nav-drop:focus-within .nav-drop-btn svg { transform: rotate(180deg); }
.nav-drop-panel { position: absolute; top: 100%; left: 50%; transform: translate(-50%, 8px); width: 560px; padding: 12px; background: #161b22; border: 1px solid #30363d; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,0.5); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; opacity: 0; visibility: hidden; transition: opacity 0.2s, transform 0.2s, visibility 0.2s; }
.nav-drop:hover .nav-drop-panel, .nav-drop:focus-within .nav-drop-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-drop-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; transition: background 0.15s; }
.nav-drop-item:hover { background: #0d1117; }
.nav-drop-ico { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.nav-drop-ico svg { width: 17px; height: 17px; }
.nav-drop-t { font-size: 14px; font-weight: 700; color: #e6edf3; line-height: 1.3; }
.nav-drop-d { font-size: 12px; color: #8b949e; line-height: 1.4; margin-top: 2px; }
.nav-drop-all { grid-column: 1 / -1; margin-top: 4px; padding: 10px 12px; border-top: 1px solid #21262d; font-size: 13px; font-weight: 600; color: #58a6ff; }
.nav-drop-all:hover { color: #79b8ff; }
.mobile-menu { display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: rgba(13,17,23,0.98); padding: 16px; z-index: 99; flex-direction: column; gap: 4px; overflow-y: auto; }
.mobile-menu.active { display: flex; }
.mobile-menu > a, .mobile-menu summary { display: block; padding: 14px 16px; font-size: 16px; font-weight: 600; color: #c9d1d9; border-radius: 12px; cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::after { content: '▾'; float: right; color: #484f58; }
.mobile-menu details[open] summary::after { content: '▴'; }
.mobile-menu details a { display: block; padding: 10px 16px 10px 32px; font-size: 15px; color: #8b949e; }
.mobile-menu > a:hover, .mobile-menu summary:hover { background: #161b22; }

/* ── Cabecera de página ── */
.fp-hero { padding: 128px 0 72px; position: relative; overflow: hidden; }
.fp-hero::before { content: ''; position: absolute; top: -240px; left: 20%; width: 760px; height: 760px; border-radius: 50%; background: radial-gradient(circle, var(--accent-bg) 0%, transparent 65%); opacity: 0.6; pointer-events: none; }
.fp-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; position: relative; }
.fp-crumbs { font-size: 13px; color: #484f58; margin-bottom: 18px; }
.fp-crumbs a { color: #8b949e; } .fp-crumbs a:hover { color: #e6edf3; }
.fp-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 14px; }
.fp-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 900; line-height: 1.08; letter-spacing: -0.03em; color: #e6edf3; }
.fp-lead { margin-top: 20px; font-size: 18px; line-height: 1.7; color: #8b949e; max-width: 540px; }
.fp-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.btn-hero { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; border-radius: 12px; font-size: 15px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #58a6ff, #7c3aed); box-shadow: 0 8px 32px rgba(88,166,255,0.25); transition: all 0.3s; }
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(88,166,255,0.35); }
.btn-hero-alt { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 12px; font-size: 15px; font-weight: 600; color: #c9d1d9; border: 1px solid #30363d; transition: all 0.3s; }
.btn-hero-alt:hover { border-color: var(--accent); color: var(--accent); }
.fp-hero-note { margin-top: 14px; font-size: 13px; color: #484f58; }
.new-pill { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 2px 8px; border-radius: 5px; background: rgba(63,185,80,0.12); color: #3fb950; border: 1px solid rgba(63,185,80,0.3); }
.beta-pill { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .6px; padding: 2px 8px; border-radius: 5px; background: rgba(227,179,65,0.12); color: #e3b341; border: 1px solid rgba(227,179,65,0.35); }

/* ── Maqueta visual ── */
.fp-visual { background: #161b22; border: 1px solid #30363d; border-radius: 16px; padding: 24px; box-shadow: 0 24px 80px rgba(0,0,0,0.35); min-width: 0; }
.fp-visual-title { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 16px; display: flex; justify-content: space-between; gap: 10px; }
.fp-visual-title span:last-child { color: #484f58; font-weight: 600; }
.mk-card { background: #0d1117; border: 1px solid #30363d; border-radius: 10px; padding: 14px; min-width: 0; }
.mk-label { font-size: 10px; font-weight: 700; color: #484f58; text-transform: uppercase; letter-spacing: 0.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-value { font-size: 22px; font-weight: 800; margin-top: 4px; color: #e6edf3; white-space: nowrap; }
.mk-sub { font-size: 11px; color: #484f58; margin-top: 2px; }
.mk-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mk-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mk-stack { display: flex; flex-direction: column; gap: 10px; }
.mk-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: #0d1117; border: 1px solid #30363d; border-radius: 10px; font-size: 13px; min-width: 0; }
.mk-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e6edf3; font-weight: 600; }
.mk-row .end { font-weight: 800; white-space: nowrap; }
.mk-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: #21262d; color: #8b949e; white-space: nowrap; }
.mk-chip.on { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-line); }
.mk-bar { height: 8px; border-radius: 4px; background: #21262d; overflow: hidden; margin-top: 6px; }
.mk-bar > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.mk-note { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--accent-bg); border: 1px solid var(--accent-line); font-size: 13px; color: #c9d1d9; line-height: 1.5; }
.mk-note b { color: var(--accent); }
.equity-svg { width: 100%; height: 80px; display: block; }

/* ── Secciones ── */
.fp-section { padding: 80px 0; }
.fp-section.alt { background: linear-gradient(180deg, rgba(22,27,34,0.35) 0%, #0d1117 100%); }
.fp-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.fp-head h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: #e6edf3; }
.fp-head p { margin-top: 14px; font-size: 16px; color: #8b949e; }
.fp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fp-card { background: #161b22; border: 1px solid #30363d; border-radius: 16px; padding: 28px 26px; transition: border-color 0.3s, transform 0.3s; min-width: 0; }
.fp-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.fp-card-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-bg); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 20px; }
.fp-card h3 { font-size: 17px; font-weight: 700; color: #e6edf3; margin-bottom: 8px; }
.fp-card p { font-size: 14.5px; color: #8b949e; line-height: 1.65; }
.fp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.fp-split h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: #e6edf3; }
.fp-split p { margin-top: 14px; font-size: 16px; line-height: 1.7; color: #8b949e; }
.fp-list { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; list-style: none; }
.fp-list li { display: flex; gap: 12px; font-size: 15px; color: #c9d1d9; }
.fp-list li::before { content: '✓'; width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: var(--accent-bg); color: var(--accent); }
.fp-list strong { color: #e6edf3; }
.fp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: paso; }
.fp-step { background: #161b22; border: 1px solid #30363d; border-radius: 16px; padding: 30px 24px 26px; position: relative; counter-increment: paso; }
.fp-step::before { content: counter(paso); position: absolute; top: -14px; left: 24px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #0d1117; background: var(--accent); }
.fp-step h3 { font-size: 16px; font-weight: 700; color: #e6edf3; margin: 4px 0 8px; }
.fp-step p { font-size: 14px; color: #8b949e; line-height: 1.6; }
.fp-warn { margin-top: 24px; padding: 16px 18px; border-radius: 12px; background: rgba(227,179,65,0.06); border: 1px solid rgba(227,179,65,0.25); font-size: 14px; line-height: 1.65; color: #c9d1d9; }
.fp-warn strong { color: #e3b341; }

/* ── Preguntas frecuentes ── */
.fp-faq { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.fp-faq details { background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 0 20px; }
.fp-faq details[open] { border-color: var(--accent-line); }
.fp-faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-size: 15px; font-weight: 600; color: #e6edf3; display: flex; justify-content: space-between; gap: 16px; }
.fp-faq summary::-webkit-details-marker { display: none; }
.fp-faq summary::after { content: '+'; color: var(--accent); font-size: 20px; line-height: 1; flex-shrink: 0; }
.fp-faq details[open] summary::after { content: '−'; }
.fp-faq details p { padding: 0 0 18px; font-size: 14.5px; line-height: 1.7; color: #8b949e; }

/* ── Otras funcionalidades ── */
.fp-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.fp-more a { display: flex; align-items: center; gap: 12px; padding: 16px; background: #161b22; border: 1px solid #30363d; border-radius: 12px; transition: border-color 0.2s; min-width: 0; }
.fp-more a:hover { border-color: #484f58; }
.fp-more a[aria-current] { display: none; }
.fp-more .t { font-size: 14px; font-weight: 700; color: #e6edf3; }
.fp-more .d { font-size: 12px; color: #8b949e; }

/* ── Llamada final ── */
.fp-final { padding: 90px 0; text-align: center; }
.fp-final h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; color: #e6edf3; letter-spacing: -0.02em; line-height: 1.15; }
.fp-final p { margin: 14px auto 0; font-size: 16px; color: #8b949e; max-width: 560px; }
.fp-final .fp-cta { justify-content: center; }

/* ── Pie (el aviso de riesgo lo exige NinjaTrader Compliance: no ocultar ni bajar de 11px) ── */
.site-footer { border-top: 1px solid #21262d; padding: 48px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: #6e7681; } .footer-links a:hover { color: #8b949e; }
.footer-copy { font-size: 13px; color: #484f58; }
.footer-risk { border-top: 1px solid #21262d; margin-top: 32px; padding-top: 22px; }
.footer-risk p { font-size: 12px; line-height: 1.7; color: #6e7681; margin: 0 0 10px; max-width: 980px; }
.footer-risk p:last-child { margin-bottom: 0; color: #57606a; }
.footer-risk a { color: #8b949e; text-decoration: underline; }

@media (max-width: 900px) {
  .fp-hero-grid, .fp-split { grid-template-columns: 1fr; gap: 40px; }
  .fp-grid { grid-template-columns: 1fr 1fr; }
  .fp-steps { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: block; }
  .fp-hero { padding: 104px 0 56px; }
  .fp-grid { grid-template-columns: 1fr; }
  .fp-section { padding: 64px 0; }
  .fp-visual { padding: 18px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 340px) {
  .mk-grid3 { grid-template-columns: 1fr 1fr; }
  .mk-value { font-size: 19px; }
}
@media (min-width: 769px) { .mobile-menu { display: none !important; } }

/* ── Idioma: selector ES|EN y barra de sugerencia ── */
.lang-switch { display: inline-flex; border: 1px solid #30363d; border-radius: 8px; overflow: hidden; font-size: 12px; font-weight: 700; }
.lang-switch a { padding: 7px 10px; color: #8b949e; text-decoration: none; transition: color 0.2s, background 0.2s; }
.lang-switch a:hover { color: #e6edf3; }
.lang-switch a.on { background: #21262d; color: #e6edf3; }
.mobile-menu .lang-switch { align-self: flex-start; margin: 12px 16px 0; }
.mobile-menu .lang-switch a { display: inline-block; padding: 9px 14px; font-size: 14px; border-radius: 0; margin: 0; }
.lang-bar { position: fixed; top: 64px; left: 0; right: 0; z-index: 98; display: none; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 9px 44px 9px 16px; background: #161b22; border-bottom: 1px solid #30363d; font-size: 14px; color: #c9d1d9; text-align: center; }
.lang-bar.show { display: flex; }
.lang-bar a { color: #58a6ff; font-weight: 700; text-decoration: none; }
.lang-bar button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #8b949e; font-size: 20px; line-height: 1; cursor: pointer; }
