@media screen and (max-width: 900px) {
  /* Macht die Haupttabelle und ihre Zellen flexibel untereinander */
  table, tbody, tr, td {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
  }

  /* Große Bilder passen sich dem Bildschirm an (Ausschluss für Slideshow) */
  img:not(.slideshow-container img) {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: inline-block;
  }

  /* Setzt Textbereiche und Ausrichtungen für Mobilgeräte sauber zurück */
  div {
    height: auto !important;
    margin-left: 15px !important;
    margin-right: 15px !important;
    margin-top: 15px !important;
    float: none !important;
    text-align: left !important;
  }

  /* Verhindert zu große Abstände auf dem Handy */
  div[style*="margin-top: 96px"], div[style*="margin-top: 148px"] {
    margin-top: 20px !important;
    text-align: center !important;
  }

  /* Fußbereich zentrieren */
  p {
    width: 100% !important;
    height: auto !important;
    text-align: center !important;
  }

  /* Handy-Anpassung für die Slideshow-Box (wird proportional zum Querformat) */
  .slideshow-container {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 600 / 250 !important;
    position: relative !important;
  }

  .slideshow-container .slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Bild wird NIE beschnitten */
  }
  
    /* Formularzeilen auf dem Handy untereinander stapeln (Name/Mail & Datum) */
  .form-row {
    flex-direction: column !important;
    gap: 0 !important;
  }

  /* Eingabefelder auf Mobilgeräten vergrößern & Touch-Fläche verbessern */
  .form-group input, 
  .form-group select, 
  .form-group textarea {
    font-size: 16px !important; /* 16px verhindert automatisches Heranzoomen auf iOS Safari */
    padding: 8px !important;
  }

  /* Datumsfelder für Smartphones optimieren */
  input[type="date"] {
    min-height: 44px !important; /* Große Trefferfläche für Finger auf Mobilgeräten */
  }

  /* Absende-Button mobil vollflächig und leicht bedienbar machen */
  .btn-submit {
    width: 100% !important;
    padding: 10px !important;
    font-size: 15px !important;
  }  
  
} /* Schließt die Media-Query für Mobilgeräte sauber ab */

/* ==========================================================================
   AB HIER: Schlanke Styles für Mobil UND Desktop (Außerhalb der Media-Query)
   ========================================================================== */

/* Dezentes, platzsparendes Design der Menü-Buttons */
.btn-zwischenraum {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
  font-weight: bold;
  font-size: 13px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  text-decoration: none;
  display: inline-block;
  vertical-align: middle;
  transition: all 0.2s ease;
  margin-bottom: 6px;
}

/* Kräftiger Effekt beim Drüberfahren (Hover) */
.btn-zwischenraum:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffcc00 !important;
  border-color: #ffcc00;
}

/* OPTISCHE HERVORHEBUNG DES ZWISCHENRAUMS */
.btn-zwischenraum:not(:last-child) {
  margin-right: 8px;
}

/* Der Home-Button als Container */
/* Der Home-Button als Container: Gleiche Ausrichtung & Grundmaße wie die Nachbarn */
.btn-home {
  display: inline-flex;
  align-items: center;     /* Zentriert das SVG vertikal */
  justify-content: center; /* Zentriert das SVG horizontal */
  vertical-align: middle;  /* IDENTISCH ZU .btn-zwischenraum */
  padding: 5px 10px;       /* IDENTISCH ZU .btn-zwischenraum */
  box-sizing: border-box;  /* Hält die Gesamthöhe stabil */
  height: 42px;            /* Passend zur Gesamthöhe der zweizeiligen Text-Buttons */
}

/* Das SVG-Haus selbst */
.home-icon {
  width: 22px;             /* 22px fügt sich optisch perfekt in die 42px Buttonhöhe ein */
  height: 22px;
  display: block;
}

/* ==========================================================================
   MARKIERUNG FÜR DIE AKTIVE SEITE & HIGHLIGHTS
   ========================================================================= */

.nav-btn-active {
  background-color: rgba(255, 204, 0, 0.2) !important;
  color: #ffcc00 !important;
  border-color: #ffcc00 !important;
}

.nav-btn-highlight {
  border-color: rgba(255, 204, 0, 1) !important;
}

/* ==========================================================================
   ZENTRALE SCHRIFTGESTALTUNG FÜR DIE TEXT-KÄSTEN (Inhalt)
   ========================================================================== */

.inhalt-kasten {
  margin-top: 8px;
  margin-left: 24px;
  margin-right: 12px;
  height: 400px;
  overflow-y: auto;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  padding-right: 10px;
}

.inhalt-kasten h2 {
  color: rgb(255, 204, 0);
  font-weight: normal;
  font-size: 20px;
  margin-top: 25px;
  margin-bottom: 8px;
}

.inhalt-kasten h2:first-child {
  margin-top: 5px;
}

body {
  padding-top: 20px !important;
}

/* ==========================================================================
   SLIDESHOW / BILDERGALERIE (Für alle Seiten wiederverwendbar)
   ========================================================================== */

/* Der Hauptcontainer für die Slideshow auf Desktop */
.slideshow-container {
  position: relative !important;
  width: 598px;
  height: 248px;
  overflow: hidden;
  display: block;
}

/* Basis-Einstellung für Bilder: Füllen immer exakt den Container aus */
.slideshow-container .slide {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: contain !important;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: block !important;
  z-index: 1;
}

.slideshow-container .slide.active {
  opacity: 1;
  z-index: 2;
}

/* Die Navigations-Pfeile (Links und Rechts) */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(81, 102, 105, 0.6);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: bold;
  font-size: 18px;
  z-index: 10;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.slide-btn:hover {
  background-color: rgba(255, 204, 0, 0.8);
  color: rgb(81, 102, 105);
  border-color: #ffcc00;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* ==========================================================================
   ANFRAGEFORMULAR STYLES (Desktop & Mobil)
   ========================================================================== */
.form-group {
  margin-bottom: 6px;
}
.form-group label {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  color: rgb(255, 204, 0);
}
.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.2);
  color: #ffffff;
  font-family: inherit;
  box-sizing: border-box;
  font-size: 13px;
}

/* Sorgt für gut lesbare Icons/Texte im mobilen Datumswähler */
input[type="date"] {
  min-height: 34px;
  color-scheme: dark;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: rgb(255, 204, 0);
  background-color: rgba(0, 0, 0, 0.4);
}
.form-row {
  display: flex;
  gap: 10px;
}
.form-row .form-group {
  flex: 1;
}
.btn-submit {
  background-color: rgb(255, 204, 0);
  color: rgb(81, 102, 105);
  border: none;
  padding: 6px 14px;
  font-weight: bold;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 4px;
  margin-bottom: 8px;
}
.btn-submit:hover {
  background-color: #ffffff;
}
.success-msg {
  background-color: rgba(76, 175, 80, 0.2);
  border: 1px solid #4CAF50;
  color: #d4edda;
  padding: 6px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 12px;
}
.error-msg {
  background-color: rgba(244, 67, 54, 0.2);
  border: 1px solid #f44336;
  color: #f8d7da;
  padding: 6px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 12px;
}
.scroll-info-text {
  max-height: 85px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.35;
  padding-right: 5px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 6px;
}