/* Print Stylesheet for Essays */
@media print {
    /* Reset colors for print */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Hide non-essential elements */
    header nav,
    .admin-link,
    .pagination,
    .post-nav,
    .read-more,
    footer {
        display: none !important;
    }

    /* Page setup */
    @page {
        margin: 2cm;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    /* Header styling for print */
    header {
        border-bottom: 1pt solid black !important;
        padding-bottom: 0.5cm !important;
        margin-bottom: 1cm !important;
    }

    header h1 {
        font-size: 14pt !important;
    }

    header p {
        font-size: 10pt !important;
    }

    /* Article styling */
    article h2 {
        font-size: 18pt !important;
        margin-bottom: 0.3cm !important;
    }

    article .meta {
        font-size: 10pt !important;
        margin-bottom: 0.5cm !important;
    }

    .content {
        font-size: 11pt !important;
        text-align: justify !important;
    }

    .content p {
        margin-bottom: 0.4cm !important;
        orphans: 3;
        widows: 3;
    }

    .content h2,
    .content h3,
    .content h4 {
        page-break-after: avoid;
    }

    .content blockquote {
        border-left: 2pt solid black !important;
        padding-left: 0.5cm !important;
        margin: 0.5cm 0 !important;
    }

    .content pre,
    .content code {
        font-size: 9pt !important;
        border: 1pt solid #ccc !important;
    }

    /* Links - show URL */
    .content a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666 !important;
    }

    .content a[href^="#"]:after,
    .content a[href^="javascript"]:after {
        content: "";
    }

    /* Prevent page breaks inside elements */
    article,
    blockquote,
    pre {
        page-break-inside: avoid;
    }

    /* Preview articles - hide in print, only show full article */
    article:not(.featured) {
        display: none !important;
    }
}
