/* ==========================================
   GLOBAL PRINT STYLESHEET — v2.1
   Refined by Peter J. Vis | 2025-10-04
   Purpose: Clean, archival print and PDF output
   ========================================== */

@media print {

  /* ---- RESET VISUAL NOISE ---- */
  * {
    background: none !important;
    outline: none !important;
    float: none !important;
    box-shadow: none !important;
  }

  /* ---- PAGE GEOMETRY ---- */
  @page {
    margin-top: 80px;   /* Room for environmental header */
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
  }

  /* ---- ENVIRONMENTAL MESSAGE HEADER ---- */
  body::before {
    content: "🌿 Please consider the environment before printing.\A Think twice, print wise!\A Bookmark Instead\A\A www.petervis.com | Donate to the USHMM \A\A Support The Quantum Archive";
    display: block;
    font-size: 16pt;
    font-family: Arial, sans-serif;
    color: #2c5f2d;
    background: #e0f2e9;
    border: 2px solid #2c5f2d;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    width: 80%;
    margin: 80px auto 100px auto;
    line-height: 1.5;
    white-space: pre-line;
    page-break-after: always;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
  }

  /* ---- BASE BODY TEXT ---- */
  body {
    font-family: Arial, sans-serif;
    font-size: 12pt;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #000;
  }

  /* ---- HIDE NON-ESSENTIAL ELEMENTS ---- */
  #header,
  #footer,
  #site-info,
  #footer-menu,
  #nav,
  #footer,
  #mobile-nav,
  #imageCounter,
  .responsive-ad-container,
  .recommendation-ad-container,
  #consent-banner,
  .clear,
  .clear1 {
    display: none !important;
    visibility: hidden !important;
  }

  /* ---- STRIP ADS COMPLETELY ---- */
  .responsive-ad-container,
  .recommendation-ad-container,
  .adsbygoogle,
  .google-auto-placed,
  ins.adsbygoogle,
  iframe[src*="googleads"],
  script[src*="adsbygoogle.js"],
  div[id^="google_ads_iframe_"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
  }

  /* ---- MAIN CONTENT AREA ---- */
  #content,
  #article {
    width: 85%;
    margin: 0 auto;
    padding: 20px;
    text-align: left;
  }

  header h1 {
    font-size: 18pt;
    margin-bottom: 10px;
    text-align: center;
  }

  /* ---- IMAGES ---- */
  img {
    max-width: 99%;
    height: auto;
    display: block;
    margin: 1em auto;
    page-break-inside: avoid;
    break-inside: avoid;
    page-break-before: avoid;
    page-break-after: auto;
  }

  /* ---- PAGE BREAK CONTROL ---- */
  img,
  table,
  figure,
  p,
  .contentbox {
    page-break-inside: avoid !important;
    break-inside: avoid-column !important;
  }

  figure,
  .image-container,
  p {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  article {
    page-break-before: avoid;
    page-break-after: auto;
    break-inside: avoid;
  }

  /* ---- TABLES ---- */
  table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
  }

  table th,
  table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
  }

  /* ---- HORIZONTAL RULE ---- */
  hr {
    border: 0;
    border-top: 2px solid #000;
    margin: 10px 0;
    page-break-before: avoid;
  }

  /* ---- LINKS ---- */
  a {
    color: #000;
    text-decoration: none;
  }

  a:hover {
    text-decoration: underline;
  }

  /* ---- DETAILS / FOOTNOTES ---- */
  #details {
    font-size: 10pt;
    text-align: center;
    margin-top: 20px;
  }

  /* ---- AD SAFETY OVERRIDES ---- */
  .adsbygoogle,
  .google-auto-placed,
  ins.adsbygoogle {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
  }

  /* ---- FINAL FOOTER NOTE ---- */
  body::after {
    content: "Printed from www.petervis.com | © Peter J. Vis 2025";
    display: block;
    text-align: center;
    font-size: 10pt;
    color: #666;
    margin-top: 40px;
    page-break-before: avoid;
  }

}
