/* ==========================================================================
   Header und Navigation: eine Quelle für Startseite (v3) und Unterseiten (v4).
   Diese Datei wird von beiden Templates zuletzt geladen und schlägt deshalb
   die Header-Blöcke in v3.css und v4.css. Vorbild Aon (07.09.2026):
   feste weiße Leiste, links drei große Punkte, rechts die kleinen Ziele.
   ========================================================================== */

.fc-header {
  --fc-nav-sans: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fc-nav-serif: "Teko", "Work Sans", system-ui, sans-serif;
  --fc-nav-mono: var(--fc-nav-sans);
  --fc-nav-max: 1440px;
  --fc-nav-gutter: clamp(20px, 2.6vw, 36px);
  --fc-nav-pad: clamp(10px, 1vw, 14px);
  --fc-nav-h: 76px;
  position: fixed;
  z-index: 100;
  /* 1px ueber den Viewport gezogen: Safari zeigt sonst bei manchen Scroll-Staenden
     eine weisse Haarlinie ueber der festen Leiste (Laurence, 11.09.2026). */
  top: -1px;
  padding-top: 1px;
  left: 0;
  width: 100%;
  border-bottom: 1px solid var(--fc-line, #e3e6e4);
  background: #ffffff;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transform: none;
  color: #191b19;
  font-family: var(--fc-nav-sans);
}
.fc-header__inner {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: calc(var(--fc-nav-max) + (var(--fc-nav-gutter) * 2));
  min-height: var(--fc-nav-h);
  margin-inline: auto;
  padding: 0 var(--fc-nav-gutter);
  gap: clamp(20px, 2.6vw, 40px);
}
.fc-header .fc-header__brand { display: flex; align-items: center; flex: none; justify-self: start; line-height: 0; }
.fc-header .fc-header__brand img { width: 124px; height: auto; }
.fc-header .fc-header__logo--white { display: none; }

/* --- Navigation ------------------------------------------------------- */
.fc-header .fc-nav { display: flex; align-items: stretch; flex: 1; min-width: 0; margin: 0; }
.fc-header .fc-nav__list { display: flex; align-items: stretch; gap: 0; }
.fc-header .fc-nav__list--primary { margin-right: auto; gap: 4px; }
.fc-header .fc-nav__list--secondary { gap: 2px; margin-left: clamp(14px, 1.8vw, 24px); padding-left: clamp(14px, 1.8vw, 24px); position: relative; align-items: center; }
.fc-header .fc-nav__list--secondary::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 20px;
  margin-top: -10px; background: var(--fc-line, #e3e6e4);
}
.fc-header .fc-nav__item { position: static; display: flex; }

.fc-header .fc-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--fc-nav-h);
  padding-inline: var(--fc-nav-pad);
  border-radius: 0;
  background: transparent;
  color: #191b19;
  font-size: 15px;
  font-weight: 500;
  transition: color 150ms ease;
}
.fc-header .fc-nav__link--sm { min-height: 40px; padding-inline: 10px; color: var(--fc-copy, #393d3f); font-size: 14px; font-weight: 400; }
.fc-header .fc-nav__link::after {
  content: "";
  position: absolute;
  left: var(--fc-nav-pad);
  right: var(--fc-nav-pad);
  bottom: calc(50% - 17px);
  height: 2px;
  background: var(--fc-green-600, #2a7955);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}
.fc-header .fc-nav__link--sm::after { left: 10px; right: 10px; bottom: calc(50% - 14px); height: 1px; }
.fc-header .fc-nav__link:is(:hover, :focus-visible),
.fc-header .fc-nav__item.is-open .fc-nav__toggle { color: var(--fc-green-800, #1a513f); }
.fc-header .fc-nav__link:is(:hover, :focus-visible)::after,
.fc-header .fc-nav__link[aria-current="page"]::after,
.fc-header .fc-nav__item.is-open .fc-nav__toggle::after { transform: scaleX(1); }
.fc-header .fc-nav__link:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
.fc-header .fc-nav__toggle svg { width: 12px; height: 12px; transition: transform 150ms ease; }
.fc-header .fc-nav__item.is-open .fc-nav__toggle svg { transform: rotate(180deg); }

/* --- Mega-Menü -------------------------------------------------------- */
.fc-header .fc-nav__menu--mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--fc-nav-h));
  overflow-y: auto;
  border-top: 1px solid var(--fc-line, #e3e6e4);
  border-bottom: 1px solid var(--fc-line, #e3e6e4);
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 24px 48px -28px rgba(25, 27, 25, 0.28);
  color: #191b19;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 150ms ease, transform 150ms ease;
}
.fc-header .fc-nav__item.is-open .fc-nav__menu--mega { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.fc-header .fc-nav__menu--mega > .fc-container {
  width: 100%;
  max-width: calc(var(--fc-nav-max) + (var(--fc-nav-gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--fc-nav-gutter);
}
.fc-header .fc-nav__mega {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 0 clamp(40px, 5vw, 80px);
  padding: 52px 0 44px;
  align-items: start;
}
.fc-header .fc-nav__lead { padding-right: clamp(24px, 3vw, 48px); border-right: 1px solid var(--fc-line, #e3e6e4); }
.fc-header .fc-nav__lead h2 {
  margin: 0;
  font-family: var(--fc-nav-serif);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #191b19;
}
.fc-header .fc-nav__lead p { margin: 14px 0 0; max-width: 30ch; color: var(--fc-copy, #393d3f); font-size: 15px; line-height: 1.55; }
.fc-header .fc-nav__lead-link { margin-top: 20px; }
.fc-header .fc-nav__lead-link a { color: #191b19; font-size: 14px; font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; transition: color 150ms ease, text-decoration-color 150ms ease; }
.fc-header .fc-nav__lead-link a:hover { color: var(--fc-green-800, #1a513f); text-decoration-color: currentColor; }

.fc-header .fc-nav__col { display: grid; grid-template-columns: 1fr; align-content: start; gap: 2px; }
.fc-header .fc-nav__col-title {
  display: block;
  padding: 0 0 14px;
  border: 0;
  color: var(--fc-green-600, #2a7955);
  font-family: var(--fc-nav-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.fc-header .fc-nav__col > a:not(.fc-nav__col-title) {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border: 0;
  border-radius: 8px;
}
.fc-header .fc-nav__col > a:not(.fc-nav__col-title):hover strong { color: var(--fc-green-800, #1a513f); }
.fc-header .fc-nav__col > a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.fc-header .fc-nav__menu--mega strong {
  color: #191b19;
  font-family: var(--fc-nav-serif);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  transition: color 150ms ease;
}
.fc-header .fc-nav__menu--mega small { max-width: 34em; color: var(--fc-copy, #393d3f); font-size: 13px; line-height: 1.5; }

/* Spalte mit Vorschaubildern (Aon-Muster, Screenshot 4) */
.fc-header .fc-nav__col--media > a:not(.fc-nav__col-title) { grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 18px; }
.fc-header .fc-nav__col--media img { width: 128px; height: 86px; object-fit: cover; border-radius: var(--fc-radius-media); }
.fc-header .fc-nav__col--media span { display: grid; gap: 4px; }


/* --- Aktionen --------------------------------------------------------- */
.fc-header__actions { display: flex; align-items: center; gap: 4px; flex: none; }
/* CTA identisch in beiden Systemen: v3 kennt kein .fc-button--green. */
.fc-header .fc-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--fc-green-800, #1a513f);
  border-radius: 999px;
  background: var(--fc-green-800, #1a513f);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.fc-header .fc-header__cta:hover,
.fc-header .fc-header__cta:focus-visible { background: var(--fc-green-950, #0b271e); border-color: var(--fc-green-950, #0b271e); transform: none; }
.fc-header .fc-header__burger span { background: #191b19; }

/* --- Mobile ----------------------------------------------------------- */
/* Eine Lesespalte, zwei native Untermenüs, dauerhaft sichtbare Hauptziele. */
.fc-mobile-nav { display: flex; flex-direction: column; position: fixed; z-index: 99; width: 100%; border: 0; border-top: 1px solid var(--fc-line); border-radius: 0; box-shadow: none; background: var(--fc-white); color: var(--fc-ink); overflow: hidden; overscroll-behavior: contain; }
.fc-mobile-nav[hidden] { display: none; }
.fc-mobile-nav__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.fc-mobile-nav__label { color: var(--fc-muted); font-family: var(--fc-font); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.fc-mobile-nav__group { border-bottom: 1px solid var(--fc-line); }
.fc-mobile-nav .fc-mobile-nav__row { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 0; border: 0; border-bottom: 1px solid var(--fc-line); border-radius: 0; color: var(--fc-ink); font-family: var(--fc-font-display); font-weight: 500; letter-spacing: 0; text-decoration: none; text-align: left; list-style: none; cursor: pointer; }
.fc-mobile-nav__group > .fc-mobile-nav__row { border-bottom: 0; }
.fc-mobile-nav__row::-webkit-details-marker { display: none; }
.fc-mobile-nav__row::marker { content: ""; }
.fc-mobile-nav__row i { position: relative; flex: none; }
.fc-mobile-nav__row i::before, .fc-mobile-nav__row i::after { content: ""; position: absolute; background: currentColor; }
.fc-mobile-nav__row i::after { transition: transform 180ms ease; }
.fc-mobile-nav__group[open] > summary i::after { transform: rotate(90deg); }
.fc-mobile-nav__group[open] > summary, .fc-mobile-nav__group.is-current > summary { color: var(--fc-green-800); }
.fc-mobile-nav .fc-mobile-nav__links a { justify-content: flex-start; margin: 0; border: 0; border-radius: 0; color: var(--fc-muted); font-family: var(--fc-font); font-weight: 400; text-decoration: none; }
.fc-mobile-nav a[aria-current="page"] { color: var(--fc-green-800); background: var(--fc-green-50); }
.fc-mobile-nav .fc-mobile-nav__help { display: flex; flex-wrap: wrap; justify-content: space-between; border: 0; border-radius: 0; color: var(--fc-ink); font-family: var(--fc-font); text-decoration: none; }
.fc-mobile-nav .fc-mobile-nav__help span { color: var(--fc-muted); font-family: var(--fc-font); text-align: left; }
.fc-mobile-nav__footer { flex: none; border-top: 1px solid var(--fc-line); background: var(--fc-white); }
.fc-mobile-nav a.fc-mobile-nav__cta { display: flex; justify-content: center; border: 1px solid var(--fc-green-800); border-radius: 999px; background: var(--fc-green-800); color: var(--fc-white); font-family: var(--fc-font-display); text-align: center; text-decoration: none; }
.fc-mobile-nav a.fc-mobile-nav__phone { justify-content: center; border: 0; border-radius: 0; color: var(--fc-muted); font-family: var(--fc-font); font-weight: 400; text-decoration: none; }
.fc-mobile-nav :is(a, summary):focus-visible { outline: 2px solid var(--fc-green-800); outline-offset: -2px; }
.fc-mobile-nav :is(.fc-mobile-nav__row, .fc-mobile-nav__links a):hover { background: var(--fc-green-50); color: var(--fc-green-800); }
.fc-mobile-nav a.fc-mobile-nav__cta:is(:hover, :focus-visible) { background: var(--fc-green-950); border-color: var(--fc-green-950); color: var(--fc-white); }
.fc-header .fc-header__burger { position: relative; }
.fc-header .fc-header__burger span { position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -4px); }
.fc-header .fc-header__burger span:last-child { transform: translate(-50%, 3px); }
.fc-header .fc-header__burger[aria-expanded="true"] span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.fc-header .fc-header__burger[aria-expanded="true"] span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
html[data-menu-open="1"] .fc-header .fc-header__cta { display: none; }
@media (prefers-reduced-motion: reduce) {
  .fc-mobile-nav__row i::after, .fc-header .fc-header__burger span { transition: none; }
}

@media (max-width: 991px) {
  .fc-header { --fc-nav-h: 64px; }
  .fc-header .fc-header__brand img { width: 112px; }
  .fc-header .fc-nav { display: none; }
  .fc-header .fc-header__actions { margin-left: auto; }
  .fc-header__inner { gap: 16px; }
  .fc-mobile-nav { inset: 64px 0 0; min-height: calc(100svh - 64px); }
}
@media (max-width: 479px) {
  .fc-header .fc-header__cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fc-header .fc-nav__link::after,
  .fc-header .fc-nav__menu--mega { transition: none; }
}

/* --- Test 08.09.2026 spaet: Header transparent ueber dunklen Sektionen ------------------
   js/header-theme.js setzt data-theme aus der Sektion unter der Leiste (data-nav="light|dark").
   Ueber einer dunklen Sektion: keine Flaeche, weisse Schrift, weisses Logo, weisser CTA.
   Sobald ein Menue offen ist, bleibt die Leiste weiss (Mega-Menue und Mobile-Nav sind weiss). */
.fc-header { transition: background-color 300ms ease, border-color 300ms ease, color 300ms ease; }
.fc-header[data-theme="dark"]:not(:has(.is-open)) {
  background: var(--fc-header-bg, rgba(25, 27, 25, .38)); /* Sektionsflaeche; ueber dem Hero-Foto Glas-Ton */
  border-color: rgba(255, 255, 255, .16);
  color: #ffffff;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.fc-header[data-theme="dark"]:not(:has(.is-open)) .fc-header__logo--color { display: none; }
.fc-header[data-theme="dark"]:not(:has(.is-open)) .fc-header__logo--white { display: block; }
.fc-header[data-theme="dark"]:not(:has(.is-open)) .fc-nav__link { color: rgba(255, 255, 255, .88); }
.fc-header[data-theme="dark"]:not(:has(.is-open)) .fc-nav__link:is(:hover, :focus-visible) { color: #ffffff; }
.fc-header[data-theme="dark"]:not(:has(.is-open)) .fc-nav__link:is(:hover, :focus-visible)::after,
.fc-header[data-theme="dark"]:not(:has(.is-open)) .fc-nav__link.is-current::after { background: #ffffff; }
.fc-header[data-theme="dark"]:not(:has(.is-open)) .fc-nav__list--secondary::before { background: rgba(255, 255, 255, .28); }
.fc-header[data-theme="dark"]:not(:has(.is-open)) .fc-header__cta { background: #ffffff; color: var(--fc-green-950, #0b271e); border-color: #ffffff; }
.fc-header[data-theme="dark"]:not(:has(.is-open)) .fc-header__cta:is(:hover, :focus-visible) { background: var(--fc-line); border-color: var(--fc-line); color: var(--fc-green-950, #0b271e); }
.fc-header[data-theme="dark"]:not(:has(.is-open)) .fc-header__burger span { background: #ffffff; }

/* Auch helle graue Sektionen fuehren ihre Flaeche in der Leiste fort. */
.fc-header[data-theme="light"]:not(:has(.is-open)) { background: var(--fc-header-bg, var(--fc-white)); }

/* Über Video-Sektionen (data-nav-bg) durchscheinend mit Weichzeichner, damit der Ton zum Bild darunter passt (26.10.2026). */
.fc-header[data-glass] { -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15); }
