:root {
    --col-beige: #EEE5C2;
    --col-blau: #1A475C;
    --col-gelb: #FAD563;
    --col-salbei: #8FBD9C;
    --col-gruen: #D3DC7C;
    --col-blau-dk: #102833;
    --col-salbei-dk: #345A49;
    --col-gruen-dk: #8AA66B;
    /* Farben als Variablen */
    --headfoot-bg: var(--col-blau);
    --headfoot-text: var(--col-beige);
    --body-bg: var(--col-beige);
    --body-text: var(--col-blau);
    /* Zusätzliche Teaser Variablen */
    --teaser-bg: var(--col-salbei);
    --teaser-text: var(--col-blau);
    --teaser-btn-bg: var(--col-gelb);
    --teaser-btn-text: var(--col-blau);
    /* Zusätziche Glow Variablen */
    --glow-1: rgba(143,189,156,0.75);
    --glow-2: rgba(26, 71, 92,0.75);
    --glow-3: rgba(238,229,194,0.75);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Farben im Dark Mode */
    --headfoot-bg: var(--col-blau-dk);
    --headfoot-text: var(--col-gruen);
    --body-bg: var(--col-blau);
    --body-text: var(--col-gruen);
    /* Teaser-Farben im Dark Mode */
    --teaser-bg: var(--col-salbei-dk);
    --teaser-text: var(--col-gruen);
    --teaser-btn-bg: var(--col-blau-dk);
    --teaser-btn-text: var(--col-salbei);
    /* Glow-Farben im Dark Mode */
    --glow-1: rgba(143,189,156,0.75);
    --glow-2: rgba(0,0,0,0.4);
    --glow-3: rgba(143,189,156,0.75);
  }
}

* {
    box-sizing: border-box;
}

/*
* {
    outline: 1px solid red !important;
}
*/

html {
    /* Verhindert das "Eigenleben" der Schriftgröße */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Verhindert horizontales Scrollen auf Mobile */
    overflow-x: hidden;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--body-bg);
    color: var(--body-text);
    margin: 0;
    padding: 0;
    
    /* Erhöhte Basisgröße für Mobile-Lesbarkeit */
    font-size: 16px; 
    
    /* WICHTIG: Erhöhe die Zeilenhöhe auf 1.5 für ein einheitliches Rendering */
    line-height: 1.5; 
    
    /* Rendering-Glättung für Safari */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Layout-Stabilität */
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Silbentrennung nur dort, wo sie nötig ist (P-Tags), 
   da sie in Safari oft das Schriftbild stört */
p {
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}

/* ----- Normaler Inhalt ----- */
.regular {
  width: clamp(0px, 80vw, 800px);
  align-items: center;
  margin: 1rem auto;
}

/* ----- Zentrierter Inhalt ----- */
.center {
  align-items: center;
  margin: 1rem auto;
  max-width: 800px;
  text-align: center;
}

/* ----- Versteckter Inhalt ----- */
.hidden {
    display: none !important;
}

/* ----- Header / Navigation ----- */
.top-header {
  width: 100%;
  background: var(--headfoot-bg);
  color: var(--headfoot-text);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.top-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

/* Dropdown-Grundstruktur */
.top-nav .dropdown {
    position: relative;
}

/* Untermenü standardmäßig verstecken */
.top-nav .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--headfoot-bg);
  width: auto;         /* passt sich an den längsten Eintrag an */
  min-width: unset;    /* entfernt die feste Mindestbreite */
  white-space: nowrap; /* verhindert Zeilenumbruch */
  list-style: none;
  padding: 0.75rem 0.75rem;
  margin: 0;
  z-index: 1000;
}

/* Unterpunkte Desktop: bei Hover sichtbar */
@media (min-width: 769px) {
  .top-nav .dropdown:hover .dropdown-content {
    display: block;
    line-height: 2;       /* Zeilenhöhe verdoppelt */
  }
}

/* Unterpunkte Mobile: standardmäßig verstecken */
@media (max-width: 768px) {
  .top-nav .dropdown-content {
    position: relative;
    top: 0;
    left: 0;
    display: none; /* bleibt versteckt */
    flex-direction: column;
  }

  /* Nur sichtbar, wenn Elternpunkt "active" Klasse bekommt */
  .top-nav .dropdown.active .dropdown-content {
    display: flex;
  }
}

/* ----- Hamburger Button ----- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--headfoot-text); /* war beige */
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ----- Navigation ----- */
.top-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

header a {
  color: var(--headfoot-text);
  text-decoration: none;
}

header a:visited {
  color: var(--headfoot-text);
  text-decoration: none;
}

header a:hover {
  text-decoration: underline;
}

header a:active {
  color: var(--headfoot-text);
  text-decoration: none;
}

/* ----- Responsive Design ----- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .top-nav ul {
    flex-direction: column;
    background: var(--headfoot-bg);
    position: absolute;
    top: 60px; /* Höhe des Headers */
    right: 0;
    width: 200px;
    display: none; /* Standard: ausgeblendet */
    margin: 0;
    padding: 0.5rem;
  }

  .top-nav ul.open {
    display: flex; /* sichtbar, wenn .open-Klasse gesetzt */
    margin-top: 20px;
  }

  .top-nav li {
    margin: 0.5rem 0;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

.wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto; /* füllt den Platz zwischen Header und Footer */
}

main a {
  color: var(--body-text);
  text-decoration: underline;
}

main a:visited {
  color: var(--body-text);
  text-decoration: none;
}

main a:hover {
  text-decoration: underline;
}

main a:active {
  color: var(--body-text);
  text-decoration: none;
}

.content {
    max-width: 1000px;
    margin-inline: auto;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
    color: var(--body-text);
}

/* ----- pdf-Anzeige ----- */
/* Der Container, der das PDF hält */
.pdf-inline-container {
    width: clamp(0px, 80vw, 800px);
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 3px 3px 12px var(--glow-2);
    background-color: var(--body-bg);
    border: 1px solid var(--headfoot-bg);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

/* Das eigentliche Embed-Element */
.pdf-embed {
    width: 100%;
    height: 80vh; /* 80% der Bildschirmhöhe */
    display: block;
    border: none;
}

.pdf-container {
    position: relative;
    width: clamp(0px, 80vw, 800px);
    max-width: 1000px;
    height: 80vh;
    margin: 0 auto;
    /*
    min-height: 500px; 
    height: 80vh;
    */
    overflow: hidden;
    display: block;
    box-shadow: 3px 3px 12px var(--glow-2);
    background-color: var(--body-bg);
    border: 1px solid var(--headfoot-bg);
    border-radius: 12px;
    clear: both;
}

.pdf-iframe {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 12px;
}

.pdf-viewer {
  width: clamp(0px, calc(100vw - 2rem), calc(1000px - 2rem));
  margin: 0;
  height: 65vh;
  overflow: auto;
  box-sizing: border-box;
  background-color: var(--body-bg);
  border: 2px solid var(--headfoot-bg);
  border-radius: 6px;
  box-shadow: 3px 3px 12px var(--glow-2);
}

.pdf-viewer canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
}

/* Standard: Link und pdfjs ausblenden */
.mobile-link {
  font-size: 16px;
  display: none;
}
.pdf-viewer {
  display: none;
}

/* Mobile: iFrame ausblenden, Link und pdfjs anzeigen */
@media (max-width: 768px) {
  .mobile-link {
    display: inline-block;
  }
  .pdf-viewer {
    display: block;
  }
}

/* Grundzustand: Das Modal ist komplett ausgeblendet */
.modal {
    display: none !important;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0 auto;
    /*height: 100%;*/
    height: 100vh;
    background-color: var(--headfoot-bg);
    justify-content: center;
    align-items: center;
}

/* Wenn diese Klasse per JS hinzugefügt wird, erscheint es */
.modal.is-visible {
    display: flex !important;
}

.modal-content {
    position: relative;
    background-color: var(--body-bg);
    margin: 30px auto;
    padding: 20px;
    width: 95%;
    max-width: 1000px;
    box-sizing: border-box;
    height: 90vh;
    border-radius: 6px
}

.modal-content iframe, 
.modal-content object {
    width: 100%;
    height: 100%;
    display: block;
    border: 1px solid var(--headfoot-bg);
    border-radius: 6px
}

.close-btn {
  position: absolute;
  top: -20px;
  right: 0px;
  width: 40px;
  height: 40px;
  font-size: 30px;
  line-height: 1;
  background: var(--headfoot-bg);
  color: var(--headfoot-text);
  box-shadow: 0 0 20px var(--glow-3);
  padding: 6px 16px;
  border: 1px solid var(--headfoot-text);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.spinner {
    border: 4px solid var(--headfoot-text);
    border-top: 4px solid var(--headfoot-bg);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -20px 0 0 -20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ----- Logo ----- */
.logo {
  height: 80px;       /* feste Höhe */
  width: auto;        /* Breite proportional anpassen */
}

/* ----- Verhindere Zeilenumbruch ----- */
.no-break {
  white-space: nowrap;   /* Wort bleibt in einer Zeile */
  hyphens: manual;       /* Browser trennt es nicht automatisch */
}

/* ----- Footer ----- */
footer {
  position: relative;
  flex-shrink: 0;
  background: var(--headfoot-bg);
  color: var(--headfoot-text);
  text-align: center;
  padding: 1rem;
  z-index: 1;
}

footer a {
  color: var(--headfoot-text);
  text-decoration: none;
}

footer a:visited {
  color: var(--headfoot-text);
  text-decoration: none;
}

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

footer a:active {
  color: var(--headfoot-text);
  text-decoration: none;
}

/* ----- Teaser ----- */
.teaser {
  background: var(--teaser-bg);
  color: var(--teaser-text);
  border-radius: 12px;
  padding: 1rem;
  max-width: 800px;
  box-sizing: border-box;
  width: 80vw;
  box-shadow: 3px 3px 12px var(--glow-2);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin: 0 auto;
}

.teaser__eyebrow {
  font-size: 0.9rem;
  opacity: 0.95;
  margin-bottom: 6px;
  font-weight: 700;
  /*text-transform: uppercase;*/
  letter-spacing: 0.04em;
}

.teaser__title {
  font-size: 1.1rem;
  margin: 0 0 6px 0;
  font-weight: 700;
}

.teaser__text {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

/* Button */
.teaser__action {
  display: inline-block;
  background: var(--teaser-btn-bg);
  color: var(--teaser-btn-text);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease,
              background-color 160ms ease, color 160ms ease;
}
.teaser__action:visited {
  color: var(--teaser-btn-text);
}
.teaser__action:focus {
  outline: none;
}
.teaser__action:hover {
  transform: translateY(-2px);
  box-shadow: 0px 0px 12px var(--glow-3);
  cursor: pointer;
}

.teaser__action.no-pointer:hover {
  transform: none;
  box-shadow: none;
  cursor: default;
}

/* Responsive */
@media (max-width: 768px) {
  .teaser {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .teaser__action {
    justify-self: center;
  }
}

/* Antrag */
.custom-select {
  max-width: 270px;
  margin: 0.25rem auto;
  background-color: var(--body-bg);
  color: var(--body-text);
  border-radius: 4px;
  height: 40px;
  border: 1px solid var(--headfoot-bg);
  padding: .6rem .35rem;
}

.custom-select option {
  width: 100%;
  margin-bottom: 1rem;
  border: 1px solid var(--teaser-bg);
  border-radius: .3rem;
}

.custom-select:focus {
  outline: none;
  box-shadow: 0px 0px 6px var(--glow-3);
}

.custom-select option:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--body-bg) inset !important;
  -webkit-text-fill-color: var(--body-text) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.dokumentenliste {
  width: 80vw;
  max-width: 800px;
}

/* Login */
.login-form {
  width: 80vw;
  max-width: 800px;
  margin: 0;
  background: var(--teaser-bg);
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 3px 3px 12px var(--glow-2);
}

.login-form input {
  width: 100%;
  padding: .6rem;
  margin-bottom: 1rem;
  border: 1px solid var(--teaser-bg);
  border-radius: .3rem;
}

.login-form input:focus {
  outline: none;
  box-shadow: 0px 0px 6px var(--glow-3);
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"],
.login-form input[type="tel"],
.login-form input[type="date"] {
  width: 100%;
  padding: .6rem;
  margin-bottom: 1rem;
  border: 1px solid var(--headfoot-bg);
  border-radius: .3rem;
  background-color: var(--body-bg);
  color: var(--body-text);
}

.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder,
.login-form input[type="email"]::placeholder,
.login-form input[type="tel"]::placeholder,
.login-form input[type="date"]::placeholder {
  background: var(--body-bg);
  color: var(--body-text);
}

.login-form input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--body-bg) inset !important;
  -webkit-text-fill-color: var(--body-text) !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:-webkit-autofill:focus {
  -webkit-box-shadow:
    0 0 0 1000px var(--body-bg) inset,
    0 0 6px var(--glow-1) !important;
  box-shadow: 0 0 6px var(--glow-1);
}

.login-form a {
  color: var(--body-text);
  text-decoration: underline;
}

.login-form a:visited {
  color: var(--body-text);
  text-decoration: none;
}

.login-form button {
  background: var(--teaser-btn-bg);
  color: var(--teaser-text);
  border: none;
  padding: .6rem 1.2rem;
  cursor: pointer;
  border-radius: .3rem;
}

.login-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0px 0px 6px var(--glow-3);
  background: var(--teaser-btn-bg);
}

.logout-button {
  background: var(--teaser-btn-bg);
  color: var(--teaser-text);
  border: none;
  padding: .6rem 1.2rem;
  border-radius: .3rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.logout-button:hover {
  transform: translateY(-2px);
  box-shadow: 0px 0px 6px var(--glow-1);
}

.error {
  color: red;
  margin-bottom: 1rem;
}

/* Verstecke das native Checkbox-Element und den Radio Button */
.checkbox-container input[type="radio"],
.checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Stil für das Label */
.checkbox-container {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  font-size: 1rem;
  user-select: none;
}

/* Custom Checkbox-Stil */
.checkbox-container .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 16px;
  width: 16px;
  background-color: var(--body-bg);
  border-radius: 4px;
  border: 1px solid var(--headfoot-bg);
}

/* Hover-Farbe */
.checkbox-container:hover .checkmark {
  background-color: var(--body-bg);
  box-shadow: 0px 0px 6px var(--glow-3);;
}

/* Wenn angeklickt */
.checkbox-container input:checked ~ .checkmark {
  background-color: var(--body-bg);
  border-color: var(--headfoot-bg);
}

/* Häkchen-Stil */
.checkbox-container .checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark::after {
  display: block;
}

/* Häkchen selbst */
.checkbox-container .checkmark::after {
  left: 5px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid var(--body-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Tabelle mit einer festen Spalte und zwei variablen Spalten */
.responsive-table {
    width: 100%; 
    border-collapse: collapse;
    margin: 0;
}

.responsive-table tr {
  display: grid;
  /* Definiert die Spaltenbreiten:
     1. Spalte: Fest 25px
     2. Spalte: Fest 15px
     3. Spalte: 6 Anteile (6fr)
     4. Spalte: 4 Anteile (4fr)
     Die Anteile (6fr und 4fr) teilen sich den gesamten Restplatz
     im gewünschten Verhältnis 60:40 (6+4 = 10 Anteile gesamt) */
  grid-template-columns: 25px 15px 6fr 4fr;
}

/* Verbindet die Spalten 3 bis 4 */
.responsive-table .col3-4-span {
  /* Startet an der 3. Grid-Linie und erstreckt sich über 2 Spalten */
  grid-column: 3 / span 2;
}

.responsive-table .full-span {
  /* Weist der Zelle an, in der ersten Spalte zu beginnen (1) und sich über 4 Spalten (span 4) zu erstrecken. */
  grid-column: 1 / span 4;
}

.responsive-table td {
  padding: 2px;
  /* Die Zellen sind jetzt automatisch nebeneinander im Grid */
}

/* versteckte Tabellenzeilen */
.responsive-table tr.hidden {
    display: none;
}

/* Reiner Text – dezenter Stil */
.andere-text {
    color: var(--body-text);
}

.img-text-section {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;       /* Container zentrieren */
    gap: 2rem;            /* Abstand Text <-> Bild */
}

/* Textbereich */
.img-text-section .text {
    flex: 1;
    margin-top: -3rem;
    margin-left: 1rem;   /* Abstand zum Rand */
    margin-right: 1rem;   /* Abstand zum Rand */
    min-width: 0;
}

/* Bildbereich */
.img-text-section .image200 {
    width: 200px;       /* gewünschte Breite */
    flex: 0 0 200px;    /* verhindert Schrumpfen */
}

.img-text-section.image-right .image200 {
    margin-right: 1rem;   /* Abstand zum Rand */
}

.img-text-section.image-left .image200 {
    margin-left: 1rem;   /* Abstand zum Rand */
}

.img-text-section img {
    width: 100%;
    height: auto;
    display: block;
}


/* ------------------------------------
   MOBILE VERSION
------------------------------------ */
@media (max-width: 768px) {
    .img-text-section {
        flex-direction: column;
	gap: 0rem;            /* Abstand Text <-> Bild */
    }
    .img-text-section .text {
	margin: 0;
	/*margin-top: 0;*/
    }
    .img-text-section .image200 {
        width: 100%;
	max-width: 200px;
        flex: none;
    }
    .img-text-section.image-right .image200 {
        margin-left: 0;
        margin-right: 0;
    }
    .img-text-section.image-left .image200 {
        margin-left: 0;
        margin-right: 0;
    }
}

.tab-text {
  display: flex;
  align-items: center; /* vertikal zentriert */
  line-height: 27px;
}
.col1 {
  width: 2.5rem; /* Tabstop Breite */
}
.col2 {
  flex: 1; /* nimmt den restlichen Platz ein */
}
.full-width {
  width: 100%;
  line-height: 27px;
}

/* copy row */
.copy-row {
    display: flex;
    align-items: center; /* vertikal zentriert */
    gap: 0px;
    width: 100%;
}

/* copy text */
.copy-text {
  background: var(--teaser-bg);
  color: var(--teaser-text);
  font-size: 1rem;
  margin: 0;
  width: 15rem;
  border: none;
  background: none;
  outline: none;
  cursor:text;
  user-select:text;
}

.copy-iban {
  background: var(--teaser-bg);
  color: var(--teaser-text);
  font-size: 1rem;
  margin: 0;
  width: 15rem;
  border: none;
  background: none;
  outline: none;
  cursor:text;
  user-select:text;
}

@media (max-width: 768px) {
    .copy-text {
	width: 12.3rem;
    }
    .copy-iban {
	width: 12.3rem;
	letter-spacing: -1px;  /* enger zusammen */
    }
}

/* iOS Safari */
@supports (-webkit-touch-callout: none) {
    .copy-text {
	width: 14.2rem;
    }
    .copy-iban {
	width: 14.2rem;
    }
}

/* copy button */
.copy-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 1px;
  color: var(--teaser-text);
}

/* copy button symbol */
.copy-btn svg {
  display: block;
}

/* Container für Input + Popup */
.copy-wrapper {
    position: relative;
    display: inline-block;
}

/* Popup */
.feedback {
    position: absolute;
    top: 0px;                   
    left: 70%;
    transform: translateX(-50%) scale(0.8);  /* leicht verkleinert */
    background: var(--teaser-bg);
    color: var(--teaser-text);
    padding: 1px 6px;
    border-radius: 8px;
    border: 1px solid var(--teaser-text);
    font-size: 0.8rem;
    box-shadow: 0px 0px 6px var(--glow-3);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

/* Popup sichtbar */
.feedback.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px) scale(1);
}

/* Spielzeug */
/* 
.select-form {
  width: 100%;
  max-width: 800px;
  margin: 1rem 0 1rem 0;
  background: var(--teaser-bg);
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 3px 3px 12px var(--glow-2);
}

.select-form input {
  width: 100%;
  padding: .6rem;
  margin-bottom: 1rem;
  border: 1px solid var(--teaser-bg);
  border-radius: .3rem;
}

.select-form input:focus {
  outline: none;
  box-shadow: 0px 0px 6px var(--glow-3);
}

.select-form input[type="text"],
.select-form input[type="email"],
.select-form input[type="tel"] {
  width: 100%;
  padding: .6rem;
  margin-bottom: 1rem;
  border: 1px solid var(--headfoot-bg);
  border-radius: .3rem;
  background-color: var(--body-bg);
  color: var(--body-text);
}

.select-form input[type="text"]::placeholder,
.select-form input[type="email"]::placeholder,
.select-form input[type="tel"]::placeholder {
  background: var(--body-bg);
  color: var(--body-text);
}

.select-form input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--body-bg) inset !important;
  -webkit-text-fill-color: var(--body-text) !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:-webkit-autofill:focus {
  -webkit-box-shadow:
    0 0 0 1000px var(--body-bg) inset,
    0 0 6px var(--glow-1) !important;
  box-shadow: 0 0 6px var(--glow-1);
}

.select-form button {
  background: var(--teaser-btn-bg);
  color: var(--teaser-text);
  border: none;
  padding: .6rem 1.2rem;
  cursor: pointer;
  border-radius: .3rem;
}

.select-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0px 0px 6px var(--glow-3);
  background: var(--teaser-btn-bg);
}
*/

/* Desktop-Hover-Bild */
#imagePreview {
  position: absolute;
  display: none;
  width: 400px;
  max-width: 80vw;
  background: var(--teaser-bg);
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 0px 20px var(--glow-2);
  pointer-events: none;
  z-index: 10;
}

/* Mobile Popup */
#mobilePreview {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  max-height: 80vh;
  background: var(--teaser-bg);
  box-sizing: border-box;
  border: 10px solid var(--teaser-bg);
  border-radius: 12px;
  box-shadow: 0 0 20px var(--glow-2);
  z-index: 9999;
}

#mobilePreviewImg {
  width: 80vw;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

/* Schwebendes X-Icon */
#closePreview {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
  background: var(--headfoot-bg);
  color: var(--headfoot-text);
  box-shadow: 0 0 20px var(--glow-2);
  border: 1px solid var(--headfoot-text);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10000;
}

/* Responsive: Hover-Bild auf kleinen Bildschirmen deaktivieren */
@media (max-width: 768px) {
  #imagePreview {
    display: none !important;
  }
}

.preview-word {
  cursor: default;
  text-decoration: underline;
}

/* Numerierte Auflistungen */
ol.gliederung, ol.gliederung ol {
    list-style: none;
    counter-reset: item;
    padding: 0;
    margin-left: 0;
}
ol.gliederung li {
    counter-increment: item;
    display: block;
    margin-bottom: 1.5rem; 
    /* Verhindert Silbentrennung für Überschriften-Punkte, falls gewünscht */
    hyphens: none;
    -webkit-hyphens: none;
}
/* Die Nummerierung vor dem Text */
ol.gliederung li::before {
    content: counters(item, ".") ". ";
    display: inline-block;
    margin-right: 0.5em;
    /* Optional: Nummerierung etwas schmaler/grauer als den Text */
    font-weight: bold;
}
/* Hauptpunkte: h2-Look */
ol.gliederung > li {
    font-size: 1.5rem; /* rem ist besser für Ihre 16px Basis */
    font-weight: bold;
    margin-top: 1.5rem;
    line-height: 1.2; /* Überschriften brauchen oft weniger Zeilenhöhe als p */
}
/* Unterpunkte: h3-Look (1.1, 1.2...) */
ol.gliederung ol li {
    font-size: 1.17rem;
    font-weight: bold;
    margin-top: 0.75rem;
    /* Falls Unterpunkte doch leicht eingerückt sein sollen, hier margin-left nutzen. 
       Für "alles linksbündig" einfach bei 0 lassen. */
    margin-left: 0; 
}
/* Verhindert, dass normale P-Tags innerhalb der Liste Abstände verfälschen */
ol.gliederung li p {
    margin: 0.75rem 0 0.5rem;
    font-size: 1rem; /* Zurück auf Ihre Basis-Größe */
    font-weight: normal;
    line-height: 1.5;
}
/* Verhindert doppelten Abstand am Ende eines Listenpunkts */
ol.gliederung li p:last-child {
    margin-bottom: 0;
}
/* Spezieller Abstand für Unterlisten */
ol.gliederung ol {
    margin-top: 1rem;
    margin-bottom: 1rem;
}
/* Bulletpoints im normalen Text innerhalb der Gliederung */
ol.gliederung ul {
    list-style: disc;              /* Bulletpoints zurück */
    margin: 0.5rem 0 0.75rem 3rem;
    padding: 0;
    font-size: 1rem;
    font-weight: normal;
}
/* Einzelne Bulletpoints */
ol.gliederung ul li {
    counter-increment: none;       /* WICHTIG: keine Nummerierung */
    display: list-item;   /* wichtig: zurück zu echtem Listenelement */
    font-size: inherit;
    font-weight: normal;
    margin-bottom: 0.3rem;
}
/* Verhindert Nummern vor Bullets */
ol.gliederung ul li::before {
    content: none;
}
