/* ========================================
   PRINT STYLES - Applied only when printing
   ======================================== */

@media print {

    /* --- 1. Reset & Typography for Paper --- */
    body {
        font-family: 'Times New Roman', Georgia, serif;  /* Classic serif font for print */
        font-size: 12pt;  /* Use point size for print (standard: 10-12pt for body) */
        line-height: 1.5;
        color: #000;  /* Pure black text on white paper */
        background: #fff;  /* White background */
        max-width: 100%;  /* Remove max-width constraints */
        margin: 0.5in;  /* Standard print margins */
        padding: 0;
    }

    /* --- 2. Hide Non-Essential Elements --- */
    /* Hide navigation, buttons, or decorative elements that waste ink */
    nav, 
    .menu, 
    .sidebar, 
    .advertisements,
    .social-share-buttons,
    .print-button {  /* Don't print the print button itself! */
        display: none !important;
    }

    /* --- 3. Links: Show URLs in Parentheses (Optional) --- */
    /* This helps readers see where links go, even on paper */
    /*
	a[href]::after {
        content: " (" attr(href) ")";
        font-size: 90%;
        font-style: italic;
        color: #333;
        word-wrap: break-word; 
    }
	*/
    
    /* But don't show URLs for internal links or the back links */
    /*
	a[href^="#"]::after,
    .footnote-back::after,
    a[href^="javascript:"]::after {
        content: ""; 
    }
	*/
    
    /* Style links to show they're clickable, but without underlines (saves ink) */
    a {
        text-decoration: none;
		color: darkblue;
        border-bottom: 1px solid #ccc;  /* Subtle indication instead of heavy underline */
    }

    /* --- 4. Footnotes: Optimize for Print Layout --- */
    
	#footnote-label {
		display: none;
	}		
	.footnote-item {
		margin: 0;  /* Space between footnotes */
	}
    /* Ensure footnotes appear at the bottom of the page */
    .footnotes-section {
        margin-top: 2cm;  /* Extra space before footnotes */
        border-top: 1px solid #000;  /* Solid line for print */
        page-break-before: avoid;  /* Try to keep footnotes with the main text */
        page-break-after: avoid;
    }
    
    /* Keep footnote entries together (don't split across pages) */
    .footnote-item,  /* If using flexbox structure */
    .footnotes-list dt + dd {  /* Float method: target each footnote pair */
        page-break-inside: avoid;  /* Prevent footnote from breaking across pages */
    }
    
    /* Ensure footnote numbers are clearly visible */
    .footnote-term {
        /* font-weight: bold; */
    }
    
    /* Remove the back-link arrow on paper - it's useless in print */
    .footnote-back {
        display: none;  /* Don't print the go-back ↩ symbol */
    }
    
    /* But keep the screen-reader text hidden (still don't print it) */
    .sr-only {
        display: none;
    }

    /* --- 5. In-Text Footnote References --- */
    .footnote-ref {
        font-weight: bold;  /* Make them stand out more on paper */
        color: #000;  /* Black instead of blue */
        border-bottom: none;  /* Remove any link styling */
    }
    
    /* Add a subtle visual indicator for footnote references */
    /*
	.footnote-ref::before {
        content: "[";
    }
    
    .footnote-ref::after {
        content: "]";
    }
	*/
    
    /* Override the general link rule for footnote references */
    .footnote-ref[href]::after {
        content: "";  /* Don't show the full URL for footnote markers */
    }

    /* --- 6. Page Breaks & Widow/Orphan Control --- */
    h1, h2, h3 {
        page-break-after: avoid;  /* Don't leave a heading alone at bottom of page */
        page-break-inside: avoid;
    }
	h1 {
		font-size: 120%;
	}
	h2, h3 {
		font-size: 100%;
	}
    
    p {
        orphans: 3;  /* Minimum lines left at bottom of page */
        widows: 3;   /* Minimum lines at top of next page */
    }
    
    /* Prevent images from breaking across pages */
    img, figure, table {
        page-break-inside: avoid;
    }

    /* --- 7. Ensure URLs are printed for important external links (Optional) --- */
    /* You might want to list URLs for cited sources */
    .bibliography a[href]::after,
    .references a[href]::after {
        content: " (" attr(href) ")";
        display: block;  /* Put URL on new line for readability */
        font-size: 90%;
        word-break: break-all;
    }
	   
}