body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: #f0f4f8;
}

.main-layout {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  /* Verhindert Scroll auf der gesamten Seite */
}

.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 300px;
  height: 100vh;
  color: white;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.sidebar-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.6);
  /* Video etwas abdunkeln für Lesbarkeit */
}

.sidebar > img,
.sidebar > h2 {
  position: relative;
  z-index: 1;
  /* Über dem Video */
}

/* Container für Logo und Überschrift, oben fixieren */
.sidebar-top {
  position: sticky;
  top: 2rem;
  /* Abstand von oben, passt du nach Wunsch an */
  text-align: center;
  z-index: 2;
}

/* Formularbereich scrollbar machen */
.form-section {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 2rem;
  background: white;
  max-height: 100vh;
  /* Wichtig, damit scrollbar */
}

/* Optional: scrollbar Styling */
.form-section::-webkit-scrollbar {
  width: 8px;
}

.form-section::-webkit-scrollbar-thumb {
  background-color: #004b6b;
  border-radius: 4px;
}

form {
  max-width: 700px;
  margin: 0 auto;
}

fieldset {
  margin-bottom: 2rem;
  border: none;
}

textarea {
  resize: none;
}

legend {
  font-weight: bold;
  margin-bottom: 1rem;
}

.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

/* Einheitliche Feldlängen */
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: none;
  outline: none;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* Range Input speziell stylen */
.form-group input[type="range"] {
  padding: 0.5rem 0;
  width: 100%;
}

/* Labels immer über dem Feld */
.form-group label {
  position: static !important;
  display: block;
  margin-bottom: 0.4rem;
  margin-top: 0;
  background: none;
  left: 0;
  top: 0;
  font-size: 1rem;
  color: #222;
  padding: 0;
  text-align: left;
  z-index: auto;
}

/* Checkbox-Gruppen korrekt darstellen */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* Abstand zwischen Checkbox und Text */
  position: static;
  /* entfernt absolute Positionierung */
}

/* Checkbox selbst */
.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
}

/* Label neben der Checkbox */
.checkbox-group label {
  position: static;
  background: none;
  padding: 0;
  font-size: 1rem;
  color: #333;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:not([value=""]) + label {
  top: -0.6rem;
  left: 0.4rem;
  font-size: 0.8rem;
  color: #006eb7;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.progressbar {
  counter-reset: step;
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.progressbar li {
  position: relative;
  flex: 1;
  text-align: center;
  font-size: 14px;
  color: #aaa;
}

.progressbar li::before {
  content: counter(step);
  counter-increment: step;
  width: 30px;
  height: 30px;
  line-height: 30px;
  border: 2px solid #005894;
  display: block;
  text-align: center;
  margin: 0 auto 10px auto;
  border-radius: 50%;
  background-color: white;
  color: #005894;
  font-weight: bold;
}

.progressbar li::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: #005894;
  top: 15px;
  left: -50%;
  z-index: -1;
}

.progressbar li:first-child::after {
  content: none;
}

.progressbar li.active::before {
  background-color: #005894;
  color: white;
}

.progressbar li.active ~ li::before {
  border-color: #ccc;
  color: #ccc;
}

.progressbar li.active ~ li::after {
  background-color: #ccc;
}

/* Einheitliche Button Styles */
.form-btn,
.prev-btn,
.next-btn,
input[type="submit"] {
  padding: 1rem 2rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
  text-decoration: none;
  min-width: 120px;
}

.form-btn:not(.prev-btn),
.next-btn,
.submit-btn,
input[type="submit"] {
  background: #006eb7;
  color: white;
}

.form-btn:not(.prev-btn):hover,
.next-btn:hover,
.submit-btn:hover,
input[type="submit"]:hover {
  background: #005894;
}

.prev-btn,
.form-btn.prev-btn {
  background: #e0e0e0;
  color: #333;
}

.prev-btn:hover,
.form-btn.prev-btn:hover {
  background: #d0d0d0;
}

.button-group {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ccc;
  gap: 1rem;
}

.button-group button,
.button-group input[type="submit"] {
  flex: 1;
}

input,
select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #0077cc;
}

/* Confirmation page styles */
.confirmation {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.confirmation h1 {
  color: #006eb7;
  margin-bottom: 1rem;
}

.confirmation .lead {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2rem;
}

.confirmation-details {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.confirmation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.confirmation-item {
  background: white;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.confirmation-item strong {
  display: block;
  color: #006eb7;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.confirmation-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.confirmation-item li {
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
}

.confirmation-item li span {
  color: #666;
  font-size: 0.9rem;
}

.privacy-notice {
  background: #e8f4ff;
  padding: 1rem;
  border-radius: 6px;
  margin: 2rem 0;
}

.privacy-notice p {
  margin: 0;
  color: #004b6b;
}

.confirmation .form-btn {
  display: inline-block;
  text-decoration: none;
  background: #006eb7;
  color: white;
  padding: 1rem 2rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  text-align: center;
}

.confirmation .form-btn:hover {
  background: #005894;
}

/* Footer Styles */
footer {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  color: white;
  z-index: 10;
  font-size: 0.85rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-info p {
  margin: 0;
}

.footer-disclaimer {
  margin: 0;
  font-size: 0.8rem;
}

.footer-disclaimer a {
  color: white;
  text-decoration: none;
}

.footer-disclaimer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .main-layout {
    flex-direction: column;
    min-height: auto;
  }

  .sidebar {
    flex: none;
    height: auto;
    min-height: 300px;
    padding: 1rem;
  }

  .sidebar h2 {
    font-size: 1.2rem;
    margin: 1rem 0;
  }

  .sidebar img {
    max-width: 150px;
    margin: 1rem 0;
  }

  .form-section {
    padding: 1rem;
    max-height: none;
  }

  .progressbar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
    padding: 0;
    margin-bottom: 2.2rem;
  }

  .progressbar li {
    flex: none !important;
    min-width: 70px;
  }

  .progressbar li::before {
    border: 2px solid #ccc;
    background: white;
  }

  .progressbar li.active {
    color: #006eb7;
  }

  .progressbar li.active::before {
    border-color: #006eb7;
  }

  .form-group {
    margin-bottom: 1.2rem;
  }

  .form-group label {
    position: static !important;
    display: block;
    margin-bottom: 0.4rem;
    margin-top: 0;
    background: none;
    left: 0;
    top: 0;
    font-size: 1rem;
    color: #222;
    padding: 0;
    text-align: left;
    z-index: auto;
  }

  .form-group textarea,
  .form-group input[type="text"] {
    margin-top: 0 !important;
  }

  .button-group {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .button-group .form-btn {
    width: 80%;
    max-width: 250px;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    margin: 0 auto;
    display: block;
  }

  /* Bestätigungsseite Responsive */
  .confirmation {
    padding: 1rem;
  }

  .confirmation h1 {
    font-size: 1.5rem;
  }

  .confirmation .lead {
    font-size: 1rem;
  }

  .confirmation-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .confirmation-item {
    padding: 1rem;
  }

  /* Footer im Mobile */
  footer {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    padding: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
  }

  .footer-content {
    align-items: center;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    min-height: 48px;
    font-size: 1.1rem;
  }
  .form-group textarea {
    min-height: 120px;
  }
  .form-step legend {
    margin-top: 1.5rem !important;
    margin-bottom: 2.5rem !important;
    text-align: center;
  }
  .form-step .form-group:first-of-type {
    margin-top: 1.5rem !important;
  }

  .form-group.label-range {
    display: flex;
    flex-direction: column;
    margin-top: 1.5rem;
  }

  .form-group.label-range label {
    position: static;
    display: block;
    margin-bottom: 1rem;
    background: none;
    padding: 0;
    color: #222;
  }

  .form-group.label-range input[type="range"] {
    width: 100%;
    margin: 0.5rem 0 1.2rem 0;
  }

  .confirmation .button-group {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 6rem;
  }
  .confirmation .button-group .form-btn {
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 auto;
    display: block;
    text-align: center;
    justify-content: center;
    align-items: center;
    white-space: normal;
    border-radius: 6px;
  }

  .form-section .button-group {
    flex-direction: row;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 2.2rem;
  }
  .form-section .button-group .form-btn,
  .form-section .button-group button,
  .form-section .button-group input[type="submit"] {
    width: 100%;
    max-width: none;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    margin: 0;
    display: block;
    flex: 1 1 0;
  }
}

/* Kleine Mobilgeräte */
@media screen and (max-width: 480px) {
  .sidebar {
    min-height: 250px;
  }

  .sidebar h2 {
    font-size: 1rem;
  }

  .sidebar img {
    max-width: 120px;
  }

  .form-section {
    padding: 0.8rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    min-height: 44px;
    font-size: 1rem;
  }

  .form-group label {
    font-size: 0.85rem;
  }

  .progressbar li {
    font-size: 0.7rem;
  }

  .confirmation h1 {
    font-size: 1.25rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px; /* Verhindert Zoom auf iOS */
  }

  .form-group textarea {
    min-height: 100px;
  }

  .form-step legend {
    margin-bottom: 2.5rem !important;
  }

  .form-step .form-group:first-of-type {
    margin-top: 1.2rem !important;
  }

  .progressbar {
    max-width: 98vw;
  }
}

/* Landscape Orientation */
@media screen and (max-height: 480px) and (orientation: landscape) {
  .sidebar {
    height: 150px;
  }

  .sidebar h2 {
    font-size: 1rem;
  }

  .form-section {
    padding: 0.75rem;
  }
}

/* Regler-Label immer über dem Regler, sauberer Abstand */
.form-group.label-range {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.form-group.label-range label[for="zufriedenheit_meeresschutz"] {
  position: static !important;
  display: block;
  margin-bottom: 0.5rem;
  margin-top: 0;
  background: none;
  left: 0;
  top: 0;
  font-size: 1rem;
  color: #222;
  padding: 0;
  text-align: left;
  z-index: auto;
}
.form-group.label-range input[type="range"] {
  width: 100%;
  margin: 0 0 1.2rem 0;
  display: block;
  box-sizing: border-box;
}

@media screen and (max-width: 768px) {
  .form-group.label-range label[for="zufriedenheit_meeresschutz"] {
    font-size: 0.98rem;
    margin-bottom: 0.35rem;
  }
}

/* Größeres Textarea für Informationsquelle */
#informationsquelle {
  min-height: 60px;
  resize: vertical;
  font-size: 1.1rem;
}
@media screen and (max-width: 768px) {
  #informationsquelle {
    min-height: 80px;
    font-size: 1.1rem;
  }
}

.brochure-link {
  margin-bottom: 2rem;
  text-align: left;
}

.brochure-link a {
  color: #006eb7;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #f0f4f8;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.brochure-link a:hover {
  background-color: #e1e8ef;
  text-decoration: none;
}

@media screen and (max-width: 768px) {
  .brochure-link {
    margin-bottom: 1.5rem;
  }
  .brochure-link a {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
}

.confirmation .button-group {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}
.confirmation .button-group .form-btn {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 auto;
  display: block;
  text-align: center;
  justify-content: center;
  align-items: center;
  white-space: normal;
  border-radius: 6px;
}

.confirmation .privacy-notice + hr,
.confirmation .privacy-notice + .button-group {
  border-top: none !important;
}
.confirmation .confirmation-details > hr {
  display: none !important;
}

/* Intro-Animation Styles */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 1s ease-in-out;
}

.intro-overlay.hide {
  transform: translateX(-100%);
}

.intro-logo {
  width: 300px;
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
}

.intro-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fehlermeldungen */
.error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

/* Validiert nur nach Benutzerinteraktion */
.form-group input:not(:placeholder-shown):invalid,
.form-group textarea:not(:placeholder-shown):invalid,
.form-group select:not(:placeholder-shown):invalid {
  border-color: #dc3545;
}

.form-group input:not(:placeholder-shown):invalid:focus,
.form-group textarea:not(:placeholder-shown):invalid:focus,
.form-group select:not(:placeholder-shown):invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Validiert nach Benutzerinteraktion */
.form-group input.touched:invalid,
.form-group textarea.touched:invalid,
.form-group select.touched:invalid {
  border-color: #dc3545;
}

.form-group input.touched:invalid:focus,
.form-group textarea.touched:invalid:focus,
.form-group select.touched:invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
