/* Print styles for rettleiingar pages */

@media print {
    /* Hide web navigation and footer completely */
    body > header,
    body > footer,
    header[data-pagefind-body],
    footer[data-pagefind-ignore],
    #top,
    nav,
    .totop,
    .owl-carousel .owl-nav,
    .owl-carousel .owl-dots {
        display: none !important;
    }

    /* Remove shadow effects and ensure black text */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
        color: black !important;
    }

    /* Base document styling */
    body {
        background: white !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
    }

    main {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Show print-only elements */
    .print\\:block,
    #print-header,
    #print-title,
    #print-hero,
    #print-footer {
        display: block !important;
    }

    /* Hide screen-only elements */
    .print\\:hidden {
        display: none !important;
    }

    /* Print header styling */
    #print-header {
        padding: 0.5cm 1.5cm !important;
    }

    #print-header img {
        width: 100px !important;
        height: auto !important;
    }

    /* Print title styling */
    #print-title {
        padding: 0 1.5cm 0.5cm 1.5cm !important;
    }

    #print-title h1 {
        font-size: 20pt !important;
        font-weight: bold !important;
        margin: 0 0 0.2cm 0 !important;
        line-height: 1.2 !important;
    }

    #print-title p {
        font-size: 11pt !important;
        font-weight: bold !important;
        margin: 0.1cm 0 0 0 !important;
        color: black !important;
    }

    /* Print hero image styling */
    #print-hero {
        padding: 0 1.5cm 0.5cm 1.5cm !important;
    }

    #print-hero img {
        width: 100% !important;
        height: auto !important;
    }

    /* Print content styling */
    #print-content {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 1.5cm !important;
    }

    /* Normal document typography */
    .markdown {
        font-size: 11pt !important;
        line-height: 1.5 !important;
    }

    .markdown > * + * {
        margin-top: 0.4cm !important;
    }

    .markdown h2 {
        font-size: 14pt !important;
        font-weight: bold !important;
        margin-top: 0.5cm !important;
        margin-bottom: 0.1cm !important;
        page-break-after: avoid;
    }

    .markdown h3 {
        font-size: 12pt !important;
        font-weight: bold !important;
        margin-top: 0.4cm !important;
        margin-bottom: 0.05cm !important;
        page-break-after: avoid;
    }

    .markdown h4, .markdown h5, .markdown h6 {
        font-size: 11pt !important;
        font-weight: bold !important;
        margin-top: 0.4cm !important;
        margin-bottom: 0.1cm !important;
    }

    .markdown p {
        font-size: 11pt !important;
        margin: 0.15cm 0 !important;
    }

    .markdown h2 + p,
    .markdown h3 + p {
        margin-top: 0 !important;
    }

    .markdown img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Links */
    .markdown a {
        color: black !important;
        text-decoration: underline !important;
    }

    /* List styling */
    .markdown ul {
        list-style-type: disc !important;
        padding-left: 1.2em !important;
        margin: 0.3cm 0 !important;
    }

    .markdown ol {
        list-style-type: decimal !important;
        padding-left: 1.2em !important;
        margin: 0.3cm 0 !important;
    }

    .markdown ul li,
    .markdown ol li {
        display: list-item !important;
        padding-left: 0.3em !important;
        margin-bottom: 0.1cm !important;
        font-size: 11pt !important;
    }

    .markdown ul li::before {
        display: none !important;
    }

    /* Print footer styling */
    #print-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0.3cm 1.5cm !important;
        border-top: 1px solid #ccc !important;
        font-size: 9pt !important;
        background: white !important;
    }
}
