/* =========================================
   PRINT.CSS
   CCM 644 DS – Dual Sport Trail
   ========================================= */

/* =========================================
   Seitenränder für Druck A4
   ========================================= */

@page {
  size: A4;
  margin: 20mm;
}

/* -----------------------------
   Grundlayout
   ----------------------------- */

body {
  background: #ffffff;
  color: #000000;
  font-family: serif;
  font-size: 12pt;
  line-height: 1.4;
  margin: 0;
  padding: 0;
}

/* Alles optische abschalten */
* {
  background: none !important;
  box-shadow: none !important;
}

/* -----------------------------
   Seitenstruktur
   ----------------------------- */

main {
  margin: 0;
  padding: 0;
  border: 0;
  max-width: none;
  counter-reset: chapter;
}

/* Hauptkapitel umbrechen */
h2 {
  break-before: page;
}

/* Erstes Kapitel nach Titelblatt nicht umbrechen */
main > section:first-of-type h2 {
  break-before: auto;
}

/* -----------------------------
   Titelblatt
   ----------------------------- */

.print-only {
  display: block;
}

#title-page {
  page-break-after: always;
  text-align: center;
  padding-top: 8cm;
}

#title-page h1 {
  font-size: 28pt;
  margin-bottom: 0.5cm;
}

#title-page h2 {
  font-size: 18pt;
  margin-bottom: 1cm;
  border: none;
}

#title-page .subtitle {
  font-size: 14pt;
  margin-bottom: 2cm;
}

#title-page .author,
#title-page .website {
  font-size: 11pt;
  margin-top: 0.5cm;
}

/* -----------------------------
   Überschriften & Nummerierung
   ----------------------------- */

h1, h2, h3, h4 {
  color: #000;
  page-break-after: avoid;
}

h2 {
  counter-increment: chapter;
  counter-reset: subchapter;
  border-bottom: 1px solid #000;
  padding-bottom: 4px;
}

h2::before {
  content: counter(chapter) " ";
  font-weight: bold;
}

h3 {
  counter-increment: subchapter;
}

h3::before {
  content: counter(chapter) "." counter(subchapter) " ";
  font-weight: bold;
}

h4 {
  counter-increment: subchapter;
}

h4::before {
  content: counter(chapter) "." counter(subchapter) " ";
  font-weight: bold;
}

#title-page h2::before {
  content: none !important;
}

#title-page h2 {
  counter-increment: none !important;
}

/* -----------------------------
   Text & Listen
   ----------------------------- */

p, ul, ol {
  orphans: 3;
  widows: 3;
}

ul, ol {
  margin-left: 1.2cm;
}

/* -----------------------------
   Tabellen
   ----------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
  page-break-inside: avoid;
  font-size: 11pt;
}

th, td {
  border: 1px solid #000;
  padding: 4px;
}

th {
  background: #eeeeee;
}

/* -----------------------------
   Bilder
   ----------------------------- */

img {
  max-width: 100%;
  height: auto;
  page-break-inside: avoid;
}

.image-row {
  display: block;
}

.image-row img {
  display: block;
  margin: 0.5cm auto;
}

/* -----------------------------
   Navigation ausblenden
   ----------------------------- */

nav,
.subnav,
#inhalt {
  display: none !important;
}

/* -----------------------------
   Links
   ----------------------------- */

a {
  color: #000;
  text-decoration: underline;
}

a[href^="http"]:after {
  content: " (" attr(href) ")";
  font-size: 10pt;
}

/* -----------------------------
   Footer
   ----------------------------- */

footer {
  text-align: center;
  font-size: 10pt;
  border-top: 1px solid #000;
  margin-top: 1.5cm;
  padding-top: 0.5cm;
}

/* -----------------------------
   Abrissbirne:
   ----------------------------- */

*,
*::before,
*::after {
  background: transparent !important;
}
