/* ============================================================
   ASI MED — sitio público
   Mismos tokens de marca que el CRM (src/styles/tokens.css), pero
   con otra densidad: el CRM está afinado para trabajar todo el día,
   un sitio público necesita respirar. Los colores, la tipografía y
   las sombras son idénticos a propósito.
   ============================================================ */

:root {
  /* Marca — copiados tal cual del sistema */
  --azul-900: #06283D;
  --azul-800: #08324D;
  --azul-700: #0D4568;   /* principal del logo */
  --azul-600: #17608A;
  --azul-500: #2C7BA6;
  --azul-100: #DDEAF1;
  --azul-50:  #EFF6F9;

  --teal-700: #3A7D8C;
  --teal-600: #4A8F9E;
  --teal-500: #57A0AF;   /* onda del logo */
  --teal-300: #8FC0CB;
  --teal-100: #DCEDF1;
  --teal-50:  #EEF7F9;

  --gris-900: #0F2733;
  --gris-800: #1B3A48;
  --gris-700: #35525F;
  --gris-600: #4E6B78;
  --gris-500: #6B8593;
  --gris-400: #93A9B4;
  --gris-300: #C2D2DA;
  --gris-200: #DDE7EC;
  --gris-100: #EDF3F6;
  --gris-50:  #F5F9FB;
  --blanco:   #FFFFFF;

  --exito-500: #2E9E77;

  --fondo: var(--blanco);
  --borde: #E2EBF0;
  --texto: var(--gris-900);
  --texto-2: var(--gris-600);
  --primario: var(--azul-700);

  --fuente: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Radios y sombras: mismos valores del sistema, un peldaño más grandes */
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --sombra-sm: 0 1px 2px rgba(13, 69, 104, 0.06);
  --sombra: 0 1px 3px rgba(13, 69, 104, 0.08), 0 4px 12px rgba(13, 69, 104, 0.05);
  --sombra-lg: 0 8px 28px rgba(13, 69, 104, 0.14);
  --anillo: 0 0 0 3px rgba(87, 160, 175, 0.45);

  --transicion: 140ms cubic-bezier(0.4, 0, 0.2, 1);

  --ancho: 1140px;
  --cabecera-alto: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Los anclajes no deben quedar debajo de la cabecera fija */
  scroll-padding-top: calc(var(--cabecera-alto) + 12px);
}

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 17px;
  line-height: 1.6;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }

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

:focus-visible { outline: none; box-shadow: var(--anillo); border-radius: 6px; }

::selection { background: var(--teal-100); color: var(--azul-900); }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 24px; }

/* Enlace de salto: invisible hasta que se tabula, para lector de pantalla */
.saltar {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--azul-700); color: #fff; padding: 12px 18px;
  border-radius: 0 0 var(--r) 0; font-weight: 500;
}
.saltar:focus { left: 0; }

/* Iconos de trazo, mismo lenguaje que los del sistema */
.ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ===================== BOTONES ===================== */

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap;
  transition: background var(--transicion), color var(--transicion),
              border-color var(--transicion), transform var(--transicion),
              box-shadow var(--transicion);
}
.boton:hover { text-decoration: none; transform: translateY(-1px); }
.boton:active { transform: translateY(0); }

.boton-lg { height: 52px; padding: 0 26px; font-size: 16.5px; }

.boton-primario { background: var(--azul-700); color: #fff; box-shadow: var(--sombra-sm); }
.boton-primario:hover { background: var(--azul-800); box-shadow: var(--sombra); }

.boton-fantasma { background: transparent; color: var(--gris-700); border-color: var(--borde); }
.boton-fantasma:hover { background: var(--gris-50); border-color: var(--gris-300); color: var(--azul-700); }

.boton-blanco { background: #fff; color: var(--azul-700); box-shadow: var(--sombra); }
.boton-blanco:hover { background: var(--azul-50); box-shadow: var(--sombra-lg); }

.boton-contorno-claro { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.45); }
.boton-contorno-claro:hover { background: rgba(255,255,255,0.14); border-color: #fff; }

/* ===================== CABECERA ===================== */

.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transicion), box-shadow var(--transicion);
}
.cabecera.con-sombra { border-bottom-color: var(--borde); box-shadow: var(--sombra-sm); }

.cabecera-fila {
  height: var(--cabecera-alto);
  display: flex; align-items: center; gap: 24px;
}

.marca { flex: none; display: flex; align-items: center; }
.marca:hover { text-decoration: none; }
.marca img { height: 46px; width: auto; }

.nav {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 30px;
}
.nav a {
  color: var(--gris-700); font-size: 15.5px; font-weight: 450;
  padding: 6px 2px; position: relative;
}
.nav a:hover { color: var(--azul-700); text-decoration: none; }
/* Subrayado que crece desde el centro */
.nav a::after {
  content: ''; position: absolute; left: 50%; right: 50%; bottom: 0; height: 2px;
  background: var(--teal-500); border-radius: 2px;
  transition: left var(--transicion), right var(--transicion);
}
.nav a:hover::after { left: 0; right: 0; }

.cabecera-acciones { flex: none; display: flex; align-items: center; gap: 10px; }

/* ===================== HERO ===================== */

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--azul-800) 0%, var(--azul-700) 45%, #10527A 100%);
  color: #fff;
  padding: 76px 0 92px;
  text-align: center;
}

.hero-fondo { position: absolute; inset: 0; pointer-events: none; }
/* La onda del logo, repetida en el fondo como firma de marca */
.hero-onda {
  position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 58%;
  fill: rgba(87, 160, 175, 0.20);
}
.hero-onda-2 { fill: rgba(87, 160, 175, 0.13); height: 72%; }

.hero-contenido { position: relative; z-index: 1; }

.hero-logo { height: 96px; width: auto; margin: 0 auto 20px; }

.hero-kicker {
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal-300); margin-bottom: 16px;
}

.hero-titulo {
  font-size: clamp(32px, 5.2vw, 52px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.13;
  max-width: 17ch; margin: 0 auto;
  text-wrap: balance;
}

.hero-bajada {
  margin: 20px auto 0; max-width: 56ch;
  font-size: clamp(16.5px, 2vw, 19px); line-height: 1.6;
  color: rgba(255,255,255,0.86);
  text-wrap: pretty;
}

.hero-acciones {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}

.hero-datos {
  margin-top: 42px;
  display: flex; flex-wrap: wrap; gap: 10px 34px; justify-content: center;
  font-size: 15px; color: rgba(255,255,255,0.82);
}
.hero-datos li { display: flex; align-items: baseline; gap: 7px; }
.hero-datos strong { color: #fff; font-weight: 600; }
/* Separadores entre los tres datos, solo cuando caben en una línea */
.hero-datos li + li::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--teal-300); margin-right: 26px; margin-left: -30px;
}

/* ===================== SECCIONES ===================== */

.seccion { padding: 82px 0; }
.seccion-clara { background: var(--gris-50); }
.seccion-azul { background: var(--azul-800); color: #fff; }

.seccion-cab { max-width: 62ch; margin: 0 auto 46px; text-align: center; }

.etiqueta {
  display: inline-block; margin-bottom: 14px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-700);
  background: var(--teal-50); border: 1px solid var(--teal-100);
  padding: 5px 13px; border-radius: 999px;
}
.etiqueta-clara { color: var(--teal-300); background: rgba(87,160,175,0.14); border-color: rgba(87,160,175,0.3); }

.titulo-seccion {
  font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -0.028em;
  text-wrap: balance;
}
.titulo-claro { color: #fff; }

.subtitulo-seccion {
  margin-top: 14px; font-size: 17.5px; line-height: 1.62; color: var(--texto-2);
  text-wrap: pretty;
}
.subtitulo-claro { color: rgba(255,255,255,0.78); }

.rejilla-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.rejilla-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rejilla-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Aparición al hacer scroll */
.por-aparecer { opacity: 0; transform: translateY(14px); }
.visible {
  opacity: 1; transform: none;
  transition: opacity 460ms cubic-bezier(0.4,0,0.2,1), transform 460ms cubic-bezier(0.4,0,0.2,1);
}

/* ---- Tarjetas de "sin cita" ---- */

.tarjeta-sc {
  background: #fff; border: 1px solid var(--borde); border-radius: var(--r-lg);
  padding: 26px 22px; box-shadow: var(--sombra-sm);
  transition: box-shadow var(--transicion), transform var(--transicion), border-color var(--transicion);
}
.tarjeta-sc:hover { box-shadow: var(--sombra); transform: translateY(-3px); border-color: var(--teal-300); }

.sc-ico {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--teal-50); border: 1px solid var(--teal-100);
  display: grid; place-items: center; margin-bottom: 16px;
  color: var(--teal-700);
}
.sc-ico svg {
  width: 23px; height: 23px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

.tarjeta-sc h3 { font-size: 17.5px; margin-bottom: 7px; }
.tarjeta-sc p { font-size: 15.3px; line-height: 1.55; color: var(--texto-2); }

.nota-sc {
  margin: 30px auto 0; max-width: 68ch; text-align: center;
  font-size: 15.5px; color: var(--gris-600);
  background: var(--blanco); border: 1px dashed var(--gris-300);
  border-radius: var(--r); padding: 15px 20px;
}

/* ---- Tarjetas de servicios ---- */

.tarjeta {
  background: #fff; border: 1px solid var(--borde); border-radius: var(--r-lg);
  padding: 28px 26px; box-shadow: var(--sombra-sm);
  display: flex; flex-direction: column;
  transition: box-shadow var(--transicion), transform var(--transicion);
}
.tarjeta:hover { box-shadow: var(--sombra); transform: translateY(-3px); }
.tarjeta-alta { padding: 30px 28px; }

.tarjeta-titulo {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; margin-bottom: 18px;
}
.punto { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.punto-azul { background: var(--azul-600); }
.punto-teal { background: var(--teal-500); }
.punto-verde { background: var(--exito-500); }

.lista { display: grid; gap: 1px; }
.lista li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  font-size: 15.8px; color: var(--gris-800);
  padding: 8px 0; border-bottom: 1px solid var(--gris-100);
}
.lista li:last-child { border-bottom: 0; }
.dur {
  flex: none; font-size: 13px; font-weight: 500; color: var(--teal-700);
  background: var(--teal-50); border-radius: 999px; padding: 2px 9px;
}

.tarjeta-pie {
  margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--gris-100);
  font-size: 14.8px; line-height: 1.55; color: var(--texto-2);
}

/* ---- Doctoras ---- */

.doctora {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--r-lg); padding: 28px 24px; text-align: center;
  transition: background var(--transicion), transform var(--transicion), border-color var(--transicion);
}
.doctora:hover { background: rgba(255,255,255,0.09); border-color: rgba(87,160,175,0.55); transform: translateY(-3px); }

.monograma {
  width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--teal-500), var(--teal-700));
  color: #fff; font-size: 25px; font-weight: 600; letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(6, 40, 61, 0.4);
}

.doctora h3 { font-size: 17.5px; color: #fff; line-height: 1.3; }
.doctora-nota { margin-top: 8px; font-size: 14.5px; color: var(--teal-300); }

/* ---- Visítanos ---- */

.direccion {
  font-style: normal; font-size: 17px; line-height: 1.65; color: var(--gris-800);
  margin-bottom: 22px; flex: 1;
}
.direccion-plaza { color: var(--texto-2); }

.horario { width: 100%; border-collapse: collapse; margin-bottom: 22px; }
.horario th, .horario td { padding: 11px 0; font-size: 16px; border-bottom: 1px solid var(--gris-100); }
.horario th { text-align: left; font-weight: 500; color: var(--gris-800); }
.horario td { text-align: right; color: var(--gris-700); font-variant-numeric: tabular-nums; }
.horario tr:last-child th, .horario tr:last-child td { border-bottom: 0; }
.horario .cerrado th, .horario .cerrado td { color: var(--gris-400); }

.contacto-directo { display: grid; gap: 10px; margin-top: auto; }
.contacto-directo a {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; color: var(--azul-700); font-weight: 450;
}
.contacto-directo a:hover { color: var(--azul-800); }

/* ===================== CIERRE ===================== */

.cierre { padding: 0 0 82px; }
.cierre-caja {
  max-width: var(--ancho);
  background: linear-gradient(150deg, var(--teal-700) 0%, var(--azul-700) 100%);
  border-radius: var(--r-xl);
  padding: 58px 32px; text-align: center; color: #fff;
  box-shadow: var(--sombra-lg);
}
.cierre-caja h2 { font-size: clamp(26px, 3.6vw, 34px); letter-spacing: -0.028em; }
.cierre-caja p { margin: 12px auto 26px; max-width: 46ch; font-size: 17.5px; color: rgba(255,255,255,0.88); }

/* ===================== PIE ===================== */

.pie { background: var(--azul-900); color: rgba(255,255,255,0.74); padding: 56px 0 26px; font-size: 15.3px; }
.pie-fila {
  display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 1fr; gap: 34px;
  padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.pie-marca img { height: 62px; width: auto; }
.pie-marca p { margin-top: 12px; font-size: 14px; color: rgba(255,255,255,0.55); }

.pie-col h4 {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--teal-300); margin-bottom: 14px;
}
.pie-col a, .pie-col p { display: block; color: rgba(255,255,255,0.74); line-height: 1.7; }
.pie-col a:hover { color: #fff; }

.pie-legal {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px;
  padding-top: 22px; font-size: 14px; color: rgba(255,255,255,0.5);
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 980px) {
  .rejilla-4 { grid-template-columns: repeat(2, 1fr); }
  .pie-fila { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .rejilla-3, .rejilla-2 { grid-template-columns: 1fr; }
  .cabecera-fila { justify-content: space-between; }
  .solo-ancho { display: none; }
  .seccion { padding: 62px 0; }
  .hero { padding: 56px 0 70px; }
  /* En columna, los separadores de puntos estorban */
  .hero-datos { flex-direction: column; align-items: center; gap: 8px; }
  .hero-datos li + li::before { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .contenedor { padding: 0 18px; }
  .rejilla-4 { grid-template-columns: 1fr; }
  .pie-fila { grid-template-columns: 1fr; }
  .hero-acciones .boton { width: 100%; }
  .cierre-caja { padding: 44px 22px; border-radius: var(--r-lg); }
  .marca img { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .boton:hover, .tarjeta:hover, .tarjeta-sc:hover, .doctora:hover { transform: none; }
}
