/* ============================================================
   pg-druck.css - Hausstandard fuer Druck und "Als PDF speichern"
   EINZIGE Quelle fuer alle Webseiten (oeffentlich + intern).
   Eingebunden per @import am Kopf von pg-weilheim-ui.css,
   intern-lichtblick-v2.css und sacred-warmth-tokens.css; Seiten ohne
   diese Dateien binden sie direkt ein:
   <link rel="stylesheet" href="/pg-weilheim-ui/pg-druck.css" media="print">

   05.10.2026: Ohne @page nahm der Browser seine Standardraender und setzte
   Titel, Adresse und Seitenzahl dicht an den Blattrand. Serverseitige PDFs
   (WeasyPrint, PDFKit) folgen denselben Massen - siehe
   berichte/BEFUND_druck_pdf_2026-10-05.md.

   Masse: A4, Rand 20 mm oben, 18 mm seitlich, 22 mm unten.
   Randfelder 8 pt grau; Chrome/Edge ab 131 ersetzen damit ihre eigene
   Kopf-/Fusszeile, Firefox druckt seine eigene - jetzt mit Abstand.
   Eine Seite mit eigenem @page (z.B. Querformat) ueberschreibt dies.
   ============================================================ */
@page {
  size: A4;
  margin: 20mm 18mm 22mm 18mm;
  @top-left {
    content: "Pfarreiengemeinschaft Weilheim i.OB";
    font: 8pt/1.2 "Outfit", "Segoe UI", Arial, sans-serif; color: #6b6259;
    vertical-align: bottom; padding-bottom: 5mm;
  }
  @top-right {
    content: "5csimon.ddnss.eu";
    font: 8pt/1.2 "Outfit", "Segoe UI", Arial, sans-serif; color: #6b6259;
    vertical-align: bottom; padding-bottom: 5mm;
  }
  @bottom-center {
    content: "Seite " counter(page) " von " counter(pages);
    font: 8pt/1.2 "Outfit", "Segoe UI", Arial, sans-serif; color: #6b6259;
    vertical-align: top; padding-top: 6mm;
  }
}

@media print {
  html, body { margin: 0 !important; }
  /* 100vh-Mindesthoehe + Abstand fuer die Handy-Leiste erzeugten eine leere Schlussseite */
  html, body, body.pg-ui { min-height: 0 !important; padding-bottom: 0 !important; }
  main, .pg-content, .pg-contact-sidebar-layout { min-height: 0 !important; padding-bottom: 0 !important; margin-bottom: 0 !important; }
  main > :last-child, .entry-content > :last-child, .ch-s:last-child { margin-bottom: 0 !important; padding-bottom: 0 !important; }

  /* Bildschirm-Bedienelemente nicht drucken (gemessen 05.10.2026 im Druckmodus) */
  #pg-ticker, #site-header, .site-header, .lichtblick-footer, .pg-breadcrumbs,
  .pg-header, .pg-footer, .pg-mobile-nav, .pg-menu-toggle,
  .pg-version-tag, .pg-contact-section, .pg-skip-link,
  .pg-bug-fab, .pg-bug-backdrop, .pg-bug-drawer,
  .pg-a11y-fab, .pg-a11y-backdrop, .pg-a11y-drawer,
  #pgs-dock, #pgs-panel, #pgs-ov { display: none !important; }
  .pg-contact-sidebar-layout { display: block !important; }
  /* Filter- und Bedienknoepfe haben auf Papier keine Funktion */
  body button { display: none !important; }
  a[href^="http"]::after { content: none !important; }

  /* Einblend-Animation startet im Druck nie: Ueberschriften blieben unsichtbar */
  .pg-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

  /* Umbrueche */
  h1, h2, h3, h4 { break-after: avoid; page-break-after: avoid; }
  img, figure, tr { break-inside: avoid; page-break-inside: avoid; }
  p { orphans: 3; widows: 3; }
}
