/*!
 * Pratica Sbloccata - Print Stylesheet
 *
 * @package PraticaSbloccata
 * @version 1.0.0
 */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
        margin: 0;
        padding: 1cm;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
        color: #000;
        margin-top: 0;
    }

    h1 {
        font-size: 24pt;
    }

    h2 {
        font-size: 18pt;
    }

    h3 {
        font-size: 14pt;
    }

    p {
        orphans: 3;
        widows: 3;
        page-break-inside: avoid;
    }

    ul, ol {
        page-break-inside: avoid;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    a[href^="http"]::after,
    a[href^="https"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        color: #555;
    }

    /* Hide non-essential elements */
    .ps-site-header,
    .ps-site-footer,
    .ps-cta-section,
    .ps-sticky-cta,
    nav,
    aside,
    .wp-block-buttons,
    form,
    .skip-link {
        display: none !important;
    }

    /* Show URL after text for important links */
    .ps-service-card,
    .ps-problem-card,
    .ps-why-item {
        page-break-inside: avoid;
        border: 1px solid #ddd !important;
        padding: 0.5cm !important;
        margin-bottom: 0.5cm !important;
    }

    /* Force backgrounds off but keep borders */
    .ps-badge {
        border: 1px solid #000;
        padding: 2pt 6pt;
    }

    /* Page break helpers */
    .ps-section {
        page-break-inside: avoid;
    }

    /* FAQ: always show answers in print */
    .ps-faq-item[open] summary,
    .ps-faq-item summary {
        background: none !important;
    }

    .ps-faq-item {
        page-break-inside: avoid;
    }
}