* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  color: #4b4b4d;
  background-color: #ffffff;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

a {
  color: #7f111a;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.headline {
  color: #7f111a;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 1.5em;
}

.lauftext {
  color: #4b4b4d;
  font-size: 12px;
  margin-bottom: 1.5em;
}

.lauftextfett {
  color: #4b4b4d;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 1em;
}

.lauftextfettrot {
  color: #7f111a;
  font-size: 12px;
  font-weight: bold;
}

.subheadline {
  color: #4b4b4d;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 1em;
}

.copyright {
  color: #4b4b4d;
  font-size: 10px;
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid #e0e0e0;
}

ul {
  list-style-type: disc;
  color: #4b4b4d;
  font-size: 12px;
  margin-left: 1.5em;
  margin-bottom: 1.5em;
}

li {
  margin-bottom: 0.5em;
}

hr {
  color: #4b4b4d;
  border: none;
  height: 1px;
  background-color: #4b4b4d;
  margin: 2em 0;
}

/* Layout */

.container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 10px;
}

.header-image {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0;
}

.logo-link {
grid-column: 1 /-1;
display: block;
width: 100%;
}

nav {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #7f111a;
  font-weight: bold;
  width: 100%;
  text-align: left;
  padding: 10px 0;
}

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

nav li {
  margin: 0;
}

nav a {
  display: block;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  color: #4b4b4d;
  font-size: 12px;
}

nav a:hover {
  color: #7f111a;
  background-color: #f5f5f5;
}

nav a.active {
  font-weight: bold;
  border-left-color: #7f111a;
  color: #7f111a;
}

/* Main navigation links (Leistungen, Referenzen, Qualifikationen, Kontakt) */
nav > ul > li:nth-child(1) > a,
nav > ul > li:nth-child(2) > a,
nav > ul > li:nth-child(3) > a,
nav > ul > li:nth-child(4) > a {
  font-size: 16px;
  color: #4b4b4d;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  font-weight: bold;
}

nav > ul > li:nth-child(1) > a:hover,
nav > ul > li:nth-child(2) > a:hover,
nav > ul > li:nth-child(3) > a:hover,
nav > ul > li:nth-child(4) > a:hover {
  color: #7f111a;
  background-color: transparent;
  border-left-color: #7f111a;
}

nav > ul > li:nth-child(1) > a.active,
nav > ul > li:nth-child(2) > a.active,
nav > ul > li:nth-child(3) > a.active,
nav > ul > li:nth-child(4) > a.active {
  color: #7f111a;
  border-left-color: #7f111a;
}

.nav-separator {
  height: 10px;
}

.subnav {
  display: none;
  margin-left: 10px;
}

.subnav.visible {
  display: block;
}

.subnav a {
  padding: 8px 10px;
  font-size: 12px;
}

main {
  flex: 1;
  min-width: 0;
}

.content {
  color: #4b4b4d;
  font-size: 12px;
}

.content p {
  margin-bottom: 1.5em;
}

/* Responsive */

@media (max-width: 640px) {
  .container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  nav {
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
  }

  .nav-toggle {
    display: block;
  }

  nav ul {
    display: none;
    width: 100%;
  }

  nav ul.open {
    display: block;
  }

  nav a {
    padding: 10px 15px;
    font-size: 14px;
  }

  /* Impressum und Datenschutz (li:nth-child(6) und li:nth-child(7)) */
  nav > ul > li:nth-child(6) > a,
  nav > ul > li:nth-child(7) > a {
    font-size: 12px;
  }

  /* Untermenü und das darin verschachtelte ul einblenden,
     sobald das Hauptmenü geöffnet ist */
  .subnav,
  nav .nav-category-leistungen .subnav {
    display: block;
    margin-left: 20px;
  }

  nav ul.open .subnav ul {
    display: block;
  }

  .subnav a {
    font-size: 12px;
  }

  .header-image {
    max-width: 100%;
  }

  main {
    padding: 0 10px;
  }

  .content {
    font-size: 13px;
  }

  .headline {
    font-size: 18px;
  }
}

/* Navigation-spezifische Stile */

.nav-category-leistungen .subnav {
  display: none;
}

.nav-category-leistungen.expanded .subnav {
  display: block;
}

/* Referenzen-Paginierung */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2em 0;
  gap: 1em;
}

.pagination a {
  color: #7f111a;
  font-weight: bold;
}

.pagination-info {
  font-size: 12px;
  color: #4b4b4d;
}

/* Nach-oben-Pfeil */

.nach-oben-pfeil {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    width: 35px;
    height: 35px;
    align-items: center;
    justify-content: center; 
    font-size: 20px;
    text-decoration: none;
    background-color: #7f111a;
    color: #fff;
    padding: 10px 15px;
    border-radius: 50%;
    z-index: 9999;
}