/* ANOVA v4 — Header & Navigation, erzeugt mit design-v4/build_css.py.
   Wirkt seitenweit auf #header, sobald die Datei geladen wird. */

#header {
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --brand-blue: #2d88c2;
  --brand-blue-deep: #236089;
  --brand-blue-link: #1f6ea3;
  --brand-blue-on-ink: #5fa8d8;
  --brand-green: #65b32e;
  --brand-green-deep: #3a7220;
  --ink: #1b2a3d;
  --text: #26343c;
  --text-muted: #4a5b6a;
  --text-muted-alt: #51636d;
  --text-faint: #5f6e7c;
  --text-on-ink: #e8edf2;
  --text-on-ink-muted: #b9c6d4;
  --surface: #ffffff;
  --surface-panel: #f5f8fa;
  --surface-note: #f0f6fa;
  --surface-pale: #e9f2f8;
  --surface-hover: #edf5f8;
  --border: #e3e8ec;
  --border-jump: #e3ebf1;
  --border-table: #d9e2e7;
  --border-hover: #c9dcea;
  --border-header: #eef1f4;
  --table-accent: #155f7a;
  --table-accent-dark: #0d455b;
  --author-accent-dark: #3c6e93;
  --legacy-faq-open: #007bff;
  --legacy-faq-divider: #dfdbdb;
  --legacy-footer-bg: #f5f3f1;
  --ai-badge-bg: rgba(255,255,255,.8);
  --ai-badge-text: #1b2a3d;
  --ai-badge-edge: rgba(27,42,61,.14);
  --space-gutter: 15px;
  --space-section-top: 64px;
  --space-section-bottom: 40px;
  --space-hero-top: 72px;
  --space-hero-bottom: 60px;
  --space-layerhead-top: 44px;
  --space-layerhead-bottom: 40px;
  --space-head-gap: 26px;
  --space-card: 24px;
  --space-card-lg: 48px;
  --space-jump-gap: 18px;
  --space-cta-y: 32px;
  --space-cta-x: 36px;
  --space-note-y: 14px;
  --space-note-x: 18px;
  --space-btn-y: 12px;
  --space-btn-x: 28px;
  --space-hero-gap: 48px;
  --content-max: 1280px;
  --radius-card: 18px;
  --radius-author: 15px;
  --radius-note: 12px;
  --radius-table: 8px;
  --radius-jump: 6px;
  --radius-rule: 2px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(24,47,58,.04);
  --shadow-lift: 0 10px 28px rgba(27,42,61,.12);
  --shadow-btn-hover: 0 6px 18px rgba(45,136,193,.35);
  --shadow-float: 0 8px 30px rgba(24,47,58,.12);
}
#header { font-family: var(--font-sans); }
#header.fixed-top { border-bottom: 0; background-color: var(--surface); box-shadow: 0 2px 16px rgba(24,47,58,.07); }
#header.fixed-top::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--brand-blue), var(--brand-green)); }
#header .lighter-grey-bg { background-color: var(--surface); }
#header .row.prime-blue-bg { background-color: var(--surface); border-top: 1px solid var(--border-header); }
#header .phone-contact .contact-meta-menu a, #header .phone-contact .call-now-icon a { color: var(--text-muted-alt); font-weight: 400; text-decoration: none; transition: color 200ms ease-out; }
#header .phone-contact .contact-meta-menu a:hover, #header .phone-contact .call-now-icon a:hover { color: var(--brand-blue-link); }
#header .phone-contact .contact-meta-menu a svg { fill: var(--brand-blue); }
#header .phone-contact .call-now-icon a svg { color: var(--brand-blue); border-color: rgba(45,136,193,.45); }
/* One centre line for the logo row: logo, contact, phone, language flag and menu button share the row's vertical middle */
#header .lighter-grey-bg > .row { align-items: center; }
#header .phone-contact { margin-top: 0; top: auto; align-self: center; align-items: center; }
#header .phone-contact .contact-meta-menu, #header .phone-contact .call-now-icon, #header .phone-contact .lang-switch-bs { display: flex; align-items: center; }
#header .phone-contact .contact-meta-menu a, #header .phone-contact .call-now-icon a { align-items: center; padding-top: 0; padding-bottom: 0; line-height: 1.2; }
#header .phone-contact .lang-switch-bs > div, #header .phone-contact .lang-switch-bs .btn-group { display: flex; align-items: center; }
/* Sprachumschalter (19.11.2026, Lucas): Schaltfläche mit Rahmen im geöffneten Zustand, Dropdown als Karte */
html body #header .phone-contact .lang-switch-bs .btn { display: flex; align-items: center; gap: .35rem; padding: .5rem .6rem; line-height: 1; border: 1px solid transparent; border-radius: 6px; transition: border-color 160ms ease-out; }
html body #header .phone-contact .lang-switch-bs .btn:hover { border-color: var(--border); }
html body #header .phone-contact .lang-switch-bs .btn.show { border-color: rgba(11,11,11,.75); }
#header .phone-contact .lang-switch-bs img { display: block; margin: 0 !important; }
#header .navbar-dark .navbar-nav .nav-link {
  color: var(--text); font-size: .95em; font-weight: 500; text-transform: none; letter-spacing: 0; white-space: nowrap;
  padding: .9rem 12px;
  background-image: linear-gradient(90deg, var(--brand-blue), var(--brand-green)); background-size: 0% 2px;
  background-position: 50% calc(100% - 8px); background-repeat: no-repeat;
  transition: color 200ms ease-out, background-size 250ms ease-out;
}
#header .navbar-dark .navbar-nav .nav-link:hover, #header .navbar-dark .navbar-nav .nav-link:focus-visible,
#header .navbar-dark .navbar-nav .nav-link.show { color: var(--brand-blue-link); background-size: calc(100% - 24px) 2px; }
#header .navbar-nav .nav-item.active > .nav-link, #header .navbar-nav .nav-item.current > .nav-link { color: var(--brand-blue-link); background-size: calc(100% - 24px) 2px; }
#header .navbar-nav .dropdown-toggle::after { opacity: .45; transition: opacity 200ms ease-out; }
#header .navbar-nav .dropdown-toggle:hover::after { opacity: .9; }
#header a:focus-visible, #header button:focus-visible { outline: 2px solid var(--brand-blue-link); outline-offset: 2px; border-radius: 4px; box-shadow: none; }
#header .navbar-toggler-icon { filter: invert(1) grayscale(100%); opacity: .7; }
#header .navbar-nav .dropdown-menu { background-color: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-note); box-shadow: var(--shadow-lift); padding: .5rem; margin: 0; text-align: left; min-width: 14rem; }
#header .dropdown-menu .nav-item { margin: 0; background-color: transparent; }
#header .dropdown-menu .nav-item a { display: block; padding: .45rem .9rem; border-radius: var(--radius-table); color: var(--text); font-size: .95rem; font-weight: 400; letter-spacing: 0; text-transform: none; background-color: transparent; transition: background-color 160ms ease-out, color 160ms ease-out; }
#header .dropdown-menu .nav-item a:hover, #header .dropdown-menu .nav-item a:focus-visible { color: var(--brand-blue-link); background-color: var(--surface-note); }
#header .dropdown-menu .nav-item.current > a, #header .dropdown-menu .nav-item.active > a { color: var(--brand-blue-link); font-weight: 500; }
#header ul.dropdown-menu > li.nav-item > ul.dropdown-menu { background-color: var(--surface-panel); border: 0; border-radius: var(--radius-table); box-shadow: none; margin: .25rem 0 .25rem .5rem; padding: .25rem; min-width: 0; }
html body #header .lang-switch-bs ul.dropdown-menu { background-color: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lift); min-width: 0; padding: .55rem 1.15rem; margin-top: .5rem !important; text-align: center; }
html body #header .lang-switch-bs ul.dropdown-menu a { display: block; padding: .45rem .35rem; }
html body #header .lang-switch-bs img { width: 24px !important; max-width: none !important; height: 16px !important; }
@media (min-width: 1200px) {
  /* Dropdowns of the last two menu items open to the left so they stay inside the viewport */
  #header .navbar-nav > .nav-item:nth-last-child(-n+2) > .dropdown-menu { left: auto; right: 0; }
  #header .navbar-nav .dropdown-menu { max-width: calc(100vw - 32px); }
}
/* Below 1200px the menu button sits at the right of the logo row instead of in its own row.
   Row heights follow the template's logo sizes: 51px (<768), 74px (768-991), 97px (992-1199);
   the button is centred on half that height. */
@media (max-width: 1199px) {
  #header .header-inner { position: relative; }
  #header .lighter-grey-bg > .row { padding-right: 56px; }
  #header .row.prime-blue-bg { border-top: 0; }
  #header .row.prime-blue-bg .navbar { position: static; padding: 0; }
  #header .navbar-toggler { position: absolute; right: 8px; top: 25.5px; transform: translateY(-50%); margin: 0; padding: 6px 10px; }
  body main { margin-top: 54px; }
}
@media (min-width: 768px) and (max-width: 1199px) { #header .navbar-toggler { top: 37px; } body main { margin-top: 77px; } }
@media (min-width: 992px) and (max-width: 1199px) { #header .navbar-toggler { top: 48.5px; } body main { margin-top: 100px; } }
/* Ab 1200px: v4-Header (Logozeile + Menüzeile + 3px-Linie) ist 169px hoch, layout.css setzt main nur 155px tiefer -> Breadcrumb rutschte unter den Header (Seiten ohne Hero). 18.11.2026 */
@media (min-width: 1200px) { body main { margin-top: 169px; } }
@media (max-width: 1199px) {
  #header .navbar-collapse { background-color: var(--surface); }
}
/* Mobil-/Tablet-Menü (< 1200px) „klare Liste“, Entscheidung Lucas 18.11.2026 (ersetzt graue Untermenüs, zentrierte Punkte).
   Idee: eine linksbündige Achse (16px = Logokante), Hairlines zwischen Hauptpunkten,
   Chevron rechts, Untermenü weiß + eingerückt an einer 2px-Markenlinie. Desktop unberührt.
   „html body #header“: das Seiten-CSS (jchoptimize) steht am Ende von <body> und gewinnt sonst Gleichstände. */
@media (max-width: 1199px) {
  /* Ursache der zu kurzen Breite: die Menüzeile ist ebenfalls ein Kind von .lighter-grey-bg und erbt
     dadurch padding-right:56px (für den Burger gedacht) plus die -12px-Ränder der Bootstrap-.row. */
  html body #header .row.prime-blue-bg { margin-left: 0; margin-right: 0; padding-right: 0; }
  html body #header .row.prime-blue-bg > nav { width: 100%; padding: 0; }

  /* Panel: volle Breite, Trennlinie zur Logozeile, scrollt selbst, wenn es höher als der Bildschirm wird */
  html body #header .navbar-collapse { text-align: left; padding: 0 0 .5rem; border-top: 1px solid var(--border);
    max-height: calc(100vh - 54px); max-height: calc(100dvh - 54px); overflow-y: auto; overscroll-behavior: contain; }
  html body #header .navbar-nav { margin: 0 !important; width: 100%; align-items: stretch; }

  /* Hauptpunkte: linksbündig, 48px hoch, Hairline darunter */
  html body #header .navbar-nav > .nav-item { border-bottom: 1px solid var(--border-header); }
  html body #header .navbar-nav > .nav-item:last-child { border-bottom: 0; }
  html body #header .navbar-dark .navbar-nav .nav-link {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 48px; padding: 12px 16px; font-size: 1rem; line-height: 1.35;
    white-space: normal; overflow-wrap: anywhere; hyphens: auto; text-align: left; background-image: none; }

  /* Chevron statt Dreieck, in Textfarbe (gedämpft) – geöffnet blau und nach oben */
  html body #header .navbar-nav .dropdown-toggle::after {
    flex: none; width: 7px; height: 7px; margin: 0 4px 3px 0; border: solid currentColor;
    border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); opacity: .5; vertical-align: 0; }
  html body #header .navbar-nav .dropdown-toggle.show::after { transform: rotate(-135deg); margin-bottom: -3px; opacity: .9; }

  /* Untermenü: weiß, eingerückt, 2px-Markenlinie links, kein Kasten */
  html body #header .navbar-nav .dropdown-menu,
  html body #header ul.dropdown-menu > li.nav-item > ul.dropdown-menu {
    position: static; float: none; width: auto; min-width: 0; max-width: none; text-align: left;
    margin: 0 16px 12px; padding: 0; background: var(--surface) !important; border: 0; border-radius: 0; box-shadow: none;
    border-left: 2px solid var(--brand-blue); border-image: linear-gradient(180deg, var(--brand-blue), var(--brand-green)) 1; }
  html body #header .dropdown-menu .nav-item { margin: 0; }
  html body #header .dropdown-menu .nav-item > a,
  html body #header .navbar-dark .navbar-nav .dropdown-menu .nav-link {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 44px; padding: 10px 0 10px 16px; border-radius: 0; background: transparent;
    color: var(--text-muted); font-size: .95rem; font-weight: 400; line-height: 1.35; white-space: normal; }
  html body #header .dropdown-menu .nav-item > a:hover, html body #header .dropdown-menu .nav-item > a:focus-visible,
  html body #header .dropdown-menu .nav-item.current > a, html body #header .dropdown-menu .nav-item.active > a,
  html body #header .navbar-dark .navbar-nav .dropdown-menu .nav-link.show { color: var(--brand-blue-link); background: transparent; }
  html body #header .dropdown-menu .nav-item.current > a, html body #header .dropdown-menu .nav-item.active > a { font-weight: 500; }

  /* 3. Ebene (z. B. Career): weiter eingerückt, nur Hairline statt zweiter Markenlinie */
  html body #header ul.dropdown-menu > li.nav-item > ul.dropdown-menu { margin: 0 0 6px 16px; border-image: none; border-left: 1px solid var(--border-hover); }

  /* ausgeblendete Einträge bleiben unsichtbar */
  html body #header .navbar-nav a.hidden, html body #header .navbar-nav .wg-hidden { display: none !important; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  html body #header .navbar-collapse { max-height: calc(100vh - 77px); max-height: calc(100dvh - 77px); }
}
@media (min-width: 992px) and (max-width: 1199px) {
  html body #header .navbar-collapse { max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); }
}
