:root {
  --navy: #1d3b34;
  --navy-light: #26463e;
  --gold: #c96b43;
  --gold-light: #e2a17e;
  --off-white: #faf6f0;
  --text-dark: #22201c;
  --text-muted: #6b6459;
  --border-soft: #e8e1d6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
a { text-decoration: none; }
img { max-width: 100%; display: block; }

/* NAV (mobile-first: bar + hamburger, drawer below) */
nav.topnav { background: var(--navy); position: sticky; top: 0; z-index: 40; }
.nav-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.nav-bar .brand { color: #fff; font-weight: 700; font-size: 14px; }
.nav-toggle { background: none; border: none; display: flex; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: #fff; display: block; border-radius: 2px; }
.nav-links { display: none; flex-direction: column; padding: 0 18px 18px; gap: 2px; }
.nav-links.open { display: flex; }
.nav-links a, .nav-group-label { color: #d9e4de; font-size: 14.5px; font-weight: 500; padding: 10px 4px; display: block; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; font-weight: 700; }
.nav-group-label { color: #9fb0a8; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; padding-top: 16px; padding-bottom: 4px; }
.nav-submenu { display: flex; flex-direction: column; padding-left: 8px; }
.nav-submenu a { font-size: 13.5px; padding: 8px 4px; }

@media (min-width: 768px) {
  .nav-bar { display: none; }
  .nav-links { display: flex !important; flex-direction: row; align-items: center; justify-content: center; gap: 24px; padding: 14px 20px; }
  .nav-group { position: relative; }
  .nav-group-label { padding: 0; color: #d9e4de; font-size: 13px; font-weight: 500; cursor: default; }
  .nav-group:hover .nav-group-label, .nav-group:focus-within .nav-group-label { color: #fff; }
  .nav-submenu {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background: var(--navy); border: 1px solid var(--navy-light); border-radius: 8px;
    padding: 6px 0; min-width: 160px; z-index: 30; margin-top: 6px;
  }
  .nav-group:hover .nav-submenu, .nav-group:focus-within .nav-submenu { display: flex; }
  .nav-submenu a { padding: 9px 16px; font-size: 13px; }
}

/* HERO */
.hero { background: var(--navy); color: #fff; padding: 28px 20px 32px; text-align: center; }
.avatar {
  width: 108px; height: 108px; border-radius: 50%;
  background: var(--navy-light); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto; font-size: 28px; font-weight: 700; color: var(--gold-light);
  object-fit: cover; overflow: hidden;
}
.hero .avatar { width: 140px; height: 140px; margin-bottom: 10px; }
.identity-line { font-size: 14px; font-weight: 600; color: #e7ede9; margin-bottom: 10px; }
.hero h1 { font-size: clamp(23px, 5vw, 30px); font-weight: 700; line-height: 1.3; margin: 0 auto 10px; max-width: 560px; }
.hero p.tagline { max-width: 480px; margin: 0 auto; font-size: 14.5px; color: #dce4df; line-height: 1.6; }
.hero .cta-row { margin-top: 16px; }
.cta-row { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.cta-row .btn { width: 100%; text-align: center; }
.cta-row .link-arrow-light { margin-top: 2px; }

.btn {
  display: inline-block; padding: 14px 22px; border-radius: 8px; font-size: 15px;
  font-weight: 600; letter-spacing: 0.1px; cursor: pointer; border: none;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-outline { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-lg { padding: 16px 30px; font-size: 15.5px; }

/* LINKS (acciones secundarias / terciarias) */
.link-arrow { color: var(--navy); font-size: 14px; font-weight: 600; display: inline-block; }
.link-arrow:hover { color: var(--gold); }
.link-arrow-light { color: #fff; font-size: 14px; font-weight: 600; display: inline-block; }
.link-arrow-light:hover { color: var(--gold-light); }

@media (min-width: 641px) {
  .cta-row { flex-direction: row; justify-content: center; align-items: center; }
  .cta-row .btn { width: auto; }
}

@media (min-width: 768px) {
  .hero { padding: 36px 20px 40px; }
  .hero .avatar { width: 224px; height: 224px; margin-bottom: 14px; }
}

/* DOS/TRES CAMINOS (tarjetas clickeables) */
.paths, .paths-3 { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 900px; margin: -22px auto 0; padding: 0 18px 36px; position: relative; }
#recorridos .paths-3 { margin-top: 18px; }
.path-card {
  background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; padding: 28px 22px 24px;
  text-align: center; box-shadow: 0 2px 10px rgba(29,59,52,0.06); transition: border-color .15s, box-shadow .15s;
  color: inherit; display: block;
}
.path-card:hover { border-color: var(--gold-light); box-shadow: 0 4px 16px rgba(29,59,52,0.1); }
.path-card .tag { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.path-card h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.path-card p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 10px; }
.path-card .link-arrow { pointer-events: none; }

@media (min-width: 768px) {
  .paths { grid-template-columns: 1fr 1fr; }
  .paths-3 { grid-template-columns: 1fr 1fr 1fr; }
}

section { padding: 40px 18px; max-width: 1040px; margin: 0 auto; }
.section-label { font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 10px; text-align: center; }
h2 { font-size: clamp(22px, 4.5vw, 27px); font-weight: 700; text-align: center; margin-bottom: 12px; color: var(--navy); }
p.lead { text-align: center; max-width: 620px; margin: 0 auto 24px; color: var(--text-muted); font-size: 15px; }
h3.sub { font-size: 15px; font-weight: 700; color: var(--navy); margin: 22px 0 8px; }
p.body-text { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
ul.plain { margin: 0 0 16px 18px; }
ul.plain li { font-size: 14.5px; color: var(--text-muted); margin-bottom: 8px; }
ul.plain li strong { color: var(--text-dark); }
.cta-center { text-align: center; margin-top: 22px; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.badge { font-size: 13px; padding: 8px 16px; border: 1px solid var(--border-soft); border-radius: 20px; color: var(--navy); background: #fff; }

/* ACCORDION */
.acc-item { background: #fff; border: 1px solid var(--border-soft); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.acc-item summary { font-weight: 600; font-size: 14.5px; color: var(--navy); padding: 15px 18px; cursor: pointer; list-style: none; }
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary::before { content: '+'; font-weight: 700; color: var(--gold); margin-right: 8px; }
.acc-item[open] summary::before { content: '\2212'; }
.acc-body { padding: 0 18px 18px; }
.acc-body p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 9px; }
.acc-body ul { margin: 0 0 9px 16px; }
.acc-body li { font-size: 13.5px; color: var(--text-muted); margin-bottom: 5px; }
.acc-body strong { color: var(--text-dark); }

.acc-group-label { text-align: center; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; color: var(--text-muted); font-weight: 700; margin: 26px 0 10px; }
.acc-group-label:first-child { margin-top: 0; }

.glossary-grid { display: grid; grid-template-columns: 1fr; gap: 8px 20px; }
.glossary-grid div { font-size: 13px; color: var(--text-muted); padding: 7px 0; border-bottom: 1px solid var(--border-soft); }
.glossary-grid strong { color: var(--navy); }

.op-steps { counter-reset: op; }
.op-step { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.op-step .op-num {
  counter-increment: op; min-width: 26px; height: 26px; border-radius: 50%;
  background: var(--off-white); border: 1px solid var(--gold); color: var(--navy);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.op-step .op-num::before { content: counter(op); }
.op-step p { font-size: 13.5px; color: var(--text-muted); }
.op-step strong { color: var(--text-dark); }
.official-link { margin-top: 16px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* CHARTS (market timing, Guía) */
.chart-title { font-size: 13px; font-weight: 700; color: var(--text-dark); margin: 16px 0 4px; }
.chart-subtitle { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.chart-source { font-size: 11.5px; color: var(--text-muted); font-style: italic; margin-top: 6px; }
.bar-chart-1 { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding: 0 4px 28px; border-bottom: 1px solid var(--border-soft); overflow-x: auto; }
.bar-col { flex: 1; min-width: 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.bar-col .bar { width: 100%; background: var(--navy); border-radius: 3px 3px 0 0; position: relative; }
.bar-col .val-label { font-size: 9px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; white-space: nowrap; }
.bar-col .pct-label { font-size: 8.5px; color: var(--text-muted); margin-bottom: 2px; }
.bar-col .x-label { position: absolute; top: 100%; margin-top: 8px; font-size: 9px; color: var(--text-muted); text-align: center; width: 100%; line-height: 1.3; }
.chart-callout { background: var(--off-white); border: 1px solid var(--gold-light); border-radius: 8px; padding: 11px 15px; font-size: 12.5px; color: var(--text-dark); margin: 38px 0 18px; text-align: center; }
.diverging-chart { display: flex; gap: 10px; height: 210px; margin: 18px 0 38px; }
.diverging-group { flex: 1; position: relative; height: 100%; }
.diverging-zero-line { position: absolute; top: 60%; left: 0; right: 0; border-top: 1px solid var(--text-dark); }
.diverging-bars { display: flex; gap: 3px; height: 100%; position: relative; }
.div-bar-wrap { flex: 1; position: relative; height: 100%; }
.div-bar { position: absolute; width: 100%; border-radius: 2px; }
.div-bar.acciones { background: #4a8a6f; }
.div-bar.bonos { background: var(--navy); }
.div-bar.portafolio { background: #a39a8a; }
.div-bar .lbl-top, .div-bar .lbl-bottom { position: absolute; left: 50%; transform: translateX(-50%); font-size: 8px; font-weight: 700; color: var(--text-dark); white-space: nowrap; }
.div-bar .lbl-top { bottom: 100%; margin-bottom: 2px; }
.div-bar .lbl-bottom { top: 100%; margin-top: 2px; }
.diverging-x-label { position: absolute; bottom: -30px; left: 0; right: 0; text-align: center; font-size: 9.5px; color: var(--text-dark); font-weight: 700; }
.chart-legend { display: flex; gap: 14px; justify-content: center; margin: 40px 0 8px; flex-wrap: wrap; }
.chart-legend span { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.chart-legend .dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.avg-table { width: 100%; border-collapse: collapse; margin: 42px 0 8px; font-size: 12px; }
.avg-table th, .avg-table td { padding: 7px 8px; border-bottom: 1px solid var(--border-soft); text-align: left; }
.avg-table th { color: var(--text-muted); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; }

/* INFLACION (pesos vs dolar) */
.inflation-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.inflation-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; padding: 20px 20px; }
.inflation-card h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.inflation-card p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 10px; }
.inflation-stat { font-size: 13px; font-weight: 600; color: var(--text-dark); background: var(--off-white); border-radius: 6px; padding: 10px 12px; }
@media (min-width: 641px) {
  .inflation-grid { grid-template-columns: 1fr 1fr; }
}

/* INTERES COMPUESTO (lista simple ascendente) */
.compound-list { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; max-width: 460px; margin-left: auto; margin-right: auto; }
.compound-row { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 10px; }
.compound-year { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.compound-bar { height: 10px; border-radius: 5px; background: var(--gold); display: block; }
.compound-value { font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; }

/* COMPARATIVA (colchón vs S&P 500 / inicio vs fin - misma estética) */
.compare-list { display: flex; flex-direction: column; gap: 24px; margin: 18px 0; max-width: 480px; margin-left: auto; margin-right: auto; }
.compare-block-label { font-size: 13.5px; font-weight: 700; color: var(--navy); margin-bottom: 10px; text-align: center; }
.compare-line { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.compare-line:last-child { margin-bottom: 0; }
.compare-tag { width: 76px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.compare-track { flex: 1; background: rgba(29,59,52,0.06); border-radius: 6px; height: 22px; overflow: hidden; }
.compare-fill { display: block; height: 100%; border-radius: 6px; }
.compare-fill.base { background: #a39a8a; }
.compare-fill.highlight { background: var(--gold); }
.compare-value { width: 92px; flex-shrink: 0; text-align: right; font-size: 13.5px; font-weight: 700; color: var(--navy); white-space: nowrap; }

.fund-block { background: #fff; border: 1px solid var(--border-soft); border-radius: 10px; padding: 18px 20px; margin-bottom: 12px; }
.fund-block h4 { font-size: 14.5px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.fund-block p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 6px; }

/* PASOS (genérico) */
.steps-3 { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 10px 0; }
.step-card { text-align: center; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  margin: 0 auto 10px;
}
.step-card h4 { font-size: 14.5px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.step-card p { font-size: 13.5px; color: var(--text-muted); }
@media (min-width: 768px) {
  .steps-3 { grid-template-columns: repeat(3, 1fr); gap: 22px; }
}

.steps-5 { display: grid; grid-template-columns: 1fr; gap: 18px; margin: 10px 0; }
@media (min-width: 768px) {
  .steps-5 { grid-template-columns: repeat(5, 1fr); gap: 12px; }
}

.card-detail { margin-top: 10px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.card-detail summary { font-size: 12.5px; font-weight: 600; color: var(--gold); cursor: pointer; list-style: none; }
.card-detail summary::-webkit-details-marker { display: none; }
.card-detail summary::before { content: '+'; margin-right: 6px; }
.card-detail[open] summary::before { content: '\2212'; }
.card-detail .detail-body { margin-top: 8px; }
.card-detail .detail-body p { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.card-detail .detail-body strong { color: var(--text-dark); }

/* GRID DE SERVICIOS */
.service-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.service-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 10px; padding: 18px 20px; }
.service-card h4 { font-size: 14.5px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.service-card p { font-size: 13.5px; color: var(--text-muted); }
@media (min-width: 768px) {
  .service-grid { grid-template-columns: 1fr 1fr; }
  .service-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* TARJETA SECUNDARIA (reasignación, convenios, cuenta jurídica) */
.highlight-card { background: #fdf6ef; border: 1px solid var(--gold-light); border-radius: 12px; padding: 22px 20px; text-align: center; margin: 18px 0; }
.highlight-card h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.highlight-card p { font-size: 13.5px; color: var(--text-dark); max-width: 560px; margin: 0 auto 12px; }

.disclaimer-banner { background: #fdf1ea; border: 1px solid var(--gold-light); border-radius: 8px; padding: 13px 16px; font-size: 13px; color: #7a4a2e; margin-bottom: 22px; text-align: center; }

.recursos-wrap { background: #fff; border-radius: 12px; padding: 26px 20px; border: 1px solid var(--border-soft); }
.recursos-wrap h2 { margin-bottom: 8px; }

.card-block { background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; padding: 26px 22px; text-align: center; }

.contact-panel { background: var(--navy-light); border-radius: 12px; padding: 32px 22px; color: #fff; text-align: center; }
.contact-panel h2 { color: #fff; }
.contact-panel .lead { color: #d9e4de; }
.contact-panel .cta-row { margin-top: 10px; }

footer { background: var(--navy); color: #cfd7e3; padding: 32px 18px 22px; text-align: center; }
footer .contact-row { display: flex; gap: 18px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; font-size: 13.5px; }
footer .contact-row a { color: var(--gold-light); }
footer .footer-links { display: flex; gap: 16px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; font-size: 12.5px; }
footer .footer-links a { color: #9fb0a8; }
footer .footer-links a:hover { color: #fff; }
footer .disclaimer { font-size: 13px; color: #9fb0a8; max-width: 620px; margin: 0 auto 10px; line-height: 1.6; }

/* BOTON WHATSAPP FLOTANTE */
.wa-float {
  position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); right: calc(16px + env(safe-area-inset-right)); z-index: 50;
  width: 50px; height: 50px; border-radius: 50%; background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(29,59,52,0.28);
}
.wa-float svg { width: 24px; height: 24px; }

@media (min-width: 641px) {
  .wa-float { width: 54px; height: 54px; bottom: calc(20px + env(safe-area-inset-bottom)); right: calc(20px + env(safe-area-inset-right)); }
  .wa-float svg { width: 26px; height: 26px; }
}
