/* SBC Asesores — hoja de estilos principal */

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Merriweather";
  src: url("../fonts/merriweather-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #101c4d;
  --navy-dark: #0b1438;
  --brand: #000096;
  --blue: #1f4fb3;
  --blue-light: #e8eef9;
  --ink: #1b2030;
  --text: #3a4150;
  --muted: #6b7280;
  --line: #dde2ec;
  --soft: #f4f6fa;
  --white: #ffffff;
  --gold: #b8892e;
  --max: 1180px;
  --radius: 4px;
  --font-body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Merriweather", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 700;
}
h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; }

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
strong { color: var(--ink); }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Barra superior ---------- */
.topbar {
  background: var(--navy-dark);
  color: #cdd4e6;
  font-size: 0.9rem;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px;
}
.topbar a { color: #fff; }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.topbar li { margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.topbar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- Cabecera ---------- */
.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 84px;
}
.logo img { width: 240px; height: auto; }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.nav li { margin: 0; }
.nav a {
  display: block; padding: 0.55rem 0.85rem; color: var(--ink); font-weight: 600; font-size: 1rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { text-decoration: none; color: var(--brand); }
.nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.nav a.btn { color: #fff; padding: 0.7rem 1.4rem; border: 2px solid var(--brand); font-weight: 700; }
.nav a.btn:hover { color: #fff; background: var(--navy); border-color: var(--navy); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 44px; height: 44px; cursor: pointer; padding: 0; color: var(--navy);
}
.nav-toggle svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; margin: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; padding: 0.7rem 1.4rem; border-radius: var(--radius); font-weight: 700;
  font-size: 1rem; line-height: 1.2; border: 2px solid transparent; cursor: pointer; text-align: center;
  font-family: var(--font-body);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--navy); border-color: var(--navy); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: var(--blue-light); border-color: var(--blue-light); }

/* ---------- Portada ---------- */
.hero { background: var(--soft); border-bottom: 1px solid var(--line); }
.hero .container {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; padding: 4rem 0;
}
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--gold); margin-bottom: 0.75rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero .lead { font-size: 1.2rem; color: var(--text); margin-bottom: 1.75rem; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero figure { margin: 0; }
.hero img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(16, 28, 77, 0.15); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Franja de datos */
.facts { background: var(--navy); color: #fff; }
.facts ul {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr);
}
.facts li { margin: 0; padding: 1.25rem 1.5rem; border-left: 1px solid rgba(255,255,255,0.12); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts strong { display: block; color: #fff; font-family: var(--font-head); font-size: 1.35rem; line-height: 1.2; margin-bottom: 0.2rem; }
.facts span { color: #c7cfe4; font-size: 0.95rem; }

/* ---------- Secciones ---------- */
.section { padding: 4.5rem 0; }
.section-soft { background: var(--soft); }
.section-title { max-width: 44em; margin-bottom: 2.25rem; }
.section-title .kicker {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--gold); margin-bottom: 0.5rem;
}
.section-title p { color: var(--muted); font-size: 1.1rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

/* Tarjetas de servicios */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brand); padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column;
}
.card .icon {
  width: 44px; height: 44px; color: var(--brand); margin-bottom: 1rem;
}
.card .icon svg { width: 44px; height: 44px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.98rem; color: var(--text); flex: 1; }
.card a.more { font-weight: 700; }
.card a.more::after { content: " \2192"; }

/* Lista de ventajas */
.why { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.why li { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: start; margin: 0; }
.why .num {
  width: 48px; height: 48px; border: 2px solid var(--navy); color: var(--navy); font-family: var(--font-head);
  font-weight: 700; display: grid; place-items: center; font-size: 1.1rem;
}
.why h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.why p { margin: 0; color: var(--text); }

/* Banda con fotografía local */
.local-band { position: relative; color: #fff; overflow: hidden; background: var(--navy); }
.local-band .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.local-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,20,56,0.92) 0%, rgba(11,20,56,0.75) 55%, rgba(11,20,56,0.35) 100%); }
.local-band .container { position: relative; z-index: 1; padding: 4.5rem 0; max-width: 1180px; }
.local-band .inner { max-width: 40em; }
.local-band .kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: #e6c377; margin-bottom: 0.5rem; }
.local-band h2 { color: #fff; }
.local-band p { color: #dfe4f2; font-size: 1.1rem; }
.local-band ul { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem; }
.local-band li { margin: 0; padding-left: 1.1rem; position: relative; color: #fff; font-weight: 600; }
.local-band li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; background: #e6c377; }

/* Banda de llamada a la acción */
.cta-band { background: var(--navy); color: #d9dfee; }
.cta-band .container { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; padding: 3rem 0; }
.cta-band h2 { color: #fff; margin-bottom: 0.5rem; }
.cta-band p { margin: 0; max-width: 46em; }

/* ---------- Encabezado de página interior ---------- */
.page-head { background: var(--soft); border-bottom: 1px solid var(--line); padding: 2.5rem 0; }
.page-head h1 { margin-bottom: 0.35rem; }
.page-head .lead { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 46em; }
.breadcrumb { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.9rem; color: var(--muted); }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: #aab2c5; }

/* ---------- Página de servicios ---------- */
.services-layout { display: grid; grid-template-columns: 260px 1fr; gap: 3rem; align-items: start; }
.services-nav { position: sticky; top: 100px; border: 1px solid var(--line); background: #fff; }
.services-nav h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-body); color: var(--muted); padding: 1rem 1.25rem 0.5rem; margin: 0; }
.services-nav ul { list-style: none; margin: 0; padding: 0 0 0.5rem; }
.services-nav li { margin: 0; }
.services-nav a { display: block; padding: 0.55rem 1.25rem; color: var(--ink); font-weight: 600; border-left: 3px solid transparent; }
.services-nav a:hover { background: var(--soft); text-decoration: none; border-left-color: var(--brand); }

.service { padding: 0 0 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; }
.service:last-child { border-bottom: 0; margin-bottom: 0; }
.service header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.service header .icon { width: 48px; height: 48px; color: var(--brand); flex: none; }
.service header .icon svg { width: 48px; height: 48px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.service header h2 { margin: 0; }
.service-body { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
.service-body figure { margin: 0; }
.service-body img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.service dl { margin: 0; }
.service dt { font-weight: 700; color: var(--ink); margin-top: 1rem; }
.service dd { margin: 0.25rem 0 0; }
.service dd ul { margin-top: 0.5rem; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.contact-list li { display: grid; grid-template-columns: 26px 1fr; gap: 0.75rem; align-items: start; margin-bottom: 1rem; }
.contact-list svg { width: 22px; height: 22px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 3px; }
.contact-list strong { display: block; }
.map-box { border: 1px solid var(--line); background: var(--soft); padding: 1.5rem; }
.map-box figure { margin: -1.5rem -1.5rem 1.25rem; }
.map-box img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: center 35%; }
.map-box p { margin-bottom: 1rem; }

/* Formularios */
.form { background: #fff; border: 1px solid var(--line); padding: 2rem; }
.form h2 { font-size: 1.4rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 0.35rem; }
.field .hint { font-size: 0.9rem; color: var(--muted); margin: 0.25rem 0 0; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea, .field select {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid #b9c0d0; border-radius: var(--radius); font: inherit; color: var(--ink); background: #fff;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field-check { display: grid; grid-template-columns: 20px 1fr; gap: 0.6rem; align-items: start; font-size: 0.95rem; }
.field-check input { margin-top: 4px; width: 18px; height: 18px; }
.form-note { font-size: 0.9rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.alert { padding: 1rem 1.25rem; border-left: 4px solid var(--brand); background: var(--blue-light); margin-bottom: 1.5rem; }
.alert-ok { border-left-color: #1e7a46; background: #e8f5ec; }
.alert-error { border-left-color: #b42318; background: #fdecea; }

/* ---------- Texto legal ---------- */
.legal h2 { font-size: 1.35rem; margin-top: 2.25rem; }
.legal h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.legal .box { background: var(--soft); border: 1px solid var(--line); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.legal .box p { margin-bottom: 0.4rem; }
.legal address { font-style: normal; }
.toc { background: var(--soft); border: 1px solid var(--line); padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.toc h2 { font-size: 1rem; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.75rem; color: var(--muted); }
.toc ol { margin: 0; columns: 2; column-gap: 2rem; }
.toc li { break-inside: avoid; }

/* ---------- Pie ---------- */
.footer { background: var(--navy-dark); color: #b9c2d9; font-size: 0.95rem; }
.footer a { color: #e6eaf5; }
.footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; padding: 3.5rem 0 2.5rem; }
.footer h3 { color: #fff; font-family: var(--font-body); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 0.5rem; }
.footer address { font-style: normal; }
.footer-logo { background: #fff; display: inline-block; padding: 0.6rem 0.9rem; border-radius: var(--radius); margin-bottom: 1rem; }
.footer-logo img { width: 200px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); }
.footer-bottom .container {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; padding: 1.25rem 0; font-size: 0.88rem;
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-bottom li { margin: 0; }

/* ---------- Utilidades ---------- */
.mt-2 { margin-top: 2rem; }
.text-center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Adaptación a pantallas ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .facts ul { grid-template-columns: repeat(2, 1fr); }
  .facts li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .services-layout { grid-template-columns: 1fr; }
  .service-body { grid-template-columns: 1fr; }
  .service-body figure { order: -1; max-width: 480px; }
  .services-nav { position: static; }
  .services-nav ul { display: flex; flex-wrap: wrap; }
  .footer .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  body { font-size: 16px; }
  .topbar ul li:first-child { display: none; }
  .header .container { min-height: 72px; }
  .logo img { width: 190px; }
  .nav-toggle { display: flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line);
    padding: 0.75rem 1.25rem 1.25rem; flex-direction: column; align-items: stretch; gap: 0.75rem; box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { padding: 0.75rem 0.25rem; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .nav .btn { margin-top: 0.5rem; }
  .hero .container { grid-template-columns: 1fr; padding: 2.5rem 0; gap: 2rem; }
  .hero figure { order: -1; }
  .section { padding: 3rem 0; }
  .two-col, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cta-band .container { grid-template-columns: 1fr; }
  .form { padding: 1.5rem; }
  .toc ol { columns: 1; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .facts ul { grid-template-columns: 1fr; }
  .facts li { border-left: 0; padding: 0.9rem 0; border-top: 1px solid rgba(255,255,255,0.12); }
  .facts li:first-child { border-top: 0; }
  .footer .container { grid-template-columns: 1fr; gap: 2rem; }
  .topbar .container { justify-content: center; }
  .topbar .location { display: none; }
}

@media print {
  .topbar, .nav-toggle, .nav .btn, .cta-band, .footer-logo { display: none !important; }
  .header { position: static; }
  a { color: inherit; }
}

/* Acceso al canal ético externo */
.canal-acceso .btn { margin: 0.25rem 0 0.5rem; }
.checks { list-style: none; padding: 0; margin: 1rem 0 1.25rem; }
.checks li { position: relative; padding-left: 1.6rem; margin-bottom: 0.5rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }

/* Selector de idioma */
.topbar .lang { gap: 0.5rem; padding-left: 0.75rem; border-left: 1px solid rgba(255,255,255,0.18); }
.topbar .lang a { color: #cdd4e6; font-weight: 600; }
.topbar .lang a.is-current { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.topbar .lang span { color: #5a6688; }
.legal .alert { margin-bottom: 1.5rem; }
