/* Grundlayout: Hintergrund, Kopf, Navigation, Inhalt, Fuß.
   Ab 1000 px Breite entspricht das Layout dem Original (970 px fest),
   darunter wird es einspaltig mit aufklappbarem Menü. */

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #630;
}

#hintergrund {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

#main {
  margin: 0 auto;
  width: 970px;
  max-width: 100%;
}

#header {
  display: block;
  height: 278px;
  background: url(../img/common/header.png) no-repeat;
}

#maincontent {
  display: flex;
  background: url(../img/common/main-bg.png) repeat-y;
}

/* ---------- linke Spalte ---------- */

#leftbar {
  position: relative;
  z-index: 10;
  flex: 0 0 206px;
  width: 206px;
  padding: 20px 0 0 14px;
}

.leftbar-image img {
  display: block;
}

.box-left {
  padding: 10px 0 0 14px;
}

.nav-toggle {
  display: none;
}

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

#nav,
#nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#nav {
  width: 206px;
}

#nav li {
  position: relative;
  background: url(../img/common/nav-a-underline.jpg) no-repeat left bottom;
}

#nav li.activ {
  background: url(../img/common/arrow-bg-navi.gif) no-repeat left top;
}

#nav a {
  display: block;
  padding: 0 5px 0 25px;
  line-height: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #630;
  background: url(../img/common/bullet.jpg) no-repeat 10px center;
}

#nav a:hover,
#nav a:focus-visible {
  background-color: #e99b37;
  color: #fff;
}

#nav a[aria-current="page"] {
  color: #c60;
}

#nav a[aria-current="page"]:hover,
#nav a[aria-current="page"]:focus-visible {
  color: #fff;
}

/* Untermenü (Desktop: aufklappend neben der Navigation) */
#nav li ul {
  display: none;
  position: absolute;
  top: 0;
  left: 206px;
  width: 250px;
}

#nav li:hover > ul,
#nav li:focus-within > ul {
  display: block;
}

#nav li li {
  background: none;
}

#nav li li a {
  background: #f0c95e url(../img/common/bullet.jpg) no-repeat 10px center;
  border-bottom: 1px solid #e99b37;
  border-left: 1px solid #e99b37;
}

#nav li li a:hover,
#nav li li a:focus-visible {
  background-color: #e99b37;
}

/* ---------- Inhalt ---------- */

#content {
  position: relative;
  flex: 1 1 auto;
  box-sizing: border-box;
  min-width: 0;
  min-height: 586px;
  padding: 10px 43px 5px 20px;
  background: url(../img/common/content-bottom.jpg) no-repeat left bottom;
}

#content h1 {
  margin: 0;
  padding: 10px 0;
  font-size: 18px;
}

#content a {
  color: #630;
}

#content a:hover {
  color: #f90;
}

#content img {
  max-width: 100%;
  height: auto;
}

/* ---------- Fuß ---------- */

#footer {
  padding-top: 9px;
  margin-bottom: 20px;
  background: url(../img/common/footer.png) no-repeat left top;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 24px;
  margin: 0 14px;
  padding: 10px;
  list-style: none;
  background: #fde585;
  font-weight: bold;
}

.footer-links a,
.footer-links button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: #630;
  text-decoration: underline;
  cursor: pointer;
}

.footer-links a:hover,
.footer-links button:hover {
  color: #f60;
}

/* Platz für den Cookie-Banner, solange er sichtbar ist */
html.show--consent body {
  padding-bottom: 12rem;
}

/* ---------- Tablet und Smartphone ---------- */

@media (max-width: 999px) {
  #header {
    height: auto;
    aspect-ratio: 970 / 278;
    background-size: 100% 100%;
  }

  #maincontent {
    flex-direction: column;
    background: #fde585;
  }

  /* Die Spalte "leftbar" löst sich auf: Menü oben, Wetterbox unter dem Inhalt */
  #leftbar {
    display: contents;
  }

  .nav-toggle {
    display: block;
    order: 0;
    margin: 10px 14px;
    padding: 10px 16px;
    border: 1px solid #e99b37;
    background: #f0c95e;
    font: bold 16px Arial, Helvetica, sans-serif;
    color: #630;
    text-align: left;
    cursor: pointer;
  }

  .nav-toggle::after {
    content: " \25BE";
  }

  .nav-toggle[aria-expanded="true"]::after {
    content: " \25B4";
  }

  #leftbar nav {
    order: 1;
    display: none;
    padding: 0 14px;
  }

  #leftbar nav.is-open {
    display: block;
  }

  #nav {
    width: auto;
  }

  #nav a {
    line-height: 40px;
  }

  #nav li ul {
    display: block;
    position: static;
    width: auto;
  }

  #nav li li a {
    padding-left: 45px;
    border-left: 0;
    background-position: 30px center;
  }

  #content {
    order: 2;
    min-height: 0;
    padding: 10px 14px 20px;
    background: none;
  }

  .leftbar-image {
    display: none;
  }

  .box-left {
    order: 3;
    padding: 0 14px 14px;
  }
}

@media (max-width: 719px) {
  body {
    font-size: 15px;
  }

  #content h1 {
    font-size: 21px;
  }
}
