/* ============================================================
   Biomédicos de Mérida
   Todo sale del logotipo: tinta negra del nombre, la raya morada
   que lo subraya y las cintas planas (magenta, azul, morado, índigo).
   Colores planos, sin degradados. Titulares en Archivo, texto en
   IBM Plex Sans.
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,100..900&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  /* Colores del logotipo. Los nombres --teal* vienen de la versión anterior:
     hoy --teal es el morado, --teal-mid el azul y --teal-deep el índigo. */
  --ink: #232323;
  --paper: #ffffff;
  --paper-dim: #f5f2f9;
  --line: #dedae6;
  --gray: #5b5964;
  --logo-magenta: #98477e;
  --logo-blue: #1f9ad9;
  --logo-purple: #5b2d8e;
  --logo-indigo: #2e3480;
  --teal: var(--logo-purple);
  --teal-mid: #1a86c2;
  --teal-deep: var(--logo-indigo);
  --teal-tint: #f1ecf8;
  --amber: var(--logo-blue);
  --green-wa: #128c4a;
  /* Difuminados entre colores vecinos del logo */
  --blend-warm: linear-gradient(100deg, #98477e 0%, #6f3a94 100%);
  --blend-cool: linear-gradient(100deg, #1f9ad9 0%, #3b62b8 100%);
  --blend-deep: linear-gradient(100deg, #5b2d8e 0%, #2e3480 100%);
  --blend-full: linear-gradient(100deg, #2e3480 0%, #5b2d8e 48%, #98477e 100%);

  /* Nombres anteriores, apuntando a la paleta nueva */
  --brand-purple: var(--teal);
  --purple-deep: var(--teal-deep);
  --brand-indigo: var(--teal-deep);
  --brand-blue: var(--teal-mid);
  --brand-magenta: var(--teal);
  --accent: var(--teal);
  --accent-tint: var(--teal-tint);
  --navy: var(--ink);
  --navy-dark: var(--teal-deep);
  --navy-deep: var(--teal-deep);
  --purple: var(--teal);
  --purple-dark: var(--ink);
  --purple-light: var(--paper-dim);
  --blue: var(--teal);
  --blue-dark: var(--teal);
  --magenta: var(--teal);
  --teal-dark: var(--teal);
  --teal-soft: var(--teal-tint);
  --sky: var(--paper-dim);
  --gray-light: var(--paper-dim);
  --bg-alt: var(--paper-dim);

  --radius: 6px;
  /* Sombras en dos capas, teñidas del verde azulado para que no se vean grises */
  --shadow-1: 0 1px 2px rgba(46, 38, 110, 0.08), 0 6px 18px rgba(46, 38, 110, 0.08);
  --shadow-2: 0 2px 6px rgba(46, 38, 110, 0.10), 0 22px 48px rgba(46, 38, 110, 0.16);
  --shadow: var(--shadow-2);
  --maxw: 1180px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --font-head: "Archivo", "Segoe UI", system-ui, sans-serif;
  --font-mono: var(--font);
}

::selection { background: var(--teal); color: #fff; }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-stretch: 88%;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.12;
  text-wrap: balance;
}
p { text-wrap: pretty; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--brand-purple); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 2px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--paper-dim); color: var(--ink); font-size: 0.82rem; }
.topbar .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px; padding-top: 5px; padding-bottom: 5px;
}
.topbar .container, .site-header .container { max-width: 1380px; }
.topbar a { color: var(--ink); font-weight: 500; }
.topbar a:hover { color: var(--brand-purple); }
.topbar .tb-group { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar .icon { display: none; }

/* ---------- Encabezado / navegación ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--paper);
  border-bottom: 3px solid var(--brand-purple);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 6px; padding-bottom: 6px; gap: 16px;
}
.brand img { height: 50px; width: auto; }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.main-nav a {
  font-family: var(--font-head); font-stretch: 90%;
  display: block; padding: 8px 10px;
  color: var(--ink); font-weight: 600; font-size: 0.94rem;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--brand-purple); text-decoration: none; }
.main-nav a.active { box-shadow: inset 0 -3px 0 var(--brand-blue); }
/* Resultados es lo que más busca un paciente: va como botón */
.main-nav a[href="resultados.html"] {
  background: var(--brand-purple); color: #fff; border-radius: var(--radius);
  padding: 8px 14px; margin: 0 6px; box-shadow: none;
}
.main-nav a[href="resultados.html"]:hover { background: var(--purple-deep); color: #fff; }

.nav-toggle {
  display: none; background: var(--paper); border: 2px solid var(--ink);
  border-radius: var(--radius); color: var(--ink);
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  padding: 7px 14px; cursor: pointer;
}

/* ---------- Portada ---------- */
/* La foto del equipo es la cinta central del logotipo: mismo corte
   inclinado, entre la cinta magenta y la azul. */
.hero { padding: 28px 0 0; overflow: hidden; }
.hero .hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight: 900; font-stretch: 76%; line-height: 0.98;
  letter-spacing: -0.01em;
}
.hero-text p { color: var(--gray); margin-top: 16px; max-width: 31em; }
.hero-art { display: block; width: 100%; height: auto; overflow: visible; }

/* Accesos del paciente: tres cintas apiladas, como en el logo */
.tasks { display: grid; gap: 6px; margin-top: 26px; max-width: 31em; }
.task {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 13px 34px; color: #fff; background: var(--teal-mid);
  clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  transition: transform 0.15s ease-out;
}
.task strong {
  font-family: var(--font-head); font-stretch: 82%;
  font-size: 1.3rem; font-weight: 800; line-height: 1.15;
}
.task span { font-size: 0.9rem; white-space: nowrap; }
.task:hover { color: #fff; text-decoration: none; transform: translateX(10px); }
@media (prefers-reduced-motion: reduce) { .task { transition: none; } .task:hover { transform: none; } }

/* ---------- Encabezado de páginas interiores ---------- */
.page-hero { padding: 40px 0 36px; border-bottom: 1px solid var(--line); }
.page-hero h1 {
  display: inline-block;
  font-size: clamp(2.2rem, 4.2vw, 3.2rem); font-weight: 900; font-stretch: 76%; line-height: 1;
  padding-bottom: 12px; border-bottom: 5px solid var(--brand-purple);
}
.page-hero p { max-width: 42em; color: var(--gray); margin-top: 18px; font-size: 1.1rem; }

/* ---------- Botones ---------- */
.btn {
  font-family: var(--font-head); font-stretch: 94%;
  display: inline-block; padding: 13px 24px; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; line-height: 1.2; cursor: pointer;
  border: 2px solid transparent; text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary, .btn-teal, .btn-purple { background: var(--brand-purple); color: #fff !important; }
.btn-primary:hover, .btn-teal:hover, .btn-purple:hover { background: var(--purple-deep); }
.btn-outline { background: transparent; color: var(--brand-purple) !important; border-color: var(--brand-purple); }
.btn-outline:hover { background: var(--brand-purple); color: #fff !important; }
.btn-wa { background: var(--green-wa); color: #fff !important; }
.btn-wa:hover { background: #0d6e3a; }
.btn:active { transform: translateY(1px); }

/* ---------- Secciones ---------- */
.section { padding: 60px 0; }
.section.alt { background: var(--paper-dim); }
.section-head { max-width: 46em; margin: 0 0 36px; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 900; font-stretch: 78%; line-height: 1; }
.section-head p { color: var(--gray); margin-top: 12px; }
/* Rótulo corto sobre un título: en frase, sin mayúsculas ni espaciado */
.eyebrow {
  font-family: var(--font-head) !important;
  color: var(--brand-magenta) !important; font-weight: 700 !important;
  text-transform: none !important; letter-spacing: 0 !important;
  font-size: 1rem !important; margin-bottom: 6px;
}

/* ---------- Cifras ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; }
.stat { padding: 18px 0 0; border-top: 3px solid var(--ink); }
.stat .num {
  font-family: var(--font-head); font-stretch: 88%;
  font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--ink);
}
.stat .lbl { color: var(--gray); font-size: 0.98rem; margin-top: 8px; max-width: 16em; }

/* ---------- Portada: bloque de calidad (lista con miniatura) ---------- */
.lead-split { display: grid; grid-template-columns: 4fr 7fr; gap: 56px; align-items: start; }
.lead-text p { color: var(--gray); margin-top: 14px; max-width: 26em; }
.lead-text a { font-weight: 600; }
@media (min-width: 993px) { .lead-text { position: sticky; top: 104px; } }
.rows { list-style: none; }
.rows li {
  display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: start;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows img { width: 150px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.rows h3 { font-size: 1.2rem; margin-bottom: 6px; }
.rows p { color: var(--gray); font-size: 0.98rem; }
.rows a { font-weight: 600; display: inline-block; margin-top: 8px; }

/* ---------- Portada: especialidades como lista tipográfica ---------- */
.spec-list { list-style: none; columns: 2; column-gap: 40px; border-top: 3px solid var(--ink); }
.spec-list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.spec-list a {
  display: block; padding: 12px 0;
  font-family: var(--font-head); font-stretch: 84%;
  font-size: 1.35rem; font-weight: 700; color: var(--ink);
}
.spec-list a:hover { color: var(--brand-purple); text-decoration: none; padding-left: 8px; }

/* ---------- Portada: columnas sin caja ---------- */
.plain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.plain-item img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 16px;
}
.plain-item.square img { aspect-ratio: 1 / 1; }
.plain-item h3 { font-size: 1.1rem; margin-bottom: 6px; }
.plain-item h3 a { color: var(--ink); }
.plain-item h3 a:hover { color: var(--brand-purple); }
.plain-item p { color: var(--gray); font-size: 0.94rem; }
.plain-item > a { font-weight: 600; display: inline-block; margin-top: 10px; }

/* ---------- Portada: franja de sucursales con las cintas del logo ---------- */
.branches-band { background: var(--brand-blue); color: var(--ink); }
.branches-band .container {
  display: grid; grid-template-columns: 7fr 4fr; gap: 48px; align-items: end;
  padding-top: 64px; padding-bottom: 64px;
}
.branches-band h2 {
  font-size: clamp(2.4rem, 5.4vw, 4.6rem); font-weight: 900; font-stretch: 76%; line-height: 0.95;
}
.branches-band p { margin-bottom: 22px; font-size: 1.1rem; }
.branches-band .btn { background: var(--ink); color: #fff !important; }
.branches-band .btn:hover { background: var(--brand-indigo); }

/* ---------- Portada: cierre con datos de contacto ---------- */
.contact-list { list-style: none; }
.contact-list li {
  display: grid; grid-template-columns: 9em 1fr; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list b { font-family: var(--font-head); font-weight: 700; }

/* ---------- Tarjetas (páginas interiores) ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.card img.card-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card .card-img-placeholder {
  width: 100%; aspect-ratio: 3 / 2;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-dim);
}
.card .card-img-placeholder span { font-weight: 600; color: var(--gray); }
.card .card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--gray); font-size: 0.98rem; flex: 1; }
.card-link { font-weight: 600; }

/* Etiquetas */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  padding: 8px 14px; border-radius: var(--radius); font-weight: 500; font-size: 0.98rem;
}
a.chip:hover, .chip[role="button"]:hover { border-color: var(--brand-purple); color: var(--brand-purple); text-decoration: none; }
.chip.chip-soft { background: var(--paper-dim); border-color: transparent; }

/* ---------- Franja de llamada (páginas interiores) ---------- */
.cta-strip { background: var(--brand-indigo); color: #fff; padding: 56px 0; }
.cta-strip h2 { color: #fff; margin-bottom: 10px; }
.cta-strip p { color: rgba(255, 255, 255, 0.9); margin-bottom: 24px; max-width: 40em; }
.cta-strip .btn-primary, .cta-strip .btn-outline {
  background: #fff; color: var(--brand-indigo) !important; border-color: #fff;
}
.cta-strip .btn-primary:hover, .cta-strip .btn-outline:hover { background: var(--accent-tint); }

/* ---------- Sucursales ---------- */
.branch-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.branch-filters button {
  font-family: var(--font-head); font-size: 0.98rem; font-weight: 600;
  padding: 9px 18px; border-radius: var(--radius); border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.branch-filters button.active, .branch-filters button:hover { background: var(--ink); color: #fff; }

.branch-search {
  display: block; width: 100%; max-width: 480px; margin: 0 0 20px;
  padding: 13px 16px; border-radius: var(--radius); border: 2px solid var(--ink);
  font-size: 1rem; font-family: var(--font); background: var(--paper); color: var(--ink);
}
.branch-search:focus { outline: 3px solid var(--brand-blue); outline-offset: 2px; }

.branch-card .card-body { gap: 12px; }
.branch-card .b-name { font-size: 1.25rem; }
.b-tag {
  align-self: flex-start; order: -1;
  font-size: 0.86rem; font-weight: 600; color: var(--accent);
}
.branch-card.foranea .b-tag { color: var(--brand-magenta); }
.branch-card .b-line { font-size: 0.96rem; color: var(--ink); }
.branch-card .b-line .ic { display: block; font-size: 0.84rem; font-weight: 600; color: var(--gray); }
.branch-card .b-actions {
  display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.branch-card .b-actions a {
  font-size: 0.92rem; font-weight: 600; padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--ink); color: var(--ink);
}
.branch-card .b-actions a:hover { background: var(--ink); color: #fff; text-decoration: none; }
.branch-card .b-actions .tel-link { border-color: var(--brand-purple); color: var(--brand-purple); }
.branch-card .b-actions .tel-link:hover { background: var(--brand-purple); color: #fff; }

/* ---------- Pasos ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { border-top: 3px solid var(--ink); padding-top: 18px; }
.step .step-num {
  display: block; font-family: var(--font-head); font-stretch: 88%;
  font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--brand-purple);
  margin-bottom: 12px;
}
.step h3 { margin-bottom: 8px; font-size: 1.15rem; }
.step p { color: var(--gray); font-size: 0.98rem; }
.step img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius) !important; margin-bottom: 16px; }

/* ---------- Imagen + texto ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.split h2 { margin-bottom: 14px; }
.split p { color: var(--gray); margin-bottom: 12px; }
.split ul { color: var(--gray); padding-left: 22px; margin-bottom: 12px; }
.split ul li { margin-bottom: 6px; }

/* ---------- Línea de tiempo ---------- */
.timeline { max-width: 46em; }
.tl-item {
  display: grid; grid-template-columns: 6em 1fr; gap: 20px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.tl-item .tl-year {
  font-family: var(--font-head); font-stretch: 88%;
  font-weight: 800; font-size: 1.4rem; line-height: 1.2; color: var(--brand-purple);
}
.tl-item p { color: var(--gray); }

/* ---------- Listas ---------- */
.check-list { list-style: none; padding-left: 0 !important; }
.check-list li { padding: 10px 0; color: var(--gray); border-bottom: 1px solid var(--line); }
.check-list li:last-child { border-bottom: none; }

/* ---------- Avisos ---------- */
.notice {
  background: var(--paper-dim); border-radius: var(--radius);
  padding: 18px 22px; color: var(--ink); font-size: 0.98rem;
}
.notice.blue { background: var(--accent-tint); }

/* ---------- Formulario ---------- */
.form-card { background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); padding: 34px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #8d8796; border-radius: var(--radius);
  font-family: var(--font); font-size: 1rem; background: var(--paper); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--brand-blue); outline-offset: 1px; border-color: var(--ink);
}
.field textarea { resize: vertical; min-height: 130px; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--brand-indigo); color: #d5d7ee; }
.site-footer .foot-main {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
  padding: 56px 0 40px;
}
.site-footer img.foot-logo { height: 54px; width: auto; margin-bottom: 16px; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; font-weight: 700; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 9px; font-size: 0.95rem; }
.site-footer .foot-note { font-size: 0.88rem; line-height: 1.55; margin-top: 12px; }
.site-footer .foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding: 18px 0; font-size: 0.86rem;
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 1200;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--green-wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(29, 29, 27, 0.3);
}
.wa-float:hover { background: #0d6e3a; }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ---------- Explicador de especialidades ---------- */
.chip[role="button"] { cursor: pointer; }
.chip.active { background: var(--brand-purple); color: #fff; border-color: var(--brand-purple); }
.explainer {
  max-width: 46em; margin: 22px 0 0;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 22px 26px;
}
.explainer .ex-label { font-size: 0.9rem; font-weight: 600; color: var(--brand-magenta); margin-bottom: 4px; }
.explainer h3 { font-size: 1.25rem; margin-bottom: 8px; }
.explainer p { color: var(--gray); }
.explainer .ex-tests { font-size: 0.95rem; color: var(--ink); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- Localizador de sucursal más cercana ---------- */
.locator-section { padding-bottom: 0; }
.locator {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--paper);
}
.locator-map { min-height: 420px; }
.locator-info { padding: 34px 36px; display: flex; flex-direction: column; align-items: flex-start; }
.locator-info h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 0 0 12px; }
.locator-info > p { color: var(--gray); margin-bottom: 20px; }
.locate-status { color: var(--ink); margin-top: 16px; }
.locate-status strong { color: var(--brand-purple); }
.locate-results { list-style: none; width: 100%; margin-top: 14px; }
.locate-results li {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.98rem;
}
.locate-results li:last-child { border-bottom: none; }
.locate-results li:first-child span { font-weight: 700; color: var(--brand-purple); }
.locate-results a {
  font-size: 0.92rem; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--brand-purple); color: var(--brand-purple);
  padding: 6px 12px; border-radius: var(--radius);
}
.locate-results a:hover { background: var(--brand-purple); color: #fff; text-decoration: none; }

.branch-card .b-actions a.b-distance { background: var(--brand-purple); border-color: var(--brand-purple); color: #fff; }
.branch-card.nearest { border: 3px solid var(--brand-purple); }

.branch-count { font-size: 0.95rem; color: var(--gray); margin-bottom: 26px; }
.branch-count strong { color: var(--ink); }

/* ---------- Botón volver arriba ---------- */
.to-top {
  position: fixed; right: 25px; bottom: 86px; z-index: 1190;
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--paper); border: 2px solid var(--ink); color: var(--ink);
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--ink); color: #fff; }

/* ---------- Refinamiento: profundidad y contraste de pesos ----------
   Como en el logotipo (nombre grueso, "de Mérida" delgado), los titulares
   van gruesos y los textos de entrada delgados. La profundidad sale de
   sombras suaves y de tonos del mismo color, nunca de mezclar colores. */
h1, h2 { color: var(--ink); }
.hero h1 { font-weight: 800; font-stretch: 80%; letter-spacing: -0.015em; }
h2 { font-weight: 800; font-stretch: 82%; letter-spacing: -0.01em; }
.page-hero h1 { font-weight: 800; font-stretch: 80%; border-bottom: 0; background: linear-gradient(90deg, #1f9ad9, #5b2d8e 55%, #98477e) left bottom / 100% 5px no-repeat; }
.hero-text p, .lead-text p:first-of-type, .page-hero p, .branches-band p {
  font-family: var(--font-head); font-weight: 300; font-stretch: 100%;
  font-size: 1.14rem; line-height: 1.5; color: #48464f;
}

.site-header { border-bottom: 0; box-shadow: 0 1px 0 var(--line); transition: box-shadow 0.2s ease-out; }
.site-header.scrolled { box-shadow: var(--shadow-1); }
.main-nav a { font-weight: 500; }
.main-nav a.active { background: linear-gradient(90deg, #1f9ad9, #98477e) left bottom / 100% 3px no-repeat; box-shadow: none; }
.main-nav a[href="resultados.html"] {
  font-weight: 600; background: var(--blend-deep);
  box-shadow: 0 1px 2px rgba(46, 38, 110, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.main-nav a[href="resultados.html"]:hover { background: var(--teal-deep); }
.topbar { background: var(--blend-deep); color: #ece8f6; }
.topbar a, .topbar a:hover { color: #fff; }

.btn { border-radius: var(--radius); transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, background-color 0.15s; }
.btn-primary, .btn-teal, .btn-purple {
  background: var(--blend-deep);
  box-shadow: 0 1px 2px rgba(46, 38, 110, 0.25), 0 6px 16px rgba(46, 38, 110, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover, .btn-teal:hover, .btn-purple:hover {
  background: linear-gradient(100deg, #4c2579 0%, #262b6c 100%); transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(46, 38, 110, 0.25), 0 10px 22px rgba(46, 38, 110, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-outline { border-color: var(--teal); color: var(--teal) !important; }
.btn-outline:hover { background: var(--teal); }

/* Cintas de acceso: satinadas, con un tono claro arriba y sombra propia */
.tasks { filter: drop-shadow(0 8px 14px rgba(46, 38, 110, 0.16)); }
.task { background: var(--blend-warm); }
.task:nth-child(2) { background: var(--blend-cool); }
.task:nth-child(3) { background: var(--blend-deep); }
.task span { font-family: var(--font-head); font-weight: 300; }

/* Secciones: fondo gris muy leve que se aclara hacia abajo */
.section.alt { background: linear-gradient(100deg, #f6f1fa 0%, #eef5fb 100%); }
.rows img { box-shadow: var(--shadow-1); }
.plain-item img { box-shadow: var(--shadow-1); }
.spec-list { border-top: 3px solid transparent; border-image: linear-gradient(90deg, #1f9ad9, #5b2d8e 55%, #98477e) 1; }
.spec-list a { font-weight: 600; }
.spec-list a:hover { color: var(--teal); }
.eyebrow { color: var(--teal) !important; }

.card { border-color: transparent; box-shadow: var(--shadow-1); transition: box-shadow 0.2s ease-out, transform 0.2s ease-out; }
a.card:hover, .branch-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.form-card, .locator { border-color: transparent; box-shadow: var(--shadow-1); }
.step { border-top: 2px solid var(--teal); }
.step .step-num, .tl-item .tl-year { color: var(--teal); }
.branch-filters button, .branch-search { border: 1px solid #c6c1d3; box-shadow: inset 0 1px 2px rgba(46, 38, 110, 0.06); }
.branch-filters button.active, .branch-filters button:hover { background: var(--teal); border-color: var(--teal); }
.branch-card .b-actions a { border-color: #c6c1d3; }
.branch-card .b-actions a:hover { background: var(--teal); border-color: var(--teal); }
.branch-card.nearest { border: 2px solid var(--teal); }
.notice { background: var(--teal-tint); }

/* Franja de sucursales: verde azulado profundo con cintas del mismo tono */
.branches-band {
  position: relative; overflow: hidden; color: #fff;
  background: var(--blend-full);
}
.branches-band::before, .branches-band::after {
  content: ""; position: absolute; right: -6%; width: 46%; height: 46px;
  transform: rotate(-8deg); transform-origin: right center;
}
.branches-band::before { top: 34%; background: rgba(255, 255, 255, 0.10); }
.branches-band::after { top: 62%; background: rgba(30, 24, 80, 0.22); }
.branches-band .container { position: relative; z-index: 1; }
.branches-band h2 { color: #fff; font-weight: 800; font-stretch: 80%; }
.branches-band p { color: #efeaf8; }
.branches-band .btn { background: #fff; color: var(--teal-deep) !important; box-shadow: 0 8px 22px rgba(30, 24, 80, 0.28); }
.branches-band .btn:hover { background: #f3ecfa; transform: translateY(-1px); }
.cta-strip { background: var(--blend-full); }
.cta-strip .btn-primary, .cta-strip .btn-outline { color: var(--teal-deep) !important; box-shadow: 0 8px 22px rgba(30, 24, 80, 0.28); }
.site-footer { background: linear-gradient(160deg, #2e3480 0%, #45297c 100%); color: #dcd8ee; }
.to-top { border: 0; box-shadow: var(--shadow-1); color: var(--teal); }
.to-top:hover { background: var(--teal); }
:focus-visible { outline-color: var(--amber); }

/* ---------- Buscador de estudios ---------- */
.study-search { position: relative; margin-top: 22px; max-width: 31em; }
.study-search label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.study-search input {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: #fff; border: 1px solid #c6c1d3; border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.study-search input:focus { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--teal); }
.study-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50;
  list-style: none; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-2); max-height: 330px; overflow: auto;
}
.study-results li + li { border-top: 1px solid #ececec; }
.study-results a, .study-results .empty { display: block; padding: 10px 16px; color: var(--ink); }
.study-results a small, .catalog-list a small { display: block; color: var(--gray); font-size: 0.84rem; }
.study-results a:hover, .study-results a.sel { background: var(--teal-tint); text-decoration: none; }
.study-results .empty { color: var(--gray); }

/* Catálogo completo */
.catalog-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 16em); gap: 14px; margin-bottom: 14px; }
.catalog-tools input, .catalog-tools select {
  width: 100%; padding: 13px 16px; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #c6c1d3; border-radius: var(--radius); box-shadow: inset 0 1px 2px rgba(46, 38, 110, 0.06);
}
.catalog-count { color: var(--gray); font-size: 0.95rem; margin-bottom: 10px; }
.catalog-list { list-style: none; columns: 2; column-gap: 40px; border-top: 3px solid transparent; border-image: linear-gradient(90deg, #1f9ad9, #5b2d8e 55%, #98477e) 1; }
.catalog-list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.catalog-list a { display: block; padding: 11px 0; color: var(--ink); font-weight: 500; }
.catalog-list a:hover { color: var(--teal); text-decoration: none; }
.catalog-more { margin-top: 22px; }

/* ---------- Ficha de estudio ---------- */
.ficha-hero { padding: 36px 0 34px; border-bottom: 1px solid var(--line); }
.ficha-hero .container { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 40px; align-items: center; }
.ficha-path { font-size: 0.92rem; color: var(--gray); margin-bottom: 12px; }
.ficha-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; font-stretch: 80%; line-height: 1.02; }
.ficha-aka { font-family: var(--font-head); font-weight: 300; font-size: 1.1rem; color: #4a4a4a; margin-top: 12px; }
.ficha-tubo { text-align: center; font-size: 0.86rem; color: var(--gray); }
.ficha-tubo svg { display: block; margin: 0 auto 8px; height: 150px; width: auto; filter: drop-shadow(0 8px 10px rgba(46, 38, 110, 0.18)); }
.ficha-facts { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 40px; }
.ficha-facts > div { border-top: 3px solid var(--tapon, var(--teal)); padding-top: 14px; }
.ficha-facts dt, .ficha-table th { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; color: var(--gray); }
.ficha-facts dd { font-size: 1.05rem; margin-top: 4px; }
.ficha-facts dd.big { font-family: var(--font-head); font-weight: 800; font-stretch: 82%; font-size: 1.7rem; line-height: 1.15; }
.ficha-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.ficha-table { width: 100%; border-collapse: collapse; }
.ficha-table th, .ficha-table td { text-align: left; vertical-align: top; padding: 13px 0; border-top: 1px solid var(--line); }
.ficha-table tr:last-child th, .ficha-table tr:last-child td { border-bottom: 1px solid var(--line); }
.ficha-table th { width: 13em; padding-right: 20px; }

/* ---------- Fotos de uso libre ---------- */
.lead-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-top: 22px; box-shadow: var(--shadow-2); }
.page-hero.con-foto .container { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: center; }
.page-hero.con-foto img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-2); }
.branches-band {
  background:
    linear-gradient(90deg, rgba(46, 52, 128, 0.96) 0%, rgba(91, 45, 142, 0.88) 48%, rgba(31, 154, 217, 0.58) 100%),
    url("../img/libres/tubos-muestra.jpg") center / cover no-repeat;
}
.branches-band::before, .branches-band::after { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero { padding: 20px 0 40px; }
.hero-text p { margin-top: 12px; }
.study-search { margin-top: 16px; }
.tasks { margin-top: 18px; }
.task { padding-top: 11px; padding-bottom: 11px; }

/* ---------- Mapa de sucursales ---------- */
#mapa-sucursales { width: 100%; height: 100%; min-height: 420px; background: #e9e6ef; z-index: 0; }
.pin-suc {
  width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--logo-purple); border: 3px solid #fff;
  box-shadow: 0 3px 8px rgba(30, 24, 80, 0.45);
}
.pin-suc.urgencias { background: var(--logo-magenta); }
.pin-suc.cercana { background: var(--logo-blue); width: 32px; height: 32px; }
.pin-yo { width: 16px; height: 16px; border-radius: 50%; background: #232323; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(35, 35, 35, 0.18); }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content { margin: 14px 16px; font-size: 0.92rem; line-height: 1.45; color: var(--ink); }
.leaflet-popup-content strong { display: block; font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 4px; }
.leaflet-popup-content a { display: inline-block; margin-top: 8px; font-weight: 600; color: var(--logo-purple); }
.leaflet-popup-content-wrapper { border-radius: var(--radius); box-shadow: var(--shadow-2); }
.map-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.88rem; color: var(--gray); margin-top: 14px; }
.map-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; background: var(--logo-purple); }
.map-legend i.u { background: var(--logo-magenta); }

/* ---------- Cotización ---------- */
.cart-link { font-weight: 700 !important; background: rgba(255, 255, 255, 0.16); padding: 2px 10px; border-radius: 999px; }
.catalog-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.catalog-list li > a { flex: 1; min-width: 0; }
.catalog-add, .link-btn, .quote-list .quitar {
  font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: none; border: 1px solid #c6c1d3; color: var(--logo-purple);
  border-radius: var(--radius); padding: 6px 10px;
}
.catalog-add:hover, .quote-list .quitar:hover { border-color: var(--logo-purple); background: var(--teal-tint); }
.catalog-add.dentro { background: var(--logo-purple); border-color: var(--logo-purple); color: #fff; }
.link-btn { border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.ficha-facts { grid-template-columns: 2fr 1fr 1fr; }
.ficha-hero .container { grid-template-columns: 1fr; }

.quote-empty { max-width: 34em; }
.quote-empty p { margin-bottom: 20px; font-size: 1.1rem; }
.quote-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: start; }
.quote-list { list-style: none; border-top: 3px solid transparent; border-image: linear-gradient(90deg, #1f9ad9, #5b2d8e 55%, #98477e) 1; }
.quote-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.quote-list a { color: var(--ink); font-weight: 600; }
.quote-list small { display: block; color: var(--gray); font-size: 0.88rem; margin-top: 4px; }
.quote-list .precio { font-family: var(--font-head); font-weight: 700; white-space: nowrap; }
.quote-tools { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 18px; font-weight: 600; }
.quote-summary { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 26px; display: grid; gap: 14px; position: sticky; top: 100px; }
.quote-summary h2 { font-size: 1.5rem; }
.quote-totals > div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.quote-totals .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; }
.quote-note { font-size: 0.9rem; color: var(--gray); }
.quote-coupon label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.quote-coupon > div { display: flex; gap: 8px; }
.quote-coupon input { flex: 1; min-width: 0; padding: 11px 12px; font: inherit; text-transform: uppercase; border: 1px solid #c6c1d3; border-radius: var(--radius); }
.quote-coupon .btn { padding: 10px 14px; font-size: 0.92rem; }
.quote-coupon .quote-note { margin-top: 6px; min-height: 1.3em; }
@media print {
  .topbar, .site-header, .site-footer, .wa-float, .to-top, .quote-tools, .quote-coupon, .quote-summary .btn, .quote-list .quitar, .notice { display: none !important; }
  .quote-grid { grid-template-columns: 1fr; }
  .quote-summary { box-shadow: none; position: static; padding: 0; }
}

/* ---------- Paciente, médico, agenda y cuenta ---------- */
.quote-people { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.quote-error { color: #a3172f; font-size: 0.92rem; font-weight: 600; }
.quote-error:empty { display: none; }
.agenda { margin-top: 40px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 30px; }
.agenda h2 { font-size: 1.6rem; margin-bottom: 16px; }
.agenda p { margin-bottom: 14px; }
.agenda-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 14px; }
.agenda-horario { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.cuenta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.cuenta-grid h2 { font-size: 1.5rem; margin-bottom: 16px; }
.cuenta-grid form { display: grid; gap: 14px; }
.cuenta-grid .btn { justify-self: start; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--gray); }
.check-row input { margin-top: 4px; }
.cuenta-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.cuenta-acciones { display: flex; gap: 10px; flex-wrap: wrap; }
.cuenta-promos { margin-bottom: 16px; }
.cuenta-confirmar { margin-bottom: 18px; display: grid; gap: 10px; }
.cuenta-confirmar .btn { padding: 9px 14px; font-size: 0.92rem; }
.cuenta-titulo { font-size: 1.5rem; margin: 30px 0 14px; }
.cuenta-citas { display: grid; gap: 16px; }
.cita-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 20px 24px; border-left: 0; }
.cita-card h3 { font-size: 1.2rem; }
.cita-card h3::first-letter { text-transform: uppercase; }
.cita-card.cancelada { opacity: 0.6; }
.cita-card ol { margin: 10px 0 10px 20px; color: var(--gray); font-size: 0.95rem; }
.cita-meta { color: var(--gray); font-size: 0.92rem; margin-top: 4px; }
.cita-total { font-family: var(--font-head); font-weight: 700; }
.cita-card .link-btn { margin-top: 10px; }

/* ---------- Promoción del mes y paquetes ---------- */
.promo-home { padding-top: 24px; }
.promo-home-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.promo-home img { width: 100%; max-height: 420px; object-fit: contain; border-radius: var(--radius); box-shadow: var(--shadow-2); background: #fff; }
.promo-home-texto { color: var(--gray); margin: 14px 0 22px; max-width: 34em; }
.paq-lista { list-style: none; display: grid; gap: 14px; }
.paq-lista li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 20px 24px; }
.paq-lista h3 { font-size: 1.25rem; }
.paq-lista p { color: var(--gray); font-size: 0.95rem; margin-top: 4px; }
.paq-lado { display: grid; gap: 8px; justify-items: end; }
.paq-precio { font-family: var(--font-head); font-weight: 800; font-stretch: 82%; font-size: 1.6rem; }
.cuenta-nac { max-width: 30em; margin-bottom: 12px; }

/* ---------- Visitas: acciones, referidos y encuesta ---------- */
.cita-acciones { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.cita-card .cita-acciones .link-btn { margin-top: 0; }
.cita-mover { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); max-width: 24em; }
.cita-mover label { font-weight: 600; font-size: 0.95rem; }
.cita-mover input { padding: 10px 12px; font: inherit; border: 1px solid #c6c1d3; border-radius: var(--radius); }
.cita-mover .btn { justify-self: start; padding: 9px 14px; font-size: 0.92rem; }
.cuenta-referidos { background: var(--teal-tint); border-radius: var(--radius); padding: 4px 24px 20px; margin-top: 24px; }
.cuenta-referidos .cuenta-titulo { margin-top: 20px; }
.ref-codigo { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: 0.04em; margin-right: 10px; }
.ref-premios { list-style: none; margin-top: 8px; font-size: 0.95rem; }
.encuesta-form { display: grid; gap: 18px; max-width: 36em; }
.encuesta-form fieldset { border: 0; }
.encuesta-form legend { font-weight: 600; margin-bottom: 10px; }
.estrellas { display: flex; gap: 8px; flex-wrap: wrap; }
.estrellas label { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid #c6c1d3; border-radius: var(--radius); font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; cursor: pointer; }
.estrellas label:has(input:checked) { background: var(--logo-purple); border-color: var(--logo-purple); color: #fff; }
.encuesta-form .btn { justify-self: start; }

/* ---------- Responsivo ---------- */
@media (max-width: 1220px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 3px solid var(--brand-purple);
    box-shadow: var(--shadow); padding: 10px 24px 20px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 12px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .main-nav a.active { box-shadow: inset 4px 0 0 var(--brand-blue); padding-left: 14px; }
  .main-nav a[href="resultados.html"] { margin: 10px 0; padding: 12px 14px; text-align: center; border-bottom: none; }
}

@media (max-width: 992px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 32px; }
  .steps { grid-template-columns: 1fr; }
  .split, .lead-split { grid-template-columns: 1fr; gap: 28px; }
  .hero .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .plain-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .foot-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 52px 0; }
  .hero { padding-top: 36px; }
  .grid-2, .grid-3, .grid-4, .plain-grid { grid-template-columns: 1fr; }
  .spec-list { columns: 1; }
  .rows li { grid-template-columns: 96px 1fr; gap: 16px; }
  .rows img { width: 96px; }
  .branches-band .container { grid-template-columns: 1fr; gap: 20px; padding-top: 48px; padding-bottom: 48px; }
  .task { flex-direction: column; gap: 0; padding: 12px 30px; }
  .tasks { max-width: none; }
  .contact-list li, .tl-item { grid-template-columns: 1fr; gap: 2px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px; }
  .locator { grid-template-columns: 1fr; }
  .locator-map { min-height: 300px; }
  .locator-info { padding: 26px 22px; }
  .topbar .tb-group.tb-right { display: none; }
  .site-footer .foot-main { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .catalog-tools { grid-template-columns: 1fr; }
  .catalog-list { columns: 1; }
  .ficha-hero .container { grid-template-columns: 1fr; }
  .ficha-tubo { display: none; }
  .ficha-facts { grid-template-columns: 1fr; gap: 20px; }
  .ficha-table th { width: 8.5em; }
  .branches-band::before, .branches-band::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .card, .site-header { transition: none; }
  .btn:hover, a.card:hover, .branch-card:hover { transform: none; }
}
@media (max-width: 768px) {
  .page-hero.con-foto .container { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  .quote-grid { grid-template-columns: 1fr; gap: 28px; }
  .quote-summary { position: static; }
  .quote-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .quote-list .quitar { grid-column: 1 / -1; justify-self: start; }
  .catalog-list li { flex-direction: column; align-items: flex-start; gap: 0; padding-bottom: 12px; }
}
@media (max-width: 768px) {
  .agenda-grid, .cuenta-grid { grid-template-columns: 1fr; }
  .agenda { padding: 22px; }
}
@media (max-width: 768px) {
  .promo-home-grid { grid-template-columns: 1fr; gap: 24px; }
  .paq-lista li { grid-template-columns: 1fr; }
  .paq-lado { justify-items: start; }
}

/* ---------- Formularios de solicitud (domicilio, empresas, factura, bolsa de trabajo) ---------- */
[hidden] { display: none !important; }
.solicitud-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: start; }
.solicitud-form { display: grid; gap: 16px; }
.solicitud-form h2 { font-size: 1.5rem; }
.solicitud-form .solicitud-sub { font-size: 1.2rem; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.solicitud-form .btn { justify-self: start; }
.solicitud-form .field textarea { min-height: 0; }
.solicitud-info h2 { font-size: 1.5rem; margin-bottom: 8px; }
.solicitud-info img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-2); margin-top: 22px; }
.solicitud-alt { margin-top: 14px; color: var(--gray); }
.solicitud-ok { padding: 28px 30px; border-left: 4px solid var(--logo-purple); }
.solicitud-ok h2 { font-size: 1.6rem; margin-bottom: 10px; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.medico-acceso { max-width: 30em; }
.medico-acceso form, form.medico-acceso { display: grid; gap: 14px; }
.medico-acceso .btn { justify-self: start; }
.medico-acceso h2 { font-size: 1.5rem; margin-bottom: 14px; }
.medico-uso { margin-top: 12px; }
#medico-talonarios details { margin-top: 12px; }
#medico-talonarios summary { cursor: pointer; font-weight: 600; color: var(--logo-purple); }
#medico-talonarios .ficha-table { margin-top: 10px; font-size: 0.95rem; }
.barra-uso { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 8px 0; }
.barra-uso span { display: block; height: 100%; background: var(--blend-cool); }

/* ---------- Preguntas frecuentes ---------- */
.faq > * { max-width: 52em; }
.faq-buscar { margin: 0 0 30px; }
.faq-grupo { margin-bottom: 34px; }
.faq-grupo h2 { font-size: 1.5rem; padding-bottom: 12px; border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, #1f9ad9, #5b2d8e 55%, #98477e) 1; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 34px 16px 0; position: relative;
  font-family: var(--font-head); font-stretch: 90%; font-weight: 600; font-size: 1.12rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.5rem; font-weight: 400; color: var(--logo-purple); }
.faq-item[open] summary::after { content: "–"; }
.faq-item summary:hover { color: var(--logo-purple); }
.faq-item > div { padding: 0 34px 18px 0; color: var(--gray); max-width: 44em; }

/* ---------- Chequeos ---------- */
.chequeos { list-style: none; display: grid; gap: 16px; }
.chequeos > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 16em); gap: 32px; align-items: start; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 26px 30px; }
.chequeos h2 { font-size: 1.5rem; }
.chequeos p { color: var(--gray); margin-top: 6px; }
.chequeo-estudios { list-style: none; margin-top: 14px; border-top: 1px solid var(--line); }
.chequeo-estudios li { border-bottom: 1px solid var(--line); }
.chequeo-estudios a { display: block; padding: 9px 0; color: var(--ink); font-weight: 500; font-size: 0.96rem; }
.chequeo-estudios a:hover { color: var(--logo-purple); text-decoration: none; }
.chequeo-lado { display: grid; gap: 10px; }
.chequeos > li.chequeo-vacio { grid-template-columns: 1fr; justify-items: start; }

/* ---------- Opiniones, acreditaciones y artículos ---------- */
.opiniones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.opinion { padding: 20px 0; border-top: 1px solid var(--line); }
.opinion blockquote { font-family: var(--font-head); font-weight: 300; font-size: 1.12rem; line-height: 1.45; color: var(--ink); }
.opinion figcaption { margin-top: 12px; font-size: 0.9rem; color: var(--gray); }
.opinion figcaption strong { color: var(--logo-purple); }
.acreditaciones li { grid-template-columns: 1fr; }
.acreditaciones li:has(img) { grid-template-columns: 150px 1fr; }
.acreditaciones img { aspect-ratio: 3 / 4; object-fit: contain; background: #fff; }
.acr-meta { font-weight: 600; color: var(--ink) !important; font-size: 0.92rem !important; margin-bottom: 6px; }
.articulo { max-width: 44em; }
.container.articulo { max-width: var(--maxw); }
.container.articulo > * { max-width: 44em; }
.articulo h2 { font-size: 1.5rem; margin: 30px 0 10px; }
.articulo p, .articulo ul { margin-bottom: 14px; color: #3d3b45; font-size: 1.05rem; line-height: 1.65; }
.articulo ul { padding-left: 22px; }
.articulo li { margin-bottom: 6px; }
.articulo-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-2); margin-bottom: 28px; }
.vacantes { display: grid; gap: 0; margin-top: 16px; }
.vacante { padding: 20px 0; border-top: 1px solid var(--line); }
.vacante h3 { font-size: 1.25rem; }
.vacante h4 { font-size: 0.98rem; margin: 12px 0 4px; }
.vacante p, .vacante ul { color: var(--gray); margin-top: 6px; }
.vacante ul { padding-left: 20px; }
.vacante .link-btn { margin-top: 12px; }

/* ---------- Resultados en la cuenta ---------- */
.resultado-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-left: 4px solid var(--logo-blue); }
.resultado-card .btn { padding: 10px 18px; font-size: 0.95rem; }

/* ---------- Sucursales: abierta ahora ---------- */
.b-abierta { font-size: 0.9rem; font-weight: 600; color: var(--gray); }
.b-abierta.si { color: #0d6e3a; }
.solo-abiertas .branch-card:not(.es-abierta) { display: none !important; }

/* ---------- Pie: más servicios ---------- */
.foot-extra { display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, 0.25); font-size: 0.95rem; }
.foot-extra a { font-weight: 500; }

@media (max-width: 992px) {
  .solicitud-grid { grid-template-columns: 1fr; gap: 32px; }
  .opiniones { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .chequeos > li { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .acreditaciones li:has(img) { grid-template-columns: 96px 1fr; }
}
@media print {
  .foot-extra, .cuenta-acciones, .page-hero p { display: none !important; }
}

/* ---------- Pago con tarjeta de una visita ---------- */
.cita-pago { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; justify-items: start; }
.cita-pago .btn { padding: 11px 20px; font-size: 0.98rem; }
