/**
 * Print Stylesheet for Orchids of New Guinea
 * Optimizes pages for printing (species detail pages, glossary, blogs)
 */

@media print {

    /* Hide non-essential elements */
    .header-v8,
    .blog-topbar,
    .navbar,
    .breadcrumbs,
    .footer-v1,
    #back-to-top,
    .btn-group,
    .annotated-list,
    .spinning-loader,
    #captchaContainer,
    .btn,
    form,
    .hidden-print {
        display: none !important;
    }

    /* Reset backgrounds and colors for ink saving */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
        line-height: 1.5;
    }

    .wrapper {
        margin: 0;
        padding: 0;
    }

    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Show full URLs for links */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #555;
    }

    a[href^="/"]:after {
        content: " (https://www.orchidsnewguinea.com" attr(href) ")";
        font-size: 0.8em;
        color: #555;
    }

    /* Navigation links don't need URL display */
    nav a:after,
    .nav a:after,
    .btn a:after {
        content: "" !important;
    }

    /* Images: keep but constrain */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Headings: avoid breaks after */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: #000 !important;
    }

    /* Full-width columns on print */
    .col-md-9,
    .col-md-8,
    .col-sm-8,
    .col-md-6,
    .col-sm-6,
    .col-md-12,
    .col-sm-12 {
        width: 100% !important;
        float: none !important;
    }

    /* Sidebars: hide on print (glossary sidebar, etc) */
    .col-md-3,
    .col-sm-4 {
        display: none !important;
    }

    /* Remove box shadows */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

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

    /* Prevent orphans and widows */
    p {
        orphans: 3;
        widows: 3;
    }

    /* Print header */
    .content-sm:before {
        content: "Orchids of New Guinea - www.orchidsnewguinea.com";
        display: block;
        text-align: center;
        font-size: 10pt;
        color: #666;
        margin-bottom: 20px;
        border-bottom: 1px solid #ccc;
        padding-bottom: 10px;
    }
}
