@media print {

  /* Reset farieb a pozadí */
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Skryť prvky, ktoré sa netlačia */
  nav,
  header,
  footer,
  .sidebar,
  .hero,
  .hero-fade,
  .back-link,
  .no-print,
  .gallery-select,
  .year-grid,
  .album figure,
  .album-detail .album-photos figure {
    display: none !important;
  }

  /* Obsah */
  main,
  article,
  .content,
  .album-detail {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Nadpis prvej úrovne – viditeľný */
  h1 {
    font-size: 28pt !important;
    margin-bottom: 0.4em !important;
    border-bottom: 2px solid #000 !important;
    padding-bottom: 0.2em !important;
    display: block !important;
  }

  /* Ostatné nadpisy */
  h2 {
    font-size: 20pt !important;
    margin-top: 1.2em !important;
    margin-bottom: 0.4em !important;
  }

  h3 {
    font-size: 16pt !important;
    margin-top: 1em !important;
    margin-bottom: 0.3em !important;
  }

  /* Odkazy – zobrazíme URL */
  a::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
  }

  /* Obrázky */
  img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid !important;
  }

  /* Odstavce */
  p,
  li,
  time {
    font-size: 12pt !important;
    line-height: 1.5 !important;
  }

  /* Články */
  article {
    margin-bottom: 1.5em !important;
    page-break-inside: avoid !important;
  }

  /* Album detail – popisy */
  .album-detail figcaption {
    font-size: 10pt !important;
    color: #000 !important;
  }

  /* Zamedziť zlomu hneď po nadpisoch */
  h1, h2 {
    page-break-after: avoid !important;
  }

  /* ============================================
     ČÍSLOVANIE STRÁN
  ============================================ */
  @page {
    margin: 1.5cm;
    size: A4;
    counter-increment: page;
  }

  body::after {
    content: "Strana " counter(page);
    position: fixed;
    bottom: 0.5cm;
    right: 0;
    font-size: 10pt;
  }
}
