/* Print Styles - Optimized for all devices */

@media print {
    /* Reset everything for print */
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Base print styles */
    html {
        font-size: 12pt;
    }
    
    body {
        font-family: "Times New Roman", Times, serif;
        font-size: 12pt;
        line-height: 1.4;
        color: #000 !important;
        background: #fff !important;
        margin: 0;
        padding: 0;
    }
    
    /* Hide non-essential elements */
    .no-print,
    .navbar,
    .site-header,
    .hero-background,
    .hero-overlay,
    .hero-actions,
    .btn,
    .social-icons,
    .social-links,
    .mobile-navigation,
    .back-to-top,
    .modal,
    .tooltip,
    .badge:not(.print-badge),
    .footer,
    .site-footer,
    .newsletter-form,
    .contact-form,
    iframe,
    video,
    audio,
    object,
    embed {
        display: none !important;
    }
    
    /* Container adjustments */
    .container,
    .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Typography for print */
    h1, h2, h3, h4, h5, h6 {
        font-family: "Times New Roman", Times, serif;
        font-weight: bold;
        color: #000 !important;
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    h1 {
        font-size: 18pt;
        margin: 1cm 0 0.5cm 0;
    }
    
    h2 {
        font-size: 16pt;
        margin: 0.8cm 0 0.4cm 0;
    }
    
    h3 {
        font-size: 14pt;
        margin: 0.6cm 0 0.3cm 0;
    }
    
    p, li, td, th {
        font-size: 12pt;
        color: #000 !important;
    }
    
    /* Links for print */
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    a[href^="http"]:after,
    a[href^="https://"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666 !important;
    }
    
    a[href^="#"]:after,
    a[href^="mailto:"]:after,
    a[href^="tel:"]:after {
        content: "";
    }
    
    /* Images for print */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    figure {
        page-break-inside: avoid;
        margin: 1cm 0;
    }
    
    figcaption {
        font-size: 10pt;
        color: #666 !important;
        text-align: center;
        margin-top: 0.5cm;
    }
    
    /* Tables for print */
    table {
        border-collapse: collapse;
        width: 100%;
        margin: 1cm 0;
        page-break-inside: avoid;
    }
    
    th, td {
        border: 1px solid #ddd;
        padding: 0.3cm;
        text-align: left;
        font-size: 11pt;
    }
    
    th {
        background: #f5f5f5 !important;
        font-weight: bold;
    }
    
    /* Lists for print */
    ul, ol {
        margin: 0.5cm 0;
        padding-left: 1.5cm;
    }
    
    li {
        margin-bottom: 0.2cm;
        page-break-inside: avoid;
    }
    
    /* Code and pre elements */
    pre, code {
        font-family: "Courier New", Courier, monospace;
        font-size: 11pt;
        background: #f5f5f5 !important;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    pre {
        padding: 0.5cm;
        overflow: auto;
        white-space: pre-wrap;
    }
    
    code {
        padding: 0.1cm 0.2cm;
    }
    
    /* Blockquotes */
    blockquote {
        margin: 1cm 2cm;
        padding: 0.5cm 1cm;
        border-left: 4px solid #ddd;
        font-style: italic;
        page-break-inside: avoid;
    }
    
    /* Forms for print (show values) */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        border: 1px solid #ddd;
        padding: 0.2cm;
        background: #fff !important;
    }
    
    /* Show form values */
    input[type="checkbox"]:checked:before {
        content: "✓ ";
    }
    
    input[type="radio"]:checked:before {
        content: "● ";
    }
    
    /* Page breaks */
    .page-break {
        page-break-before: always;
    }
    
    .avoid-break {
        page-break-inside: avoid;
    }
    
    .break-before {
        page-break-before: always;
    }
    
    .break-after {
        page-break-after: always;
    }
    
    /* Print-only elements */
    .print-only {
        display: block !important;
    }
    
    .print-hide {
        display: none !important;
    }
    
    /* Header and footer for print */
    @page {
        margin: 2cm;
        size: A4;
        
        @top-left {
            content: element(pageHeader);
        }
        
        @top-right {
            content: "Page " counter(page);
            font-size: 10pt;
            color: #666;
        }
        
        @bottom-center {
            content: "© " attr(data-year) " " attr(data-company);
            font-size: 10pt;
            color: #666;
        }
    }
    
    /* Print header */
    .print-header {
        position: running(pageHeader);
        text-align: left;
        font-size: 10pt;
        color: #666;
        margin-bottom: 1cm;
    }
    
    /* QR codes for URLs */
    .print-qr {
        display: block;
        margin: 0.5cm 0;
        max-width: 3cm;
    }
    
    /* Company info for print */
    .print-company-info {
        border-top: 2px solid #000;
        padding-top: 0.5cm;
        margin-top: 1cm;
        font-size: 10pt;
    }
    
    /* Contact info for print */
    .print-contact {
        margin: 0.5cm 0;
        font-size: 11pt;
    }
    
    /* Hero section for print */
    .hero-section {
        min-height: auto !important;
        padding: 0 !important;
        margin: 0 0 1cm 0 !important;
    }
    
    .hero-background,
    .hero-overlay {
        display: none !important;
    }
    
    .hero-content {
        position: static !important;
        color: #000 !important;
        padding: 0 !important;
    }
    
    .hero-title {
        color: #000 !important;
        font-size: 20pt !important;
        margin: 0 0 0.5cm 0 !important;
    }
    
    .hero-subtitle {
        color: #666 !important;
        font-size: 14pt !important;
        margin: 0 0 1cm 0 !important;
    }
    
    /* Cards for print */
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        margin: 0.5cm 0;
        page-break-inside: avoid;
    }
    
    .card-body {
        padding: 0.5cm !important;
    }
    
    .card-title {
        color: #000 !important;
        font-size: 14pt !important;
        margin-bottom: 0.3cm !important;
    }
    
    /* Process steps for print */
    .process-step {
        border: 1px solid #ddd !important;
        margin: 0.5cm 0;
        page-break-inside: avoid;
    }
    
    .step-number,
    .step-icon {
        display: none !important;
    }
    
    /* Features for print */
    .feature-card {
        border: 1px solid #ddd !important;
        margin: 0.5cm 0;
        page-break-inside: avoid;
    }
    
    .feature-icon {
        display: none !important;
    }
    
    /* Trust signals for print */
    .trust-card {
        border: 1px solid #ddd !important;
        margin: 0.5cm 0;
        page-break-inside: avoid;
    }
    
    .trust-icon {
        display: none !important;
    }
    
    /* Grid system for print */
    .row {
        display: block !important;
    }
    
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
    .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
    .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
    .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
    .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Flexbox for print */
    .d-flex,
    .flex-row,
    .flex-column {
        display: block !important;
    }
    
    /* Grid for print */
    .grid,
    .grid-cols-1,
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        display: block !important;
    }
    
    /* Utility classes for print */
    .text-primary,
    .text-success,
    .text-warning,
    .text-danger,
    .text-info {
        color: #000 !important;
    }
    
    .bg-primary,
    .bg-success,
    .bg-warning,
    .bg-danger,
    .bg-info,
    .bg-light,
    .bg-dark {
        background: #fff !important;
    }
    
    .shadow-sm,
    .shadow,
    .shadow-md,
    .shadow-lg,
    .shadow-xl {
        box-shadow: none !important;
    }
    
    .rounded,
    .rounded-sm,
    .rounded-lg,
    .rounded-xl {
        border-radius: 0 !important;
    }
    
    /* Margins and padding for print */
    .m-0, .m-1, .m-2, .m-3, .m-4, .m-5, .m-6, .m-8, .m-12, .m-16, .m-20, .m-24 {
        margin: 0.5cm 0 !important;
    }
    
    .p-0, .p-1, .p-2, .p-3, .p-4, .p-5, .p-6, .p-8, .p-12, .p-16, .p-20, .p-24 {
        padding: 0.3cm !important;
    }
    
    /* Transitions and animations for print */
    .transition,
    .transition-all,
    .transition-colors,
    .transition-opacity,
    .transition-shadow,
    .transition-transform {
        transition: none !important;
    }
    
    .animate__animated,
    .fade-in,
    .slide-in,
    .float-animation,
    .pulse-animation {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Specific page templates for print */
    .front-page .hero-section {
        margin-bottom: 2cm !important;
    }
    
    .template-about .hero-section {
        margin-bottom: 1.5cm !important;
    }
    
    .template-contact .contact-form-card {
        display: none !important;
    }
    
    /* Legal information for print */
    .legal-info {
        font-size: 9pt;
        color: #666 !important;
        border-top: 1px solid #ddd;
        padding-top: 0.5cm;
        margin-top: 2cm;
    }
    
    /* Watermark for draft documents */
    .draft-watermark {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-size: 60pt;
        color: rgba(0, 0, 0, 0.1) !important;
        z-index: 9999;
        pointer-events: none;
    }
    
    /* Print URL at the end */
    .print-url {
        text-align: center;
        font-size: 10pt;
        color: #666 !important;
        margin-top: 1cm;
        border-top: 1px solid #ddd;
        padding-top: 0.5cm;
    }
}

/* Print media query for screens (preview) */
@media screen and (min-width: 768px) {
    .print-preview {
        background: #fff;
        padding: 2cm;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        margin: 2cm auto;
        max-width: 21cm;
        min-height: 29.7cm;
    }
}

/* High contrast print */
@media print and (prefers-contrast: high) {
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
        font-weight: bold;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        text-decoration: underline;
    }
    
    th, td {
        border: 2px solid #000 !important;
    }
}

/* Grayscale print */
@media print and (monochrome) {
    * {
        color: #000 !important;
        background: #fff !important;
    }
    
    img {
        filter: grayscale(100%);
    }
    
    .hero-background {
        filter: grayscale(100%);
    }
}

/* Double-sided print */
@media print and (duplex) {
    @page :left {
        margin-left: 3cm;
        margin-right: 2cm;
    }
    
    @page :right {
        margin-left: 2cm;
        margin-right: 3cm;
    }
}