/* ============================================================
   NegligenciasMédicas.info — v2 (mobile-first, sin frameworks)
   ============================================================ */
:root {
  --ink: #14232b;
  --ink-soft: #465c66;
  --brand: #0b5c75;
  --brand-deep: #083e51;
  --brand-tint: #e9f4f7;
  --cta: #b45309;
  --cta-hover: #92400e;
  --bg: #f8fafb;
  --card: #ffffff;
  --line: #dce6eb;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20,35,43,.05), 0 10px 30px rgba(20,35,43,.07);
  --maxw: 1140px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; height: auto; }
img { border-radius: 12px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--cta); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.prose { max-width: none; }
/* Bloques editoriales a todo el ancho del contenedor, con apoyo visual en escritorio. */
.feature-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.feature-split .prose { min-width: 0; }
.feature-media { margin: 0; min-width: 0; }
.feature-media img { display: block; width: 100%; height: 280px; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); }
.feature-media figcaption { margin-top: 10px; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }
@media (min-width: 900px) {
  .feature-split { grid-template-columns: minmax(0, 1.5fr) minmax(300px, .75fr); gap: 44px; }
  .feature-media img { height: 480px; min-height: 0; max-height: none; }
  .feature-split.authority { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr); }
}
.prose h2 { font-size: clamp(1.45rem, 3.5vw, 1.8rem); line-height: 1.25; margin: 2.6rem 0 .9rem; color: var(--brand-deep); letter-spacing: -.01em; }
.prose h3 { font-size: 1.22rem; margin: 1.8rem 0 .6rem; color: var(--brand-deep); }
.prose p, .prose li { font-size: 1.06rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .98rem; display: block; overflow-x: auto; border-radius: 12px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
.prose th { background: var(--brand-tint); color: var(--brand-deep); white-space: nowrap; }
.prose tr:nth-child(even) td { background: #f4f9fb; }
.prose blockquote { margin: 1.4rem 0; padding: 18px 22px; background: var(--brand-tint); border-radius: 12px; border-left: 4px solid var(--brand); }
.prose strong { color: var(--ink); }
.lead { font-size: 1.18rem; color: var(--ink-soft); line-height: 1.6; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.97);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: var(--brand-deep); letter-spacing: -.015em; }
.brand:hover { text-decoration: none; }
.nav-toggle {
  margin-left: auto; flex: 0 0 46px; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; display: grid; place-items: center; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--brand-deep); position: relative;
  transition: transform .18s ease, background-color .18s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
.main-nav { display: none; flex: 0 0 100%; width: 100%; flex-direction: column; gap: 2px; padding: 8px 0 16px; }
.main-nav.open { display: flex; }
.main-nav a { padding: 12px 14px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 1rem; min-height: 44px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--brand-tint); text-decoration: none; color: var(--brand-deep); }
.main-nav a.nav-cta { background: var(--cta); color: #fff; text-align: center; margin-top: 6px; }
.main-nav a.nav-cta:hover { background: var(--cta-hover); }
@media (min-width: 1180px) {
  .site-header .bar { flex-wrap: nowrap; }
  .nav-toggle { display: none; }
  .main-nav { display: flex; flex: 0 1 auto; width: auto; flex-direction: row; align-items: center; gap: 2px; padding: 0; margin-left: auto; }
  .main-nav a { padding: 9px 9px; font-size: .92rem; white-space: nowrap; }
  .main-nav a.nav-cta { margin: 0 0 0 8px; padding: 10px 14px; }
}

/* ---------- Hero home ---------- */
.hero { position: relative; color: #fff; padding: 56px 0 48px; overflow: hidden; background: var(--brand-deep); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(8,62,81,.97) 30%, rgba(8,62,81,.72) 65%, rgba(8,62,81,.45));
  z-index: 1;
}
.hero .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(1.85rem, 5.6vw, 2.9rem); line-height: 1.14; margin: 0 0 16px; letter-spacing: -.025em; max-width: 21ch; }
.hero p { font-size: 1.13rem; color: #dceef3; max-width: 56ch; margin: 0 0 24px; }
.hero .kicker { display: inline-block; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #a5d8e4; margin-bottom: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; font-size: .95rem; color: #c8e6ee; }
.hero .trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero .trust svg { color: #7fd1a2; flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 13px 24px; border-radius: 12px;
  font-weight: 700; font-size: 1.02rem; border: 0; cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-cta { background: var(--cta); color: #fff; }
.btn-cta:hover { background: var(--cta-hover); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-deep); }

/* ---------- Secciones ---------- */
main { flex: 1; }
.section { padding: 52px 0; }
.section-tint { background: var(--brand-tint); }
.section h2.title { font-size: clamp(1.5rem, 3.8vw, 2.05rem); color: var(--brand-deep); margin: 0 0 10px; letter-spacing: -.02em; }
.section .sub { color: var(--ink-soft); margin: 0 0 30px; max-width: 68ch; font-size: 1.05rem; }

.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
}
a.card:hover { text-decoration: none; border-color: var(--brand); }
.card h3 { margin: 0; font-size: 1.15rem; color: var(--brand-deep); line-height: 1.3; }
.card p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.card a.more { margin-top: auto; font-weight: 700; font-size: .98rem; }
.card .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-tint); display: grid; place-items: center; color: var(--brand); }
.card-img { width: calc(100% + 48px); margin: -24px -24px 8px; height: 170px; object-fit: cover; border-radius: 15px 15px 0 0; }

/* ---------- Biblioteca de modelos imprimibles ---------- */
.model-group { margin: 30px 0; }
.model-group > h3 { margin: 0 0 16px; color: var(--brand-deep); font-size: 1.3rem; }
.model-grid { align-items: stretch; }
.model-card { scroll-margin-top: 100px; }
.model-card .tag { align-self: flex-start; }
.model-actions { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-top: auto; }
.model-card .model-actions .more { margin-top: 0; font-weight: 700; font-size: .98rem; }
.model-card .download-link, .model-card .print-link { display: inline-flex; align-items: center; min-height: 44px; }
.model-card .print-link { cursor: pointer; }
@media (max-width: 639px) { .model-card { padding: 20px; } }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: #fff; border-radius: var(--radius); padding: 34px 24px; text-align: center;
  margin: 44px 0 0;
}
.cta-band h2 { margin: 0 0 10px; font-size: 1.5rem; color: #fff; }
.cta-band p { margin: 0 auto 20px; max-width: 54ch; color: #d6ecf2; font-size: 1.04rem; }

/* ---------- Aval / revisor (E-E-A-T) ---------- */
.reviewer {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 32px 0 0; box-shadow: var(--shadow);
}
.reviewer .avatar {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 1.15rem; letter-spacing: .02em;
}
.reviewer p { margin: 4px 0 0; font-size: .96rem; color: var(--ink-soft); }
.reviewer b { color: var(--brand-deep); }
.reviewer .role { font-size: .85rem; font-weight: 700; color: var(--cta); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- FAQ ---------- */
details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
details.faq summary {
  cursor: pointer; list-style: none; padding: 18px 20px; font-weight: 700; color: var(--brand-deep);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; font-size: 1.04rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); flex: none; }
details.faq[open] summary::after { content: "–"; }
details.faq[open] { border-color: var(--brand); }
details.faq .faq-body { padding: 0 20px 18px; color: var(--ink-soft); font-size: 1.02rem; }
.faq-group { margin-bottom: 36px; }
.faq-group > h2 { margin-top: 0; }
.faq-group .group-intro { color: var(--ink-soft); margin-top: -6px; }

/* ---------- Migas / hero interior ---------- */
.crumbs { font-size: .88rem; color: var(--ink-soft); padding: 14px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li::after { content: "›"; margin-left: 6px; color: #9db2ba; }
.crumbs li:last-child::after { content: ""; }
.page-hero { background: linear-gradient(140deg, var(--brand-deep), #0d6b85); color: #fff; padding: 36px 0 34px; }
.page-hero h1 { font-size: clamp(1.65rem, 4.8vw, 2.3rem); line-height: 1.18; margin: 10px 0 12px; letter-spacing: -.02em; max-width: 27ch; }
.page-hero p { color: #d6ecf2; margin: 0; max-width: 64ch; font-size: 1.08rem; }
.page-hero .crumbs, .page-hero .crumbs a { color: #a9d3de; }
.page-hero .crumbs li::after { color: #7fb6c4; }
.page-hero-img { display: block; width: 100%; height: 200px; object-fit: cover; margin: 22px 0 0; }
@media (min-width: 900px) {
  .page-hero .wrap.with-img { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
  .page-hero-img { height: 260px; margin: 0; }
}

/* ---------- Datos ---------- */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat b { display: block; font-size: 1.8rem; color: var(--brand); letter-spacing: -.02em; }
.stat span { font-size: .92rem; color: var(--ink-soft); }
.notice { background: #fff8ec; border: 1px solid #f2dfb8; border-radius: 12px; padding: 16px 18px; font-size: 1rem; color: #6b4a12; margin: 20px 0; }
.tag { display: inline-block; background: var(--brand-tint); color: var(--brand-deep); font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }

/* ---------- Formulario ---------- */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; color: var(--brand-deep); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1.02rem; color: var(--ink);
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  min-height: 50px;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(11,92,117,.25); border-color: var(--brand); }
.field-hint { font-size: .88rem; color: var(--ink-soft); margin-top: 5px; }
.document-upload input[type="file"] { padding: 11px; border-style: dashed; background: var(--brand-tint); }
.document-upload input[type="file"]::file-selector-button { margin-right: 12px; padding: 10px 14px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.document-list { margin: 8px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: .92rem; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--ink-soft); }
.consent input { width: 22px; height: 22px; min-height: 0; margin-top: 3px; flex: none; }
.form-status { margin-top: 14px; font-size: 1rem; border-radius: 10px; padding: 14px 16px; display: none; }
.form-status.ok { display: block; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.form-status.err { display: block; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.recaptcha-field { min-height: 76px; }
.recaptcha-field .grecaptcha-badge { position: static !important; box-shadow: none !important; border: 1px solid var(--line); }
.hp-field { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Calculadora ---------- */
.calc-result { background: var(--brand-deep); color: #fff; border-radius: var(--radius); padding: 24px; margin-top: 20px; display: none; }
.calc-result.show { display: block; }
.calc-result .range { font-size: clamp(1.6rem, 5vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; margin: 6px 0 2px; }
.calc-result small { color: #bcdfe9; }
.calc-result ul { margin: 14px 0 0; padding-left: 18px; color: #d6ecf2; font-size: .96rem; }
.range-field output { font-weight: 800; color: var(--brand); }

/* ---------- Chatbot ---------- */
.chat-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  min-height: 58px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1rem;
  box-shadow: 0 8px 24px rgba(7,68,87,.42);
  transition: transform .18s ease, background .18s ease;
}
.chat-fab:hover { transform: scale(1.04); background: var(--brand-deep); }
.chat-panel {
  position: fixed; z-index: 61; right: 0; bottom: 0; left: 0; top: 0;
  background: var(--bg); display: none; flex-direction: column;
}
.chat-panel.open { display: flex; }
@media (min-width: 640px) {
  .chat-panel {
    left: auto; top: auto; right: 22px; bottom: 96px;
    width: 420px; max-width: calc(100vw - 40px); height: min(660px, calc(100dvh - 130px));
    border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(20,35,43,.3);
    overflow: hidden;
  }
}
.chat-head { background: var(--brand-deep); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; flex: none; }
.chat-head b { font-size: 1rem; }
.chat-head small { display: block; color: #a9d3de; font-size: .78rem; }
.chat-head .expand {
  margin-left: auto; background: rgba(255,255,255,.12); border: 0; color: #fff;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: grid; place-items: center;
}
.chat-head .expand:hover { background: rgba(255,255,255,.24); }
.chat-close { background: none; border: 0; color: #fff; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 1.3rem; flex: none; }
.chat-close:hover { background: rgba(255,255,255,.14); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 88%; padding: 13px 16px; border-radius: 14px; font-size: .98rem; line-height: 1.6; white-space: pre-wrap; }
.chat-msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.bot a { font-weight: 700; text-decoration: underline; }
.chat-msg.typing { color: var(--ink-soft); font-style: italic; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; flex: none; }
.chat-chips button, .chat-chips a {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  border: 1px solid var(--brand); color: var(--brand); background: #fff; border-radius: 999px;
  padding: 9px 15px; font-size: .88rem; font-weight: 700; cursor: pointer; min-height: 44px;
}
.chat-chips button:hover, .chat-chips a:hover { background: var(--brand-tint); }
.chat-chips .chip-cta { background: var(--cta); border-color: var(--cta); color: #fff; }
.chat-chips .chip-cta:hover { background: #a95027; }
.chat-chips .chip-whatsapp { background: #176b52; border-color: #176b52; color: #fff; }
.chat-chips .chip-whatsapp:hover { background: #105440; }
.chat-chips .chip-call { background: var(--brand); border-color: var(--brand); color: #fff; }
.chat-chips .chip-call:hover { background: var(--brand-deep); }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; flex: none; }
.chat-form input { flex: 1; min-height: 48px; }
.chat-form button { min-width: 54px; min-height: 48px; border-radius: 10px; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-form button:hover { background: var(--brand-deep); }
.chat-note { font-size: .78rem; color: var(--ink-soft); padding: 6px 16px 12px; background: #fff; flex: none; }
.chat-reset { background: none; border: 0; color: #a9d3de; font-size: .75rem; cursor: pointer; text-decoration: underline; padding: 0 4px; }
.chat-reset:hover { color: #fff; }

/* Página completa del asistente: la conversación crece con el documento, sin scroll interno. */
.assistant-trust {
  display: block; margin: 14px 0 0; color: #c8e6ee; font-size: .82rem;
  font-weight: 700; line-height: 1.4; text-transform: uppercase; letter-spacing: .07em;
}
.chat-page .chat-panel {
  position: static; display: flex; height: auto; min-height: 0;
  border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: hidden; background: var(--bg); width: 100%; max-width: none; margin: 0;
}
.chat-page .chat-log { flex: none; min-height: 160px; overflow-y: visible; }

/* ---------- Footer ---------- */
.site-footer { background: #10222a; color: #b9cdd4; margin-top: 56px; }
.site-footer .cols { display: grid; align-items: start; gap: 28px; grid-template-columns: 1fr; padding: 44px 18px 28px; }
.site-footer .cols > * { min-width: 0; }
@media (min-width: 760px) { .site-footer .cols { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); } }
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.site-footer h3 .footer-home { color: #fff; font-size: inherit; }
.site-footer h3 .footer-home:hover { color: #7fd1e2; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #b9cdd4; font-size: .96rem; }
.site-footer a:hover { color: #fff; }
.site-footer .legal { border-top: 1px solid #25404b; padding: 20px 18px 30px; font-size: .84rem; color: #8aa3ad; display: grid; gap: 8px; }
@media (min-width: 900px) { .grid.contact-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.site-footer .pro { color: #dceef3; font-size: .96rem; }
.site-footer .pro a { color: #7fd1e2; font-weight: 700; }

/* ---------- Utilidades ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--brand-deep); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Interlinking editorial con miniaturas de las guías de destino. */
.related-guides { margin: 42px 0; padding-top: 28px; border-top: 1px solid var(--line); }
.related-guides h2 { margin: 0 0 18px; }
.related-guides ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.related-guides li { margin: 0; min-width: 0; }
.related-guides .related-card { display: grid; grid-template-columns: 124px minmax(0, 1fr); align-items: stretch; min-height: 116px; height: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--brand-deep); font-weight: 700; text-decoration: none; }
.related-guides .related-thumb { display: block; width: 124px; height: 100%; min-height: 116px; object-fit: cover; background: var(--brand-tint); }
.related-guides .related-label { display: flex; align-items: center; gap: 12px; padding: 16px 18px; line-height: 1.45; }
.related-guides .related-label::after { content: "→"; margin-left: auto; padding-left: 4px; color: var(--cta); flex: none; }
.related-guides .related-card:hover { border-color: var(--brand); background: var(--brand-tint); }
@media (min-width: 800px) {
  .related-guides ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related-guides .related-card { display: flex; flex-direction: column; min-height: 0; }
  .related-guides .related-thumb { width: 100%; height: auto; min-height: 0; aspect-ratio: 3 / 2; }
  .related-guides .related-label { flex: 1; width: 100%; }
}

/* Los enlaces dentro de texto se distinguen también sin depender del color. */
.prose p a, .prose blockquote a, .prose > ul > li > a, .prose > ol > li > a,
.faq-body a, .reviewer p a, .site-footer p a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ============================================================
   v5 — identidad editorial, fotografía y E-E-A-T
   ============================================================ */
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: optional;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 700;
  font-display: optional;
}
:root {
  --teal-950: oklch(29% .055 215);
  --teal-700: oklch(43% .075 215);
  --teal-100: oklch(95% .025 210);
  --clay-700: oklch(51% .13 48);
  --clay-800: oklch(44% .12 45);
  --paper: oklch(98.5% .006 210);
  --surface: oklch(99.5% .003 210);
  --brand: var(--teal-700);
  --brand-deep: var(--teal-950);
  --brand-tint: var(--teal-100);
  --cta: var(--clay-700);
  --cta-hover: var(--clay-800);
  --bg: var(--paper);
  --card: var(--surface);
}
body { font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif; line-height: 1.68; }
h1, h2 { font-family: "Source Serif 4", Georgia, serif; }
.brand { flex: none; }
.brand-logo { display: block; width: 178px; height: auto; border-radius: 0; }
.site-header .bar { padding: 10px 18px; }

/* Todas las cabeceras interiores tienen fondo y destacada con el mismo recurso. */
.page-hero { position: relative; overflow: hidden; isolation: isolate; background: var(--brand-deep); padding: 32px 0; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(5,45,60,.97) 12%, rgba(5,45,60,.88) 55%, rgba(5,45,60,.58));
}
.page-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; z-index: 0; }
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { font-weight: 600; }
.page-hero-img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  margin: 24px 0 0; border-radius: 14px; border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 18px 44px rgba(0,0,0,.22); background: var(--brand-deep);
}

/* Todas las páginas usan exactamente el ancho de contenido de la home. */
.section > .wrap.prose { max-width: var(--maxw); }
.prose h2, .section h2.title { font-weight: 600; }
.reviewer { flex-wrap: wrap; }
.reviewer-copy { flex: 1 1 240px; min-width: 0; }
.reviewer .avatar {
  width: 72px; height: 72px; padding: 0; object-fit: cover; object-position: center 20%;
  border: 3px solid var(--brand-tint); background: var(--brand-tint);
}
.reviewer-signature {
  display: block; flex: none; width: 155px; height: auto;
  margin: 10px auto 0; border-radius: 0; align-self: center;
}
.authority-portrait { object-position: center 18%; }
.authority .feature-media img { max-height: 540px; }

.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.direct-contact-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 14px; }
.contact-action {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  min-width: 0; min-height: 72px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--brand-tint); color: var(--brand-deep); font: 700 .9rem/1.2 "Source Sans 3", sans-serif;
  text-align: center; cursor: pointer; text-decoration: none;
}
.contact-action:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(.97); }
.contact-action svg { flex: none; width: 20px; height: 20px; }
.contact-whatsapp { background: #edf8f2; color: #176b52; border-color: #cde8db; }
.contact-email { background: #f8f4ef; color: var(--cta); border-color: #eadfd2; }
.contact-privacy-note { margin: 8px 0 0; font-size: .82rem; color: var(--ink-soft); }
.chat-chips[hidden] { display: none; }

@media (min-width: 900px) {
  .brand-logo { width: 210px; }
  .page-hero { padding: 42px 0; }
  .page-hero .wrap.with-img { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr); gap: 44px; }
  .page-hero-img { height: 270px; margin: 0; }
  .page-hero::before { background: linear-gradient(100deg, rgba(5,45,60,.97) 18%, rgba(5,45,60,.86) 60%, rgba(5,45,60,.5)); }
  .reviewer-signature { width: 174px; margin: 0 0 0 auto; }
}
@media (max-width: 420px) {
  .brand-logo { width: 168px; }
  .site-header .bar { padding-left: 14px; padding-right: 14px; gap: 8px; }
  .page-hero { padding: 24px 0 28px; }
  .reviewer { gap: 12px; padding: 16px; }
  .reviewer .avatar { width: 58px; height: 58px; }
}


/* ============================================================
   v18 — Centro Documental: consulta sobria, filtros y fuentes
   ============================================================ */
.doc-prose { width: 100%; max-width: var(--maxw); }
.doc-intro-grid { display: grid; gap: 24px; margin-bottom: 30px; }
.doc-intro-grid section { min-width: 0; }
.doc-intro-grid h2 { margin-top: 0; }
.doc-intro-grid p { margin-bottom: 0; }
.doc-collections { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 28px 0; }
.doc-collections a { display: flex; flex-direction: column; justify-content: center; min-height: 118px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--brand-deep); }
.doc-collections a:hover { border-color: var(--brand); background: var(--brand-tint); }
.doc-collections strong { font-family: "Source Serif 4", Georgia, serif; font-size: 1.22rem; color: var(--brand-deep); }
.doc-collections span { margin-top: 5px; color: var(--ink-soft); font-size: .96rem; }
.doc-group { margin-top: 44px; }
.doc-group > h2 { margin-bottom: 20px; }
.doc-search { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: end; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #eef5f7; }
.doc-search label { display: grid; gap: 6px; min-width: 0; color: var(--brand-deep); font-size: .92rem; font-weight: 700; }
.doc-search input, .doc-search select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid #b9cbd2; border-radius: 9px; background: #fff; color: var(--ink); font: 400 1rem "Source Sans 3", sans-serif; }
.doc-search input:focus, .doc-search select:focus { outline: 3px solid rgba(11,92,117,.22); border-color: var(--brand); }
.doc-reset { min-height: 48px; padding: 10px 16px; border: 1px solid var(--brand); border-radius: 9px; background: transparent; color: var(--brand-deep); font: 700 .96rem "Source Sans 3", sans-serif; cursor: pointer; }
.doc-reset:hover { background: #fff; }
.doc-count { margin: 12px 0 20px; color: var(--ink-soft); font-size: .94rem !important; }
.doc-noscript { padding: 12px 16px; background: var(--brand-tint); border-radius: 10px; }
.doc-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.doc-card { display: flex; flex-direction: column; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 5px 18px rgba(15,43,53,.035); }
.doc-card[hidden], .doc-empty[hidden] { display: none !important; }
.doc-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 15px; }
.doc-type { color: var(--brand); font-size: .77rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.doc-review { color: var(--ink-soft); font-size: .78rem; }
.doc-card h3 { margin: 0 0 10px; font-size: 1.19rem; line-height: 1.35; }
.doc-card h3 a { color: var(--brand-deep); text-decoration: none; }
.doc-card h3 a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.doc-card > p { margin: 0 0 16px; color: var(--ink-soft); font-size: 1rem; }
.doc-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 !important; margin: auto 0 18px; list-style: none; }
.doc-tags li { margin: 0; padding: 4px 8px; border-radius: 6px; background: var(--brand-tint); color: var(--brand-deep); font-size: .79rem !important; line-height: 1.35; }
.doc-card-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.doc-card-links a { font-size: .92rem; font-weight: 700; }
.doc-open { color: var(--brand-deep); }
.doc-open span { color: var(--cta); }
.external-mark { font-size: .85em; }
.doc-empty { padding: 22px; border: 1px dashed var(--line); border-radius: 12px; background: var(--card); }
.doc-method { margin: 38px 0; }
.doc-method h2 { margin-top: 0; }
.doc-summary { padding: 24px; border-left: 4px solid var(--brand); border-radius: 0 14px 14px 0; background: var(--brand-tint); }
.doc-summary h2 { margin-top: 0; }
.doc-summary p { margin: 0; font-size: 1.12rem !important; }
.doc-facts { margin: 30px 0 40px; }
.doc-facts dl { display: grid; grid-template-columns: 1fr; margin: 18px 0 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.doc-facts dl > div { display: grid; gap: 3px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.doc-facts dl > div:last-child { border-bottom: 0; }
.doc-facts dt { color: var(--ink-soft); font-size: .86rem; font-weight: 700; }
.doc-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.doc-chapter { margin: 36px 0; }
.doc-chapter h2 { margin-top: 0; }
.doc-source { margin-top: 42px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.doc-source h2 { margin-top: 0; }
.doc-source-link { display: inline-flex; margin: 4px 0 10px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.documental-cta { margin: 42px 0 28px; padding: 26px; border-radius: 14px; background: var(--brand-deep); color: #fff; }
.documental-cta h2 { margin: 0 0 8px; color: #fff; }
.documental-cta p { margin: 0 0 18px; color: #dceef3; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.doc-secondary { background: #fff; color: var(--brand-deep); border: 1px solid #fff; }
.documental-cta .btn { min-height: 48px; }
.doc-hero .crumbs { padding-top: 0; }

@media (min-width: 620px) {
  .doc-collections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-facts dl > div { border-right: 1px solid var(--line); }
  .doc-facts dl > div:nth-child(2n) { border-right: 0; }
}
@media (min-width: 900px) {
  .doc-intro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 54px; }
  .doc-collections { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .doc-search { grid-template-columns: minmax(0, 1.6fr) minmax(180px, .8fr) minmax(180px, .8fr) auto; }
  .doc-group:not(.doc-group-all) .doc-search { grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr) auto; }
  .doc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .doc-facts dl > div { grid-template-columns: minmax(130px, .65fr) minmax(0, 1.35fr); gap: 16px; }
}
@media (max-width: 480px) {
  .doc-search, .doc-card, .doc-source, .doc-summary, .documental-cta { padding: 18px; }
  .doc-actions { display: grid; }
  .doc-actions .btn { width: 100%; }
  .doc-card-links { align-items: flex-start; flex-direction: column; }
}

/* ---------- v19 · identidad visual del footer ---------- */
.site-footer .footer-logo,
.site-footer .footer-pro-logo { display: block; width: min(230px, 100%); }
.site-footer .footer-logo { margin: 0 0 12px; }
.site-footer .footer-pro-logo { margin: 24px 0 10px; }
.site-footer .footer-logo img,
.site-footer .footer-pro-logo img { display: block; width: 100%; height: auto; }
.site-footer .footer-pro-logo { opacity: .94; }
.site-footer .footer-pro-logo:hover { opacity: 1; }
@media (max-width: 759px) {
  .site-footer .footer-logo { width: 210px; }
  .site-footer .footer-pro-logo { width: 220px; margin-top: 22px; }
}

/* Los enlaces dentro de subtítulos se distinguen también por subrayado. */
.section .sub a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Glosario de negligencias médicas ---------- */
.glossary-index { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 0 0 44px; }
.glossary-index h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.glossary-index > p { margin: 0 0 18px; color: var(--ink-soft); }
.glossary-index ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.glossary-index li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.glossary-index a { color: var(--brand-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.glossary-index span { color: var(--ink-soft); font-size: .94rem; white-space: nowrap; }
.glossary-group { margin: 0 0 48px; scroll-margin-top: 90px; }
.glossary-group > h2 { margin: 0 0 18px; font-size: clamp(1.45rem, 3.4vw, 2rem); color: var(--brand-deep); }
.glossary-group dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; }
.glossary-term { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.glossary-term dt { scroll-margin-top: 100px; color: var(--brand-deep); font-size: 1.13rem; font-weight: 700; line-height: 1.35; }
.glossary-term dd { margin: 8px 0 0; color: var(--ink-soft); }
.glossary-term .term-definition { margin: 0; font-size: 1rem; line-height: 1.62; }
.glossary-term .term-link { display: inline-block; margin-top: 10px; color: var(--brand); font-weight: 700; font-size: .97rem; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 760px) {
  .glossary-index ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; }
  .glossary-group dl { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .glossary-term { padding: 22px; }
}
