/* Print Stylesheet (print.css) */
@media print {
  /* 1. Hiding common unnecessary elements */
  #site-header,
  #navigation,
  #sidebar,
  .print-button,
  .skip-link,
  #comments,
  #onetrust-consent-sdk,
  .print-hidden   /* This one is is fairly broad depending on where it appears. */
  {
    visibility: hidden;
    display: none !important;
  }

  header button,
  header > div > div:nth-child(1),
  footer button
  {
    display: none !important;
  }
  footer > div > div:nth-child(1) img {
    margin-top: 3rem !important;
    max-width: 192px !important;
  }

  /* Suppress Link Styles */
  a, a:visited {
    text-decoration: none !important;
    color: inherit !important;
    font-weight: normal !important;
  }
  /* Suppress the visible URL display (if you added it previously) */
  a[href]:after {
    content: none !important;
  }

  /* 2. Basic print cleanup */
  body {
    background: #fff !important;
    color: #000 !important;
    margin: 0;
    padding: 0;
  }

  /* 3. Ensure main content is full width */
  #content, main, article {
    width: 100% !important;
    float: none !important;
  }

  /* 4. Page break control */
  h1, h2, h3 {
    page-break-after: avoid; /* Don't break immediately after a heading */
  }

  article {
    page-break-before: always; /* Start each article on a new page */
  }

  /* 5. Displaying full links */
  a[href]:after {
    content: " (" attr(href) ")";
    word-break: break-all;
  }

  /* 6. Image and media containment */
  img,
  figure,
  video,
  iframe,
  embed,
  object {
    max-width: 100% !important;
    /* Optional: Also hide elements that don't print well or are too complex */
    page-break-inside: avoid;
  }

  /* 7. Ensure the parent content area is also constrained */
  .entry-content,
  main,
  article {
    overflow: visible !important; /* Prevent scrollbars from appearing */
    width: 100% !important;
  }
}