/* ==========================================================================
   KnowMeal — Print Stylesheet
   ========================================================================== */

@media print {
    /* Hide non-essential elements */
    .km-header,
    .km-footer,
    .km-skip-link,
    .km-mobile-menu,
    .km-mobile-overlay,
    .km-breadcrumbs,
    .km-single__toc-sidebar,
    .km-single__sidebar,
    .km-share,
    .km-helpfulness,
    .km-comments,
    .km-cta-block,
    .km-cta-section,
    .km-newsletter,
    .km-pagination,
    .km-audio-player,
    .km-btn,
    nav,
    aside,
    button,
    form {
        display: none !important;
    }

    /* Reset colors for print */
    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
        line-height: 1.5;
    }

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

    h1 { font-size: 24pt; }
    h2 { font-size: 18pt; }
    h3 { font-size: 14pt; }

    /* Full width content */
    .km-container,
    .km-container--narrow,
    .km-single__layout,
    .km-single__content-area {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .km-single__layout {
        display: block;
    }

    /* Show URLs after links */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

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

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

    /* Tables */
    table {
        border-collapse: collapse;
    }

    th, td {
        border: 1px solid #ccc;
        padding: 8px;
    }

    /* Key takeaways */
    .km-takeaways {
        border: 2px solid #000;
        padding: 16px;
        margin: 16px 0;
        page-break-inside: avoid;
    }

    /* FAQ */
    .km-faq__item {
        border: 1px solid #ccc;
        margin-bottom: 8px;
    }

    .km-faq__item[open] summary,
    .km-faq__question {
        font-weight: bold;
    }

    /* Page breaks */
    .km-single__content h2 {
        page-break-before: auto;
    }

    p, li, blockquote {
        orphans: 3;
        widows: 3;
    }

    /* Meal cards */
    .km-meal-card {
        border: 1px solid #ccc;
        padding: 8px;
        margin: 4px;
        page-break-inside: avoid;
    }

    .km-callout {
        border: 1px solid #ccc;
        padding: 12px;
        page-break-inside: avoid;
    }
}
