/* ===== CSS-Variablen ===== */
:root {
  --nav-bg: aquamarine;
  --footer-bg: aqua;
  --aside-bg: bisque;
  --body-bg: #f0f0f0;
  --grid-box-bg: rgb(207 232 220);
  --grid-box-border: rgb(79 185 227);
}

/* ===== Reset & Basis ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: var(--body-bg);
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* ===== Navigation ===== */
nav {
  background-color: var(--nav-bg);
  padding: 0 16px;
}

/* Hamburger-Button (nur mobil sichtbar) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 12px 0;
  width: 100%;
  text-align: left;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.nav-links li a {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav-links li a:hover {
  color: hotpink;
  background: rgba(255,255,255,0.4);
}

.nav-links li a:active {
  color: blue;
}

.nav-links h3 {
  margin: 0;
  font-size: 1rem;
}

/* ===== Links allgemein ===== */
a:hover  { color: hotpink; }
a:active { color: blue; }

/* ===== Hauptinhalt ===== */
main {
  margin-bottom: 20px;
  padding: 20px;
}

/* ===== Bilder responsiv ===== */
img {
  max-width: 100%;
  height: auto;
}

/* ===== Tabellen responsiv ===== */
table {
  width: 100%;
  border-collapse: collapse;
}

td {
  padding: 6px 8px;
  vertical-align: top;
}

/* ===== Startseite: Modell-Tabelle ===== */
.modell-tabelle {
  width: 100%;
}

.modell-tabelle td:first-child {
  width: 40%;
  font-weight: bold;
  vertical-align: middle;
}

.modell-tabelle img {
  width: 100%;
  max-width: 320px;
}

/* ===== Logo-Bereich ===== */
.logo-bereich {
  text-align: right;
  padding: 12px 16px 0;
}

.logo-bereich img {
  width: 15%;
  min-width: 80px;
  max-width: 160px;
}

/* ===== Info-Seite: Preistabelle ===== */
.preis-tabelle td:nth-child(3) {
  white-space: nowrap;
}

/* ===== Aside ===== */
aside {
  background-color: var(--aside-bg);
  min-height: 50px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
}

/* ===== Footer ===== */
footer {
  background-color: var(--footer-bg);
  min-height: 60px;
  padding: 16px;
}

/* Grid-Footer (Startseite) */
.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.container > div {
  border-radius: 5px;
  padding: 10px;
  background-color: var(--grid-box-bg);
  border: 2px solid var(--grid-box-border);
}

/* ===== Klassen-Helfer ===== */
.p_text {
  text-align: justify;
  hyphens: auto;
}

/* ===== Geschichte: Header-Bilder ===== */
.header-bilder {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0;
}

.header-bilder img {
  flex: 1 1 200px;
  max-width: 300px;
  height: auto;
  object-fit: cover;
}

/* ===== Kontaktformular ===== */
.form-grid {
  display: grid;
  grid-template-columns: max-content 1fr max-content 1fr;
  gap: 12px 16px;
  align-items: center;
  width: 100%;
  max-width: 700px;
}

.form-grid label {
  font-weight: bold;
  white-space: nowrap;
}

.form-grid input[type="Text"],
.form-grid input[type="text"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 1rem;
}

.form-grid select {
  padding: 6px 8px;
  font-size: 1rem;
}

.form-anrede {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-buttons {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
}

.form-buttons input[type="reset"],
.form-buttons input[type="submit"] {
  padding: 8px 20px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #888;
}

.form-buttons input[type="submit"] {
  background-color: aquamarine;
  font-weight: bold;
}

/* ===================================================
   RESPONSIVE BREAKPOINTS
   =================================================== */

/* ── Tablet (≤ 900 px) ── */
@media (max-width: 900px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid {
    grid-template-columns: max-content 1fr;
  }

  .header-bilder img {
    max-width: 45%;
  }
}

/* ── Mobil (≤ 600 px) ── */
@media (max-width: 600px) {

  /* Navigation: Hamburger */
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0 0 8px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links h3 {
    font-size: 0.95rem;
  }

  /* Modell-Tabelle: untereinander */
  .modell-tabelle tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
  }

  .modell-tabelle td:first-child {
    width: 100%;
  }

  .modell-tabelle img {
    max-width: 100%;
  }

  /* Preis-Tabelle: kompakter */
  .preis-tabelle td {
    display: block;
    padding: 2px 4px;
  }

  .preis-tabelle tr {
    margin-bottom: 10px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
    display: block;
  }

  /* Footer-Grid: einspaltg */
  .container {
    grid-template-columns: 1fr;
  }

  /* Formular: einspaltg */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-anrede {
    grid-column: 1;
  }

  .form-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .form-buttons input {
    width: 100%;
  }

  /* Header-Bilder: gestapelt */
  .header-bilder {
    flex-direction: column;
  }

  .header-bilder img {
    max-width: 100%;
  }

  /* Logo */
  .logo-bereich {
    text-align: center;
  }

  .logo-bereich img {
    width: 40%;
  }

  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }
}
