/* inspired by 
https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/
*/

.skip,
.header,
.back-to-top,
.form-container {
  display: none;
}

body,
section,
p,
article,
a {
  position: relative;
}

@page :left {
  margin: 1cm;
}

@page :right {
  margin: 1cm;
}

/* Set font to 14pt, set background to white and font to black.*/
/* This saves ink */
body {
  font: 14pt Georgia, "Times New Roman", Times, serif;
  line-height: 1.4;
  background: #fff !important;
  color: #000;
}

h1 {
  font-size: 24pt;
}

h2,
h3,
h4 {
  font-size: 14pt;
  margin-top: 25px;
}

img,
figcaption {
  max-width: 10cm;
  margin-left: 3cm;
  margin-right: 3cm;
  text-align: center;
}

/* Styling Links */

/* Displaying link color and link behaviour */
a:link,
a:visited,
a {
  background: transparent;
  font-weight: bold;
  text-decoration: underline;
  text-align: left;
}

a {
  page-break-inside: avoid;
}

a[href^="http"]:after {
  content: " < " attr(href) "> ";
}

a:after > img {
  content: "";
}

article a[href^="#"]:after {
  content: "";
}

a:not(:local-link):after {
  content: " < " attr(href) "> ";
}

/* Defining all page breaks */

.gallery > h2,
article > h2 {
  page-break-before: always;
}

a {
  page-break-inside: avoid;
}
blockquote {
  page-break-inside: avoid;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  page-break-after: avoid;
  page-break-inside: avoid;
}

img {
  page-break-inside: avoid;
  page-break-after: avoid;
}

table,
pre {
  page-break-inside: avoid;
}

ul,
ol,
dl {
  page-break-before: avoid;
}

hr + hr {
  display: none;
}

section hr {
  page-break-before: avoid;
  page-break-after: avoid;
  overflow: visible;
  padding: 0;
  border: none;
  border-top: medium double #333;
  color: #333;
  text-align: center;
}

section > hr:after {
  content: "§";
  display: inline-block;
  position: relative;
  top: -0.7em;
  font-size: 1.5em;
  padding: 0 0.25em;
  background: white;
}

.footer {
  text-align: center;
}