/* Navigation overrides for st-martin. Loaded after common.css. */
#oben:where(.kjf-site-martin).kjf-site-martin .cn-nav-subtoggle {
  color: var(--akzent1, #01437d);
}

/* Keep 24px controls within the original desktop header. */
#oben:where(.kjf-site-martin).kjf-site-martin:not(.cn-nav-mobile-mode) .cn-nav-subtoggle {
  min-width: 24px;
  min-height: 24px;
}

#oben:where(.kjf-site-martin).kjf-site-martin:not(.cn-nav-mobile-mode) .cn-nav-item.ifsub > :where(.cn-nav-item-head) > a {
  padding-right: 24px;
}

#oben:where(.kjf-site-martin).cn-nav-mobile-mode.kjf-site-martin .cn-nav-list > li {
  box-sizing: border-box !important;
  width: calc(100% - 40px) !important;
  margin: 0px 20px !important;
  padding-left: 0px !important;
  padding-right: 0px !important;
}

#oben:where(.kjf-site-martin).cn-nav-mobile-mode.kjf-site-martin .cn-nav-list > li > :where(.cn-nav-item-head) > a {
  box-sizing: border-box !important;
  max-width: calc(100% - 44px) !important;
  width: calc(100% - 44px) !important;
  padding-right: 0px !important;
}

/* Keep each button beside its own link, including nested subject groups. */
#oben:where(.kjf-site-martin).cn-nav-mobile-mode.kjf-site-martin .cn-nav-list .cn-nav-item {
  box-sizing: border-box;
}

#oben:where(.kjf-site-martin).cn-nav-mobile-mode.kjf-site-martin .cn-nav-list .cn-nav-item.ifsub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
}

#oben:where(.kjf-site-martin).cn-nav-mobile-mode.kjf-site-martin .cn-nav-list .cn-nav-item.ifsub > :where(.cn-nav-item-head) > a {
  grid-column: 1;
  grid-row: 1;
  max-width: 100% !important;
  width: 100% !important;
  padding-right: 0px !important;
}

#oben:where(.kjf-site-martin).cn-nav-mobile-mode.kjf-site-martin .cn-nav-list .cn-nav-item.ifsub > :where(.cn-nav-item-head) > .cn-nav-subtoggle {
  position: static;
  transform: none;
  grid-column: 2;
  grid-row: 1;
}

#oben:where(.kjf-site-martin).cn-nav-mobile-mode.kjf-site-martin .cn-nav-list .cn-nav-item.ifsub > .cn-nav-panel {
  grid-column: 1 / -1;
  grid-row: 2;
}

#oben:where(.kjf-site-martin).cn-nav-mobile-mode.kjf-site-martin .cn-nav-panel .cn-nav-subtoggle {
  color: var(--weiss, #fff);
}

#oben:where(.kjf-site-martin).cn-nav-mobile-mode.kjf-site-martin .cn-nav-subtoggle .cn-nav-arrow {
  background: transparent;
}

#oben:where(.kjf-site-martin).kjf-site-martin .cn-nav-panel {
  position: absolute;
  top: 100%;
  left: 0px;
  z-index: 10;
}

#oben:where(.kjf-site-martin).kjf-site-martin .cn-nav-panel > ul {
  position: static !important;
}

/* Restore the original full-width, four-column desktop menus. */
#oben:where(.kjf-site-martin).kjf-site-martin:not(.cn-nav-mobile-mode) .cn-nav-list > li.hor {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
}

#oben:where(.kjf-site-martin).kjf-site-martin:not(.cn-nav-mobile-mode) .cn-nav-list > li.hor > :where(.cn-nav-item-head) > a {
  padding-right: 0px;
}

#oben:where(.kjf-site-martin).kjf-site-martin:not(.cn-nav-mobile-mode) .cn-nav-list > li.hor > :where(.cn-nav-item-head) > .cn-nav-subtoggle {
  position: static;
  transform: none;
}

#oben:where(.kjf-site-martin).kjf-site-martin:not(.cn-nav-mobile-mode) .cn-nav-list > li.hor > .cn-nav-panel {
  right: 0px;
}

#oben:where(.kjf-site-martin).kjf-site-martin:not(.cn-nav-mobile-mode) .hor .cn-nav-sublist > li {
  float: none;
  break-inside: avoid;
}

/* Desktop groups show their child links together; mobile keeps disclosure controls. */
#oben:where(.kjf-site-martin).kjf-site-martin:not(.cn-nav-mobile-mode) .hor .cn-nav-sublist .cn-nav-panel {
  position: static;
}

#oben:where(.kjf-site-martin).kjf-site-martin:not(.cn-nav-mobile-mode) .hor .cn-nav-sublist .cn-nav-subtoggle {
  display: none;
}

@media (max-width: 1400px) {
  #oben:where(.kjf-site-martin).kjf-site-martin .cn-nav-mobile {
    display: inline-flex !important;
  }

  #oben:where(.kjf-site-martin).kjf-site-martin .cn-nav-list:not([hidden]) {
    display: block !important;
  }
}

/* The header keeps its original flat desktop layout. */
#oben.kjf-site-martin > .cn-nav {
  display: contents;
}
