/**
 * Print-Friendly Styles
 * Optimized layouts for printing and PDF generation
 */

@media print {
    /* Reset and Basic Layout */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    @page {
        margin: 1in;
        size: A4;
    }
    
    html, body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000 !important;
        background: #fff !important;
    }
    
    /* Hide Non-Essential Elements */
    .no-print,
    .navbar,
    .nav-menu,
    .nav-toggle,
    footer,
    .social-sharing,
    .btn,
    .cta-button,
    .back-to-top,
    .cookie-notice,
    .modal,
    .overlay,
    .loading-spinner,
    .performance-overlay,
    .vitals-overlay,
    .skip-links,
    .keyboard-help-modal,
    .page-transition,
    script,
    noscript {
        display: none !important;
    }
    
    /* Hide Decorative Elements */
    .feature-decoration,
    .hero-decoration,
    .background-gradient,
    .animation,
    .hover-effect {
        display: none !important;
    }
    
    /* Layout Adjustments */
    .container,
    .content-wrapper,
    main {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
    }
    
    /* Typography for Print */
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
        margin: 1em 0 0.5em 0;
        font-weight: bold;
    }
    
    h1 {
        font-size: 24pt;
        margin-bottom: 1em;
        border-bottom: 2pt solid #000;
        padding-bottom: 0.5em;
    }
    
    h2 {
        font-size: 18pt;
        margin-top: 1.5em;
    }
    
    h3 {
        font-size: 14pt;
        margin-top: 1.2em;
    }
    
    p {
        margin: 0.5em 0;
        orphans: 3;
        widows: 3;
    }
    
    /* Lists */
    ul, ol {
        margin: 0.5em 0;
        padding-left: 2em;
    }
    
    li {
        margin: 0.25em 0;
        page-break-inside: avoid;
    }
    
    /* Links */
    a {
        color: #000 !important;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
        word-break: break-all;
    }
    
    a[href^="#"]:after,
    a[href^="tel:"]:after,
    a[href^="mailto:"]:after,
    a[href=""]:after {
        content: "";
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
        margin: 0.5em 0;
        border: 1pt solid #ccc;
    }
    
    .headshot img,
    .author-avatar,
    .logo img {
        width: 2in !important;
        height: 2in !important;
        object-fit: cover;
        border-radius: 0;
        float: right;
        margin: 0 0 1em 1em;
    }
    
    /* Tables */
    table {
        border-collapse: collapse;
        width: 100%;
        margin: 1em 0;
        font-size: 10pt;
    }
    
    th, td {
        border: 1pt solid #000;
        padding: 0.5em;
        text-align: left;
        vertical-align: top;
    }
    
    th {
        background: #f0f0f0 !important;
        font-weight: bold;
    }
    
    /* Sections and Articles */
    section {
        margin: 2em 0;
        page-break-inside: avoid;
    }
    
    article {
        page-break-inside: avoid;
        margin: 1.5em 0;
        border-bottom: 1pt solid #ccc;
        padding-bottom: 1em;
    }
    
    .hero,
    .hero-section {
        text-align: left !important;
        padding: 1em 0 !important;
        background: none !important;
        color: #000 !important;
    }
    
    .hero h1,
    .hero-title {
        font-size: 28pt !important;
        margin-bottom: 0.5em;
        color: #000 !important;
    }
    
    .hero p,
    .hero-subtitle {
        font-size: 14pt !important;
        margin-bottom: 1em;
        color: #333 !important;
    }
    
    /* Feature Sections */
    .features-grid,
    .services-grid {
        display: block !important;
    }
    
    .feature-item,
    .service-card {
        display: block !important;
        margin: 1em 0 !important;
        padding: 0.5em 0 !important;
        page-break-inside: avoid;
        border-bottom: 1pt dotted #ccc;
    }
    
    .feature-title,
    .service-title {
        font-weight: bold;
        font-size: 14pt;
        margin-bottom: 0.5em;
    }
    
    /* Forms for Print */
    .contact-form,
    form {
        border: 1pt solid #000;
        padding: 1em;
        margin: 1em 0;
    }
    
    .form-group {
        margin: 0.5em 0;
    }
    
    label {
        font-weight: bold;
        display: block;
        margin-bottom: 0.25em;
    }
    
    input,
    textarea {
        border: 1pt solid #000;
        padding: 0.25em;
        width: 100%;
        background: #fff !important;
        color: #000 !important;
    }
    
    /* Testimonials */
    .testimonial {
        page-break-inside: avoid;
        margin: 1em 0;
        padding: 1em;
        border-left: 3pt solid #000;
        font-style: italic;
    }
    
    .testimonial-author {
        font-style: normal;
        font-weight: bold;
        margin-top: 0.5em;
    }
    
    /* Contact Information */
    .contact-info {
        border: 2pt solid #000;
        padding: 1em;
        margin: 2em 0;
        background: #f9f9f9 !important;
    }
    
    .contact-info h3 {
        margin-top: 0;
        text-align: center;
    }
    
    /* Page Headers and Footers */
    .print-header {
        display: block !important;
        text-align: center;
        border-bottom: 1pt solid #000;
        padding-bottom: 0.5em;
        margin-bottom: 2em;
    }
    
    .print-header .logo-text {
        font-size: 18pt;
        font-weight: bold;
        color: #000;
    }
    
    .print-header .tagline {
        font-size: 12pt;
        color: #666;
        margin-top: 0.5em;
    }
    
    /* Article Specific */
    .article-meta {
        font-size: 10pt;
        color: #666 !important;
        margin-bottom: 1em;
        border-bottom: 1pt dotted #ccc;
        padding-bottom: 0.5em;
    }
    
    .article-tags {
        display: block !important;
        margin: 1em 0;
    }
    
    .tag {
        display: inline !important;
        background: none !important;
        color: #666 !important;
        border: 1pt solid #666 !important;
        padding: 0.2em 0.5em !important;
        margin: 0.2em !important;
        border-radius: 0 !important;
        font-size: 9pt;
    }
    
    /* Assessment/Quiz */
    .assessment-section {
        page-break-before: always;
    }
    
    .question {
        margin: 1.5em 0;
        page-break-inside: avoid;
    }
    
    .question-title {
        font-weight: bold;
        margin-bottom: 0.5em;
    }
    
    .answer-options {
        margin-left: 1em;
    }
    
    .answer-option {
        margin: 0.25em 0;
    }
    
    /* Business Cards / Contact Printout */
    .print-business-card {
        width: 3.5in;
        height: 2in;
        border: 1pt solid #000;
        padding: 0.25in;
        page-break-inside: avoid;
        float: left;
        margin: 0.25in;
    }
    
    /* Utility Classes */
    .page-break-before {
        page-break-before: always;
    }
    
    .page-break-after {
        page-break-after: always;
    }
    
    .no-page-break {
        page-break-inside: avoid;
    }
    
    .print-only {
        display: block !important;
    }
    
    .screen-only {
        display: none !important;
    }
    
    /* QR Codes and Print-specific content */
    .qr-code {
        width: 1in;
        height: 1in;
        float: right;
        margin: 0.5em;
    }
    
    .print-url {
        font-family: monospace;
        font-size: 10pt;
        word-break: break-all;
        background: #f0f0f0;
        padding: 0.25em;
        margin: 0.5em 0;
    }
    
    /* Two-column layout for dense content */
    .print-two-column {
        column-count: 2;
        column-gap: 1em;
        column-rule: 1pt solid #ccc;
    }
    
    .print-two-column h1,
    .print-two-column h2,
    .print-two-column h3 {
        column-span: all;
    }
}