/* ============================
   Grundlayout & Basisdesign
============================= */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
  background: #f7f7f7;
  color: #333;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

main {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}


/* ============================
   Überschriften
============================= */
h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
}

h2 {
  margin-bottom: 0;
}

/* ============================
   Layout-Helferklassen
============================= */
.half-width {
  flex: 1 1 45%;
  min-width: 280px;
}

.quarter-width {
  flex: 1 1 22%;
  min-width: 180px;
}

.three-quarter-width {
  flex: 1 1 70%;
  min-width: 280px;
}

.section {
  padding: 30px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.section img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: block;
}

.half-width.image {
  display: flex;
  justify-content: center;  /* horizontal zentrieren */
  align-items: center;      /* vertikal zentrieren */
}

/* ============================
   Formular
============================= */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
select,
textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  transition: border-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0077cc;
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[type="tel"]::placeholder {
  font-style: italic;
}

/* ============================
   Header & Navigation
============================= */
.header {
  background-color: white;
  padding: 10px 20px;
  position: relative;
  z-index: 1000;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.logo {
  max-width: 400px;
  margin: 0 auto;
  z-index: 1001;
}

.logo img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Hamburger Menü */
#nav-toggle {
  display: none;
}

.hamburger {
  margin-left: auto;
  width: 30px;
  height: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1002;
  margin: 10px auto;
}

.hamburger span {
  display: block;
  height: 4px;
  background: black;
  border-radius: 2px;
  transition: 0.3s ease;
}

/* Mobile Navigation */
.navi {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 22px;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 999;
}

.menu-link {
  color: black;
  padding: 8px 16px;
  display: block;
}

.menu-link.button {
  background-color: rgb(53, 89, 28);
  color: white;
  border-radius: 8px;
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);
  text-align: center;
  font-weight: 600;
}

/* Menü-Animation */
#nav-toggle:checked + label.hamburger span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

#nav-toggle:checked + label.hamburger span:nth-child(2) {
  opacity: 0;
}

#nav-toggle:checked + label.hamburger span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

#nav-toggle:checked ~ nav.navi {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================
   Footer
============================= */
.footer {
  background-color: rgb(53, 89, 28);
  color: white;
  padding: 10px 20px;
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1000px;    /* gleiche Breite wie main */
  margin: 0 auto;       /* zentriert die gesamte Box */
  justify-content: flex-start; /* alles links ausrichten */
  text-align: left;     /* Text linksbündig */
}

.footer-link {
  color: white;
}

.impressum table {
  color: white;
  margin-top: 10px;
  border-collapse: collapse;
}

.impressum td {
  padding: 3px 10px 3px 0;
}

/* ============================
   Responsive Design
============================= */
@media (max-width: 700px) {
  .footer {
    flex-direction: column;
    text-align: center;
  }

  .impressum {
    text-align: center;       /* komplette Impressum-Sektion mittig */
  }

  .impressum table {
    margin: 0 auto;           /* Tabelle ebenfalls mittig */
    text-align: left;         /* Text in der Tabelle bleibt links */
  }

  .sitemap {
    text-align: center;       /* Sitemap auch mittig */
  }

  .quarter-width, 
  .half-width, 
  .three-quarter-width {
    flex: 1 1 100%;
  }

  .section {
    flex-direction: column;
  }

  .section-part2 > div:first-child {
    order: 2;
  }

  .section-part2 > div:last-child {
    order: 1;
  }
}

@media (min-width: 701px) {
  .nav-wrapper {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .hamburger {
    display: none;
  }

  .navi {
    position: static;
    flex-direction: row;
    height: auto;
    width: auto;
    background: transparent;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    gap: 10px;
  }

  .menu-link {
    display: inline-block;
    padding: 8px 12px;
  }

  .menu-link.button {
    padding: 8px 18px;
  }
}
