/* header.css */

/* -------------------------------------
   Navbar-Grundlayout (weiß & kompakt)
   ------------------------------------- */
.navbar {
  position: relative;
  height: 80px;
  padding: 0;
  overflow: visible; /* erlaubt Logo-Overflow */
  z-index: 999;
  background-color: #ffffff;
}

/* -------------------------------------
   Logo absolut zentriert & ins Hero hineinragen
   ------------------------------------- */
.navbar-brand.mx-auto {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) translateY(40px) !important;
  z-index: 1000;
}
.navbar-brand.mx-auto img {
  max-height: 160px;
  width: auto;
  display: block;
}

/* -------------------------------------
   Desktop-Nav-Links (sichtbar ab lg)
   ------------------------------------- */
.d-xl-flex .navbar-nav {
  display: flex;
  align-items: center;
}
.d-xl-flex .navbar-nav .nav-item + .nav-item {
  margin-left: 1rem;
}

/* -------------------------------------
   Gemeinsame Link-Basis-Styling
   ------------------------------------- */
.navbar-light .nav-link {
  color: var(--text-color);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
  position: relative;
  transition: color 0.2s;
}
.navbar-light .nav-link:hover {
  color: var(--text-color);
}
.navbar-light .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--main-brand-color);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s;
}
.navbar-light .nav-link:hover::after {
  transform: scaleX(1);
}

/* -------------------------------------
   Mobile-Menü Styling (#mobileNav)
   ------------------------------------- */
#mobileNav {
  background: none;
}
#mobileNav.show {
  position: absolute;
  top: 60px; /* direkt unter der Navbar */
  left: 0;
  right: 0;
  background-color: #ffffff;
  padding: 5rem 0 1rem; /* oben extra Abstand, damit erste Links nicht vom Logo verdeckt werden */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 998;
}
#mobileNav .nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
}

/* -------------------------------------
   Collapse-Container: Bootstrap darf steuern
   ------------------------------------- */
#mobileNav {
  display: none; /* KEIN !important */
}
#mobileNav.show {
  display: block; /* KEIN !important */
}

/* -------------------------------------
   Instagram-Icon im Burger-Menü
   ------------------------------------- */
.mobile-instagram {
  display: none;
}
.mobile-instagram a {
  text-decoration: none;
}
.mobile-instagram .mobile-nav-icon {
  font-size: 1.75rem;
  color: var(--text-color);
  transition: color 0.2s;
}
.mobile-instagram a:hover .mobile-nav-icon {
  color: var(--main-brand-color);
}

/* -------------------------------------
   Mobile-/Tablet-Menü auf Full Width
   ------------------------------------- */
@media (max-width: 1199.98px) {
  #mobileNav.show .mobile-instagram {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
  }
  #mobileNav.show {
    position: fixed; /* bleibt beim Scrollen oben kleben */
    top: 80px; /* direkt unter deiner 80px-hohen Navbar */
    left: 0;
    width: 100%;
    background-color: #ffffff;
    padding: 5rem 0 1rem; /* Abstand für das Logo-Overflow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 998;
  }

  /* Anker im Mobile-Menü inline machen */
  #mobileNav.show .nav-link {
    display: inline-block; /* nur so breit wie der Text */
    width: auto; /* KEIN !important */
  }

  /* Stelle sicher, dass das Pseudo-Element für alle Links vorhanden ist */
  #mobileNav.show .nav-link {
    position: relative; /* für das ::after */
  }
  #mobileNav.show .nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: var(--main-brand-color); /* rote Farbe */
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.1s;
  }

  /* Rote Unterstreichung bei Hover, Focus und Active (Mobile & Desktop) */
  .navbar-light .nav-link:hover::after,
  .navbar-light .nav-link:focus::after,
  .navbar-light .nav-link:active::after {
    transform: scaleX(1) !important;
  }
}
