/* CSS für den Block Navbar mit seinen Elementen nach BEM */ .nav { display: flex; justify-content: space-between; align-items: center; background-color: #333d43; padding: 0 1rem; } .nav__left, .nav__right { display: flex; align-items: center; } .nav__logo img { height: 3rem; } .nav__center { display: flex; align-items: center; } .nav__item { position: relative; margin: 0 0.5rem; } .nav__dropdown-toggle { background: none; border: none; cursor: pointer; font-weight: 600; padding: 0.5rem 1rem; color: #fff; text-decoration: none; } .nav__dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #f9f9f9; min-width: 12rem; box-shadow: 0 2px 5px rgba(0,0,0,.15); padding: 0.5rem 0; } .nav__dropdown-menu a { padding: 0.5rem 1rem; /* Abstand um den Text */ color: #333; text-decoration: none; font-weight: 600; } .nav__link { display: inline-block; font-weight: 600; background: none; border: none; cursor: pointer; padding: 0.5rem 1rem; color: #fff; text-decoration: none; } .nav__button { display: inline-block; background: #fff; border: none; border-radius: 4px; padding: 0.5rem 1rem; cursor: pointer; color: #333; text-decoration: none; font-weight: 600; margin-left: 0.5rem; } .nav__search { display: flex; align-items: center; border-radius: 4px; /* Abgerundete Ecken */ background: #fff; margin: 0 0.5rem; } .nav__dropdown:hover .nav__dropdown-menu { display: block; } /* CSS von https://responsivenavigation.net/examples/simple-toggle/ */ .anchor-link, #mobile-nav { display: none; } /* Nicht im Desktop‑View */ @media (max-width: 48em) { /* ~768px */ /* Desktop‑Menü verstecken */ .nav__center { display: none; } /* Hamburger‑Button sichtbar */ #mobile-nav, .anchor-link { display: block; } /* Mobile‑Nav‑Liste (der “off‑canvas”‑Menu) sichtbar */ .nav__mobile-menu { display: block; position: absolute; top: 100%; left: 0; right: 0; background: #333d43; z-index: 999; /* über allem anderen */ max-height: 0; /* verstecken */ overflow: hidden; transition: max-height 0.3s ease-out; } .nav__mobile-menu.open { max-height: 100vh; /* 100% viewport‑height */ overflow-y: auto; /* Scrollen, falls zu viele Links */ } /* Mobile‑Links */ .nav__mobile-menu ul { list-style: none; margin: 0; padding: 0; } .nav__mobile-menu li { border-bottom: 1px solid #444; } .nav__mobile-menu a { display: block; color: #fff; padding: 1rem; text-decoration: none; } /* Die “Profil / Anmelden / Registrieren”‑Buttons in einer Zeile */ .nav__right { flex: 1; justify-content: flex-end; } .nav__left { flex: 1; } }