/* ---------- Gemeinsame Kopfzeile (alle Seiten) ----------
   Eigenständig, damit sie auf Seiten mit style.css und mit home.css gleich aussieht.
   Wird als letztes Stylesheet geladen. Verhalten: account-menu.js (Menü, aktive Seite),
   site-search.js (Suche), i18n.js (DE/EN), account-menu.js (Konto). */
.nav {
  --nh-bg: 31, 31, 33; --nh-1: #ECEAE4; --nh-2: #B9B7B0; --nh-3: #918F89;
  --nh-line: rgba(236, 234, 228, .10); --nh-line-2: rgba(236, 234, 228, .22);
  --nh-pad: clamp(20px, 4.2vw, 76px); --nh-h: 76px;
  --nh-grad: linear-gradient(90deg, #B36BFF, #4C8DFF 50%, #4C8DFF);
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: transparent !important; border-bottom: 0 !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* Fläche als eigene Ebene: oben durchsichtig wie auf der Startseite, beim Scrollen mattes Glas.
   (Der Weichzeichner liegt nicht auf .nav selbst, damit fixierte Menüs darin richtig sitzen.) */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(var(--nh-bg), .86); box-shadow: 0 1px 0 var(--nh-line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: opacity .3s;
}
.nav.is-top::before { opacity: 0; }
.nav .wrap {
  display: flex; align-items: center; justify-content: flex-start; gap: 0; height: var(--nh-h); position: relative;
  width: 100%; max-width: none; margin: 0; padding: 0 var(--nh-pad); box-sizing: border-box;
}
.nav .logo {
  display: inline-flex; align-items: center; gap: 9px; flex: none; margin: 0;
  font-family: "Archivo", "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif !important;
  font-weight: 600 !important; font-size: 18.4px; line-height: 1; font-stretch: 110%; letter-spacing: -0.01em !important;
  color: var(--nh-1); text-decoration: none;
}
.nav .logo-mark { width: 22px; height: 22px; fill: none; stroke-width: 2.6; stroke-linecap: round; }

/* Links: die Hauptpunkte stehen mittig zwischen Logo und rechter Gruppe */
.nav .nav-links { display: flex; gap: clamp(18px, 2.4vw, 40px); align-items: center; flex: 1 1 auto; min-width: 0; }
.nav .nav-links a {
  position: relative; text-decoration: none; color: var(--nh-2); white-space: nowrap;
  font-family: inherit; font-size: 15.04px; font-weight: 400; line-height: 1.55; letter-spacing: 0;
  padding: 6px 0; border-radius: 0; background: none; box-shadow: none; transition: color .25s;
}
.nav .nav-links a:hover { color: var(--nh-1); }
.nav .nav-links a[aria-current="page"] { color: var(--nh-1); }
.nav .nav-links a.nav-main[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--nh-grad);
}
/* :first-of-type statt :first-child: bei Angemeldeten steht die Glocke (notifications.js) davor */
.nav .nav-links a.nav-main:first-of-type { margin-left: auto; }
.nav .nav-links .nav-end { margin-right: auto; }
/* Pillen-Knopf wie auf der Startseite: helle Fläche, das Farblicht liegt als Linie darunter */
.nav .nav-links .nav-cta {
  display: inline-flex; align-items: center; margin: 0; padding: .7em 1.15em; border: 0; border-radius: 999px;
  font: 500 14.4px/1 "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif; white-space: nowrap;
  color: #151516 !important; background: var(--nh-1) !important; box-shadow: none;
  transition: background .3s cubic-bezier(.2, .8, .2, 1);
}
.nav .nav-links .nav-cta::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: -7px; height: 2px; border-radius: 2px;
  background: var(--nh-grad); filter: blur(1.5px); opacity: .9; transform: scaleX(.55);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.nav .nav-links .nav-cta:hover { background: #fff !important; color: #151516 !important; }
.nav .nav-links .nav-cta:hover::after, .nav .nav-links .nav-cta:focus-visible::after { transform: scaleX(1.25); }
.nav .nav-links [hidden] { display: none !important; }
.nav .nav-links .hide-sm { display: none; }
.nav .nav-links .nav-main { display: none; }
@media (min-width: 1001px) {
  .nav .nav-links .nav-main { display: inline-block; }
  /* Reihenfolge wie auf der Startseite: Logo, Links mittig, dann Suche, Bewerben, Konto.
     Die Links lösen sich dafür aus ihrem Kasten, damit „Bewerben“ hinter die Suche rücken kann. */
  .nav .nav-links { display: contents; }
  .nav .nav-links .nav-main + .nav-main { margin-left: clamp(18px, 2.4vw, 40px); }
  .nav .nav-links .nav-cta { order: 7; margin-left: 22px; }
  .nav .wrap > .site-search.site-search { margin-left: 0; }
  /* Glocke: rechts neben der Lupe und rund wie sie, nicht vorn am Logo */
  .nav .nav-links .notifications { order: 6; flex: none; margin-left: 10px; }
  .nav .nav-links .notifications summary {
    position: relative; justify-content: center; gap: 0; width: 32px; height: 32px; padding: 0; box-sizing: border-box;
    border-radius: 50%; background: rgba(236, 234, 228, .08); color: var(--nh-1); transition: background-color .3s ease;
  }
  .nav .nav-links .notifications summary:hover, .nav .nav-links .notifications[open] summary { background: rgba(236, 234, 228, .18); }
  .nav .nav-links .notifications summary:focus-visible { outline: 2px solid #4C8DFF; outline-offset: 4px; }
  .nav .nav-links .notifications summary svg { width: 18px; height: 18px; }
  .nav .nav-links .notifications .badge { position: absolute; top: -5px; right: -7px; margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
  .nav .nav-links .notification-panel { left: auto; right: 0; }
}
/* Login steckt im Konto-Symbol; als Text nur im ausgeklappten Menü */
.nav .nav-links:not(.open) [data-account] { display: none; }
.nav a:focus-visible, .nav button:focus-visible { outline: 2px solid #4C8DFF; outline-offset: 4px; border-radius: 4px; }
.nav .nav-cta:focus-visible, .nav .nav-toggle:focus-visible { border-radius: 999px; }

/* Menü-Knopf (bis 1000 px) */
.nav .nav-toggle {
  display: none; flex: none; order: 9;
  font: 500 13.5px/1 inherit; color: var(--nh-1); cursor: pointer;
  background: transparent; border: 0; box-shadow: inset 0 0 0 1px var(--nh-line-2);
  border-radius: 999px; padding: 10px 16px; margin: 0 0 0 12px; transition: box-shadow .25s;
}
.nav .nav-toggle:hover { box-shadow: inset 0 0 0 1px var(--nh-1); }
@media (max-width: 1000px) {
  .nav { --nh-h: 64px; }
  .nav .nav-toggle { display: inline-block; }
  .nav .nav-links { justify-content: flex-end; }
  .nav .nav-links:not(.open) .nav-cta { display: inline-flex; }
  .nav .nav-links.open {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    max-height: calc(100dvh - 80px); overflow-y: auto;
    padding: 6px var(--nh-pad) 22px;
    background: rgb(var(--nh-bg)); box-shadow: 0 1px 0 var(--nh-line);
  }
  .nav:has(.nav-links.open)::before { opacity: 1; }
  .nav .nav-links.open a { margin: 0; padding: 14px 0; font-size: 17px; color: var(--nh-1); border-bottom: 1px solid var(--nh-line); }
  .nav .nav-links.open a.nav-main[aria-current="page"]::after { display: none; }
  .nav .nav-links.open .nav-main, .nav .nav-links.open .hide-sm { display: block; }
  .nav .nav-links.open a.nav-main:first-of-type, .nav .nav-links.open .nav-end { margin: 0; }
  .nav .nav-links.open .nav-cta { margin: 20px 0 0; padding: 1em 1.4em; justify-content: center; border-bottom: 0; font-size: 15px; color: #151516 !important; }
}
@media (max-width: 640px) { .nav .nav-links:not(.open) .nav-cta { display: none; } }

/* Sprache (i18n.js), Konto (account-menu.js); die Suchleiste steht in site-search.css.
   Reihenfolge wie auf der Startseite: Suche, Sprache, Bewerben, Konto. Sprache als Pille wie Suche und Konto
   (gleiches Aussehen wie .top in css/neu.css). */
.nav .lang-switch {
  display: inline-flex; align-items: center; flex: none; order: 6; height: 32px; padding: 3px; box-sizing: border-box;
  border-radius: 999px; background: transparent; border: 0; box-shadow: inset 0 0 0 1px var(--nh-line); margin: 0 0 0 22px;
}
.nav .lang-switch button { height: 26px; min-width: 34px; padding: 0 9px; border: 0; border-radius: 999px; background: transparent; color: var(--nh-3); font: 500 12px/1 "JetBrains Mono", ui-monospace, monospace; cursor: pointer; transition: color .2s, background .2s; }
.nav .lang-switch button:hover { color: var(--nh-1); }
.nav .lang-switch button[aria-pressed="true"] { background: rgba(236, 234, 228, .12); color: var(--nh-1); }
.nav .lang-switch button:focus-visible { outline-offset: 2px; border-radius: 999px; }
/* Bis 1000 px nur die andere Sprache als runder Knopf wie die Lupe (wie auf der Startseite) */
@media (max-width: 1000px) {
  .nav .wrap > .lang-switch { margin-left: 12px; padding: 0; box-shadow: none; }
  .nav .lang-switch button[aria-pressed="true"] { display: none; }
  .nav .lang-switch button { width: 32px; height: 32px; min-width: 0; padding: 0; background: rgba(236, 234, 228, .08); color: var(--nh-1); }
  .nav .lang-switch button:hover { background: rgba(236, 234, 228, .18); }
}
@media (max-width: 480px) { .nav .lang-switch button { width: 36px; height: 36px; } }
.nav .wrap > .acct { order: 8; margin-left: 16px !important; }
@media (min-width: 1001px) { .nav .wrap > .acct { margin-left: 22px !important; } }
.nav .badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--nh-1); color: #151516; font-size: 12px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) { .nav::before, .nav .nav-links a, .nav .nav-links .nav-cta, .nav .nav-links .nav-cta::after { transition: none; } }

/* Profilbilder bleiben immer exakt in ihrer Form (Kreis), egal wie groß das Bild ist */
.avatar, .acct-face { overflow: hidden; }
.avatar > img, .acct-face > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar:has(> img) { position: relative; }

/* Profil: Bereichs-Navigation links untereinander */
.ptabs.ptabs-side { display: grid; gap: 6px; padding: 6px; margin: 0 0 20px; overflow: visible; border-radius: 2px; }
.ptabs.ptabs-side button { justify-content: flex-start; width: 100%; padding: 12px 14px; border-radius: 2px; }
@media (max-width: 959px) { .ptabs.ptabs-side { display: flex; overflow-x: auto; } .ptabs.ptabs-side button { width: auto; } }

/* Benachrichtigungen (notifications.js) sitzen in .nav-links: deren Link-Regeln (nowrap, Pillen-Padding,
   Unterstrich) dürfen nicht auf die Einträge im Panel durchschlagen, sonst wird der Text abgeschnitten. */
.nav .nav-links .notification-panel { white-space: normal; }
.nav .nav-links .notification-panel a.notification-item {
  display: grid; gap: 4px; padding: 12px; margin: 4px 0 0; white-space: normal; overflow-wrap: anywhere;
  font-size: 14px; line-height: 1.45; color: #ECEAE4; box-shadow: none; border-radius: 2px; border-bottom: 0;
}
.nav .nav-links .notification-panel a.notification-item:hover { color: #ECEAE4; background: #2A2A2A; }
.nav .nav-links .notification-panel a.notification-item.unread { background: rgba(236, 234, 228, .10); }
.nav .nav-links .notification-panel a.notification-item small { color: #A09E98; font-size: 12px; }
