/* ======================================
   ESTILO PARA IMPRESIÓN
   Cumple WCAG 1.4.1 (Use of Color, A)
   Basado en estilos.css
====================================== */
@import url("estilos.css");

/* General */
body {
  background: white;
  color: black;
  font-size: 12pt;
  line-height: 1.6;
  margin: 2cm;
}

/* Quitar colores decorativos */
header, footer, nav, aside {
  background: none !important;
  color: black !important;
  border: none !important;
  box-shadow: none !important;
}

/* Ocultar elementos no útiles para impresión */
nav, .skip-link, button, input[type="submit"] {
  display: none !important;
}

/* Mostrar enlaces como texto */
a {
  color: black;
  text-decoration: underline;
}

a::after {
  content: " (" attr(href) ")";
  font-size: 10pt;
}

/* Ajuste de tablas */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11pt;
  margin-bottom: 1.5em;
}

th, td {
  border: 1px solid #444;
  padding: 6px;
  text-align: left;
}

/* Evitar cortes de contenido */
table, img, figure, p, h2, h3, ul, ol {
  page-break-inside: avoid;
}

/* Cada sección importante empieza en nueva página */
section, article {
  page-break-before: auto;
  page-break-after: auto;
  orphans: 3; /* mínimo de líneas en página anterior */
  widows: 3;  /* mínimo de líneas en página siguiente */
}

/* Título y estructura */
h1, h2, h3 {
  color: black;
  page-break-after: avoid;
  margin-top: 1.5em;
}

/* Pie de página simple para impresión */
footer::after {
  content: "© 2025 Biblioteca Salud UA — Impreso desde https://tu-sitio.neocities.org";
  display: block;
  text-align: center;
  font-size: 10pt;
  margin-top: 2em;
  color: #333;
}

/* Eliminar bordes y fondos innecesarios de formularios */
form, fieldset, legend {
  border: none !important;
  background: none !important;
}
