/* ============================================
   NAVIGATION
   ============================================ */

/* Sticky auf dem Wrapper, weil site-header sonst nur 72px Elternhöhe hat */
.nav-root {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header {
  position: relative;
  background: var(--white);
  border-bottom: 1px solid var(--gray-nav-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  height: var(--nav-height);
  min-height: var(--nav-height);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Item 3: Nav-Shadow beim Scrollen */
.site-header--scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.13);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  height: 100%;
  padding: 0 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--black);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-item.active .nav-link {
  background: var(--brand-gradient);
  color: var(--white);
}

.dropdown-arrow {
  font-size: 11px;
  opacity: 0.7;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  min-width: 180px;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding-top: 4px;
}

.nav-item:hover .nav-dropdown {
  display: block;
}

.nav-dropdown-link {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--black);
}

.nav-dropdown-link:hover {
  background: var(--gray-nav-border);
}

.nav-cta-btn {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  font-size: 13px;
  font-weight: 400;
  padding: 10px 18px;
  white-space: nowrap;
  transition: color 0.15s;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-cta-btn:hover {
  background: var(--brand-gradient);
  color: var(--black);
}

/* ============================================
   BURGER BUTTON
   ============================================ */

.burger-btn {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1200;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  cursor: pointer;
  padding: 8px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.burger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   MOBILE DRAWER
   ============================================ */

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--white);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.mobile-drawer.is-open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 20px 24px;
  border-bottom: 1px solid var(--gray-divider);
  flex-shrink: 0;
}

.drawer-brand {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 15px;
  color: var(--black);
}

.drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.drawer-close:hover { opacity: 1; }

.drawer-nav {
  flex: 1;
  padding: 8px 0;
}

.drawer-links {
  display: flex;
  flex-direction: column;
}

.drawer-link {
  display: block;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 400;
  color: var(--black);
  transition: color 0.15s;
}

.drawer-link:hover { color: var(--navy); }

.drawer-item--sub .drawer-link--sub {
  padding-left: 36px;
  font-size: 14px;
  color: var(--gray-text);
  opacity: 0.8;
}

.drawer-item.active .drawer-link {
  font-weight: 700;
  color: var(--navy);
}

.drawer-footer {
  padding: 20px 24px 32px;
  flex-shrink: 0;
  border-top: 1px solid var(--gray-divider);
}

.drawer-cta {
  display: block;
  text-align: center;
  padding: 14px 20px;
  font-size: 14px;
}

/* Overlay backdrop */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1050;
}

.mobile-drawer-overlay.is-visible {
  display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .site-header        { display: none; }
  .burger-btn         { display: flex; }
  .burger-btn.is-open { display: none; }
}

/* ============================================
   VIDEO HERO — transparente Nav
   Klasse .has-video-hero wird per JS gesetzt,
   nur wenn das Video tatsächlich abspielt.
   ============================================ */

.site-header {
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.4s ease;
}

body.has-video-hero .nav-root {
  position: fixed;
  width: 100%;
}

body.has-video-hero .site-header:not(.site-header--scrolled) {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

body.has-video-hero .site-header:not(.site-header--scrolled) .nav-link,
body.has-video-hero .site-header:not(.site-header--scrolled) .nav-cta-btn {
  color: var(--white);
}

/* Hover: Nav einblenden */
body.has-video-hero .nav-root:hover .site-header:not(.site-header--scrolled) {
  background: var(--white);
  border-bottom-color: var(--gray-nav-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.has-video-hero .nav-root:hover .site-header:not(.site-header--scrolled) .nav-link,
body.has-video-hero .nav-root:hover .site-header:not(.site-header--scrolled) .nav-cta-btn {
  color: var(--black);
}
