/* ==========================================================================
   print.css — สไตล์สำหรับการพิมพ์ (@media print)
   Template: tpl_govcore · Joomla 3.10
   โหลดด้วย media="print" จึงไม่กระทบหน้าจอปกติ
   ========================================================================== */

@media print {

  /* ซ่อนส่วนที่ไม่ต้องพิมพ์ */
  .topbar,
  .mainnav,
  .nav-toggle,
  .breadcrumb,
  .hero,
  .announce,
  .header-search,
  .header-meta,
  .quick-grid,
  .sidebar-col,
  .site-footer .social-icons,
  .back-to-top,
  .skip-link,
  .no-print,
  .doc-print-bar,
  .ads-top, .ads-under,
  [class*="slide-"],
  iframe[src*="youtube"],
  iframe[src*="facebook"] {
    display: none !important;
  }

  /* รีเซ็ตพื้นหลัง/สี ให้ประหยัดหมึก + อ่านง่ายบนกระดาษ */
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html, body {
    font-size: 12pt;
    line-height: 1.5;
    background: #fff !important;
    color: #000 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .section {
    padding: 0 !important;
  }

  /* หัวกระดาษ — โลโก้ + ชื่อหน่วยงาน */
  .site-header {
    border-bottom: 2pt solid #000 !important;
    padding: 0 0 8pt !important;
    margin-bottom: 12pt !important;
  }
  .site-header .brand { gap: 12pt; }
  .site-header .emblem-img,
  .error-brand-logo,
  .doc-header img {
    height: 56pt !important;
    filter: none !important;
  }
  .site-header .name h1 { font-size: 18pt !important; }

  /* บทความ */
  .article-page .article-headline,
  .article-page .article-title {
    font-size: 18pt !important;
    color: #000 !important;
  }
  .article-page .article-body {
    font-size: 12pt !important;
    line-height: 1.6 !important;
  }
  .article-page .article-body img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  /* ลิงก์ — แสดง URL ต่อท้ายเพื่อให้รู้ปลายทางเมื่ออ่านบนกระดาษ */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555 !important;
  }
  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }

  /* ตาราง */
  table { border-collapse: collapse !important; }
  table, th, td { border: 1pt solid #999 !important; }
  th, td { padding: 4pt 8pt !important; }
  thead { background: #eee !important; }

  /* การแบ่งหน้า */
  h1, h2, h3, h4 { page-break-after: avoid; }
  img, figure, table, .card { page-break-inside: avoid; }
  p, blockquote { orphans: 3; widows: 3; }

  /* footer พิมพ์ */
  .site-footer {
    border-top: 1pt solid #000 !important;
    padding: 8pt 0 0 !important;
    font-size: 10pt !important;
  }
  .site-footer .grid { display: block !important; }
}
