/* montserrat-regular - latin */
@font-face {
  font-display: swap;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/montserrat-v31-latin-regular.woff2') format('woff2');
}
/* montserrat-italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 400;
  src: url('fonts/montserrat-v31-latin-italic.woff2') format('woff2');
}
/* montserrat-700 - latin */
@font-face {
  font-display: swap;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/montserrat-v31-latin-700.woff2') format('woff2');
}

/* open-sans-regular - latin */
@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/open-sans-v44-latin-regular.woff2') format('woff2');
}
/* open-sans-italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 400;
  src: url('fonts/open-sans-v44-latin-italic.woff2') format('woff2');
}
/* open-sans-700 - latin */
@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/open-sans-v44-latin-700.woff2') format('woff2');
}

body {
    margin: 0;
    display: block;
    font-family: 'Open Sans', Verdana, Arial;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3, h4, h5, h6, .site-banner, nav a {
    font-family: 'Montserrat', Verdana, Arial;
}

a {
   color: #0000AA;
   text-decoration: none;
}

a:hover {
   text-decoration: underline;
}

textarea {
   width: 99%;
}

h1 {
   margin: 0;
   margin-bottom: 10px;
   padding: 0;
   font-size: 1.6rem; /* Korrigiert mit rem */
   font-weight: normal;
}

h2 {
   margin: 0;
   margin-bottom: 10px;
   padding: 0;
   font-size: 1.4rem; /* Korrigiert mit rem */
   font-weight: normal;
}

h3 {
   margin: 0;
   margin-bottom: 10px;
   padding: 0;
   font-size: 1.3rem; /* Korrigiert mit rem */
   font-weight: normal;
}

h4 {
   margin: 0;
   margin-bottom: 10px;
   padding: 0;
   font-size: 1.2rem; /* Korrigiert mit rem */
   font-weight: normal;
}

ol, ul {
   padding-left: 20px;
}
li {
   margin-bottom: 5px;
}

/* --- TABELLEN-STYLING --- */
main table {
    width: 100%;
    border-collapse: collapse; /* Lässt doppelte Linien zu einer einzigen feinen Linie verschmelzen */
    margin: 25px 0;
}

main th, 
main td {
    border: 1px solid #dcdcdc; /* Eine feine, dezente graue Linie */
    padding: 10px 14px;        /* Genug Luft, damit der Text nicht an den Linien klebt */
    text-align: left;
    vertical-align: top;
}

main th {
    background-color: #f4f4f4; /* Ein dezenter Hintergrund für die Kopfzeile (passt zu deinem Menü) */
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Optional: Leichter Zebrastreifen-Effekt für bessere Lesbarkeit bei vielen Zeilen */
main tr:nth-child(even) {
    background-color: #fafafa;
}

/* Globaler Publikations-Banner ganz oben */
.site-banner {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 20px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-banner a {
    font-size: 2rem;
    color: #ffffff;
    text-decoration: none;
}

.site-banner a:hover {
    text-decoration: underline;
}

/* Wrapper-Container für Navigation und Inhalt */
.page-container {
    display: flex;
    gap: 40px;
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
}

nav {
    width: 280px;
    background: #f4f4f4;
    padding: 20px;
    box-sizing: border-box;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    align-self: flex-start;
    flex-shrink: 0;
}

nav ul { list-style: none; padding: 0; margin: 0; }
nav li { margin-bottom: 10px; }
nav a { text-decoration: none; color: #333; display: block; }
nav a:hover { color: #0066cc; }
nav ul ul.submenu { padding-left: 15px; margin-top: 5px; display: none; }
nav li.active > ul.submenu { display: block; }

main {
    padding: 20px 0;
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.pagination-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 15px 0;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}
.pagination-links a {
    text-decoration: none;
    color: #0066cc;
}
.pagination-links a:hover {
    text-decoration: underline;
}
.nav-prev { text-align: left; }
.nav-refs { text-align: center; color: #666; }
.nav-refs a { margin: 0 5px; }
.nav-next { text-align: right; }

/* Zettel-Blöcke (.DataBox) */
.DataBox {
  border-left: 4px solid var(--block-color, #3498db);
  background-color: #edf2f7; /* Ein deutlich ruhigerer, augenschonenderer Ton */
  padding: 12px 16px;
  margin: 15px 0;
  border-radius: 4px;
}

.DataBox::before {
  content: "[" attr(data-type) "] ";
  display: inline-block;
  font-weight: 700;
  font-style: normal;
  color: var(--block-color, #3498db);
}

.DataBox2 {
  border-left: 4px solid #d53984;
  background-color: #f7f9fa;
  padding: 12px 16px;
  margin: 15px 0;
  border-radius: 4px;
}

.DataBox[data-type="These"] { --block-color: #9b59b6; }
.DataBox[data-type="Frage"] { --block-color: #DD0000; }
.DataBox[data-type="Definition"] { --block-color: #3498db; }
.DataBox[data-type="Kernaussage"] { --block-color: #d53984; }
.DataBox[data-type="Anmerkung"] { --block-color: #00bcd4; }
.DataBox[data-type="Bedeutung"] { --block-color: #3f51b5; }
.DataBox[data-type="Zitat"] { --block-color: #2e7d32; font-style: italic; }
.DataBox[data-type="Dogma"] { --block-color: #ec7500; }
.DataBox[data-type="Illusion"] { --block-color: #cddc39; font-style: italic; }

/* Standard-Bilder zentrieren */
main article img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    margin-bottom: 20px;
}

.excalidraw-container, 
div:has(> img[src*="excalidraw"]) {
    text-align: center;
    margin: 20px auto;
}

.menu-toggle-checkbox, .menu-button {
    display: none;
}

/* ==========================================
   RESPONSIVES DESIGN FÜR SMARTPHONES (< 768px)
   ========================================== */
@media screen and (max-width: 768px) {
   body {
      font-size: 1.2rem;
   }

   h1 { font-size: 1.6rem; }
   h2 { font-size: 1.5rem; }
   h3 { font-size: 1.4rem; }
   h4 { font-size: 1.3rem; }

    .menu-button {
        display: block;
        background-color: #34495e;
        color: white;
        padding: 12px 20px;
        font-weight: bold;
        cursor: pointer;
        text-align: center;
        user-select: none;
    }

    .menu-toggle-checkbox {
        display: none;
    }

    .page-container {
        display: block;
        max-width: 100%;
        padding: 0;
    }

    nav {
        position: static;
        width: 100%;
        height: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        padding: 0 20px;
        background: #eceff1;
    }

    .menu-toggle-checkbox:checked ~ .page-container nav {
        max-height: 70vh;
        overflow-y: auto;
        padding: 20px;
    }

    main {
        margin-left: 0;
        padding: 20px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .pagination-links {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .site-banner a {
       font-size: 1.2rem;
    }
}