/* German "Dienstleistungen" navigation (client DOCX 16 Oct 2026, chapters 2 and 8): topbar with claim,
   desktop mega-menu, mobile accordion. Loaded by partials/header.php on German pages only.
   Colours come from farben.css; the mega-menu columns carry their own data-bereich. */

/* ------------------------------------------------------------------ topbar (claim) */
:root { --finaro-topbar-h: 34px; }
/* the header is fixed (style.css: body padding-top 80px); the topbar adds its own height */
html body { padding-top: calc(80px + var(--finaro-topbar-h)) !important; }
/* same 80px header box as before, plus the topbar (the inner row keeps its own height, as before) */
.nav-header.has-topbar { height: calc(80px + var(--finaro-topbar-h)) !important; transition: transform .5s ease-in-out, opacity .5s ease-in-out, height .3s ease !important; }
.nav-header.has-topbar.is-scrolled { height: 80px !important; }
.finaro-topbar {
  background: var(--finaro-hell);
  color: var(--finaro-dunkel);
  height: var(--finaro-topbar-h);
  overflow: hidden;
  transition: height .3s ease;
}
.finaro-topbar__text {
  margin: 0;
  font-size: 14px;
  line-height: var(--finaro-topbar-h);
  color: var(--finaro-dunkel);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.finaro-topbar__claim { font-weight: 600; color: var(--finaro-dunkel); }
.nav-header.is-scrolled .finaro-topbar { height: 0; }
@media (max-width: 767px) {
  .finaro-topbar__more { display: none; }
  .finaro-topbar__text { text-align: center; }
}

/* ------------------------------------------------------------------ Zielgruppe switch (menu + /dienstleistungen) */
.finaro-zg-switch { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.finaro-zg-switch__btn {
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid #D6D6D6;
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--finaro-dunkel);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.finaro-zg-switch__btn:hover { border-color: var(--finaro-dunkel); }
.finaro-zg-switch__btn[aria-pressed="true"] { background: var(--finaro-dunkel); border-color: var(--finaro-dunkel); color: #FFFFFF; }
.finaro-zg-switch__btn:focus-visible { outline: 2px solid var(--finaro-dunkel); outline-offset: 2px; }

/* only the chosen target group is visible inside a scope */
[data-zg="privat"] [data-for="unternehmen"],
[data-zg="unternehmen"] [data-for="privat"] { display: none !important; }

/* ------------------------------------------------------------------ desktop mega-menu */
.nav-header .sticky-wrapper > .container { position: relative; }
.main-menu > ul > li.mm-item { position: static; }
.mm-panel {
  position: absolute;
  top: 100%;
  left: 12px;
  right: 12px;
  z-index: 60;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
  text-align: left;
}
/* invisible bridge between the menu item and the panel, so the pointer can travel without closing it */
.mm-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -28px; height: 28px; }
.mm-item.is-open > .mm-panel { visibility: visible; opacity: 1; transform: none; }
@media (hover: hover) {
  .mm-item:not(.is-closed):hover > .mm-panel { visibility: visible; opacity: 1; transform: none; }
}
.mm-inner {
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid #E3E3E3;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
}
.mm-top { padding: 14px 24px; border-bottom: 1px solid #E3E3E3; }
.mm-body { display: grid; gap: 8px 28px; padding: 20px 24px 24px; }
.mm-body--2 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(220px, .9fr); }
.mm-body--4 { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(200px, .9fr); }
.mm-col { border-top: 3px solid var(--bereich); padding-top: 14px; }
.main-menu .mm-panel ul { margin: 0; padding: 0; }
.main-menu .mm-panel ul li { display: block; margin: 0 !important; position: static; }
.mm-list--split { columns: 2; column-gap: 24px; }
.mm-list li { break-inside: avoid; }
.main-menu .mm-panel .mm-col__title {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--bereich-dunkel);
}
.main-menu .mm-panel a.mm-col__title:hover { text-decoration: underline; color: var(--bereich-dunkel); }
.main-menu .mm-panel .mm-link {
  display: block;
  margin: 0 -10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.35;
  color: #1A1A1A;
}
.main-menu .mm-panel a.mm-link:hover,
.main-menu .mm-panel a.mm-link:focus-visible { background: var(--bereich-hell); color: var(--bereich-dunkel); }
.main-menu .mm-panel .is-planned { color: #6B6B6B; cursor: default; }
.main-menu .mm-panel a.active { border-bottom: 0 !important; color: var(--bereich-dunkel) !important; font-weight: 600; }
.main-menu .mm-panel a:focus-visible { outline: 2px solid var(--bereich-dunkel); outline-offset: 1px; }

/* seasonal highlight / contact */
.mm-feature {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 10px;
  border-left: 3px solid var(--bereich);
  background: var(--finaro-hell);
  color: var(--finaro-dunkel);
}
.mm-feature__eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--finaro-dunkel); }
.mm-feature__title { font-size: 16px; line-height: 1.35; color: #1A1A1A; }
.mm-feature__text { font-size: 14px; line-height: 1.5; color: var(--finaro-dunkel); }
.main-menu .mm-panel .mm-feature__link,
.main-menu .mm-panel .mm-feature__phone {
  display: inline-block;
  padding: 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--bereich-dunkel);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* claim row: logo grey, white text only as large bold text (DOCX chapter 8) */
.mm-claim {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 24px;
  border-radius: 0 0 13px 13px;
  background: var(--finaro);
  color: var(--finaro-on);
}
.mm-claim__text { font-size: 19.2px; font-weight: 700; line-height: 1.3; }
.main-menu .mm-panel .mm-claim__link { display: inline-block; font-size: 19.2px; font-weight: 700; line-height: 1.3; color: var(--finaro-on); }
.main-menu .mm-panel .mm-claim__link:hover { color: var(--finaro-on); text-decoration: underline; }
.main-menu .mm-panel .mm-claim__link:focus-visible { outline-color: var(--finaro-on); }
@media (max-width: 1199px) {
  .mm-body--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(200px, .8fr); }
  .mm-list--split { columns: 1; }
}

/* ------------------------------------------------------------------ mobile accordion */
.mobile-menu ul li.mm-m__switch { padding: 12px 0 12px 20px; }
.mm-m-switch .finaro-zg-switch__btn { padding: 8px 14px; font-size: 14px; }
.mobile-menu .mm-m__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  border-left: 3px solid var(--bereich);
  padding-left: 10px;
  background: transparent;
  color: var(--bereich-dunkel);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.mobile-menu .mm-m__head::after {
  content: "\f107";
  font-family: var(--icon-font);
  font-weight: 700;
  color: var(--title-color);
  transition: transform .2s ease;
}
.mobile-menu .mm-m__head[aria-expanded="true"]::after { transform: rotate(180deg); }
.mobile-menu .mm-m__head:focus-visible { outline: 2px solid var(--bereich-dunkel); outline-offset: 2px; }
.mobile-menu ul li .mm-m__link,
.mobile-menu ul li .mm-m__all { display: block; min-height: 44px; padding: 11px 0; font-size: 15px; line-height: 1.45; }
.mobile-menu ul li .mm-m__link.is-planned { color: #6B6B6B; }
.mobile-menu ul li a.mm-m__all { font-weight: 600; color: var(--bereich-dunkel); }
.mobile-menu ul li.mm-m__overview > a { font-weight: 600; }
/* client wording as written (the theme capitalises every mobile-menu link) */
.mobile-menu .mm-m a, .mobile-menu .mm-m span, .mobile-menu .mm-m button { text-transform: none; }
/* long German compounds (e.g. "Unternehmensfinanzierung") wrap inside narrow columns */
.mm-panel .mm-link, .mm-panel .mm-col__title, .mm-feature__title, .mm-feature__text { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 1199px) {
  .mm-body--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mm-body--4 .mm-feature { grid-column: 1 / -1; }
}
