/* Custom Sticky Navigation - behält ursprüngliche Dimensionen */
#nav.nav-sticky {
  position: fixed;
  top: 0;
  z-index: 1020;
  /* transition entfernt - kein smooth Effekt mehr */
  /* width und left werden dynamisch per JavaScript gesetzt */
}

/* Custom Sticky Masthead */
.masthead.masthead-sticky {
  position: fixed;
  top: 0;
  z-index: 1030;
  /* width und left werden dynamisch per JavaScript gesetzt */
}

/* Mobile Menu Fix - Navigation als fixer Overlay */
@media (max-width: 767px) {
  .navbar-collapse.in {
    position: fixed;
    width: 100%;
  }
}

/* Fallback für Bootstrap Affix (falls noch verwendet) */
#nav.affix {
  position: fixed;
  top: 0;
  z-index: 1030;
}

.masthead.affix {
  position: fixed;
  top: 0;
  z-index: 1030;
}

/* Subnav klebt smooth unter der sticky navigation */
.content-navi-affix.affix {
  position: fixed;
  top: 50px; /* Höhe der Hauptnavigation */
  left: 0;
  right: 0;
  z-index: 1020;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .content-navi-affix.affix {
    top: 42px; /* Mobile Navigation Höhe */
  }
}

/* Mobile Menu Styles - Side Collapse */
@media screen and (max-width: 768px) {
  .navbar-toggle:not(.collapsed) {
    background-color: var(--fd-green-default) !important;
    color: #fff;
  }

  .masthead .navbar-toggle:not(.collapsed) .icon-bar {
    background-color: #fff;
  }

  .side-collapse-container {
    width: 100%;
    position: relative;
    left: 0;
    transition: left 0.2s;
  }

  #page-content.side-collapse-container.out,
  #top-wbs.side-collapse-container.out {
    left: 240px;
  }

  .side-collapse {
    top: -10px;
    bottom: 0;
    left: -1px;
    right: 0;
    width: 240px;
    position: fixed;
    overflow: hidden;
    transition: width 0.2s;
    z-index: 100;
  }

  .side-collapse.in {
    width: 0;
    transition: width 0.2s;
  }
}

/* Enhanced Mobile Menu - Full Width */
@media screen and (max-width: 768px) {
  #page-content.side-collapse-container.out,
  #top-wbs.side-collapse-container.out {
    left: 100vw;
  }

  .side-collapse {
    width: 101vw;
  }

  .side-collapse.in {
    width: 0;
    transition: width 0.4s;
  }
}
