/* =========================================================
   menufix.css
   Hotfix für Desktop-Menü (Bootstrap Navbar)

   Ziele:
   - Trenner "|" bleibt in einer Linie (kein Hochspringen)
   - Active-Indikator bleibt sauber UNTER dem aktiven Menüpunkt
     (Trigger: NUR über .active)
   - Im kritischen Desktop-Bereich (992–1399px) Menü leicht komprimieren

   Hinweis:
   - Greift NUR ab 992px (Desktop).
   - Unter 992px übernimmt das Burger-Menü (keine Änderungen hier).
   ========================================================= */


/* =========================================================
   1) DESKTOP (>= 992px)
   ========================================================= */
@media (min-width: 992px){

  /* Separator-Fix: Baseline stabilisieren */
  .navbar li:not(:first-child) > a{
    display: inline-flex;
    align-items: center;
  }

  .navbar li:not(:first-child) > a::before{
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
  }

  /* Active-Indikator: unter dem Link platzieren */
  .nav-item > a{
    position: relative;
  }

  /* NUR .active (verhindert Doppelindikator) */
  .nav-item > a.active::after{
    content: " ";
    position: absolute;
    display: block;
    width: 1.5rem;
    border-bottom: 5px solid transparent; /* Farbe kommt über Theme-Block */
    margin: 0 !important;                  /* build.css setzt teils margin !important */
    transform: none !important;            /* build.css setzt teils transform */
    pointer-events: none;

    left: 2rem;
    bottom: 3px;
  }
}


/* =========================================================
   2) DESKTOP (992px–1399px) – kritischer Bereich
   ========================================================= */
@media (min-width: 992px) and (max-width: 1399.98px){

  /* Kein Abschneiden/Overflow-Artefakte */
  .navbar,
  .navbar .navbar-nav{
    overflow-x: visible !important;
    max-width: 100%;
  }

  /* Eine Zeile bis Burger */
  .navbar .navbar-nav{
    flex-wrap: nowrap !important;
    white-space: nowrap;
  }

  /* Links kompakter */
  .navbar .navbar-nav .nav-link{
    font-size: 0.92rem;
    padding-left: 0.28rem;
    padding-right: 0.28rem;
  }

  /* Separator-Abstand kompakter */
  .navbar li:not(:first-child) > a::before{
    margin: 0 0.55rem 0 0.18rem !important;
  }

  /* Active-Indikator: vertikaler Abstand bleibt identisch */
  .nav-item > a.active::after{
    bottom: 3px !important;
  }

  /* Active-Indikator: horizontale Ausrichtung */
  .navbar li:first-child > a.active::after{
    left: calc(0.28rem - 6.5px) !important;
  }

  .navbar li:not(:first-child) > a.active::after{
    left: calc(0.28rem + 0.18rem + 0.55rem + 1.2ch - 8px) !important;
  }
}


/* =========================================================
   3) THEME COLORS (>= 992px)
   ========================================================= */
@media (min-width: 992px){

  /* BED + CTD */
  .bed-theme .nav-item > a.active::after,
  .ctd-theme .nav-item > a.active::after{
    border-bottom-color: #ffac27 !important;
  }

  /* SFB */
  .sfb-theme .nav-item > a.active::after{
    border-bottom-color: #b5e873 !important;
  }

  /* GBV */
  .gbv-theme .nav-item > a.active::after{
    border-bottom-color: #ff6c0e !important;
  }

  /* GRB */
  .grb-theme .nav-item > a.active::after{
    border-bottom-color: #adb7c0 !important;
  }
}