/* ═══════════════════════════════════════════════
   INTEGRAL S-COM · sitio público
   Estilos compartidos por index, subpáginas de servicio y cotizador.
   Las variables marcadas "compat" las usa cotizador_template.html.
   ═══════════════════════════════════════════════ */

:root {
  /* Marca (tomada del logo) */
  --navy: #0a2540;
  --navy-2: #12355c;
  --blue: #0d57b0;
  --blue-soft: #e8f0fa;
  --green: #0b7a14;
  --green-hover: #086310;
  --green-soft: #e7f4e8;

  /* Superficies y texto */
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --line: #dde4ec;
  --line-strong: #b9c4d1;
  --ink: #0a2540;
  --text: #33465c;
  --muted: #5d6f84;

  /* compat: cotizador_template.html */
  --primary: var(--navy);
  --primary-dark: var(--navy);
  --primary-light: var(--blue);
  --accent-cyan: #0a8fb0;
  --accent-emerald: var(--green);
  --accent-rose: #c8323f;
  --bg-page: var(--bg-soft);
  --bg-card: #ffffff;
  --bg-card-subtle: var(--bg-soft);
  --bg-header: rgba(255, 255, 255, 0.96);
  --border-color: var(--line);
  --border-strong: var(--line-strong);
  --text-title: var(--ink);
  --text-body: var(--text);
  --text-muted: var(--muted);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(10, 37, 64, 0.16);

  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-text: "Red Hat Text", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  accent-color: var(--blue);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--line-strong) var(--bg-soft); }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

.wrap, .container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap, .container { padding: 0 16px; } }

/* ── Botones ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: 0;
  border-radius: 10px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-cta { background: var(--green); color: #fff; box-shadow: 0 4px 12px -6px rgba(10, 37, 64, .45); }
.btn-cta:hover { background: var(--green-hover); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }
.link-arrow { font-size: 17px; font-weight: 700; font-family: var(--font-display); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow:hover { text-decoration: underline; }
/* compat cotizador */
.grid-bg, .bracket { position: relative; }

/* ── Header ────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.logo { display: block; flex: none; }
.logo img { height: 45px; width: auto; object-fit: contain; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { color: var(--text); font-weight: 500; font-size: 15px; text-decoration: none; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.main-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-tel, .header-clientes { white-space: nowrap; }
.header-clientes { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.header-clientes svg { width: 16px; height: 16px; color: var(--muted); }
.header-clientes:hover { color: var(--ink); background: var(--bg-soft); }
.header-tel { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; font-family: var(--font-display); text-decoration: none; font-size: 15px; }
.header-tel svg { width: 18px; height: 18px; color: var(--blue); }
.header-actions .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.mobile-nav { display: none; }

@media (max-width: 1180px) {
  .main-nav, .header-tel, .header-clientes { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 520px) {
  :root { --header-h: 64px; }
  .logo img { height: 38px; }
  .header-actions { gap: 10px; }
  .header-actions .btn { padding: 0 14px; font-size: 14px; }
  .header-actions .btn .btn-long { display: none; }
}

/* ── Secciones base ────────────────────────── */
.section { padding: 104px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p { margin-top: 14px; font-size: 18px; color: var(--muted); }
@media (max-width: 700px) { .section { padding: 72px 0; } .section-head { margin-bottom: 32px; } }

/* ── Hero ──────────────────────────────────── */
/* Hero a sangre: foto detrás, velo navy solo bajo el texto */
.hero { position: relative; padding: 0; background: var(--navy); isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,37,64,.95) 0%, rgba(10,37,64,.9) 38%, rgba(10,37,64,.45) 50%, rgba(10,37,64,0) 60%); }
.hero-grid { min-height: min(78vh, 720px); padding-top: 64px; padding-bottom: 64px; }
.hero h1 { color: #fff; max-width: 13ch; }
.hero h1 .hl { color: #8cc2ff; }
.hero-lead { color: #dbe6f3; }
.hero-call { color: #fff; }
.hero-call svg { color: #8cc2ff; }
.hero .facts { margin-top: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); letter-spacing: -0.03em; line-height: 1.04; }
.hero h1 .hl { color: var(--blue); }
.hero-lead { margin-top: 22px; font-size: clamp(18px, 1.6vw, 20px); max-width: 38ch; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.hero-call { color: var(--ink); font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.hero-call strong { font-family: var(--font-display); }
.hero-call:hover strong { text-decoration: underline; }
.hero-call svg { width: 18px; height: 18px; color: var(--blue); }
.hero-for { margin-top: 28px; font-size: 15px; color: var(--muted); }
.hero-for strong { color: var(--ink); font-weight: 600; }

/* Tarjeta "Agenda tu visita" */
.visit-card {
  background: #fff; border-radius: 18px;
  padding: 30px; box-shadow: 0 24px 48px -28px rgba(10, 37, 64, .35), 0 1px 3px rgba(10, 37, 64, .12);
  animation: rise .9s var(--ease-out) both .1s;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.visit-card h2 { font-size: 24px; }
.visit-card > p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.vf { margin-top: 22px; display: grid; gap: 16px; }
.vf-group > span, .vf-group > label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.vf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-chips label { position: relative; }
.vf-chips input { position: absolute; opacity: 0; pointer-events: none; }
.vf-chips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; transition: all .15s; background: #fff; }
.vf-chips span:hover { border-color: var(--line-strong); }
.vf-chips input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.vf-chips input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.vf select, .vf input[type="text"] {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
}
.vf select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6f84' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.vf select:focus, .vf input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.vf .btn { width: 100%; }
.vf-note { font-size: 13px; color: var(--muted); text-align: center; }

/* Franja de garantías */
.facts { margin-top: 0; border-top: 0; border-bottom: 1px solid var(--line); background: #fff; }
.facts ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { display: flex; gap: 14px; align-items: flex-start; padding: 26px 24px; }
.facts li + li { border-left: 1px solid var(--line); }
.facts svg { width: 26px; height: 26px; color: var(--blue); flex: none; margin-top: 2px; }
.facts strong { display: block; font-family: var(--font-display); color: var(--ink); font-size: 16px; line-height: 1.3; }
.facts span { display: block; font-size: 14px; color: var(--muted); line-height: 1.45; margin-top: 2px; }

@media (max-width: 760px) {
  .hero-media { inset: 0 0 auto 0; height: 560px; }
  .hero-media img { object-position: 50% 30%; }
  .hero-media::after { background: linear-gradient(0deg, rgba(10,37,64,1) 0%, rgba(10,37,64,.94) 42%, rgba(10,37,64,.78) 52%, rgba(10,37,64,.3) 68%, rgba(10,37,64,0) 82%); }
  .hero-grid { min-height: 0; padding-top: 250px !important; padding-bottom: 0; }
  .hero .visit-card { margin-bottom: -32px; position: relative; }
  .hero .facts { padding-top: 32px; }
}
@media (max-width: 1020px) and (min-width: 761px) {
  .hero-media::after { background: linear-gradient(180deg, rgba(10,37,64,.88) 0%, rgba(10,37,64,.8) 45%, rgba(10,37,64,.6) 100%); }
}
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-lead { max-width: 52ch; }
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(3) { border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .hero-grid { padding-top: 32px; }
  .facts { margin-top: 0; }
  .hero-actions .btn { width: 100%; }
  .hero-call { width: 100%; justify-content: center; }
  .visit-card { padding: 22px 18px; }
  .facts { margin-top: 48px; }
  .facts ul { grid-template-columns: 1fr; }
  .facts li { padding: 18px 0; }
  .facts li + li { border-left: 0; border-top: 1px solid var(--line); }
}

/* ── Servicios ─────────────────────────────── */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter button {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; transition: all .15s;
}
.filter button:hover { border-color: var(--line-strong); color: var(--ink); }
.filter button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.svc-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 18px; align-items: start;
  padding: 26px 20px 26px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: opacity .35s var(--ease-out), background-color .2s;
}
.svc:nth-child(odd) { padding-right: 32px; }
.svc:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--line); }
.svc-ico { width: 52px; height: 52px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.svc-ico svg { width: 26px; height: 26px; }
.svc h3 { font-size: 20px; letter-spacing: -0.01em; }
.svc p { margin-top: 6px; font-size: 16px; color: var(--text); max-width: 46ch; }
.svc-for { margin-top: 10px; font-size: 13px; color: var(--muted); font-weight: 500; }
.svc-go { align-self: center; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--blue); transition: transform .25s var(--ease-out), background-color .2s; }
.svc-go svg { width: 20px; height: 20px; }
.svc:hover h3 { color: var(--blue); }
.svc:hover .svc-go { background: var(--blue-soft); transform: translateX(4px); }
.svc.is-dim { opacity: .28; }
.svc.is-dim:hover { opacity: .6; }
.svc-note { margin-top: 28px; color: var(--muted); font-size: 16px; }
@media (max-width: 860px) {
  .svc-list { grid-template-columns: 1fr; }
  .svc, .svc:nth-child(odd), .svc:nth-child(even) { padding: 22px 0; border-left: 0; }
  .svc { grid-template-columns: 44px 1fr auto; gap: 14px; }
  .svc-ico { width: 44px; height: 44px; }
}

/* ── Cómo funciona ─────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; position: relative; }
.step { position: relative; padding: 0 28px 0 0; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); color: var(--blue);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; position: relative; z-index: 1;
}
.step:first-child .step-num { background: var(--blue); color: #fff; }
.step::before { content: ""; position: absolute; top: 23px; left: 48px; right: 0; border-top: 2px dashed var(--line-strong); }
.step:last-child::before { display: none; }
.step h3 { margin-top: 22px; font-size: 20px; }
.step p { margin-top: 8px; font-size: 16px; color: var(--text); }
.steps-cta { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.steps-cta p { color: var(--muted); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { display: grid; grid-template-columns: 48px 1fr; column-gap: 20px; padding: 0 0 32px; }
  .step-num { grid-row: span 3; }
  .step h3 { margin-top: 10px; }
  .step::before { top: 48px; bottom: 0; left: 23px; right: auto; border-top: 0; border-left: 2px dashed var(--line-strong); }
  .steps-cta { margin-top: 16px; }
  .steps-cta .btn { width: 100%; }
}

/* ── Por qué nosotros ──────────────────────── */
.why-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.why-list { display: grid; grid-template-columns: 1fr; gap: 32px; max-width: 560px; }
.why-list svg { width: 28px; height: 28px; color: var(--blue); }
.why-list h3 { margin-top: 14px; font-size: 19px; }
.why-list p { margin-top: 6px; font-size: 16px; }
.company { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.company h3 { font-size: 18px; }
.company dl { margin: 18px 0 0; display: grid; gap: 0; }
.company dl div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.company dt { color: var(--muted); }
.company dd { margin: 0; color: var(--ink); font-weight: 600; }
.company dd a { color: var(--ink); }
.brands { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; max-width: 80ch; }
@media (max-width: 960px) { .why-grid { grid-template-columns: 1fr; gap: 48px; } }
@media (max-width: 600px) {
  .why-list { grid-template-columns: 1fr; gap: 28px; }
  .company { padding: 22px 18px; }
  .company dl div { grid-template-columns: 1fr; gap: 2px; }
}

/* ── Preguntas ─────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
.faq-grid .section-head { margin-bottom: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 0; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 22px; height: 22px; flex: none; color: var(--blue); transition: transform .25s var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--text); max-width: 68ch; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ── Cierre ────────────────────────────────── */
.closing { background: var(--navy); color: #c9d6e6; padding: 96px 0; }
.closing-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.closing h2 { color: #fff; font-size: clamp(32px, 4.4vw, 50px); letter-spacing: -0.03em; }
.closing p { margin-top: 16px; font-size: 18px; max-width: 52ch; }
.closing-actions { display: grid; gap: 14px; min-width: 300px; }
.closing-actions .btn { width: 100%; }
.closing .btn-cta { box-shadow: none; }
.closing .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.closing .btn-outline:hover { border-color: #fff; }
.closing-mail { text-align: center; color: #c9d6e6; font-size: 15px; }
.closing-mail a { color: #fff; }
@media (max-width: 860px) { .closing { padding: 72px 0; } .closing-inner { grid-template-columns: 1fr; gap: 32px; } .closing-actions { min-width: 0; } }

/* ── Footer ────────────────────────────────── */
footer { background: #071a2e; color: #9fb1c6; padding: 64px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-logo { display: inline-block; background: #fff; border-radius: 10px; padding: 8px 12px; }
.footer-logo img { height: 40px; width: auto; object-fit: contain; }
.footer-about { margin-top: 16px; max-width: 34ch; line-height: 1.55; }
footer .footer-h { color: #fff; font-size: 15px; font-weight: 700; font-family: var(--font-display); margin-bottom: 14px; }
footer li + li { margin-top: 8px; }
footer a { color: #9fb1c6; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Barra fija móvil ──────────────────────── */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  .mobile-bar {
    display: grid; grid-template-columns: 1fr auto auto; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -12px rgba(10,37,64,.2);
    transform: translateY(110%); transition: transform .35s var(--ease-out);
  }
  .mobile-bar.is-visible { transform: none; }
  .mobile-bar .btn { min-height: 50px; }
  .mobile-bar .btn-outline { width: 54px; padding: 0; }
  body { padding-bottom: 76px; }
  body.bar-on .header-actions .btn-cta { display: none; }
}

/* ── Chat asistente ────────────────────────── */
#chatWidget { position: fixed; right: 20px; bottom: 20px; z-index: 95; font-size: 15px; }
#chatBubble { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 8px 20px -8px rgba(0,0,0,.35); }
#chatBubble svg { width: 26px; height: 26px; }
.chat-panel { position: absolute; right: 0; bottom: 70px; width: min(360px, calc(100vw - 32px)); height: min(500px, calc(100vh - 160px)); background: #fff; border-radius: 16px; box-shadow: 0 24px 48px -20px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.12); display: none; flex-direction: column; overflow: hidden; }
.chat-panel.is-open { display: flex; }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--navy); color: #fff; }
.chat-header strong { font-family: var(--font-display); display: block; }
.chat-header small { color: #b8c8da; }
.chat-header button { background: transparent; border: 0; color: #fff; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; }
.chat-header button:hover { background: rgba(255,255,255,.1); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 10px; align-content: start; background: var(--bg-soft); }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; line-height: 1.45; }
.chat-msg.bot { background: #fff; border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-msg.user { justify-self: end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg a { color: inherit; font-weight: 700; }
.chat-typing { display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; width: max-content; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .15s; } .chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.chat-escalate { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.chat-escalate .btn { width: 100%; min-height: 42px; margin-top: 8px; font-size: 14px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; }
.chat-form input:focus { outline: none; border-color: var(--blue); }
.chat-form button { width: 44px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-form button:disabled { opacity: .5; }
@media (max-width: 760px) { #chatWidget { bottom: 88px; right: 16px; } #chatBubble { width: 50px; height: 50px; } }

/* ═══ Subpáginas de servicio ═══ */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--muted); }
.svc-hero { padding: 24px 0 72px; background: var(--bg-soft); }
.svc-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; margin-top: 28px; }
.svc-hero .svc-ico { width: 64px; height: 64px; border-radius: 16px; }
.svc-hero .svc-ico svg { width: 32px; height: 32px; }
.svc-hero h1 { margin-top: 0; font-size: clamp(34px, 4.6vw, 54px); letter-spacing: -0.03em; }
.svc-hero-lead { margin-top: 18px; font-size: 19px; max-width: 50ch; }
.svc-hero .hero-actions { margin-top: 30px; }
.svc-for-line { margin-top: 22px; font-size: 15px; color: var(--muted); }
.svc-for-line strong { color: var(--ink); font-weight: 600; }
.includes { background: #fff; border-radius: 18px; padding: 28px; overflow: hidden; box-shadow: 0 24px 48px -28px rgba(10,37,64,.35), 0 1px 3px rgba(10,37,64,.12); }
.includes h2 { font-size: 23px; }
.includes ul { margin-top: 14px; }
.includes li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 16px; color: var(--ink); }
.includes li:first-child { border-top: 0; }
.includes li svg { width: 20px; height: 20px; color: var(--blue); margin-top: 3px; }
.includes-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.includes-foot strong { color: var(--ink); }
.mini-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.mini-steps li h3 { font-size: 18px; margin-top: 14px; }
.mini-steps li p { margin-top: 6px; font-size: 16px; }
.mini-steps .step-num { width: 40px; height: 40px; font-size: 16px; }
.other-svcs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.other-svcs a { display: flex; align-items: center; gap: 14px; padding: 20px 16px 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.other-svcs a:hover { color: var(--blue); }
.other-svcs .svc-ico { width: 40px; height: 40px; border-radius: 10px; }
.other-svcs .svc-ico svg { width: 20px; height: 20px; }
@media (max-width: 960px) { .svc-hero-grid { grid-template-columns: 1fr; gap: 36px; } .other-svcs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .mini-steps { grid-template-columns: 1fr; gap: 24px; } .other-svcs { grid-template-columns: 1fr; } .includes { padding: 22px 18px; } .svc-hero { padding-bottom: 56px; } }

/* Hero sobre foto: colores claros (van al final para ganar a las reglas base) */
.hero .hero-lead { color: #dbe6f3; }
.hero h1 .hl { color: #8cc2ff; }
.hero .hero-call { color: #fff; }
.hero .hero-call svg { color: #8cc2ff; }
body.menu-open .header-actions .btn-cta { visibility: hidden; opacity: 0; }

/* ═══ Menú móvil ═══ */
.burger { position: relative; width: 20px; height: 14px; display: block; }
.burger span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .26s cubic-bezier(.22,1,.36,1), opacity .2s ease, top .26s cubic-bezier(.22,1,.36,1); }
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 12px; }
.menu-btn[aria-expanded="true"] .burger span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; transform: scaleX(.3); }
.menu-btn[aria-expanded="true"] .burger span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

@media (max-width: 1180px) {
  .mobile-nav {
    display: flex; flex-direction: column; justify-content: space-between;
    position: fixed; top: var(--header-h); left: 0; right: 0; height: calc(100dvh - var(--header-h)); z-index: 99;
    background: #fff; border-top: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
    visibility: hidden; clip-path: inset(0 0 100% 0);
    transition: clip-path .22s cubic-bezier(.4,0,1,1), visibility 0s linear .22s;
  }
  .mobile-nav.is-open {
    visibility: visible; clip-path: inset(0 0 0 0);
    transition: clip-path .34s cubic-bezier(.22,1,.36,1), visibility 0s;
  }
  .mn-list > *, .mn-foot > * { opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
  .mobile-nav.is-open .mn-list > *, .mobile-nav.is-open .mn-foot > * { opacity: 1; transform: none; transition: opacity .4s cubic-bezier(.22,1,.36,1), transform .4s cubic-bezier(.22,1,.36,1); }
  .mobile-nav.is-open .mn-list > :nth-child(1) { transition-delay: .12s; }
  .mobile-nav.is-open .mn-list > :nth-child(2) { transition-delay: .155s; }
  .mobile-nav.is-open .mn-list > :nth-child(3) { transition-delay: .19s; }
  .mobile-nav.is-open .mn-list > :nth-child(6) { transition-delay: .295s; }
  .mobile-nav.is-open .mn-list > :nth-child(4) { transition-delay: .225s; }
  .mobile-nav.is-open .mn-list > :nth-child(5) { transition-delay: .26s; }
  .mobile-nav.is-open .mn-foot > * { transition-delay: .3s; }

  .mn-link {
    display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 62px;
    padding: 0 6px; margin: 0; border: 0; border-bottom: 1px solid #edf1f5; background: transparent;
    font-family: var(--font-display); font-size: 25px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink);
    text-decoration: none; text-align: left; cursor: pointer; border-radius: 8px;
  }
  .mn-link:active { background: var(--bg-soft); }
  .mn-chev { width: 22px; height: 22px; color: var(--blue); flex: none; transition: transform .3s cubic-bezier(.22,1,.36,1); }
  #mnSvcBtn[aria-expanded="true"] .mn-chev { transform: rotate(180deg); }
  .mn-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.22,1,.36,1); }
  .mn-sub > div { overflow: hidden; }
  .svcs-open .mn-sub { grid-template-rows: 1fr; }
  .mn-sub a { display: block; padding: 11px 6px 11px 14px; font-size: 17px; color: var(--text); text-decoration: none; border-radius: 8px; }
  .mn-sub a:first-child { margin-top: 8px; }
  .mn-sub a:last-child { margin-bottom: 10px; color: var(--blue); font-weight: 600; }
  .mn-sub a:active { background: var(--bg-soft); }
  .mn-quiet { display: inline-block; margin-top: 18px; padding: 6px; font-size: 15px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
  .mn-foot { display: grid; gap: 12px; padding-top: 24px; }
  .mn-foot .btn { width: 100%; }
  .mn-tel { text-align: center; color: var(--ink); text-decoration: none; font-size: 16px; }
  .mn-tel strong { font-family: var(--font-display); }
  .mn-hours { text-align: center; font-size: 13px; color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-nav, .mobile-nav.is-open { clip-path: none !important; }
  .mn-list > *, .mn-foot > * { transform: none !important; }
}

/* Hero móvil: texto más arriba */
@media (max-width: 760px) {
  .hero-media { height: 380px; }
  .hero-media img { object-position: 50% 88%; }
  .hero-media::after { background: linear-gradient(0deg, rgba(10,37,64,1) 0%, rgba(10,37,64,.92) 30%, rgba(10,37,64,.7) 45%, rgba(10,37,64,.2) 66%, rgba(10,37,64,0) 80%); }
  .hero-grid { padding-top: 150px !important; gap: 32px; }
  .hero h1 { font-size: 34px; }
  .hero-lead { margin-top: 16px; font-size: 17px; }
  .hero-actions { margin-top: 20px; }
}
@media (max-width: 1180px) { .mn-link-sm { font-size: 19px; min-height: 54px; color: var(--text); } }

/* Combobox de comuna */
.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  max-height: 244px; overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 6px; list-style: none; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 32px -16px rgba(10,37,64,.3);
}
.combo-list li { padding: 10px 12px; border-radius: 8px; font-size: 16px; color: var(--text); cursor: pointer; }
.combo-list li strong { color: var(--ink); font-weight: 700; }
.combo-list li:hover, .combo-list li[aria-selected="true"] { background: var(--bg-soft); color: var(--ink); }
.combo-list li.is-free { color: var(--blue); font-weight: 600; }
@media (max-width: 1280px) { .header-tel { display: none !important; } }

/* Asistente en móvil: se abre desde la barra, como hoja a pantalla completa */
@media (max-width: 760px) {
  #chatBubble { display: none; }
  #chatWidget { position: static; }
  .chat-panel {
    display: flex; position: fixed; inset: 0; z-index: 120; width: 100%; height: 100dvh; max-height: none;
    border-radius: 0; border: 0; box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom);
    visibility: hidden; transform: translateY(100%);
    transition: transform .24s cubic-bezier(.4,0,1,1), visibility 0s linear .24s;
  }
  .chat-panel.is-open { visibility: visible; transform: none; transition: transform .32s cubic-bezier(.22,1,.36,1), visibility 0s; }
  .chat-header { padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; }
  .chat-header button { width: 44px; height: 44px; }
  .chat-form input { font-size: 16px; }
  body.chat-open .mobile-bar { visibility: hidden; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .chat-panel { transform: none; opacity: 0; transition: opacity .15s, visibility 0s linear .15s; }
  .chat-panel.is-open { opacity: 1; transition: opacity .15s, visibility 0s; }
}

/* ═══ Header translúcido que se adapta al fondo ═══ */
.site-header {
  position: fixed; left: 0; right: 0; top: 0;
  background: transparent; border-bottom: 0; isolation: isolate;
  transition: box-shadow .25s cubic-bezier(.22,1,.36,1);
}
/* El desenfoque va en una capa aparte para no romper el menú móvil (position: fixed dentro del header) */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(10, 37, 64, .62);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  transition: background-color .25s cubic-bezier(.22,1,.36,1);
}
.site-header.over-light::before { background: rgba(10, 37, 64, .92); }
.site-header.over-light { box-shadow: 0 6px 20px -12px rgba(10, 37, 64, .35); }
.site-header.menu-open::before { background: #0a2540; }
.main-nav a { color: rgba(255, 255, 255, .86); }
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.header-tel, .header-clientes { color: #fff; }
.header-tel svg, .header-clientes svg { color: #8cc2ff; }
.header-clientes:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.menu-btn { background: transparent; border-color: rgba(255, 255, 255, .32); color: #fff; }
.site-header :focus-visible { outline-color: #8cc2ff; }
@media (prefers-reduced-motion: reduce) { .site-header, .site-header::before { transition: none; } }

/* El contenido empieza debajo del header fijo */
.hero { padding-top: var(--header-h); }
.svc-hero { padding-top: calc(var(--header-h) + 24px); }
main:not(:has(> .hero:first-child, > .svc-hero:first-child)) { padding-top: var(--header-h); }
@media (max-width: 760px) {
  .hero-media { height: calc(380px + var(--header-h)); }
}

/* Evita saltos al bloquear el scroll (menú o chat abiertos): la barra de desplazamiento siempre reserva su espacio */
html { scrollbar-gutter: stable; }
.menu-btn { flex: none; width: 44px; height: 44px; padding: 0; position: relative; }
.burger { position: absolute; left: 50%; top: 50%; width: 20px; height: 14px; margin: -7px 0 0 -10px; }
.burger span { transform-origin: center; }
.header-tel svg, .header-clientes svg { flex: none; }
