/* ============================================
   YFO.gr Print Stylesheet
   Optimized for clean, professional printing
   ============================================ */

@media print {

  /* === Reset & Base === */
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
  }

  @page {
    size: A4;
    margin: 18mm 15mm;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    font-family: Georgia, 'Times New Roman', serif !important;
    font-size: 11pt !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* === Hide non-essential elements === */
  header,
  nav,
  footer,
  .header-menu-wrap,
  .navbar,
  .sticky-mobile-cta,
  #chatbotToggle,
  #chatbotWindow,
  .chatbot-toggle-btn,
  .chatbot-window,
  .cookie-consent,
  .preloader-wrap,
  .magic-cursor,
  .video-bg,
  video,
  audio,
  iframe,
  .breadcrumb-area,
  .scroll-top,
  .back-to-top,
  .social-share,
  .related-posts,
  .newsletter-section,
  .testimonial-sec,
  .partner-area,
  .feature-sec,
  .cta-sec,
  .quick-replies,
  .blog-bottom-area,
  .blog-detail-tags,
  .author-box,
  .post-navigation,
  button,
  .theme-btn,
  .reading-time-badge,
  .last-updated-badge,
  .ai-summary,
  .toc-wrapper,
  .image-credit,
  noscript,
  .feature-project-info-box,
  .header-right-info,
  .menu,
  .copyright,
  [aria-hidden="true"],
  .d-print-none {
    display: none !important;
  }

  /* === Logo & Title for header === */
  .logo,
  .blog-detail-content-wrap::before {
    display: block !important;
  }

  .blog-detail-content-wrap::before {
    content: "yfo.gr · Your Future Online Digital Agency";
    font-size: 9pt;
    color: #888 !important;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5pt;
    margin-bottom: 15pt;
  }

  /* === Typography === */
  h1, h2, h3, h4, h5, h6 {
    color: #000 !important;
    font-family: Georgia, serif !important;
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  h1 {
    font-size: 24pt !important;
    margin: 0 0 12pt !important;
    border-bottom: 2pt solid #000;
    padding-bottom: 6pt;
  }

  h2 {
    font-size: 18pt !important;
    margin: 18pt 0 10pt !important;
  }

  h3 {
    font-size: 14pt !important;
    margin: 14pt 0 8pt !important;
  }

  h4 {
    font-size: 12pt !important;
    margin: 12pt 0 6pt !important;
  }

  p, li {
    color: #000 !important;
    orphans: 3;
    widows: 3;
  }

  p {
    margin: 0 0 8pt !important;
  }

  /* === Links === */
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  /* Show full URL after link (helps print readers) */
  a[href^="http"]::after,
  a[href^="https"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555 !important;
    word-break: break-all;
  }

  /* Don't show URL for internal anchors or images */
  a[href^="#"]::after,
  a[href^="mailto:"]::after,
  a[href^="tel:"]::after,
  a:has(> img)::after {
    content: "";
  }

  /* === Images === */
  img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
    page-break-after: avoid;
  }

  /* === Tables === */
  table {
    border-collapse: collapse !important;
    page-break-inside: avoid;
    width: 100% !important;
    margin: 10pt 0 !important;
  }

  th, td {
    border: 1px solid #999 !important;
    padding: 6pt 8pt !important;
  }

  th {
    background: #f0f0f0 !important;
    color: #000 !important;
    font-weight: bold;
  }

  /* === Quotes === */
  blockquote {
    border-left: 3pt solid #000 !important;
    padding-left: 12pt !important;
    margin: 10pt 0 !important;
    font-style: italic;
    page-break-inside: avoid;
  }

  /* === Code === */
  pre, code {
    font-family: 'Courier New', monospace !important;
    font-size: 10pt !important;
    border: 1px solid #ddd !important;
    background: #fafafa !important;
    page-break-inside: avoid;
  }

  pre {
    padding: 8pt !important;
    overflow: visible !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
  }

  /* === Lists === */
  ul, ol {
    margin: 0 0 8pt 20pt !important;
    padding: 0 !important;
  }

  li {
    margin: 0 0 4pt !important;
  }

  /* === Page breaks === */
  section, article {
    page-break-inside: auto;
  }

  hr {
    border: none !important;
    border-top: 1px solid #ddd !important;
    margin: 12pt 0 !important;
  }

  /* === Blog content focus === */
  .blog-detail-content-wrap,
  .blog-content-box,
  main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  /* === Print footer with attribution === */
  body::after {
    content: "Πηγή: yfo.gr · Your Future Online Digital Agency · Τρίκαλα, Ελλάδα · Τηλ: 6984249796";
    display: block;
    text-align: center;
    font-size: 9pt;
    color: #666 !important;
    margin-top: 24pt;
    padding-top: 8pt;
    border-top: 1px solid #ddd;
  }

  /* Avoid breaking these elements across pages */
  figure,
  pre,
  blockquote,
  table {
    page-break-inside: avoid;
  }
}
