/* ---------------------------------------------------------
   Navigation
   ---------------------------------------------------------*/
@media screen {

  /* ---------------------------------
     Basisnavigation   */

  nav {
    background: #eee;
    color: #333;
  }
  nav ul {
    padding: 0;
    margin: 0;
  }
  nav li {
    display: inline-block;
    padding: 0;
    margin: 0;
  }
  nav li a {
    text-decoration: none;
    color: #333;
    padding: 1em;
  }
  nav li.active a {
    color: black;
    text-decoration: underline;
  }
  nav li:first-child a {
    padding-left: 0;
  }

  body { min-width: 280px; }
  div.menubutton { display: none; }

} /* Ende @media screen */

@media screen and (min-width: 320px) and (max-width: 767px) {

  /* ---------------------------------
     Mobile Navigation */

   body {
    position: relative;
  }
  /* box-shadow für den Header erst hier, weil vorher die einfache Navi nahtlos unterm header ist */
  .pageheader {
    box-shadow: 0 2px 6px rgba(51,51,51,0.3);
    margin-bottom: 0.5em;
  }

  /* Button positionieren  */
  div.menubutton {
    display: block;
    position: absolute;
    right: 1em;
    top: 1em;
    z-index: 1000;
  }

  /* Button gestalten */
  div.menubutton a {
    display: block;
    color: white;
    background: #08c;
    text-decoration: none;
    padding: 0.5em;
    border-radius: 0.25em;
    border: none;
  }

  div.menubutton a.shownavlist:after {
    content: " \25bc";
    font-size: 0.7rem;
  }
  div.menubutton a.hidenavlist:after {
    content: " \25b2";
    font-size: 0.7rem;
  }
  div.menubutton a.hidenavlist {
    display:none;
  }

  /* Navigationsliste gestalten */
  nav {
    padding: 0 1rem;
    margin: 0;
    background: white;
  }
  nav ul#navlist {
    max-height: 0;
    overflow: hidden;
    transition: 0.25s;
    list-style-type: none;
    padding: 0;
    border-radius: 0 0 1rem 1rem;
    margin: 0;
  }
  nav li {
    display: block;
    border-bottom: 1px solid #ddd;
  }
  nav li:last-of-type {
    border-bottom: 0;
  }

  /* Gestaltung der Hyperlinks */
   /* mit Attributselektor wg. Spezifität */
  nav[role="navigation"] li a {
    display: block;
    text-decoration: none;
    background: #eee;
    color: #333;
    padding: 0,25em;
  }
  nav a:hover,
  nav a:focus {
    text-decoration: underline;
  }
  nav li.active a {
    background: #08c;
    color: white;
    text-decoration: none;
  }

  /* Navigationsliste einblenden */
  #menu:target ul#navlist {
    max-height: 30em;
  }
  #menu:target a.shownavlist {
    display: none;
  }
  #menu:target a.hidenavlist {
    display: block;
  }

} /* Ende @media */


/* ---------------------------------
     Media Query für große Viewports   */

@media screen and (min-width: 768px) {

  /* Schatten wie bei den mittleren Viewports */
  .pageheader {
    box-shadow: 0 2px 6px rgba(51,51,51,0.3);
    margin-bottom: 0.5em;
  }
  nav {
    background: white;
    padding: 0.5em 1em 0 1em;
    margin: 0;
  }
  nav ul {
    position: relative;
    padding-left: 0;
    margin: 0;
  }
  nav li {
    list-style-type: none;
    display: inline-block;
  }
  nav li a {
    display: block;
    min-width: 8em;
    background-color: #eee;
    color: #333;
    text-align: center;
    text-decoration: none;
    border-radius: 0.5em;
    padding: 0.5em 0;
    margin: 1em 2em 1em 0;
  }
  nav li.active a {
    background: #08c;
    color: #fff;
    text-decoration: none;
  }
  nav a:hover,
  nav a:focus {
    text-decoration: underline;
  }

} /* Ende @media */