﻿
@media print {

    body {
        margin: 0;
        padding: 0;
        color: #000;
        line-height: 1.5;
    }

    /* Hide elements that are not needed in print */
    header, footer, nav, aside, button, .header, .sidebar, .no-print {
        display: none;
    }

    .page {
        padding: 0px;
        padding-top: 0px;
    }

    /* Ensure links are shown as URLs */
    a::after {
        content: " (" attr(href) ")";
    }

    /* Style headings */
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid; /* Prevents page breaks after headings */
    }

    /* Style paragraphs */
    p {
        margin: 0 0 1em;
    }

    /* Style images */
    img {
        max-width: 100%; /* Ensures images do not exceed page width */
        height: auto; /* Maintains aspect ratio */
    }

    /* Style tables */
    table {
        width: 100%;
        border-collapse: collapse; /* Removes spacing between cells */
        margin-bottom: 1em;
    }

    th, td {
        border: 1px solid #000;
        padding: 0.5em;
        text-align: left;
    }

    th {
        background-color: #f0f0f0;
    }

    /* Page breaks */
    .page-break {
        page-break-before: always; /* Forces a page break before the element */
    }
}

/* Optional: Screen-specific styles to hide the print version elements */
@media screen {
    .print-only {
        display: none;
    }
}
