/* rd-print.css — gaya cetak sepunya portfolio rusydee.com
   Dipasang 8 Ogos 2026 untuk penjilidan portfolio Guru Cemerlang.

   Tujuan: setiap halaman yang dicetak daripada mana-mana bahagian tapak
   keluar dengan rupa yang SAMA — saiz A4, margin kiri lebih lebar untuk
   ruang jilid, tiada butang atau menu, tiada latar berwarna yang membazir
   dakwat, dan tiada jadual terpotong di tengah halaman.

   Cara pasang pada halaman baharu:
     <link rel="stylesheet" href="/assets/rd-print.css?v=1" media="print">

   Halaman yang SUDAH ada gaya cetak sendiri tidak perlu fail ini. */

@media print {

  /* ---------- halaman ---------- */
  @page {
    size: A4;
    margin: 16mm 12mm 16mm 20mm;   /* kiri 20mm = ruang jilid */
  }

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

  /* ---------- sembunyikan kawalan interaktif ---------- */
  nav, .nav, .navbar, .nav-links, .sidebar, .toolbar,
  button, .btn, .butang, .chev, .fab, .pautan,
  input[type="button"], input[type="submit"], input[type="reset"],
  select, .dropdown, .menu-toggle, .hamburger,
  [role="navigation"], [data-noprint], .noprint, .no-print, .cetak-sembunyi {
    display: none !important;
  }

  /* ---------- pautan ---------- */
  a, a:visited {
    color: #000 !important;
    text-decoration: none !important;
  }

  /* ---------- jangan pecahkan unit bermakna ---------- */
  table, figure, img, tr, blockquote,
  .kad, .card, .qa, .item, .blok, .klip, .lompang, .liputan, .bahan {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }

  h1, h2, h3, h4 {
    break-after: avoid !important;
    page-break-after: avoid !important;
  }
  h1 { font-size: 15pt !important; }
  h2 { font-size: 12.5pt !important; }
  h3 { font-size: 11pt !important; }

  /* ---------- buang kesan skrin ---------- */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
  }
  section, div, article, header, main, aside {
    background-image: none !important;
  }

  /* ---------- imej ---------- */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* ---------- jadual kemas ---------- */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  th, td {
    border: 1px solid #999 !important;
    padding: 5px 7px !important;
    color: #000 !important;
  }
  th { background: #f0f0f0 !important; font-weight: 700 !important; }

  /* ---------- teks Arab kekal boleh dibaca ---------- */
  .ar, .arw, [lang="ar"], [dir="rtl"] {
    color: #000 !important;
    font-family: 'Amiri', 'Traditional Arabic', serif !important;
  }

  /* ---------- kotak berwarna jadi bergaris ---------- */
  .nota, .amaran, .beza, .tally-bukti, .qa-nota {
    background: #fff !important;
    border: 1px solid #999 !important;
    color: #000 !important;
    border-radius: 0 !important;
  }

  /* ---------- bar tajuk: kekalkan teksnya, buang kawalannya ----------
     Beberapa halaman (rekod, lembaran) meletakkan TAJUK halaman di dalam
     .bar bersama butang. Menyembunyikan .bar sepenuhnya akan membuang
     tajuk daripada muka surat bercetak. */
  .bar, .topbar {
    background: #fff !important;
    color: #000 !important;
    border-bottom: 1px solid #000 !important;
    padding: 0 0 6px 0 !important;
    display: block !important;
    margin-bottom: 10px !important;
  }
  .bar b, .topbar b { color: #000 !important; font-size: 12pt !important; }
  .bar a, .bar button, .bar select, .bar input,
  .topbar a, .topbar button, .topbar select, .topbar input {
    display: none !important;
  }
}
