/* ===================================
   Farb- und Layout-Variablen
=================================== */
:root {
  --primary: #660033;
  --primary-light: #8a0044;
  --primary-dark: #4a0025;
  --secondary: #710036;
  --secondary-light: #99004c;
  --neutral-bg: #f4f5f7;
  --neutral-panel: #ffffff;
  --neutral-border: #e0e0e0;
  --text-primary: #333333;
  --text-light: #ffffff;
  --info: #0077cc;
  --success: #28a745;
  --warning: #ff9800;
  --error: #dc3545;
  --radius: 6px;
  --spacing: 16px;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s ease;
}

/* ===================================
   Grundstruktur
=================================== */
html, body {
  height: 100%;
  margin: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--neutral-bg);
  line-height: 1.6;
  font-size: 16px;
}

/* Wrapper für gesamten Seiteninhalt */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: var(--spacing);
}
#konsultation-form {
  width: 100%;
  max-width: 960px;
}


/* ===================================
   Header & Footer
=================================== */
.site-header,
.site-footer {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: var(--spacing);
}

.logo {
  height: 40px;
  vertical-align: middle;
  margin-right: var(--spacing);
}

.logo-container {
  display: flex;
  align-items: center;   /* vertikale Zentrierung */
  justify-content: flex-end;  /* nach rechts ausrichten */
  /*height: 100px;         /* oder was du brauchst */
  /* padding-right: 16 px;    optionaler Abstand */
}


.logo-small {
  float: right;
  max-height: 80px;
  height: auto;
  width: auto;
  object-fit: contain;     /* sorgt für korrektes Seitenverhältnis */
  display: block;          /* sicherstellen, dass das Bild nicht als Inline-Element behandelt wird */
}

h1, h2, h3 {
  margin: var(--spacing) 0 0.5em;
  font-weight: 600;
}

/* ===================================
   Formulare & Layout
=================================== */
#konsultation-form form {
  background: #fff;
  padding: var(--spacing);
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

#konsultation-form fieldset {
  border: 1px solid #ccc;
  padding: var(--spacing);
  margin-bottom: var(--spacing);
  border-radius: var(--radius);
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#konsultation-form fieldset.collapsed .fieldset-content {
  display: none;
}

#konsultation-form legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--primary);
  padding: 8px 12px;
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
}

.pointer {
  cursor: pointer;
  background: #f8f8f8;
}

.legend-title {
  flex: 1;
}

.collapsible {
  border: 1px solid #ccc;
  border-radius: var(--radius);
  margin-bottom: var(--spacing);
  overflow: hidden;
}

.fieldset-content {
  max-height: 1000px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  padding: 12px;
  background: #fff;
}

.collapsed .arrow {
  transform: rotate(-90deg);
}

.arrow {
  margin-left: 10px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--primary);
  transition: transform 0.3s ease;
}

.legend-text {
  flex: 1;
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ===================================
   Grid-System
=================================== */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: var(--spacing);
}

.grid-2 > div,
.grid-3 > div {
  display: flex;
  flex-direction: column;
}

.grid-2 textarea,
.grid-3 textarea {
  flex: 1;
  resize: vertical;
  min-height: 80px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* ===================================
   Inputs & Labels
=================================== */
label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95em;
  font-weight: 500;
}

input[type="date"],
input[type="number"],
input[type="text"],
select,
textarea {
  width: 100%;
  padding: 7px;
  border: 1px solid #bbb;
  border-radius: var(--radius);
  font-size: 1em;
  background: #fff;
  transition: var(--transition);
}

textarea {
  resize: vertical;
  min-height: 60px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 6px rgba(102, 0, 51, 0.3);
}

/* ===================================
   Buttons
=================================== */
.form-actions {
  text-align: right;
  margin-top: var(--spacing);
}

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1em;
  transition: var(--transition);
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.secondary {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn.tertiary {
  background: transparent;
  color: var(--text);
}

.btn.long {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Buttons mit Actions */
.input-with-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.apply-single {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.apply-single:hover {
  background-color: #880044;
  transform: scale(1.05);
}

.apply-single:active {
  transform: scale(0.98);
}

/* ===================================
   Tooltip für data-title
=================================== */
[data-title] {
  position: relative;
}

[data-title]::after {
  content: attr(data-title);
  position: absolute;
  bottom: -150%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 4px;
  width: 250px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  transition-delay: 0.8s;
  z-index: 9999;
}

[data-title]:hover::after {
  opacity: 1;
}

/* ===================================
   Utilities (Abstände, Farben)
=================================== */
.bg-gs {
  background: #66003315;
}

.mb-0 { margin-bottom: 0px !important; }
.mb-1 { margin-bottom: 15px !important; }
.mb-2 { margin-bottom: 30px !important; }
.mb-3 { margin-bottom: 50px !important; }
.mb-4 { margin-bottom: 75px !important; }
.mb-5 { margin-bottom: 100px !important; }

.mt-0 { margin-top: 0px !important; }
.mt-1 { margin-top: 15px !important; }
.mt-2 { margin-top: 30px !important; }
.mt-3 { margin-top: 50px !important; }
.mt-4 { margin-top: 75px !important; }
.mt-5 { margin-top: 100px !important; }

/* ===================================
   Responsive Anpassungen
=================================== */
@media (max-width: 768px) {
  main {
    padding: 12px;
  }

  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .form-actions {
    text-align: center;
  }

  .btn {
    margin: 8px 4px;
    width: 100%;
    max-width: 280px;
  }

  .mb-1 { margin-bottom: 8px !important; }
  .mb-2 { margin-bottom: 15px !important; }
  .mb-3 { margin-bottom: 25px !important; }
  .mb-4 { margin-bottom: 38px !important; }
  .mb-5 { margin-bottom: 50px !important; }

  .mt-1 { margin-top: 8px !important; }
  .mt-2 { margin-top: 15px !important; }
  .mt-3 { margin-top: 25px !important; }
  .mt-4 { margin-top: 38px !important; }
  .mt-5 { margin-top: 50px !important; }
}

/* ===================================
   Fehlerzustand
=================================== */
.error {
  color: red !important;
  border: 1px solid red;
}


/* ===================================
   Flexbox Utilities für Ausrichtung
=================================== */

/* Basis: Aktiviert Flexbox */
.flex {
  display: flex;
  align-items: center; /* vertikal mittig */
  gap: 10px; /* Standard-Abstand zwischen Elementen */
}

/* Horizontale Ausrichtung */
.flex-left {
  justify-content: flex-start; /* Links */
}

.flex-center {
  justify-content: center; /* Zentriert */
}

.flex-right {
  justify-content: flex-end; /* Rechts */
}

.flex-between {
  justify-content: space-between; /* Elemente aufteilen */
}

.flex-around {
  justify-content: space-around; /* Gleichmäßige Abstände */
}

/* Responsive Anpassung (optional) */
@media (max-width: 768px) {
  .flex {
    flex-direction: column; /* Auf kleinen Bildschirmen untereinander */
    align-items: center;
  }
    .site-header .grid-3 > div:nth-child(3) {
    order: 1; /* Logo ganz oben */
  }

  .site-header .grid-3 > div:nth-child(2) {
    order: 2; /* Titel danach */
  }

  .site-header .grid-3 > div:nth-child(1) {
    display: none; /* das leere linke Grid-Element ausblenden */
  }
  
  .site-header h1 {
    font-size: 1.8rem;  /* kleinerer Titel */
    line-height: 1.2;
  }
  
  .logo-small {
    max-height: 60px;
    margin-bottom: 5px;
  }

}

/* Login */
    * {
      margin: 0
      padding: 0;
      box-sizing: border-box;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    body.login {
      background-color: var(--neutral-bg);
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      /*background-image: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--secondary-light) 100%);*/
    }

    .login-container {
      width: 100%;
      max-width: 900px;
      min-height: 550px; /* <- Mindesthöhe */
      display: flex;
      box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
      border-radius: 12px;
      overflow: hidden;
    }

    .image-section {
      flex: 1;
      background-image: linear-gradient(rgba(74, 0, 37, 0.2), rgba(106, 0, 53, 0.2)), url('/fileadmin/img/login-picture.png');
      background-size: cover;
      background-position: center;
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      color: var(--text-light);
      padding: 40px;
    }

    .image-section::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(135deg, rgba(74, 0, 37, 0.8) 0%, rgba(106, 0, 53, 0.7) 50%, rgba(153, 0, 76, 0.6) 100%);
    }

    .brand {
      position: relative;
      z-index: 2;
      text-align: center;
    }

    .brand h1 {
      font-size: 2.5rem;
      margin-bottom: 1rem;
      font-weight: 700;
      letter-spacing: 1px;
	  color: var(--text-light)
    }

    .brand p {
      font-size: 1.1rem;
      max-width: 80%;
      margin: 0 auto 2rem;
      line-height: 1.6;
	  color: var(--text-light)
    }

    body.login .form-section {
      flex: 1;
      background-color: var(--neutral-panel);
      padding: 40px;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .login-header {
      margin-bottom: 0.5rem;
    }

    .login-header h2 {
      font-size: 1.8rem;
      color: var(--primary-dark);
      margin-bottom: 0.5rem;
      font-weight: 600;
    }


    .separator {
      display: flex;
      align-items: center;
      text-align: center;
      margin: 25px 0;
      color: #777;
    }

    .separator::before,
    .separator::after {
      content: '';
      flex: 1;
      border-bottom: 1px solid var(--neutral-border);
    }

    .separator::before {
      margin-right: 10px;
    }

    .separator::after {
      margin-left: 10px;
    }

    .form-group {
      margin-bottom: 20px;
      position: relative;
    }

    .form-group label {
      display: block;
      margin-bottom: 8px;
      font-weight: 500;
      color: #444;
    }

    .form-group input {
      width: 100%;
      padding: 12px 15px;
      font-size: 15px;
      border: 1px solid var(--neutral-border);
      border-radius: 6px;
      transition: all 0.3s ease;
    }

    .form-group input:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 2px rgba(102, 0, 51, 0.1);
      outline: none;
    }

    .password-toggle {
      position: absolute;
      right: 15px;
      top: 41px;
      cursor: pointer;
      color: #777;
    }

    .remember-forgot {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 25px;
    }

    .remember {
      display: flex;
      align-items: center;
    }

    .remember input {
      margin-right: 8px;
      accent-color: var(--primary);
    }

    .forgot {
      color: var(--info);
      text-decoration: none;
      font-size: 14px;
      transition: color 0.3s;
    }

    .forgot:hover {
      color: var(--primary);
      text-decoration: underline;
    }

    .login-button {
      background: linear-gradient(to right, var(--primary), var(--secondary-light));
      color: var(--text-light);
      border: none;
      padding: 14px;
      border-radius: 6px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      margin-bottom: 20px;
	  min-width: 130px;
      box-shadow: 0 4px 6px rgba(102, 0, 51, 0.1);
    }

    .login-button:hover {
      background: linear-gradient(to right, var(--primary-light), var(--secondary-light));
      transform: translateY(-2px);
      box-shadow: 0 6px 8px rgba(102, 0, 51, 0.15);
    }

    .login-footer {
      text-align: center;
      color: #777;
      font-size: 14px;
    }

    .login-footer a {
      color: var(--primary);
      text-decoration: none;
      font-weight: 600;
      transition: color 0.3s;
    }

    .login-footer a:hover {
      text-decoration: underline;
    }

    @media (max-width: 900px) {
      .login-container {
        flex-direction: column;
        height: auto;
        max-width: 500px;
      }

      .image-section {
        display: none;
      }

      .form-section {
        padding: 30px;
      }
	}  
	.copyright {
		position: fixed;         /* fixiert das Element im Viewport */
		bottom: 8px;             /* Abstand vom unteren Rand */
		left: 8px;               /* Abstand vom linken Rand */
		font-size: 0.6em;        /* wie in deinem Inline-Stil */
	    color: #333;             /* Textfarbe anpassen */
	    z-index: 9999;           /* über anderen Elementen */
	}

	.copyright a {
	  color: inherit;          /* übernimmt die Farbe des Containers */
	  text-decoration: none;   /* keine Unterstreichung */
	}

	.copyright a:hover {
	  text-decoration: underline; /* bei Hover sichtbar machen */
	}
	.login-error h4 {
	  margin: 0 0 4px;
	  font-size: 1em;
	}
	.login-error p {
	  margin: 0;
	  font-size: 0.9em;
	}
	.login-error {
	  background: #fdecea;         /* helles Rot für Fehler */
	  color: #dc3545;             /* kräftiges Rot für Text */
	  padding: 12px 16px;
	  margin-bottom: 16px;        /* Abstand zum Formular */
	  border: 1px solid #f5c2c7;  /* leichte Umrandung */
	  border-radius: 6px;
	  font-size: 0.9em;
	}