/* ------------------------------------------------------------
   Automatische Kapitel-/Unterkapitel-Nummerierung mit CSS-Counters
   ------------------------------------------------------------
   Verwendung:
     <section>
     <section>
       <h2 class="section-title">Einleitung</h2>
       ...
       <h3 class="subsection-title">1.1 Unterpunkt</h3>
     </section>

   Vorteile:
    - Keine JS-Abhängigkeit
    - Druckfähig / durchsuchbar / barrierefreundlich
    - Aktuelle Reihenfolge stellt die Nummerierung automatisch her
-----------------------------------------------------------------*/

/* Gesamt-Counter für Kapitel */
body {
  counter-reset: chapter; /* nullsetzen beim Seitenanfang */
  font-family: system-ui, Arial, sans-serif;
  line-height: 1.45;
  
/* Fallback-Farbe + sehr dezenter Verlauf (links oben -> rechts unten) */
  background-color: #141418;
  background-image: linear-gradient(135deg, rgba(73, 110, 185, 0.219) 0%, rgba(20,20,24,1) 100%);
  background-repeat: no-repeat;
  background-attachment: fixed; /* optional: bleibt beim Scrollen stehen */
}


/* Zentriert den Inhalts-Container und setzt Breite auf 40% des Viewports.
   Text im Inneren wird im Blocksatz (justify) dargestellt. */
.document_center {
  width: 40vw;        /* 60% der Viewport-Breite */
  margin: 0 auto;     /* horizontal in der Mitte positionieren */
  text-align: justify;/* Blocksatz für Fließtext */
}

@media (max-width: 1024px) {
  .document_center {
  width: 95%;        /* 60% der Viewport-Breite */
}
}

/*Schriften ########################################################################################################### */
.document_center p {
  color: #fff;        /* weißer Text */
  padding-left: 1.8rem; /* Einrückung des kompletten Absatz-Blocks */
}

.document_center li {
  color: #fff;        /* weißer Text */
  padding-left: 3rem; /* Einrückung des kompletten Absatz-Blocks */
}

.document_center em {
  color: #fff;        /* weißer Text */
}



h1 {
    color: white;
}

/*klickbare links*/
.document_center a {
  color: #fff;        /* weißer Text */
}

.document_center a:hover {
  color: #b6eaff;       /* weißer Text */
}




/*Section und nummerierung ################################################################################################# */

/* Wenn eine neue <section> beginnt, wird der subsection-counter zurückgesetzt */
section {
  counter-reset: subsection; /* Unterkapitel pro section zurücksetzen */
  margin-bottom: 1.4rem;
}

/* Kapitel-Überschrift (H2) bekommt die fortlaufende Nummer */
h2.section-title {
  counter-increment: chapter; /* erhöht Kapitelzahl beim Auftreten */
  margin: 4rem 0 0.6rem;      /*TOP = 1.2 RM*/
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  /* Abstand zum Text nach Bedarf anpassen */
}

/* Vor dem H2-Text die Nummer einfügen: "1. " */
h2.section-title::before {
  content: counter(chapter) ". ";
  color: inherit;
  font-weight: 700;
  margin-right: 0.35rem;
  
}

/* Unterkapitel (H3) — nummeriert als "1.1", "1.2" */
h3.subsection-title {
  counter-increment: subsection; /* erhöht Unterkapitel innerhalb der aktuellen section */
  margin: 1.8rem 0 -0.5rem;     /*Oben 2 unten -0.5*/
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

/* Vor dem H3-Text die zusammengesetzte Nummer einfügen */
h3.subsection-title::before {
  content: counter(chapter) "." counter(subsection) " ";
  margin-right: 0.35rem;
  font-weight: 600;
}

/* Optional: kleinere Kapitelnummern (z. B. für Inhaltsverzeichnis) */
.small-meta {
  font-size: 0.9rem;
  color: #555;
}






/*Langugae buttons-------------------------------------------------------------------*/



.language-switcher {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin-top: 3rem;
}

.language-switcher .lang-btn {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(255,255,255,0.12);
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.08s ease;
}

.language-switcher .lang-btn:hover,
.language-switcher .lang-btn:focus-visible {
  background-color: rgba(182,234,255,0.08); /* dezenter blauer HIntergrund */
  color: #b6eaff;
  transform: translateY(-1px);
  outline: none;
}

/* Aktive Sprache markieren (manuell im HTML setzen) */
.language-switcher .lang-btn.active,
.language-switcher .lang-btn[aria-current="page"] {
  background-color: #b6eaff; /* aktive Farbe */
  color: #041226;            /* dunkler Text auf active */
  border-color: #b6eaff;
}
