/* ═══════════════════════════════════════════════════════
   AmortizaHipoteca — Shared Design System
   Loaded by every page. Contains: variables, base, nav, footer.
═══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ─────────────────────────────────── */
:root {
  --hero-bg:      #070D1A;
  --nav-bg:       #070D1A;
  --blue:         #3B82F6;
  --blue-dark:    #2563EB;
  --blue-light:   #EFF6FF;
  --emerald:      #10B981;
  --emerald-light: #D1FAE5;
  --surface:      #FFFFFF;
  --bg:           #F8FAFC;
  --border:       #E2E8F0;
  --text:         #0F172A;
  --muted:        #64748B;
  --muted-light:  #94A3B8;
  --red:          #DC2626;
  --green:        #059669;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:    0 4px 12px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:    0 20px 60px rgba(0,0,0,.15), 0 8px 24px rgba(0,0,0,.08);
  --radius:       16px;
}

/* ── BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

/* ── SITE NAV ────────────────────────────────────────── */
.site-nav {
  background: var(--nav-bg);
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  gap: 1rem;
  position: relative;
  z-index: 10;
}

/* Logo: icono + texto */
.nav-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-icon svg {
  width: 17px;
  height: 17px;
  fill: #fff;
}

.nav-logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.nav-logo-text span {
  color: var(--blue);
}

/* Separador / título de página */
.nav-sep {
  color: rgba(255,255,255,.25);
  font-size: .875rem;
  flex-shrink: 0;
}

.nav-page-title {
  color: rgba(255,255,255,.45);
  font-size: .8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Links de herramientas */
.nav-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .15rem;
  flex-shrink: 0;
}

.nav-tool-link {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 500;
  padding: .35rem .65rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}

.nav-tool-link:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.nav-tool-link.active {
  color: #fff;
  background: rgba(255,255,255,.06);
}

/* Responsive nav */
@media (max-width: 640px) {
  .nav-page-title { display: none; }
  .nav-sep { display: none; }
}

@media (max-width: 480px) {
  .site-nav {
    flex-wrap: wrap;
    gap: .5rem;
    padding-bottom: .75rem;
  }
  .nav-tools {
    margin-left: 0;
    width: 100%;
    gap: .1rem;
  }
  .nav-tool-link {
    font-size: .74rem;
    padding: .3rem .5rem;
  }
}

/* ── PAGE WRAP (contenedor de contenido) ─────────────── */
.page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ── SITE FOOTER ─────────────────────────────────────── */
.site-footer {
  background: var(--nav-bg);
  color: rgba(255,255,255,.45);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .78rem;
  line-height: 1.65;
}

.site-footer strong {
  color: rgba(255,255,255,.65);
}

.footer-updated {
  font-size: .72rem;
  color: rgba(255,255,255,.3);
  margin: 0 0 .5rem;
}

.footer-desc {
  margin: 0 0 .2rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.footer-tools {
  margin-top: .9rem;
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

.footer-tools a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .15s;
}

.footer-tools a:hover {
  color: #fff;
}

.footer-legal {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: .1rem;
}

.footer-legal a {
  color: rgba(255,255,255,.35);
  text-decoration: underline;
  transition: color .15s;
}

.footer-legal a:hover {
  color: rgba(255,255,255,.65);
}
