/* =========================================================================
   print.css — Facharztzentrum Schlachtensee
   Druckoptimierung für DIN A4 Portrait (210 mm × 297 mm)
   Eingebunden als <link media="print"> — kein Einfluss auf den Screen.
   =========================================================================
*/

@media print {

  /* ── 1. SEITENGRÖSSE & RÄNDER ──────────────────────────────────────── */
  @page {
    size: A4 portrait;          /* 210 mm × 297 mm                        */
    margin: 20mm 15mm 25mm;     /* Oben · Rechts/Links · Unten            */
  }
  @page :first {
    margin-top: 15mm;           /* Etwas mehr Platz für die erste Seite   */
  }

  /* ── 2. AUSGEBLENDETE UI-ELEMENTE ──────────────────────────────────── */
  /* Alles ausblenden, das auf Papier keinen Mehrwert hat               */
  .gr-header,                   /* Haupt-Navigation                       */
  .gr-mobile-toggle,            /* Hamburger-Menü                         */
  .theme-switch,                /* Hell-/Dunkel-Umschalter                */
  .font-btn,                    /* Schriftgrößen-Buttons                  */
  .tts-nav-btn,                 /* Vorleser-Nav-Button                    */
  .tts-article-btn,             /* "Artikel vorlesen"-Buttons             */
  button,                       /* Alle verbleibenden Buttons             */
  #tarteaucitronRoot,           /* Cookie-Manager (komplett)              */
  #tarteaucitronIcon,
  #tarteaucitronAlertBig,
  #tarteaucitronAlertSmall,
  #tarteaucitronPercentage,
  #font-dsgvo-notice,           /* Hinweis-Banner Adobe Fonts             */
  #share-action-toolbar,        /* Share-Toolbar                          */
  #sha-toast,
  #sha-fallback-menu,
  .liquid-overlay,              /* Hintergrundbild-Overlay                */
  .skip-link,                   /* Skip-to-content Link                   */
  footer a {                    /* Footer-Links — Pflichttext bleibt      */
    display: none !important;
  }

  /* ── 3. HINTERGRÜNDE & GLASEFFEKTE ENTFERNEN ──────────────────────── */
  *,
  *::before,
  *::after {
    background        : white !important;
    background-image  : none !important;
    backdrop-filter   : none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow        : none !important;
    text-shadow       : none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── 4. TYPOGRAFIE ─────────────────────────────────────────────────── */
  html {
    font-size: 10pt;            /* Basisgröße für DIN A4 Druck            */
  }

  body {
    background  : white !important;
    color       : #000 !important;
    font-family : Georgia, 'Times New Roman', Times, serif;
    line-height : 1.55;
  }

  h1 { font-size: 18pt; margin: 0 0 8pt; }
  h2 { font-size: 14pt; margin: 14pt 0 6pt; }
  h3 { font-size: 12pt; margin: 10pt 0 4pt; }
  p  { margin: 0 0 7pt; orphans: 3; widows: 3; }

  /* Keine Überschrift allein am Seitenende (verwaist)                  */
  h1, h2, h3, h4, h5, h6 {
    page-break-after : avoid;
    break-after      : avoid;
    color            : #000 !important;
  }

  /* ── 5. LAYOUT — EINSPALTIGER DRUCK ───────────────────────────────── */
  .container {
    width     : 100% !important;
    max-width : 100% !important;
    padding   : 0 !important;
    margin    : 0 !important;
  }

  main {
    padding : 0 !important;
  }

  /* Zwei- und Drei-Spalten-Grids auf eine Spalte reduzieren           */
  .glass-tile,
  [class*="grid-"] {
    display : block !important;
    width   : 100% !important;
    float   : none !important;
  }

  /* ── 6. INHALTSBOXEN (GLASS-CARDS) ────────────────────────────────── */
  .glass-card {
    background    : white !important;
    border        : 1pt solid #bbb !important;
    border-radius : 0 !important;
    margin        : 0 0 12pt !important;
    padding       : 10pt !important;
    page-break-inside : avoid;
    break-inside      : avoid;
  }

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

  /* ── 7. LINKS — URL IM TEXT ANZEIGEN ──────────────────────────────── */
  /* Externe URLs nach dem Linktext einblenden, damit sie lesbar sind  */
  main a[href]::after {
    content    : ' (' attr(href) ')';
    font-size  : 8pt;
    color      : #444;
    word-break : break-all;
  }
  /* Anker, tel:, mailto: ohne URL-Anhang                              */
  main a[href^="#"]::after,
  main a[href^="tel:"]::after,
  main a[href^="mailto:"]::after {
    content : '';
  }

  /* ── 8. BILDER ─────────────────────────────────────────────────────── */
  img {
    max-width          : 100% !important;
    height             : auto !important;
    page-break-inside  : avoid;
    break-inside       : avoid;
  }

  /* Hintergrundbild als eigenständiges <img>-Element ausblenden       */
  body > img {
    display : none !important;
  }

  /* ── 9. FORMULARE AUSBLENDEN ───────────────────────────────────────── */
  form,
  .form-group,
  .file-upload,
  .hint,
  .error {
    display : none !important;
  }

  /* ── 10. FUSSZEILE ─────────────────────────────────────────────────── */
  footer {
    margin-top  : 16pt !important;
    padding-top : 8pt !important;
    border-top  : 1pt solid #ccc !important;
    font-size   : 8pt !important;
    color       : #555 !important;
    text-align  : center !important;
    page-break-inside : avoid;
    break-inside      : avoid;
  }

}
