/*
 * Responsive Reparaturen fuer die aus dem Internet Archive
 * wiederhergestellte Website. Das historische Desktop-Layout bleibt
 * oberhalb der Breakpoints unveraendert.
 */

/*
 * Tastaturbedienung fuer die historische Navigation: Untermenues bleiben
 * sichtbar, solange sich der Fokus darin befindet. Skip-Links werden beim
 * Fokussieren eingeblendet und alle Navigationslinks erhalten einen klaren
 * Fokusindikator.
 */
#header .mod_navigation li:focus-within > .level_2 {
  left: auto;
  top: auto;
  z-index: 1000;
  display: block;
  overflow: auto;
  width: auto;
  min-width: 78px;
  height: auto;
  background-color: #141414;
}

#header .mod_navigation a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -4px;
  text-decoration: underline;
}

#left .mod_navigation a:focus-visible,
.mod_customnav a:focus-visible {
  outline: 3px solid #5432b3;
  outline-offset: 2px;
}

.mod_navigation .invisible:focus,
.mod_customnav .invisible:focus {
  clip: auto;
  z-index: 10000;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.65rem 0.9rem;
  overflow: visible;
  position: fixed;
  border: 2px solid #5432b3;
  border-radius: 4px;
  background: #fff;
  color: #141414;
  font-size: 16px;
  line-height: 1.25;
}

@media screen and (max-width: 1100px) {
  /*
   * Die alte Navigation besteht aus Floats und der Header hatte eine
   * feste Hoehe von 0. Sobald das Menue umbricht, ragte es deshalb in den
   * Inhalt hinein und drueckte den Hauptartikel auf eine unlesbare Breite.
   */
  #header {
    height: auto !important;
    padding-bottom: 0;
  }

  #header .inside {
    display: flow-root;
  }

  #header .mod_navigation {
    float: none;
  }

  /*
   * Bei mittleren Breiten bleibt die Kontextnavigation links erhalten.
   * Die rechte Zusatzspalte folgt unter dem Artikel, damit der Hauptinhalt
   * nicht zwischen zwei 300-Pixel-Spalten eingeklemmt wird.
   */
  #container {
    padding-right: 0 !important;
  }

  #right {
    float: none !important;
    clear: both;
    width: auto !important;
    margin-right: 0 !important;
  }

  #right > .inside {
    max-width: 400px;
    margin-top: 2rem;
  }
}

@media screen and (max-width: 767px) {
  #wrapper {
    padding-right: 20px;
    padding-left: 20px;
  }

  #container {
    padding-left: 0 !important;
  }

  #main,
  #left,
  #right {
    float: none !important;
    width: auto !important;
  }

  #left {
    right: auto !important;
    margin-top: 3rem;
    margin-left: 0 !important;
  }

  #main > .inside {
    margin-right: 0;
  }

  #right > .inside {
    max-width: none;
  }

  /* Zwei stabile Menuespalten ersetzen das unkontrollierte Float-Wrapping. */
  #header .mod_navigation > ul.level_1 {
    display: grid;
    float: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #header .mod_navigation > ul.level_1 > li {
    float: none;
    min-width: 0;
  }

  #header .mod_navigation > ul.level_1 > li > a,
  #header .mod_navigation > ul.level_1 > li > span {
    margin-right: 0;
    margin-left: 0;
    padding-right: 16px;
    padding-left: 16px;
  }
}
