body,
html {
  margin: 0;
  padding: 0;
  background-color: transparent;
  overflow: hidden;
}

#starCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-color: black;
}

#mainWrapper {
  transition: transform 1.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* "100vh" allein reicht auf iOS-Safari nicht zuverlässig - siehe home.css
   für die ausführliche Erklärung. Gleicher Fix hier: erst der von
   global.js gemessene --vh-Fallback, dann 100dvh, zuletzt 100lvh (deckt
   auch den Bereich hinter einer eventuell durchsichtigen Toolbar ab). */
section {
  min-height: calc(var(--vh, 1vh) * 100);
  min-height: 100dvh;
  min-height: 100lvh;
  background: transparent;
  color: white;
}

/* Ausnahme: die äußere Footer-Section soll sich nach ihrem tatsächlichen
   Inhalt richten (genau wie auf der Startseite), statt immer mindestens
   100vh hoch zu sein. Ob der <footer>-Tag selbst volle Bildschirmhöhe
   bekommt, entscheidet weiterhin die bestehende Media Query in
   global.css (@media max-width: 1300px). */
section.footer {
  min-height: 0;
}

.contact1 {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  /* Fallback von "safe center" für Browser, die es nicht kennen */
  align-items: safe center;
  padding-left: 10vw;
  /* Reserviert Platz für den fixierten Header, damit der zentrierte
     Inhalt bei kurzen Fenstern/viel Text nicht darunter verschwindet.
     --header-height wird per JS in global.js gemessen; 140px ist nur
     der Notfall-Fallback, falls das Skript ausnahmsweise noch nicht
     gelaufen ist. */
  padding-top: var(--header-height, 140px);
  box-sizing: border-box;
  color: white;
  text-decoration: none;
  gap: 100px;
  text-shadow:
    0 4px 10px rgba(0, 0, 0, 0.5),
    0 8px 20px rgba(0, 0, 0, 0.8),
    0 10px 40px rgba(0, 0, 0, 0.7);
  font-family: "Times New Roman", Times, serif;
}

.contact1left {
  /* Auf dem Desktop soll das Formular (.contact1right) immer rechts
     stehen und dieser Block (Adresse/Händler) links - unabhängig von der
     Reihenfolge im HTML, wo das Formular zuerst kommt. order sorgt dafür
     visuell dafür, ohne das Markup umzustellen. */
  order: 1;
}

.contact1Loc,
.contact1Accord {
  width: 45vw;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact1Loc {
  padding-bottom: 50px;
}

.contact1 h2 {
  max-width: 500px;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(30px, 4vw, 45px);
  font-weight: 30;
  letter-spacing: 2px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
}

.contact1 h3 {
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  font-weight: 30;
  letter-spacing: 1px;
  color: #ffffff;
  margin: 0 0 10px 0;
}

.contact1 p,
.contact1 a {
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  margin: 5px 0;
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease;
}

.contact1 a:hover {
  color: rgb(171, 171, 171);
  transition: color 0.3s ease;
}

.accordion {
  background-color: transparent;
  color: white;
  cursor: pointer;
  padding: 20px 10px;
  width: 100%;
  max-width: 500px;
  text-align: left;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  outline: none;
  transition:
    background-color 0.4s,
    padding-left 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion:hover,
.accordion.active {
  background-color: rgba(255, 255, 255, 0.05);
  padding-left: 20px;
}

.accordion p {
  color: white;
  font-size: 20px;
  font-family: "Times New Roman", Times, serif;
  margin: 0;
}

.accordion::after {
  content: "+";
  font-family: "Times New Roman", Times, serif;
  font-size: 30px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.4s ease;
}

.accordion.active::after {
  content: "−";
  transform: rotate(180deg);
}

.panel {
  max-width: 500px;
  background-color: rgba(255, 255, 255, 0.02);
  max-height: 0;
  padding: 0 20px;
  margin-bottom: 0;
  overflow: hidden;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  margin-left: 10px;

  transition: all 0.4s ease-in-out;
}

.accordion.active + .panel {
  max-height: 300px;
  padding: 15px 20px;
  margin-bottom: 10px;
}

/* form */

.contact1right {
  width: 45vw;
  display: flex;
  flex-direction: column;
  background-color: transparent;
  /* Siehe .contact1left: hält das Formular immer rechts, egal wie die
     Blöcke im HTML angeordnet sind. */
  order: 2;
}

.contact1right form {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
}

.contact1right label {
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 20px;
  margin-bottom: 5px;
}

.contact1right input[type="text"],
.contact1right input[list],
.contact1right textarea {
  width: 100%;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  padding: 10px 0;
  box-sizing: border-box;
  outline: none;
  border-radius: 0;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.contact1right input[type="text"]:focus,
.contact1right input[list]:focus,
.contact1right textarea:focus {
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
}

/* Pflichtfeld leer gelassen und Formular trotzdem abgeschickt: die
   Unterlinie selbst färbt sich rot. Damit NUR die Linie leuchtet (nicht
   das ganze Eingabefeld als Kasten), sitzt der Schein nicht als
   box-shadow direkt auf dem Input, sondern auf einem hauchdünnen
   ::after-Strich, der exakt auf der Unterlinie liegt (dafür braucht es
   den .field-wrap um jedes Pflichtfeld - <input>/<textarea> selbst
   unterstützen kein ::after zuverlässig). So bleibt der Glow schmal und
   auf die Linie konzentriert, statt an allen vier Seiten des Feldes
   auszubluten. Dezent gehalten (eine Schicht, gedämpfte Deckkraft, kein
   Pulsieren). :has() spiegelt den Zustand vom Input auf den Wrapper,
   daher reicht weiterhin nur die Klasse "field-invalid" auf dem Feld
   (wird in global.js gesetzt) - keine JS-Änderung nötig. */
.contact1right input.field-invalid,
.contact1right textarea.field-invalid {
  border-bottom-color: #ff5c5c;
}

.contact1right .field-wrap {
  position: relative;
}

.contact1right .field-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.contact1right .field-wrap:has(.field-invalid)::after {
  opacity: 1;
  box-shadow: 0 -5px 14px 0 rgba(255, 60, 60, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  .contact1right input.field-invalid,
  .contact1right textarea.field-invalid {
    animation: none;
  }
}

.contact1right input::placeholder,
.contact1right textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-family: "Times New Roman", Times, serif;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
}

.checkbox-row input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background-color: transparent;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.checkbox-row input[type="checkbox"]:checked::before {
  content: "✓";
  color: white;
  font-size: 14px;
}

.checkbox-row label {
  margin-top: 0;
  margin-bottom: 0;
  cursor: pointer;
}

.contact1right input[type="submit"] {
  margin-top: 40px;
  background-color: transparent;
  color: white;
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  letter-spacing: 2px;
  padding: 15px 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.4s ease;
}

.contact1right input[type="submit"]:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.contact2 {
  display: flex;
  justify-content: center;
  align-items: center;
  /* Fallback von "safe center" für Browser, die es nicht kennen */
  align-items: safe center;
  width: 100%;
  /* War vorher "height: 100vh" (fest). Als min-height kann die Section
     wachsen, falls Header-Padding + Formular-Inhalt zusammen mehr als
     100vh brauchen, statt dass beides sich gegenseitig überlappt.
     Gleicher iOS-Fix wie bei "section" oben. */
  min-height: calc(var(--vh, 1vh) * 100);
  min-height: 100dvh;
  min-height: 100lvh;
  padding-top: var(--header-height, 140px);
  box-sizing: border-box;
}

@media screen and (max-width: 1470px) {
  .contact1 {
    padding-left: 0;
    justify-content: center;
  }

  .contact1left {
    width: 90vw;
    max-width: 500px;
  }

  .contact1Loc,
  .contact1Accord {
    width: 100%;
  }

  .contact1right {
    width: 90vw;
    max-width: 500px;
    padding: 0 20px;
  }

  .contact1 h2,
  .contact1right h2 {
    max-width: 500px;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(30px, 4vw, 45px);
    font-weight: 30;
    letter-spacing: 2px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    color: white;
  }
}

@media screen and (max-width: 768px) {
  /* Handy: statt nebeneinander (eng gequetscht) sauber untereinander -
     und das Formular soll dabei immer oben stehen, nicht unten. */
  .contact1 {
    flex-direction: column;
    gap: 40px;
  }

  .contact1right {
    order: 1;
  }

  .contact1left {
    order: 2;
  }

  .contact1 h2,
  .contact1right h2 {
    font-size: clamp(22px, 6vw, 28px);
    margin-bottom: 5px;
    padding-bottom: 5px;
  }

  .contact1 h3,
  .contact1 p,
  .contact1 a,
  .accordion p,
  .contact1right label,
  .contact1right input[type="text"],
  .contact1right input[list],
  .contact1right textarea {
    font-size: 15px;
  }

  .contact1Loc {
    padding-bottom: 20px;
  }

  .accordion {
    padding: 12px 5px;
  }

  .accordion::after {
    font-size: 24px;
  }

  .accordion.active + .panel {
    padding: 10px 15px;
  }

  .contact1right label {
    margin-top: 10px;
    margin-bottom: 2px;
  }

  .contact1right input[type="text"],
  .contact1right input[list],
  .contact1right textarea {
    padding: 5px 0;
  }

  .contact1right textarea {
    height: 70px !important;
  }

  .checkbox-row {
    margin-top: 10px;
    gap: 10px;
  }

  .checkbox-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
  }

  .contact1right input[type="submit"] {
    margin-top: 20px;
    padding: 10px 15px;
    font-size: 16px;
  }
}
