/*
 * Navigation CSS — header, mega-menu, dropdowns, mobile drawer.
 * German industrial: clean horizontal bar, no decorative backgrounds, precise transitions.
 */

/* ── Site header ────────────────────────────────────────────────────────────── */
.st-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--st-white);
  box-shadow: 0 1px 0 var(--st-gray-300);
}

/* ── Group strip ────────────────────────────────────────────────────────────── */
.st-group-strip {
  background: var(--st-blue-900);
  padding-block: 5px;
}
.st-group-strip .st-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--st-space-5);
}
.st-group-strip__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--st-blue-300);
  margin-right: auto;
}
.st-group-strip__nav { display: flex; gap: var(--st-space-4); }
.st-group-strip__link {
  display: flex;
  align-items: center;
  gap: var(--st-space-2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color var(--st-transition);
}
.st-group-strip__link:hover { color: var(--st-white); text-decoration: none; }
.st-group-strip__tag {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--st-blue-300);
  opacity: 0.8;
}

/* ── Main nav bar ───────────────────────────────────────────────────────────── */
.st-nav-bar {
  height: 64px;
  display: flex;
  align-items: center;
}
.st-nav-bar .st-container {
  display: flex;
  align-items: center;
  gap: var(--st-space-4);
  height: 100%;
}

/* ── Logo ───────────────────────────────────────────────────────────────────── */
.st-logo { display: flex; align-items: center; margin-right: auto; flex-shrink: 0; }
.st-logo img { height: 40px; width: auto; }

/* ── Primary nav ────────────────────────────────────────────────────────────── */
.st-primary-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 100%;
}

.st-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.st-nav-btn,
.st-nav-link {
  display: flex;
  align-items: center;
  gap: var(--st-space-1);
  padding: 0 var(--st-space-4);
  font-family: var(--st-font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--st-gray-800);
  background: none;
  border: none;
  text-decoration: none;
  height: 100%;
  white-space: nowrap;
  position: relative;
  cursor: pointer;
  transition: color var(--st-transition);
}
.st-nav-btn::after,
.st-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--st-space-4);
  right: var(--st-space-4);
  height: 3px;
  background: var(--st-blue-500);
  transform: scaleX(0);
  transition: transform var(--st-transition);
}
.st-nav-btn:hover::after,
.st-nav-link:hover::after,
.st-nav-btn[aria-expanded="true"]::after,
.st-nav-item.is-active .st-nav-btn::after,
.st-nav-link.current-menu-item::after {
  transform: scaleX(1);
}
.st-nav-btn:hover,
.st-nav-link:hover,
.st-nav-btn[aria-expanded="true"] {
  color: var(--st-blue-700);
  text-decoration: none;
}

.st-nav-btn__arrow {
  transition: transform var(--st-transition);
}
.st-nav-btn[aria-expanded="true"] .st-nav-btn__arrow {
  transform: rotate(180deg);
}

/* ── Simple dropdown ────────────────────────────────────────────────────────── */
.st-dropdown {
  position: absolute;
  top: calc(100% + 0px);
  left: 0;
  min-width: 240px;
  background: var(--st-white);
  border: 1px solid var(--st-gray-300);
  border-top: 3px solid var(--st-blue-500);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: var(--st-space-2) 0;
  z-index: 200;
  display: none;
}
.st-dropdown.is-open { display: block; }
.st-dropdown li { }
.st-dropdown a {
  display: block;
  padding: var(--st-space-3) var(--st-space-4);
  font-size: 0.9375rem;
  color: var(--st-gray-800);
  text-decoration: none;
  transition: background var(--st-transition), color var(--st-transition);
}
.st-dropdown a:hover {
  background: var(--st-blue-50);
  color: var(--st-blue-700);
  text-decoration: none;
}
.st-dropdown__all a {
  border-top: 1px solid var(--st-gray-300);
  margin-top: var(--st-space-1);
  font-weight: 600;
  color: var(--st-blue-700);
}
.st-dropdown__divider { border-top: 1px solid var(--st-gray-300); margin-top: var(--st-space-1); }

/* ── Mega-menu ──────────────────────────────────────────────────────────────── */
.st-mega-menu {
  position: absolute;
  top: 100%;
  left: -120px;
  width: 600px;
  background: var(--st-white);
  border: 1px solid var(--st-gray-300);
  border-top: 3px solid var(--st-blue-500);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  z-index: 200;
  display: none;
}
.st-mega-menu.is-open { display: block; }
.st-mega-menu__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.st-mega-menu__col {
  padding: var(--st-space-5);
  border-right: 1px solid var(--st-gray-300);
}
.st-mega-menu__col:last-child { border-right: 0; }
.st-mega-menu__heading {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--st-blue-700);
  margin-bottom: var(--st-space-1);
}
.st-mega-menu__desc {
  font-size: 0.8125rem;
  color: var(--st-gray-600);
  margin-bottom: var(--st-space-3);
}
.st-mega-menu__list { display: flex; flex-direction: column; }
.st-mega-menu__list a {
  display: block;
  padding: var(--st-space-2) var(--st-space-3);
  font-size: 0.9375rem;
  color: var(--st-gray-800);
  text-decoration: none;
  transition: background var(--st-transition), color var(--st-transition);
  margin-inline: calc(var(--st-space-3) * -1);
}
.st-mega-menu__list a:hover {
  background: var(--st-blue-50);
  color: var(--st-blue-700);
  text-decoration: none;
}
.st-mega-menu__all a {
  border-top: 1px solid var(--st-gray-300);
  margin-top: var(--st-space-2);
  padding-top: var(--st-space-3);
  font-weight: 600;
  color: var(--st-blue-700);
}

/* ── Nav CTA button ─────────────────────────────────────────────────────────── */
.st-nav-cta { margin-left: var(--st-space-3); flex-shrink: 0; }

/* ── Hamburger (mobile) ─────────────────────────────────────────────────────── */
.st-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: var(--st-space-2);
  background: none;
  border: 1px solid var(--st-gray-300);
  margin-left: auto;
}
.st-hamburger__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--st-gray-800);
  transition: transform var(--st-transition), opacity var(--st-transition);
}
.st-hamburger[aria-expanded="true"] .st-hamburger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.st-hamburger[aria-expanded="true"] .st-hamburger__bar:nth-child(2) { opacity: 0; }
.st-hamburger[aria-expanded="true"] .st-hamburger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer ──────────────────────────────────────────────────────────── */
.st-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 90vw;
  background: var(--st-white);
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.st-mobile-drawer.is-open { transform: translateX(0); }
.st-mobile-drawer__inner {
  display: flex;
  flex-direction: column;
  padding: var(--st-space-4);
  flex: 1;
}
.st-mobile-drawer__close {
  align-self: flex-end;
  background: none;
  border: 1px solid var(--st-gray-300);
  padding: var(--st-space-2);
  margin-bottom: var(--st-space-4);
}

.st-mobile-nav { flex: 1; }
.st-mobile-nav__item { border-bottom: 1px solid var(--st-gray-300); }
.st-mobile-nav__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--st-space-4) 0;
  font-family: var(--st-font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--st-gray-800);
  background: none;
  border: none;
  cursor: pointer;
}
.st-mobile-nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.st-mobile-nav__sub {
  display: none;
  padding-bottom: var(--st-space-3);
}
.st-mobile-nav__sub.is-open { display: block; }
.st-mobile-nav__sub a {
  display: block;
  padding: var(--st-space-2) var(--st-space-4);
  font-size: 0.9375rem;
  color: var(--st-gray-800);
  text-decoration: none;
}
.st-mobile-nav__sub a:hover { color: var(--st-blue-700); }
.st-mobile-nav__link {
  display: block;
  padding: var(--st-space-4) 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--st-gray-800);
  text-decoration: none;
  border-bottom: 1px solid var(--st-gray-300);
}
.st-mobile-drawer__contact {
  padding-top: var(--st-space-5);
  border-top: 2px solid var(--st-blue-500);
  margin-top: auto;
}

/* ── Mobile overlay ─────────────────────────────────────────────────────────── */
.st-mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(30,79,160,0.45);
  z-index: 1999;
}
.st-mobile-overlay.is-open { display: block; }

/* ── Funnel header ──────────────────────────────────────────────────────────── */
.st-site-header--funnel {
  background: var(--st-blue-900);
  height: 60px;
}
.st-funnel-header-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: var(--st-space-5);
}
.st-site-header--funnel .st-logo img { filter: brightness(0) invert(1); }
.st-funnel-header__group {
  font-size: 0.8125rem;
  color: var(--st-blue-300);
  margin-left: auto;
}

/* ── Responsive: hide desktop nav, show hamburger ──────────────────────────── */
@media (max-width: 1024px) {
  .st-primary-nav { display: none; }
  .st-nav-cta { display: none; }
  .st-hamburger { display: flex; }
  .st-group-strip__nav { display: none; }
}
