/* ===================================================================== *
 * Desktop main navigation + mega menu (Figma 1309:4106).
 * Rendered by oda_nav_render() from the live WP menu (Appearance → Menus).
 * Hidden ≤991px (the hamburger drawer takes over there).
 * ===================================================================== */

.oda-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}
.oda-nav__item {
  position: relative;
}
.oda-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20.25px;
  letter-spacing: -0.08px;
  color: #0f0f10;
  text-decoration: none;
  white-space: nowrap;
}
.oda-nav__link .oda-ic {
  color: currentColor;
  transition: transform 0.2s ease;
}
.oda-nav__item:hover > .oda-nav__link,
.oda-nav__link:focus-visible {
  color: #c00;
}
.oda-nav__item:hover > .oda-nav__link .oda-ic {
  transform: rotate(180deg);
}

/* ---- Flyout panels (mega + dropdown): hidden until hover / focus ---- */
.oda-mega,
.oda-drop {
  position: absolute;
  top: 100%;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
}
.oda-nav__item:hover .oda-mega,
.oda-nav__item:focus-within .oda-mega,
.oda-nav__item:hover .oda-drop,
.oda-nav__item:focus-within .oda-drop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---- Mega menu ---- */
.oda-mega {
  left: 0; /* horizontal offset set by JS (clamped to the viewport) */
  padding-top: 27px; /* transparent hover-bridge: item bottom → header bottom */
  transform: translateY(-6px);
}
.oda-nav__item:hover .oda-mega,
.oda-nav__item:focus-within .oda-mega {
  transform: translateY(0);
}
.oda-mega__inner {
  display: flex;
  align-items: stretch;
  width: min(861px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid #e6e4e0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 12px 32px 0 rgba(15, 15, 16, 0.08),
    0 4px 8px 0 rgba(15, 15, 16, 0.04);
}

/* Flat mega: single-level top items (Lernende / Ausbildungsbetriebe /
   Veranstaltungen) — same shell, one detail pane, no left rail. Width fits the
   two link columns (wide enough for the longest apprenticeship titles). */
.oda-mega--flat .oda-mega__inner {
  width: min(600px, calc(100vw - 32px));
}

/* Left rail */
.oda-mega__rail {
  flex: 0 0 288px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: #f4f4f3;
  border-right: 1px solid #e6e4e0;
}
.oda-mega__rail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 18.13px;
  letter-spacing: -0.145px;
  color: #0f0f10;
  text-align: left;
}
.oda-mega__rail-item .oda-ic {
  flex: none;
  color: #87878d;
}
.oda-mega__rail-item:hover,
.oda-mega__rail-item.is-active {
  background: #fff;
  color: #c00;
}
.oda-mega__rail-item:hover .oda-ic,
.oda-mega__rail-item.is-active .oda-ic {
  color: #c00;
}

/* Right panes */
.oda-mega__panes {
  flex: 1 1 0;
  min-width: 0;
}
.oda-mega__pane {
  display: none;
  padding: 24px 28px;
}
.oda-mega__pane.is-active {
  display: block;
}
.oda-mega__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 15px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e6e4e0;
}
.oda-mega__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 27px;
  letter-spacing: -0.27px;
  color: #0f0f10;
}
.oda-mega__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.08px;
  color: #c00;
  text-decoration: none;
  white-space: nowrap;
}
.oda-mega__more:hover {
  text-decoration: underline;
  text-underline-position: from-font;
}
.oda-mega__cols {
  display: flex;
  gap: 26px;
  align-items: flex-start;
}
.oda-mega__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.oda-mega__link,
.oda-mega__grouptitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: -0.08px;
  color: #0f0f10;
  text-decoration: none;
}
.oda-mega__link:hover,
.oda-mega__grouptitle:hover {
  color: #c00;
}
.oda-mega__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.oda-mega__sub {
  list-style: none;
  margin: 0;
  padding: 0 0 0 11px;
  border-left: 1px solid #e6e4e0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.oda-mega__subitem {
  display: block;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 16.25px;
  letter-spacing: -0.08px;
  color: #424248;
  text-decoration: none;
}
.oda-mega__subitem:hover {
  background: #f4f4f3;
  color: #c00;
}

/* ---- Simple dropdown (top items whose children have no children) ---- */
.oda-drop {
  left: 0;
  padding-top: 27px;
  transform: translateY(-6px);
}
.oda-nav__item:hover .oda-drop,
.oda-nav__item:focus-within .oda-drop {
  transform: translateY(0);
}
.oda-drop__list {
  min-width: 248px;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid #e6e4e0;
  border-radius: 10px;
  box-shadow:
    0 12px 32px 0 rgba(15, 15, 16, 0.08),
    0 4px 8px 0 rgba(15, 15, 16, 0.04);
}
.oda-drop__item {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.08px;
  color: #0f0f10;
  text-decoration: none;
  white-space: nowrap;
}
.oda-drop__item:hover {
  background: #f4f4f3;
  color: #c00;
}
