/**
 * Lneu Blog Print Styles
 * Version: 4.0
 *
 * Hides navigation, sidebar, share buttons, and other non-content elements.
 * Only the article content prints, optimized for readability.
 */

@media print {

  /* ---- Reset & base ---- */
  *,
  *::before,
  *::after {
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html {
    font-size: 12pt;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
  }

  /* ---- Hide non-essential elements ---- */
  .site-header,
  .site-footer,
  .site-sidebar,
  .main-nav,
  .footer-nav,
  .header-actions,
  .search-overlay,
  .search-toggle,
  .menu-toggle,
  .post-toc,
  .floating-share-bar,
  .font-size-controls,
  .post-tags,
  .comments-area,
  .related-posts,
  .post-navigation,
  .pagination-wrap,
  .skip-link,
  .post-category,
  .post-thumbnail,
  .no-results,
  .error-search,
  .error-home {
    display: none !important;
  }

  /* ---- Simplify layout: single column, full width ---- */
  .site-content,
  .site-main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  /* ---- Article content ---- */
  .single-post {
    margin: 0;
    padding: 0;
  }

  .post-header {
    margin-bottom: 1.5em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #ccc;
  }

  .post-title {
    font-size: 22pt;
    line-height: 1.3;
    margin: 0 0 0.5em;
    color: #000;
  }

  /* Only show key meta: author, date, word count, updated */
  .post-meta {
    font-size: 9pt;
    color: #444;
  }

  .post-meta .meta-item {
    display: inline;
    margin-right: 1em;
  }

  /* Hide views (dynamic, not useful in print) */
  .post-meta .meta-views {
    display: none !important;
  }

  /* ---- Content typography ---- */
  .post-content {
    font-size: 12pt;
    line-height: 1.7;
    color: #000;
    max-width: 100% !important;
  }

  .post-content p {
    margin: 0 0 1em;
    orphans: 3;
    widows: 3;
  }

  .post-content h2,
  .post-content h3,
  .post-content h4 {
    page-break-after: avoid;
    break-after: avoid;
  }

  .post-content img,
  .post-content figure {
    max-width: 100% !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .post-content blockquote {
    border-left: 3px solid #999;
    padding-left: 1em;
    font-style: italic;
    color: #333;
  }

  .post-content pre,
  .post-content code {
    font-family: "Courier New", monospace;
    font-size: 10pt;
  }

  .post-content pre {
    border: 1px solid #ccc;
    padding: 0.5em;
    page-break-inside: avoid;
    break-inside: avoid;
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  .post-content table {
    border-collapse: collapse;
    width: 100%;
  }

  .post-content table th,
  .post-content table td {
    border: 1px solid #ccc;
    padding: 0.4em;
  }

  /* ---- Links ---- */
  a,
  a:visited {
    color: #000;
    text-decoration: underline;
  }

  /* Show link URLs in parentheses after link text */
  .post-content a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }

  /* Don't expand internal anchor links */
  .post-content a[href^="#"]::after,
  .post-content a[href^="javascript:"]::after {
    content: "";
  }

  /* ---- Page breaks ---- */
  .single-post {
    page-break-before: auto;
    page-break-after: auto;
  }

  /* Avoid breaking inside cards/items */
  .timeline-item,
  .link-card {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
