.pdf-page {
    margin-bottom: 20px;
    background: white;
}

.page-break-after {
    page-break-after: always;
    break-after: page;
}

.page-break-before {
    page-break-before: always;
    break-before: page;
}

.page-break-avoid {
    page-break-inside: avoid;
    break-inside: avoid;
}

@media print {
    .pdf-page {
        margin: 0;
        page-break-after: always;
    }
}

.image-container {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-bottom: 20px;
  }

  .image-wrapper {
    max-width: 100%;
    display: block;
  }

  .image-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* Per forzare una nuova pagina prima dell'immagine se necessario */
  .force-new-page {
    page-break-before: always;
    break-before: page;
  }