/* Allgemeine Einstellungen */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
}

/* Header / Navigation */
header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  position: relative; /* für Dropdown */
}

nav {
  position: relative;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  margin: 0;
  flex-wrap: wrap;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  color: #b22222;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: color 0.3s;
  padding: 6px 8px;
  border-radius: 6px;
}

nav ul li a:hover {
  color: #ff6666;
}

nav ul li a.active {
  background: rgba(178, 34, 34, 0.08);
  border: 1px solid rgba(178, 34, 34, 0.25);
}

/* Main */
main {
  padding: 2rem;
  text-align: center;
  background-color: #fff;
  margin: 20px auto;
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

main h1 {
  color: #b22222;
  margin-bottom: 1rem;
}

main p {
  color: #555;
}

/* Footer */
footer {
  text-align: center;
  background-color: #fff;
  color: #999;
  padding: 1rem 0;
  font-size: 0.95rem;
  border-top: 1px solid #e0e0e0;
}

footer a {
  color: #b22222;
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}

.footer-sep {
  margin: 0 8px;
  color: #ccc;
}

/* Highlight-Link */
.highlight-link {
  color: #d90429;
  font-weight: bold;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.highlight-link:hover {
  color: #af041e;
}

/* Startseiten-Bilder */
.images-container {
  margin-top: 18px;
}

.images-container img {
  width: 100%;
  max-width: 120px;
  margin: 10px;
  display: inline-block;
  vertical-align: top;
}

/* Tabellen */
.table-wrap {
  overflow-x: auto;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  font-size: 1rem;
  text-align: left;
  min-width: 650px;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 10px;
}

table thead {
  background-color: #b22222;
  color: white;
}

table tr:nth-child(even) {
  background-color: #f9f9f9;
}

table tr:hover {
  background-color: #f2f2f2;
}

/* Formular */
form {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.form-group {
  margin-bottom: 14px;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
}

.checkbox-group input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.error-message {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: #b00020;
  min-height: 1.1em;
}

.hint {
  display: block;
  margin-top: 8px;
  color: #777;
  font-size: 0.9rem;
}

/* Button */
button {
  padding: 10px 15px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
}

button:hover {
  background-color: #45a049;
}

/* Social */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #b22222;
  text-decoration: none;
  font-weight: bold;
}

.social-icon {
  width: 40px;
  height: 40px;
  transition: transform 0.2s ease;
}

.social-icon:hover {
  transform: scale(1.2);
}

/* ===== Hamburger Button ===== */

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(178, 34, 34, 0.35);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #b22222;
  margin: 4px 0;
  transition: transform 0.2s, opacity 0.2s;
}

/* Responsive */
@media (max-width: 768px) {

  /* Hamburger sichtbar */
  .nav-toggle {
    display: inline-block;
  }

  /* Dropdown-Menü */
  nav ul {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    padding: 10px;
    flex-direction: column;
    gap: 6px;
    z-index: 999;
  }

  nav ul.open {
    display: flex;
  }

  nav ul li {
    margin: 0;
  }

  nav ul li a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 10px;
  }

  main {
    padding: 1.5rem;
    margin: 10px;
  }

  table {
    min-width: 600px;
  }
}

/* X-Animation */
.nav-toggle.open .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Fix: Navigation immer oben und klickbar */
header, nav, #navMenu, #navMenu li, #navMenu a, .nav-toggle {
  position: relative;
  z-index: 2000;
}