.site-header {
  background-color: #1c3144;
  color: white;
  padding: 10px 20px;
}

.header-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-title .logo {
  height: 32px;
}

/* Container für alle Header-Links */
.header-links-container {
  display: flex;
  flex-wrap: wrap;          /* bei sehr schmalen Viewports umbrechen */
  justify-content: center;  /* horizontal zentrieren */
  gap: 0.2em;                /* Abstand zwischen den Links */
  margin: 0.2em 0;
}
.header-link {
  display: inline-block;
  padding: 0.2em 0.5em;
  font-size: 1.5rem;
  color: #0366d6;              /* Link-Farbe */
  text-decoration: none;
  position: relative;          /* für das Pseudo-Element */
  transition: color 0.2s;
}

.header-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;                /* Stärke der Linie */
  background-color: #0366d6;  /* gleiche Farbe wie der Text */
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.header-link:hover {
  color: #f1f1f1;             /* dunkler beim Hovern */
}

.header-link:hover::after {
  transform: scaleX(1);       /* Unterstreichung wird sichtbar */
}

/* Dark Mode Anpassung */
@media (prefers-color-scheme: dark) {
  .header-link {
    color: #58a6ff;
  }
  .header-link::after {
    background-color: #58a6ff;
  }
  .header-link:hover {
    color: #f1f1f1;
  }
}

/* Unter 600px: kompakter */
@media (max-width: 800px) {
  .header-link {
    font-size: 0.875rem;
    padding: 0.25em 0.5em;
  }
}




.site-title {
  font-weight: bold;
  font-size: 24px;
}
  /* Basis‐Style für den Link */
  .site-titlel {
    position: relative;
    color: #ffffff;              /* Link-Farbe */
    text-decoration: none;       /* Unterstreichung abschalten */
    font-weight: 500;
    padding: 0.1em 0;            /* etwas Abstand ober/unter */
    transition: color 0.2s;      /* sanfter Farbwechsel */
  }

  /* Farbverlauf‐Hintergrund, versteckt im Normalzustand */
  .site-titlel::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0.35em;              /* Höhe des Highlight-Streifens */
    background: linear-gradient(120deg, rgba(255,215,0,0.6), rgba(255,140,0,0.6));
    border-radius: 0.2em;
    z-index: -1;                 /* hinter den Text legen */
    transform: scaleX(0);        /* von 0% starten */
    transform-origin: left;
    transition: transform 0.3s ease;
  }

  /* Hover- und Fokus‐Zustand: Farbe + „Wisch“-Animation */
  .site-titlel:hover,
  .site-titlel:focus {
    color: #d7b600;                 /* Schriftfarbe ändert sich */
  }
  .site-titlel:hover::before,
  .site-titlel:focus::before {
    transform: scaleX(1);        /* Hintergrund breitet sich über den Text aus */
  }










.main-nav a {
  color: white;
  text-decoration: none;
  margin-right: 12px;
}

.search-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: relative;
  max-width: 100%;
}
.search-area select,
.search-area input {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #aaa;
  border-radius: 6px;
  background: #f8f9fa;
  color: #222;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.search-area select:focus,
.search-area input:focus {
  outline: none;
  border-color: #0074cc;
  box-shadow: 0 0 4px rgba(0, 116, 204, 0.5);
}

.search-area button {
  background-color: #0074cc;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-area button:hover {
  background-color: #005fa3;
}

.language-select select {
  background-color: #f0f0f0;
  border: 1px solid #bbb;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  color: #333;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.language-select select:focus {
  border-color: #0074cc;
  box-shadow: 0 0 4px rgba(0, 116, 204, 0.5);
}


.autocomplete-box {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  color: black;
}
.autocomplete-item {
  padding: 8px;
  cursor: pointer;
}
.autocomplete-item:hover,
.autocomplete-item.active {
  background-color: #f0f0f0;
}
.section-title {
  font-weight: bold;
  padding: 6px 8px;
  background-color: #eee;
}

/* Responsive Verhalten */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }

  .search-area,
  .main-nav,
  .language-select {
    width: 100%;
    justify-content: center;
  }

  .main-nav {
    text-align: center;
  }

  .search-area input,
  .search-area select,
  .search-area button {
    width: 100%;
  }

  .language-select select {
    width: 100%;
  }
}

:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --header-bg: #1c3144;
  --input-bg: #f8f9fa;
  --input-border: #ccc;
}

[data-theme="dark"] {
  --bg-color: #0e2439;         /* dunkles Marineblau für Hintergrund */
  --text-color: #e0e6ed;       /* leichtes Grau für Text */
  --header-bg: #102a43;        /* Marineblau für Header */
  --input-bg: #1b3b5f;         /* etwas heller für Inputfelder */
  --input-border: #406080;     /* dezente Umrandung */
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

.site-header {
  background-color: var(--header-bg);
}

/* optional: Inputs */
.search-area input,
.search-area select,
.language-select select {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-color);
}
/* Header polish - keep existing background color */
.site-header {
  padding: 12px 22px;
  box-shadow: 0 8px 24px rgba(13, 35, 56, 0.12);
}

.site-header .header-container {
  width: min(100%, 1880px);
  margin: 0 auto;
  gap: 18px;
  flex-wrap: nowrap;
}

.logo-title {
  min-width: max-content;
  gap: 10px;
}

.logo-title .logo {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}

.logo-title .site-titlel {
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
}

.logo-title .beta-badge {
  margin-left: 2px;
  transform: translateY(-1px);
}

.header-links-container {
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(158, 208, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #6fb8ff !important;
  font-size: clamp(1.05rem, 1.25vw, 1.35rem);
  font-weight: 700;
  text-decoration: none !important;
}

.header-link::after {
  display: none;
}

.header-link:hover,
.header-link:focus {
  background: rgba(111, 184, 255, 0.12);
  border-color: rgba(158, 208, 255, 0.26);
  color: #ffffff !important;
}

.search-area {
  flex: 1 1 560px;
  justify-content: center;
  gap: 8px;
  min-width: 360px;
}

.search-area select,
.search-area input,
.language-select select {
  height: 38px;
  border-color: rgba(124, 183, 228, 0.24);
  border-radius: 9px;
  background: #f8fbfe;
  color: #102a43;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-area input {
  min-width: 220px;
  flex: 0 1 280px;
}

.search-area button {
  height: 38px;
  border-radius: 9px;
  padding: 0 16px;
  background: linear-gradient(180deg, #0b86d7, #056eaf);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0, 116, 204, 0.22);
}

.search-area button:hover {
  background: linear-gradient(180deg, #1294e7, #0576bc);
}

.language-select {
  flex: 0 0 auto;
}

.language-select select {
  min-width: 146px;
}

#theme-toggle {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin-left: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(158, 208, 255, 0.12);
  box-shadow: none;
}

#theme-toggle:hover {
  background: rgba(111, 184, 255, 0.12);
  transform: translateY(-1px);
}

.autocomplete-box {
  top: calc(100% + 8px);
  border-radius: 10px;
  border-color: rgba(52, 91, 125, 0.18);
  overflow: hidden;
}

@media (max-width: 1240px) {
  .site-header .header-container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo-title {
    flex: 1 1 100%;
    justify-content: center;
  }

  .search-area {
    order: 3;
    flex-basis: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 10px 12px;
  }

  .header-links-container {
    width: 100%;
    justify-content: center;
  }

  .search-area,
  .language-select {
    width: 100%;
  }

  .search-area input,
  .search-area select,
  .search-area button,
  .language-select select {
    width: 100%;
    min-width: 0;
  }

  #theme-toggle {
    margin: 0 auto;
  }
}
/* Compact mobile header */
@media (max-width: 900px) {
  .site-header {
    padding: 8px 10px;
  }

  .site-header .header-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
  }

  .logo-title {
    grid-column: 1 / -1;
    justify-content: center;
    gap: 8px;
  }

  .logo-title .logo {
    height: 30px;
  }

  .logo-title .site-titlel {
    font-size: 1rem;
  }

  .logo-title .beta-badge {
    font-size: 0.64rem;
  }

  .header-links-container {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .header-link {
    justify-content: center;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 1rem;
  }

  .language-select {
    grid-column: 1 / 2;
    width: 100%;
  }

  .language-select select {
    width: 100%;
    min-width: 0;
    height: 36px;
  }

  #theme-toggle {
    grid-column: 2 / 3;
    width: 36px;
    height: 36px;
    margin: 0;
  }

  .search-area {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.6fr) auto;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .search-area select,
  .search-area input,
  .search-area button {
    width: 100%;
    min-width: 0;
    height: 38px;
  }

  .search-area button {
    padding: 0 14px;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 7px 8px;
  }

  .site-header .header-container {
    gap: 7px;
  }

  .logo-title {
    justify-content: flex-start;
  }

  .logo-title .logo {
    height: 28px;
  }

  .logo-title .site-titlel {
    font-size: 0.95rem;
  }

  .header-links-container {
    grid-template-columns: 1fr 1fr;
  }

  .header-link {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 0.9rem;
  }

  .language-select select,
  #theme-toggle {
    height: 34px;
  }

  #theme-toggle {
    width: 34px;
  }

  .search-area {
    grid-template-columns: 1fr 1fr;
  }

  .search-area select,
  .search-area input,
  .search-area button {
    height: 36px;
  }

  .search-area input,
  .search-area button {
    grid-column: auto;
  }
}
@media (max-width: 420px) {
  .search-area {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-area select {
    grid-column: auto;
  }

  .search-area input {
    grid-column: 1 / 2;
    min-width: 0;
  }

  .search-area button {
    grid-column: 2 / 3;
    width: auto;
    min-width: 112px;
    padding: 0 12px;
    white-space: nowrap;
  }
}

/* Theme toggle icon visibility */
#theme-toggle svg,
#theme-toggle svg path,
#theme-toggle svg circle {
  color: #d9ecff;
  fill: #d9ecff;
  stroke: #d9ecff;
}