/* Estilos para impresión / PDF */
@media print {
  .nav-superior, .nav-inferior, #barra { display: none !important; }

  body {
    background: white !important;
    color: black !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  .capitulo, .anexo, .front-matter, .back-matter {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Restaurar page-breaks para PDF */
  h1.parte {
    page-break-before: always !important;
    break-before: page !important;
  }

  h1.capitulo-titulo, h1.anexo-titulo {
    page-break-before: always;
    break-before: page;
  }

  h2, h3 {
    page-break-after: avoid;
    break-after: avoid;
  }

  pre, table, .caja {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  pre {
    background: #f5f0e6 !important;
    color: #1a1612 !important;
    border: 1px solid #d9c9a8;
    font-size: 9pt;
  }

  a {
    color: black !important;
    text-decoration: none !important;
  }

  /* Drop cap solo en PDF */
  .capitulo > p:first-of-type::first-letter {
    font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    font-size: 4.5em;
    float: left;
    line-height: 0.85;
    margin: 0.05em 0.12em 0 0;
    color: var(--accent);
    font-weight: 700;
  }
}
