@media print {
  header, nav, .custom-navbar, .navbar, 
  aside, footer, video, audio, button, 
  .btn-group, .form-actions, #skiptocontent {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
    line-height: 1.3;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  a {
    color: black !important;
    text-decoration: underline;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    font-weight: normal;
  }

  img {
    max-width: 50% !important;
    height: auto !important;
    page-break-inside: avoid;
    float: none !important;
    display: block;
    margin: 0 auto 1em;
  }

  table {
    width: 100% !important;
    page-break-inside: avoid;
    font-size: 10pt;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  p, li, blockquote {
    page-break-inside: avoid;
  }

  form {
    border: none !important;
    padding: 0 !important;
  }

  input, textarea {
    border: 1px solid #ccc !important;
    background: white !important;
    width: 100% !important;
  }

  .grid {
    display: block !important;
  }

  .grid figure {
    page-break-inside: avoid;
    margin-bottom: 1em;
    text-align: center;
  }

  .custom-border, .table-bordered {
    border: 1px solid #000 !important;
    background: none !important;
    box-shadow: none !important;
  }

  @page {
    margin: 1.5cm;
    size: A4;
  }

  @page :first {
    @top-center {
      content: "Hangszedők";
      font-size: 0.8em;
    }
  }

  @page {
    @bottom-right {
      content: counter(page) " / " counter(pages);
      font-size: 0.8em;
    }
  }
}