/*
 * WRD Spider 4 vs 4M Comparison - Print Stylesheet
 * Clean PDF output for Legal (8.5" × 14") paper
 * Print from Chrome: Background graphics ON, Scale 100%, Margins Default
 */

@media print {

    /* Force color printing where needed */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }


    /* ============================================
     PAGE & DOCUMENT SETUP
     ============================================ */
    @page {
        size: letter portrait;
        margin: 0.5in 0.5in;
        padding-top: 0.5in;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size: 10pt;
        line-height: 1.4;
        color: #000;
    }

    /* Remove WordPress theme containers padding/margins */
    .container,
    .card,
    .padded,
    #content,
    #main,
    #spider-comparison {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
        border: none !important;
    }


    /* ============================================
     HIDE WEB-ONLY ELEMENTS
     ============================================ */
    #wpadminbar,
    .page-head,
    .article-header,
    .full-width-header,
    header,
    footer,
    nav,
    .navbar,
    .header,
    .footer-site,
    .menu,
    .sidebar,
    .breadcrumb,
    .cta-buttons,
    .btn,
    button,
    .no-print,
    .placeholder-box,
    .visual-comparison-section {
        display: none !important;
    }

    .product-image-placeholder img,
    .feature-image-placeholder img,
    .comparison-image-placeholder img {
        border-radius: 8pt;
    }

    .print-only {
        display: block !important;
    }


    /* ============================================
     PAGINATION CONTROL
     ============================================ */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
        orphans: 3;
        widows: 3;
        font-weight: 700;
        color: #000;
    }

    p,
    li {
        orphans: 2;
        widows: 2;
    }

    p {
        margin: 0 0 6pt;
    }

    .entry-content p {
        margin: 0 0 6pt;
        font-size: 10pt !important;
    }


    /* ============================================
     HERO SECTION - NO PAGE BREAK
     ============================================ */
    .comparison-hero {
        margin: 0 0 18pt 0;
        padding: 0;
        background: none !important;
        border-bottom: 2pt solid #d75917;
        page-break-after: avoid;
        /* DO NOT force new page */
    }

    .comparison-main-title {
        font-size: 28pt;
        font-weight: 700;
        color: #000;
        margin: 0 0 6pt 0;
        line-height: 1.1;
        text-align: center;
        padding-top: 24pt;
    }

    .comparison-main-title .vs-separator {
        color: #d75917;
        font-weight: 300;
        font-style: italic;
    }

    .comparison-subtitle {
        font-size: 11pt;
        font-weight: 400;
        color: #555;
        margin: 0;
        line-height: 1.3;
        text-align: center;
    }


    /* ============================================
     SECTION TITLES
     ============================================ */
    .section-title {
        font-size: 14pt;
        font-weight: 700;
        color: #000;
        margin: 16pt 0 10pt 0;
        padding-bottom: 4pt;
        padding-top: 12pt;
        border-bottom: 1.5pt solid #d75917;
        page-break-after: avoid;
    }

    .section-title:first-of-type {
        margin-top: 0;
    }

    .section-intro {
        font-size: 9pt;
        color: #555;
        margin-bottom: 10pt;
    }


    /* ============================================
     PRODUCT CARDS - COMPACT
     ============================================ */
    .comparison-overview {
        margin: 10pt 0 14pt 0;
        page-break-inside: avoid;
    }

    .comparison-table-row {
        display: table;
        width: 100%;
        table-layout: fixed;
        border-spacing: 6pt 0;
    }

    .comparison-table-row>[class*="col-"] {
        display: table-cell;
        float: none;
        width: 50%;
        vertical-align: top;
    }

    .product-card {
        border: 1pt solid #ccc;
        background: #fff !important;
        page-break-inside: avoid;
    }

    .product-card.enhanced {
        border: 1.5pt solid #d75917;
    }

    .product-card-header {
        background: #333 !important;
        /* Light gray instead of dark */
        color: #fff !important;
        /* Black text */
        padding: 8pt 10pt;
    }

    .product-card.enhanced .product-card-header {
        background: #d75917 !important;
        /* Light orange tint */
    }

    .product-card-header h3 {
        margin: 0 0 2pt 0;
        font-size: 16pt;
        font-weight: 700;
        color: #fff !important;
        line-height: 1.2;
    }

    .product-card-badge {
        margin: 0;
        font-size: 7pt;
        color: #fff !important;
        text-transform: uppercase;
        letter-spacing: 0.3pt;
        font-weight: 600;
    }

    .product-highlights {
        padding: 10pt;
    }

    .feature-list {
        list-style: none;
        padding: 0;
        margin: 0;
        font-size: 10pt;
        line-height: 1.4;
        padding-left: 18pt;
    }

    .feature-list li {
        margin-bottom: 4pt;
        padding-left: 12pt;
        position: relative;
        color: #000;
    }

    .feature-list.enhanced-list li::before {
        color: #d75917;
    }

    .feature-list.enhanced-list li i:before {
        color: #d75917 !important;
    }


    /* ============================================
     FEATURE ROWS - SINGLE COLUMN FOR PRINT
     ============================================ */
    .feature-comparison-section {
        margin-bottom: 14pt;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .feature-row {
        margin-bottom: 12pt;
        padding: 8pt 0;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .feature-row:last-child {
        border-bottom: none;
    }

    /* Force single column layout */

    .feature-content {
        padding: 0;
    }

    .feature-title {
        font-size: 11pt;
        font-weight: 700;
        color: #000;
        margin: 0 0 6pt 0;
        line-height: 1.2;
        page-break-after: avoid;
    }

    .feature-number {
        display: inline-block;
        width: 20pt;
        height: 20pt;
        background: #d75917 !important;
        color: #fff !important;
        border-radius: 50%;
        font-size: 10pt;
        font-weight: 700;
        text-align: center;
        line-height: 20pt;
        margin-right: 6pt;
        vertical-align: middle;
    }

    .improvement-badge {
        display: inline-block;
        background: gold !important;
        /* Light gray, not green */
        color: #333 !important;
        padding: 2pt 6pt;
        font-size: 6pt;
        font-weight: 700;
        margin-bottom: 4pt;
        text-transform: uppercase;
        letter-spacing: 0.3pt;
    }

    .feature-description {
        font-size: 10pt !important;
        line-height: 1.4;
        color: #000;
        margin-bottom: 6pt;
    }

    .benefit-list {
        font-size: 10pt;
        line-height: 1.4;
        margin-top: 6pt;
        display: none;
    }

    .benefit-list li::before {
        color: #d75917;
    }


    /* ============================================
     SPECS TABLE
     ============================================ */
    .technical-specs-section {
        margin-bottom: 14pt;
        page-break-inside: auto;
        /* Allow breaking if needed */
        break-inside: avoid;
    }

    .specs-table-wrapper {
        overflow: visible;
        margin-top: 10pt;
    }

    /* Single column for Bootstrap grid */
    .technical-specs-section .row>[class*="col-"] {
        width: 100% !important;
        float: none !important;
    }

    .comparison-specs-table {
        width: 100%;
        border-collapse: collapse;
        background: #fff;
        font-size: 8pt;
        border: 1pt solid #999;
    }

    .comparison-specs-table thead {
        display: table-header-group;
        background: #f5f5f5 !important;
        /* Light gray, not dark */
        color: #000 !important;
    }

    .comparison-specs-table thead th {
        padding: 6pt 8pt;
        font-weight: 700;
        text-align: left;
        font-size: 9pt;
        border-bottom: 1.5pt solid #d75917;
        color: #000 !important;
    }

    .comparison-specs-table tbody {
        display: table-row-group;
    }

    .comparison-specs-table tbody tr {
        border-bottom: 0.5pt solid #ddd;
        page-break-inside: avoid;
    }

    .comparison-specs-table tbody tr:last-child {
        border-bottom: none;
    }

    .comparison-specs-table td {
        padding: 5pt 8pt;
        vertical-align: middle;
        border-right: 0.5pt solid #eee;
    }

    .comparison-specs-table td:last-child {
        border-right: none;
    }

    .spec-label {
        font-weight: 600;
        color: #000;
        background: #fafafa !important;
    }

    .enhanced-cell {
        background: #fffbf8 !important;
    }

    .enhanced-cell strong {
        color: #d75917;
        font-weight: 700;
    }

    .new-badge {
        display: inline-block;
        background: gold !important;
        color: #333 !important;
        padding: 1pt 4pt;
        font-size: 6pt;
        font-weight: 700;
        margin-left: 3pt;
        text-transform: uppercase;
        letter-spacing: 0.3pt;
    }

    .text-success {
        color: #5cb85c;
        font-size: 10pt;
        font-weight: 700;
    }


    /* ============================================
     UPGRADE GUIDE
     ============================================ */
    .upgrade-guide-section {
        margin-bottom: 14pt;
        page-break-inside: avoid;
    }

    /* Single column layout */
    .upgrade-guide-section .row>[class*="col-"] {
        width: 100% !important;
        float: none !important;
    }

    .upgrade-card {
        background: #fff !important;
        padding: 8pt 10pt;
        margin-bottom: 8pt;
        border-left: 2pt solid gold;
        page-break-inside: avoid;
    }

    .upgrade-card:last-child {
        margin-bottom: 0;
    }

    .upgrade-card h3 {
        font-size: 12pt;
        font-weight: 700;
        color: #000;
        margin: 0 0 4pt 0;
    }

    .upgrade-card h3 i {
        color: #d75917;
    }

    .upgrade-card p {
        font-size: 10pt;
        line-height: 1.4;
        color: #000;
        margin-bottom: 0;
    }

    .reassurance-note {
        background: #fff3e0 !important;
        border-left: 2pt solid #ff9800;
        padding: 8pt 10pt;
        margin-top: 10pt;
        page-break-inside: avoid;
    }

    .reassurance-note p {
        margin: 0;
        font-size: 8pt;
        line-height: 1.4;
        color: #000;
    }

    .reassurance-note strong {
        color: #e65100;
        font-weight: 700;
    }


    /* ============================================
     SHARED FEATURES
     ============================================ */
    .shared-features-section {
        margin-bottom: 14pt;
        page-break-inside: avoid;
    }

    .shared-features-grid {
        margin-top: 10pt;
    }

    /* Force 2-column grid for print */
    .shared-features-grid>[class*="col-"] {
        width: 48% !important;
        float: left !important;
        margin-right: 2% !important;
        margin-bottom: 8pt !important;
    }

    .shared-features-grid>[class*="col-"]:nth-child(2n) {
        margin-right: 0 !important;
    }

    .shared-feature-box {
        padding: 8pt;
        text-align: center;
        border-top: 2pt solid #e0e0e0;
        background: #fff !important;
        page-break-inside: avoid;
        min-height: 60pt;
    }

    .feature-icon {
        width: 36pt;
        height: 36pt;
        background: #d75917 !important;
        border-radius: 50%;
        display: inline-block;
        text-align: center;
        line-height: 24pt;
        margin-bottom: 6pt;
    }

    .feature-icon i {
        color: #fff !important;
        font-size: 22pt;
        vertical-align: middle;
        margin-top: 7pt;
    }

    .feature-icon i:before {
        color: #fff !important;
    }

    .shared-feature-box h4 {
        font-size: 12pt;
        font-weight: 700;
        color: #000;
        margin: 0 0 4pt 0;
    }

    .shared-feature-box p {
        font-size: 10pt;
        line-height: 1.3;
        color: #555;
        margin: 0;
    }


    /* ============================================
     CTA SECTION - LIGHT & COMPACT
     ============================================ */
    .comparison-cta-section {
        page-break-before: avoid;
        /* NO forced page break */
        margin: 14pt 0 0 0;
        padding: 12pt;
        padding-top: 20pt;
        background: #d75917 !important;
        /* LIGHT gray, not dark */
        color: #fff !important;
        /* Black text */
        text-align: center;
    }

    .comparison-cta-section h2 {
        font-size: 14pt;
        font-weight: 700;
        color: #fff !important;
        margin: 0 0 6pt 0;
    }

    .cta-subtitle {
        font-size: 10pt;
        color: #fff !important;
        margin-bottom: 0;
        line-height: 1.3;
    }


    /* ============================================
     LINKS
     ============================================ */
    a {
        color: #000;
        text-decoration: none;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 7pt;
        color: #666;
        font-weight: 400;
    }

    a[href^="#"]::after {
        content: "";
    }

}