/* =========================================================
   Dr. Roberto Albarrán · Cardiología clínica · Coacalco
   Hoja base: tokens, tipografía, contenedores y componentes.
   Los estilos de cada sección viven en el <style> del index.html.
   ========================================================= */

/* ---------- Tipografía: Google Sans (SIL OFL 1.1, alojada en el sitio) ---------- */
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/google-sans-latin.woff2") format("woff2-variations"), url("assets/fonts/google-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Google Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/google-sans-latin-italic.woff2") format("woff2-variations"), url("assets/fonts/google-sans-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ---------- Tokens (tema claro) ---------- */
:root {
  --noche: #0E1726;
  --ink: #0E1726;
  --ink-muted: #4A5A6E;
  --surface: #FFFFFF;
  --surface-alt: #F4F6F9;
  --surface-raised: #FFFFFF;
  --line: #E1E6EC;
  --line-field: #C3CDD8;
  --acero: #3E6A8A;
  --acero-soft: #E6EEF4;
  --vino: #8C2F39;
  --vino-soft: #F7E9EB;
  --vino-fill: #8C2F39;
  --exito: #1E7A4C;
  --error: #B42318;

  --font-display: "Google Sans", "Google Sans Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-sans: "Google Sans", "Google Sans Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --gutter: clamp(16px, 4vw, 40px);

  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px; --radius-pill: 999px;
  --shadow-sm: 0 1px 2px #0E172614, 0 2px 8px #0E17260D;
  --shadow-lg: 0 24px 48px -16px #0E172640, 0 2px 6px #0E172614;
  --dur: .22s;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Tema oscuro por sección ---------- */
.tema-noche {
  --ink: #F2F5F9;
  --ink-muted: #A9B6C6;
  --surface: #0E1726;
  --surface-alt: #15213A;
  --surface-raised: #172540;
  --line: #FFFFFF1F;
  --line-field: #FFFFFF33;
  --acero: #9CBAD3;
  --acero-soft: #9CBAD31F;
  --vino: #E9A0A8;
  --vino-soft: #E086901F;
  --vino-fill: #A33A45;
  --exito: #7CC5A1;
  --error: #F4A39A;
  background: var(--surface);
  color: var(--ink);
}
.topbar.tema-noche { background: #0A111D; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, canvas, video { display: block; max-width: 100%; height: auto; }
svg { flex: none; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acero); text-underline-offset: .18em; }
figure, blockquote { margin: 0; }
address { font-style: normal; }
fieldset { min-width: 0; }

h1, h2, h3 { margin: 0 0 var(--space-4); font-family: var(--font-display); font-weight: 500; color: var(--ink); text-wrap: balance; font-optical-sizing: auto; }
h1 { font-size: clamp(44px, 6.4vw, 78px); line-height: 1.04; letter-spacing: -.035em; }
h2 { font-size: clamp(30px, 3.8vw, 46px); line-height: 1.1; letter-spacing: -.03em; }
h3 { font-size: 22px; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 var(--space-4); max-width: 68ch; }
p:last-child { margin-bottom: 0; }
.acento { font-style: normal; font-weight: 500; color: var(--vino); }

/* ---------- Layout ---------- */
.contenedor { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.seccion { padding-block: clamp(64px, 9vw, 120px); background: var(--surface); }
.seccion--alt { background: var(--surface-alt); }
.seccion.tema-noche { background: var(--surface); }
.seccion__encabezado { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.seccion__encabezado h2 { margin-bottom: var(--space-4); }

/* ---------- Texto ---------- */
.t-eyebrow { display: inline-block; margin-bottom: var(--space-3); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--vino); }
.t-subtitle { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--ink-muted); }
.t-body-lg { font-size: 18px; line-height: 1.65; }
.t-muted { color: var(--ink-muted); }
.t-caption { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.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; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 52px; padding: 0 var(--space-6); border: 1.5px solid transparent; border-radius: var(--radius-pill); font: 600 16px/1.2 var(--font-sans); text-align: center; text-decoration: none; cursor: pointer; transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.btn svg { transition: transform var(--dur) var(--ease-out); }
.btn:hover svg[width="18"] { transform: translateX(2px); }
.btn--primario { background: var(--vino-fill); color: #FFFFFF; box-shadow: 0 8px 20px -10px #8C2F39; }
.btn--primario:hover { background: #A33A45; color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 12px 24px -10px #8C2F39; }
.btn--primario:active { transform: translateY(0); }
.btn--secundario { background: transparent; color: var(--ink); border-color: var(--line-field); }
.btn--secundario:hover { border-color: var(--acero); color: var(--ink); background: var(--acero-soft); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.nav .btn { min-height: 44px; padding: 0 var(--space-6); font-size: 15px; }

/* ---------- Componentes ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--acero-soft); color: var(--acero); font-size: 13px; font-weight: 600; }
.tarjeta { padding: var(--space-8); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.tarjeta:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.aviso-urgencia { padding: var(--space-4) var(--space-6); border-radius: var(--radius-md); font-size: 15px; line-height: 1.55; }

/* ---------- Formularios ---------- */
.campo { display: grid; gap: 6px; margin-bottom: var(--space-4); }
.campo > label { font-size: 14px; font-weight: 600; color: var(--ink); }
.campo input:not([type="checkbox"]), .campo select { width: 100%; min-height: 52px; padding: 0 var(--space-4); border: 1.5px solid var(--line-field); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: 400 16px/1.4 var(--font-sans); transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.campo select { appearance: none; -webkit-appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%239CBAD3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.campo input::placeholder { color: var(--ink-muted); opacity: .7; }
.campo input:focus-visible, .campo select:focus-visible { outline: none; border-color: var(--acero); box-shadow: 0 0 0 4px var(--acero-soft); }
.campo--error input:not([type="checkbox"]), .campo--error select { border-color: var(--error); }
.campo__mensaje { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--error); }
.campo__mensaje--exito { color: var(--exito); font-weight: 600; }
.consentimiento a { color: var(--ink); }

/* ---------- Detalles del sitio que la plantilla daba por hechos ---------- */
.header .logo__nombre { color: var(--ink); }
.nav__btn, .nav a:not(.btn) { transition: color var(--dur) var(--ease-out); }
.hero__micro { margin-top: 0; }
.hero--foto h1 { color: #FFFFFF; }
.cita__intro .t-body-lg { max-width: 46ch; }
.form-cita { border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.footer .logo { margin-bottom: var(--space-2); }
.footer__legal { color: var(--ink-muted); }
.footer__legal a { color: var(--ink-muted); }

/* ---------- Ajustes de secciones del Dr. Albarrán ---------- */
.franja .contenedor { flex-wrap: nowrap; gap: var(--space-4) var(--space-6); }
.franja__item { font-size: 14px; white-space: nowrap; }
@media (max-width: 1180px) { .franja .contenedor { flex-wrap: wrap; } .franja__item { white-space: normal; } }
.sede .sede__acciones { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-top: var(--space-1); }
.ubicacion .reaseguro { margin-top: var(--space-6); }
.ubicacion .contenedor:not(.galeria-wrap) { align-items: start; }
.ubicacion .mapa { position: sticky; top: 96px; height: min(640px, calc(100vh - 128px)); }
.ubicacion .mapa iframe { height: 100%; }
@media (max-width: 860px) { .ubicacion .mapa { position: static; height: 360px; } }
.bloques--sedes .bloque__txt { min-width: 0; }
.bloques--sedes .bloque__txt small { white-space: normal; }
@media (max-width: 640px) { .form-cita .bloques--sedes { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Landings: galería con pie de foto ---------- */
.galeria--cap figure { margin: 0; }
.galeria--cap figcaption { margin-top: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.res-grid .mq-lg { display: inline-flex; align-items: center; gap: 5px; color: #B45309; font-weight: 600; }
