 @media print {



:root {
      --background-body: #fff;
      --primary:#e7453a;
      --text-main: #000000;
      --links:#e7453a;

}


  /* --- Basic Print Resets & Readability --- */
  body {
    font-family: 'Times New Roman', Times, serif; /* Serif fonts are often preferred for print */
    font-size: 12pt; /* A common base font size for print */
    color: black;
    background-color: white;
    margin: 0; /* Remove default body margins if any */
    padding: 0; /* Remove default body padding if any */
    widows: 3; /* Minimum number of lines at the top of a page */
    orphans: 3; /* Minimum number of lines at the bottom of a page */
  }

  /* --- Hide Elements Unsuitable for Print --- */
  /* Add selectors for elements you DON'T want to print */
  header, footer, nav, aside, .sidebar, .no-print, button, form, video, audio {
    display: none !important; /* Use !important carefully, but often needed for print overrides */
  }

  h2,h3,h4,h5,h6 {break-after: avoid-page;}
  img, svg, table, canvas {break-inside: avoid;}


  /* --- Optional: Show URLs for Links --- */
  a[href^="http"]::after,
  a[href^="https"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
    word-wrap: break-word; /* Prevent long URLs from overflowing */
  }
  /* Don't show URLs for internal page links or javascript links */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  /* --- Page Setup: Margins, Header, Footer --- */
  @page {
    /* Define page size (optional, browser default is usually fine) */
    size: A4; /* Or 'letter' */

    /* Define page margins - IMPORTANT to leave space for header/footer */
    /* Adjust these values as needed */
    margin-top: 1.5cm;
    margin-bottom: 1.5cm;
    margin-left: 1cm;
    margin-right: 1cm;
    padding-top:32px;

    /* --- Header Definition --- */
    @top-left {
      content: url('/img/logo32.png') "  MEAction.org.uk"; /* The header text */
      font-size: 10pt;
      font-weight: bold;
      color: #333;
      vertical-align: bottom; /* Align to the bottom of the margin box */
      padding-bottom: 5pt;   /* Add some space below the text */
    }


    /* --- Footer Definition --- */
    @bottom-right {
      content: "Page " counter(page) " of " counter(pages); /* Page x/y */
      font-size: 9pt;
      color: #555;
      vertical-align: top; /* Align to the top of the margin box */
      padding-top: 5pt;    /* Add some space above the page number */
    }

    /* You can also define @bottom-left, @bottom-center, @top-center if needed */
    /* Example:
    @bottom-left {
        content: "Confidential";
        font-size: 8pt;
        color: #666;
    }
    */
  }

  /* --- Page Break Control --- */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid; /* Try to keep headings with the content that follows */
    page-break-inside: avoid;
  }

  table, figure, img, pre, blockquote {
    page-break-inside: avoid; /* Try to keep these elements on a single page */
  }

  ul, ol, dl {
     page-break-before: auto; /* Default behavior */
  }



  /* Firefox only */
  @-moz-document url-prefix() {
    body::before{
      content: url('/img/logo16.png') " MEAction.org.uk";
      font-size: 12px;
      font-family: Arial, sans-serif;
      position: absolute;
      top:0px;
      left: 0;
      padding: 0px;
      padding-bottom:20px;
    }
}

} /* End of @media print */