/* =========================
   Navbar Allgemein
   ========================= */

/*
.mega-menu h6::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background-color: #007bff;
  margin-top: 5px;
}
*/

/* Grundzustand: kein sichtbarer Strich */
.mega-menu .dropdown-item {
  position: relative;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Die unsichtbare Linie vorbereiten */
.mega-menu .dropdown-item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #007bff;
  transition: width 0.3s ease;
}

/* Hover-Zustand */
.mega-menu .dropdown-item:hover::after {
  width: 100%;
}

.mega-menu .dropdown-item:hover {
  color: #007bff;
}

.navbar-custom {
  transition: 
      background-color 0.35s ease,
      box-shadow 0.35s ease,
      padding 0.35s ease,
      transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  background-color: transparent !important;
  padding: 0.75rem 1rem;
  text-transform: uppercase;
  font-family: "Sofia Sans Condensed", sans-serif;
}

.dropdown-menu a,
.dropdown-item {
  text-transform: none !important;
  font-size: 1.2rem;
}

.navbar-custom.scrolled {
  background-color: rgba(0,0,0,0.75) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  box-shadow: 0 6px 22px rgba(0,0,0,0.25);
  padding: 0.35rem 1rem;

  /* Kernbeauty: super smooth Shrink */
  transform: scaleY(0.90) translateY(-6px);
}

/* Logo Größen */
.navbar-brand img {
  height: 48px;
  transition: 
      height 0.35s ease,
      transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.navbar-custom.scrolled .navbar-brand img {
  height: 36px;
  transform: scale(0.85);
}

/* =========================
   Mobile Styles (NICHT VERÄNDERT!)
   ========================= */
@media (max-width: 991.98px) {

  .nav-item .btn-toggle span {
    font-size: 1.3rem;
  }

  .navbar-nav .nav-item a {
    font-size:1.3rem;
  }

  .navbar-custom {
    background-color: #000 !important;
    padding: 0.75rem 1rem !important;
    transform: none !important;
  }

  .navbar-custom.scrolled {
    background-color: #000 !important;
    box-shadow: none !important;
  }

  .navbar-custom .navbar-brand img {
    height: 48px !important;
    transform: none !important;
  }

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

    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

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

  .mobile-menu-modern .nav-link {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    border-radius: 0.5rem;
    text-align: left;
    color: #fff;
    background: transparent;
  }

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

  .btn-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.9rem 1rem;
    background: transparent;
    border: 0;
    color: #fff;
    text-align: left;
  }

  .btn-toggle .chev {
    transition: transform .22s ease;
    font-size: 1.05rem;
    line-height: 1;
    opacity: .95;
  }

  .btn-toggle .chev.rotate { transform: rotate(45deg); }

  .mobile-submenu {
    padding: .5rem 0 0.75rem 0;
  }

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

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

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

/* =========================
   Desktop Navbar Optimiert
   ========================= */
@media (min-width: 992px) {

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

  .navbar-nav .nav-link {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    font-size: 1.3rem;
    line-height: 1.4;
    transition: font-size 0.35s ease;
  }

  .navbar-custom.scrolled .nav-link {
    font-size: 1.12rem !important;
  }

  .dropdown.position-static > .dropdown-menu.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 4px);
    width: 100%;
    border: 0;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 0;
    transition: top 0.3s ease;
  }

  .navbar-custom.scrolled
  .dropdown.position-static > .dropdown-menu.mega-menu {
    top: calc(100% - 2px);
  }

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

/* =========================
   Mega-Menu Layout
   ========================= */

.square-bullet {
  display: inline-block;
  width: 5px;
  height: 5px;
  background-color: #007bff;
  border-radius: 1px;
  flex-shrink: 0;
}

@media (min-width: 992px) {

  .mega-menu .row {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
  }

  .mega-menu .row > div {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  .mega-menu .row > div h6 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }

  .mega-menu .row > div a {
    display: block;
    text-decoration: none;
    padding: 0.25rem 0;
  }
}
