/* ====== Allgemein ====== */

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  color: #222;
  line-height: 1.6;
}

main {
  padding: 2rem;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* ====== Header ====== */

header {
  background-color: #333;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
}

/* ====== Page layout: sidebar + content ====== */

.page-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 120px);
}

#site-logo {
    width: 120px;
    height: auto;
}

.sidebar {
  width: 200px;
  flex-shrink: 0;
  background-color: #e8e8e8;
  padding: 2rem 1rem;
  min-height: calc(100vh - 120px);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar nav a {
  display: block;
  color: #333;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.sidebar nav a:hover {
  background-color: #d0d0d0;
  color: #111;
}

.content-area {
  flex: 1;
  padding: 2rem;
  max-width: 960px;
}

/* ====== Footer ====== */

footer {
  background-color: #eaeaea;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 3rem;
}

footer p {
  margin: 0.5rem 0 0;
}

footer nav a {
  color: #333;
  text-decoration: none;
  margin: 0 1rem;
}

footer nav a:hover {
  text-decoration: underline;
}

/* ====== Überschriften & Text ====== */

h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.4rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

/* ====== Responsives Verhalten ====== */

@media (max-width: 600px) {
  .page-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: unset;
    padding: 1rem;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .content-area {
    padding: 1rem;
  }

  footer nav a {
    display: block;
    margin: 0.5rem 0;
  }
}

/* ====== Skip-Link (Barrierefreiheit) ====== */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #333;
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

/* ====== Header-Layout mit Sprachumschalter ====== */

header {
  justify-content: space-between;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
}

.lang-switch a {
  color: #ccc;
  text-decoration: none;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.lang-switch a:hover {
  color: #fff;
}

.lang-switch a.active {
  background-color: #555;
  color: #fff;
}

/* ====== Aktiver Navigationspunkt ====== */

.sidebar nav a[aria-current="page"] {
  background-color: #d0d0d0;
  color: #111;
}

/* ====== Logout-Button im Nav (gleicher Look wie Links) ====== */

.nav-logout-form {
  margin: 0;
  padding: 0;
}

.nav-logout-form button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  font-family: inherit;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.nav-logout-form button:hover {
  background-color: #d0d0d0;
  color: #111;
}
