/* Ajustes móviles — auditoría de usabilidad (nov 2026).
   Se carga después del CSS principal; solo actúa en pantallas < 768px salvo indicación. */
@media (max-width: 767px) {
  /* 2. Objetivos táctiles de al menos 44×44 px */
  header button,
  button.lg\:hidden {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  a.inline-flex {
    min-height: 44px;
    align-items: center;
  }
  a.w-9.h-9 {
    width: 44px !important;
    height: 44px !important;
  }

  /* 3. Hero: foto atenuada detrás del texto para mejorar contraste */
  section:has(#hero-heading) img.absolute {
    opacity: 0.3;
  }

  /* 4. Botón de WhatsApp flotante: más pequeño y pegado al borde, para no tapar botones */
  a.fixed.bottom-6.right-6 {
    bottom: 12px !important;
    right: 12px !important;
    transform: scale(0.85);
    transform-origin: bottom right;
  }
}

/* 5. Pantallas muy angostas (≤ 359 px, p. ej. 320 px): la cabecera no debe desbordarse */
@media (max-width: 359px) {
  header .flex.items-center.gap-2\.5 {
    gap: 6px !important;
  }
  header img {
    width: 36px !important;
    height: auto !important;
  }
  /* el logo puede encogerse y la leyenda "Cirujano de cabeza y cuello" puede ajustarse en dos líneas */
  header nav a.shrink-0 {
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  header nav .leading-tight .uppercase {
    letter-spacing: 0.02em !important;
    white-space: normal !important;
  }
  header button.lg\:hidden {
    min-width: 40px;
    min-height: 40px;
  }
}

/* 1. Texto mínimo legible: 12 px en todas las pantallas (los tamaños 9–11.5 px eran ilegibles) */
[class*="text-[9px]"],
[class*="text-[10px]"],
[class*="text-[10.5px]"],
[class*="text-[11px]"],
[class*="text-[11.5px]"] {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

/* 6. Palabras muy largas (p. ej. "Nasofibrolaringoscopia") no deben desbordar la pantalla */
h1, h2, h3, h4 {
  overflow-wrap: anywhere;
}
p, li, dd, dt {
  overflow-wrap: break-word;
}
@media (max-width: 767px) {
  p, li { hyphens: auto; }
}

/* 7. Páginas de sede (/sedes/...): su maquetación no tenía estilos en el build; se definen aquí */
.sede {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 56px;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.6;
}
.sede h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: #0b2545;
  margin: 12px 0 10px;
}
.sede h2 {
  font-size: 17px;
  font-weight: 700;
  color: #0b2545;
  margin: 20px 0 6px;
}
.sede .lead {
  font-size: 17px;
  color: #374151;
}
.sede .card {
  background: #f5f8fc;
  border: 1px solid #e5eaf2;
  border-radius: 14px;
  padding: 16px 18px;
  margin: 18px 0;
}
.sede a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sede iframe {
  width: 100%;
  height: 260px;
  border: 0;
  border-radius: 12px;
  margin-top: 8px;
}
@media (min-width: 768px) {
  .sede { padding-top: 40px; }
  .sede h1 { font-size: 34px; }
}
.sede a + a {
  margin-left: 12px;
}
