/**
 * Print Stylesheet for H3 Systems AI Theme
 * Optimized for printing pages cleanly
 * 
 * @package H3_Systems_AI
 */

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

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

    /* Typography adjustments */
    body {
        font-size: 12pt;
        line-height: 1.5;
        font-family: Georgia, "Times New Roman", serif;
    }

    h1 {
        font-size: 24pt;
        page-break-after: avoid;
    }

    h2 {
        font-size: 18pt;
        page-break-after: avoid;
    }

    h3 {
        font-size: 14pt;
        page-break-after: avoid;
    }

    h4, h5, h6 {
        font-size: 12pt;
        page-break-after: avoid;
    }

    p, ul, ol {
        orphans: 3;
        widows: 3;
    }

    /* Hide non-essential elements */
    header,
    footer,
    nav,
    .nav-toggle,
    .mobile-menu,
    .hero-buttons,
    .btn-primary,
    .btn-secondary,
    .back-to-top,
    .skip-link,
    .contact-form,
    .social-links,
    #contact,
    .section-tag,
    .animate-on-scroll,
    [role="navigation"],
    .cookie-consent,
    video,
    audio,
    iframe {
        display: none !important;
    }

    /* Show URLs for links */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666 !important;
    }

    /* Don't show URL for internal anchors */
    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

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

    /* Tables */
    table {
        border-collapse: collapse;
        width: 100%;
    }

    th, td {
        border: 1px solid #333 !important;
        padding: 8px;
        text-align: left;
    }

    /* Code blocks */
    pre, code {
        font-family: "Courier New", monospace;
        font-size: 10pt;
        border: 1px solid #ccc !important;
        padding: 8px;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    /* Blockquotes */
    blockquote {
        border-left: 3px solid #333 !important;
        margin: 1em 0;
        padding-left: 1em;
        font-style: italic;
    }

    /* Cards and sections - remove fancy styling */
    .benefit-card,
    .danger-card,
    .tool-card,
    .practice-card,
    .incident-container,
    article {
        border: 1px solid #ccc !important;
        padding: 1em;
        margin: 1em 0;
        page-break-inside: avoid;
    }

    /* Statistics */
    .stat-number {
        font-size: 18pt;
        font-weight: bold;
    }

    .stat-label,
    .stat-source {
        font-size: 10pt;
    }

    /* Grid layouts - stack for print */
    .benefits-grid,
    .dangers-grid,
    .tools-grid,
    .practices-grid,
    .hero-stats,
    [style*="grid"] {
        display: block !important;
    }

    /* Ensure page breaks are sensible */
    section {
        page-break-before: always;
    }

    section:first-of-type {
        page-break-before: avoid;
    }

    /* Print header */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 2em;
        padding-bottom: 1em;
        border-bottom: 2px solid #333;
    }

    /* Add print footer with URL */
    body::after {
        content: "Printed from h3systems.ai - AI Security & Privacy Consulting";
        display: block;
        text-align: center;
        font-size: 10pt;
        color: #666 !important;
        margin-top: 2em;
        padding-top: 1em;
        border-top: 1px solid #ccc;
    }

    /* Risk badges - make visible in print */
    [role="status"] {
        border: 1px solid #333 !important;
        padding: 2px 8px;
        font-weight: bold;
    }
}
