@page {
  margin: 2mm;
  size: A4;
}

@media print {
  html, body {
    background-color: white;
    margin: 0;
  }

  main {
    width: auto;
  }

  .print-about-layout {
    padding: 0 !important;
    page-break-after: always;
  }

  .print-about-layout p,
  .print-about-layout .contact,
  .print-about-layout details {
    break-inside: avoid;
  }

  p {
    padding: 0.3rem 0 0.3rem 0 !important;
    page-break-inside: avoid;
    max-width: 8cm;
  }

  .home-main-about {
    display: block !important;
    padding: 0;
    margin: 0;
  }

  .close,
  header,
  details,
  .horizontal-spacer-1 {
    display: none !important;
  }

  article {
    padding: 0 !important;
  }

  /* --- NEW --- */
  article h1 {
    display: none !important;
  }

  .wrapper-gallery {
    display: block !important;
    margin: 0;
    padding: 0;
  }

  /* Each image + description on its own page */
  .gallery-elements {
    display: block !important;
    break-inside: avoid;
    page-break-inside: avoid;
    page-break-after: always;
    text-align: center;
    margin: 0 auto;
  }

  .gallery-elements img {
    animation: none !important;
    filter: blur(0) !important;
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 20cm;
    height: auto !important;
    margin: 0 auto;
    padding: 0;
    page-break-inside: avoid;
  }

  .gallery-elements p {
    display: block !important;
    text-align: center;
    margin-top: 0.5rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 90%;
    page-break-inside: avoid;
  }

  /* Ensure all images are shown */
  .wrapper-gallery li.gallery-elements:nth-of-type(n + 2) {
    display: block !important;
  }

  .underline {
    text-decoration: none !important;
  }

  /* Hide other paragraphs (cycle info etc.) */
  article > .cycle-info,
  article > p:not(.gallery-elements p) {
    display: none !important;
  }

  .gallery-elements::before {
    content: attr(data-cycle);
    display: block;
    text-align: center;
    font-size: 11px;
    margin-bottom: 0.5rem;
    page-break-before: always;
  }

    body::after {
    content: "Linus Beckmann";
    position: fixed;
    bottom: 5mm;      
    left: 5mm;       
    font-size: 11px;
    color: black;
    page-break-inside: avoid;
    font-family: "Shift-Serif-Light";
  }
    u {
    text-transform: uppercase;
    text-decoration: none !important;
  }
}
