/* Seitenhintergrund und Rahmen */
.page-wrapper {
  background-color: #e6e6e6;
  padding: 10px;
}

.page-content {
  background-color: white;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2); /* Schatten rechts */
}

/* Basislayout */
body {
  margin: 0;
  font-family: Verdana, sans-serif;
  color: #333;
  background-color: transparent;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Container für Layout mit Sidebar */
.layout {
  display: flex;
  flex: 1;
}

/* Sidebar */
aside {
  background-color: #b30707;
  color: white;
  padding: 20px;
  width: 180px;
  min-width: 160px;
  margin-left: 20px;
}

aside a {
  color: white;
  text-decoration: underline;
  display: block;
  padding: 8px 0;
}

/* Hauptbereich */
main {
  flex: 1;
  padding: 20px;
  background-color: white;
}

.main-content {
  margin-bottom: 30px;
}

.main-content h1 {
  font-size: 18px;
  margin-bottom: 10px;
}

.logo-und-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-und-text img {
  max-width: 100%;
  height: auto;
}

.kanzlei-text {
  text-align: left;
  font-size: 25px;
  font-weight: normal;
  margin-top: 10px;
}

main a {
  color: #333;
  text-decoration: underline;
}

/* Header */
header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 20px;
  background-color: #fff;
  border-bottom: none;
}

header img {
  max-height: 60px;
  margin-bottom: 20px;
}

/* Balken unter dem Logo */
.kanzlei-balken {
  background-color: #3e4f5a;
  color: white;
  text-align: left;
  font-size: 1.1em;
  font-weight: normal;
  width: 100%;
  box-sizing: border-box;
}

/* Zweispaltiger Balken */
.kanzlei-balken.zweispaltig {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  flex-wrap: wrap;
}

.balken-links,
.balken-rechts {
  flex: 1;
  white-space: nowrap;
}

.balken-links {
  text-align: left;
}

.balken-rechts {
  text-align: right;
}

/* Header-Top-Links */
.header-top-links {
  align-self: flex-end;
  font-size: 12px;
  margin-bottom: 10px;
}

.header-top-links a {
  color: #333;
  text-decoration: underline;
  margin-left: 10px;
}

/* Kontaktbox */
.contact-box {
  background-color: #eee;
  padding: 15px 20px;
  margin-top: 20px;
  border-radius: 4px;
  box-sizing: border-box;
}

.contact-link {
  display: inline-block;
  margin-bottom: 10px;
  color: #333;
  text-decoration: underline;
  font-weight: bold;
}

.contact-image {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
  margin: 10px 0;
}

.contact-text {
  font-size: 0.85em;
  line-height: 1.4;
  margin-bottom: 10px;
}

/* Footer */
footer {
  background-color: #eee;
  padding: 8px 20px;
  font-size: 0.9em;
  text-align: center;
  border-top: 1px solid #ccc;
  box-sizing: border-box;
  margin-top: 30px;
}

footer a {
  color: #333;
  text-decoration: underline;
  margin: 0 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  aside {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
    margin-left: 0;
  }

  aside a {
    margin: 5px 10px;
  }

  header {
    padding: 10px;
    align-items: center;
  }

  header img {
    max-height: 50px;
    margin-bottom: 10px;
  }

  .kanzlei-balken {
    font-size: 1em;
    padding: 6px 20px;
  }

  .kanzlei-balken.zweispaltig {
    flex-direction: column;
    align-items: flex-start;
  }

  .balken-rechts {
    text-align: left;
    margin-top: 5px;
  }

  .header-top-links {
    align-self: center;
    margin-bottom: 5px;
  }

  footer {
    padding: 8px 20px;
    margin-top: 20px;
  }

  main {
    padding: 15px;
  }

  .contact-box {
    margin-top: 30px;
  }
}

@media (min-width: 1024px) {
  main {
    display: flex;
    gap: 40px;
    align-items: flex-start;
  }

  .main-content {
    flex: 2;
  }

  .contact-box {
    flex: none;
    width: 200px;
    margin-top: 0;
  }
}
