/* ==========================================================
   SHRINK-ON-SCROLL NAVIGATION - COMPLETE NEW VERSION
   ========================================================== */

/* ===========================
   BASE NAVBAR
   =========================== */
.navbar-custom {
  background-color: rgba(0,0,0,0.4) !important;
  padding: 0.75rem 1rem;       /* Konstantes Padding = kein Verschieben */
  text-transform: uppercase;

  transition:
    background-color .35s ease,
    box-shadow .35s ease,
    height .35s ease;
}

.navbar-custom.scrolled {
  background-color: #000 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}

/* ===========================
   BRAND (LOGO)
   =========================== */
.navbar-brand img {
  height: 48px;
  transition: height .35s ease;
}

.navbar-custom.scrolled .navbar-brand img {
  height: 36px;
}

/* ===========================
   NAVIGATION LINK STYLES
   =========================== */
.navbar-nav .nav-link {
  font-size: 1rem;
  padding: 0 1.25rem !important;

  transition:
    font-size .35s ease,
    padding .35s ease;
}

.navbar-custom.scrolled .navbar-nav .nav-link {
  font-size: 0.90rem;   /* Schrift wird kleiner */
}

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

  /* Desktop Menu horizontal */
  .navbar-nav.d-lg-flex {
    flex-direction: row !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
  }

  /* Mega Menu */
  .dropdown.position-static > .dropdown-menu.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 4px);
    width: 100%;
    margin: 0;
    border: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);

    transition: top .35s ease;
  }

  /* Fix für Shrink-Offset */
  .navbar-custom.scrolled
  .dropdown.position-static > .dropdown-menu.mega-menu {
    top: calc(100% - 2px);
  }

  .mega-menu .col-md-3 {
    margin-bottom: .75rem;
  }
}

/* ===========================
   MOBILE ONLY
   =========================== */
@media (max-width: 991.98px) {

  /* Mobile Navbar immer solide */
  .navbar-custom,
  .navbar-custom.scrolled {
    background-color: #000 !important;
    padding: 0.75rem 1rem !important;
    box-shadow: none !important;
  }

  /* Reset Logo */
  .navbar-brand img {
    height: 48px !important;
  }

  /* Mobile Collapse Menu */
  .navbar-collapse {
    position: fixed;
    top: var(--bs-navbar-height, 72px);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    overflow-y: auto;
    z-index: 1040;

    transform: translateY(-20px);
    opacity: 0;

    transition:
      transform .3s ease,
      opacity .3s ease;
  }

  .navbar-collapse.show {
    transform: translateY(0);
    opacity: 1;
  }

  /* Mobile Links */
  .mobile-menu-modern .nav-link {
    display: block;
    padding: 0.9rem 1rem;
    margin-bottom: .5rem;
    font-size: 1.05rem;
    color: #fff;
    border-radius: .5rem;
    background: transparent;

    transition: background-color .25s ease;
  }

  .mobile-menu-modern .nav-link:hover {
    background-color: rgba(255,255,255,.05);
  }

  /* Toggle (Parent Links in Mobile) */
  .btn-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    padding: .9rem 1rem;
    background: transparent;
    border: 0;
    color: #fff;

    transition: background-color .25s ease;
  }

  .btn-toggle:hover {
    background-color: rgba(255,255,255,.05);
  }

  .btn-toggle .chev {
    transition: transform .22s ease;
    font-size: 1.2rem;
    opacity: .9;
  }
/*
  .btn-toggle .chev.rotate {
    transform: rotate(45deg);
  }
*/
  /* Mobile Submenu */
  .mobile-submenu {
    padding: .5rem 0 .75rem 0;
  }

  .mobile-submenu .submenu-heading {
    padding: .45rem 1rem;
    font-weight: 700;
    color: #fff;
  }

  .mobile-submenu .dropdown-item {
    padding: .6rem 1rem;
    color: #e9ecef;

    transition: background-color .25s ease;
  }

  .mobile-submenu .dropdown-item:hover {
    background-color: rgba(255,255,255,.03);
    color: #fff;
  }
}
