/*
 * Die eine Navbar von jimmy-ausbildung.de: statische Seiten UND die
 * Laravel-Seiten (Stellen, Berufe, Ratgeber, Azubis finden) laden diese Datei.
 * Markup: backend/resources/views/components/website/navbar.blade.php,
 * in die statischen Seiten geschrieben mit `php artisan website:navbar`.
 */
.jn {
    --jn-gelb: #FFD000;
    --jn-hoehe: clamp(60px, 10vh, 70px);
    background: var(--jn-gelb);
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
.jn--fest { position: fixed; left: 0; right: 0; }
.jn *, .jn *::before, .jn *::after { box-sizing: border-box; }

.jn-innen {
    max-width: 1400px;
    margin: 0 auto;
    height: var(--jn-hoehe);
    padding: 0 clamp(20px, 5vw, 60px);
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.6vw, 24px);
}
.jn-marke { display: flex; align-items: center; flex-shrink: 0; }
.jn-marke img { display: block; height: clamp(24px, 3vw, 34px); width: auto; max-width: 56vw; }

.jn .jn-nav {
    display: flex; align-items: center; gap: clamp(6px, 1vw, 14px); margin-left: auto;
    /* styles.css setzt ein globales nav { width: 100%; justify-content: center }. */
    width: auto; justify-content: flex-end; padding: 0; background: none;
}

/* Zielgruppen als Schalter, wie bisher auf der Startseite */
.jn-zielgruppen {
    display: flex; gap: 4px; padding: 4px;
    background: rgba(0, 0, 0, 0.12); border-radius: 30px;
    margin-right: clamp(4px, 1vw, 12px);
}
.jn-zielgruppen a {
    color: #000; text-decoration: none; font-weight: 600; font-size: 14px;
    padding: 7px 15px; border-radius: 24px; white-space: nowrap;
    transition: background 0.2s;
}
.jn-zielgruppen a:hover { background: rgba(0, 0, 0, 0.1); }
.jn-zielgruppen a[aria-current="page"] { background: #000; color: var(--jn-gelb); }

/* Stellen, Berufe, Wissen */
.jn-link {
    color: #000; text-decoration: none; font-weight: 700; font-size: 15px;
    padding: 8px 10px; border-radius: 10px; white-space: nowrap;
    background: none; border: 0; cursor: pointer; font-family: inherit;
    display: inline-flex; align-items: center; gap: 5px; line-height: 1.2;
}
.jn-link:hover { background: rgba(0, 0, 0, 0.08); }
.jn-link[aria-current="page"], .jn-link[data-aktiv] { box-shadow: inset 0 -3px 0 #000; border-radius: 10px 10px 2px 2px; }
.jn-auf svg { transition: transform 0.2s; }
.jn-auf[aria-expanded="true"] svg { transform: rotate(180deg); }

.jn-gruppe { position: relative; }
.jn-menue {
    display: none;
    position: absolute; top: calc(100% + 10px); right: 0;
    background: #fff; color: #111;
    border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    padding: 18px; gap: 18px;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    width: min(560px, 90vw);
}
.jn-menue.offen { display: grid; }
/* Hover-Bruecke, damit das Menue beim Ueberfahren der Luecke offen bleibt */
.jn-menue::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.jn-titel {
    font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45); margin: 0 0 6px 10px;
}
.jn-spalte a {
    display: block; text-decoration: none; color: #111;
    padding: 9px 10px; border-radius: 10px;
}
.jn-spalte a:hover, .jn-spalte a:focus-visible { background: #fff6cc; }
.jn-spalte strong { display: block; font-size: 15px; font-weight: 700; }
.jn-spalte span { display: block; font-size: 13px; color: #666; margin-top: 2px; }

.jn-start {
    background: #000; color: var(--jn-gelb); text-decoration: none;
    font-weight: 700; font-size: 15px; padding: 11px 20px; border-radius: 10px;
    white-space: nowrap; flex-shrink: 0;
}
.jn-start:hover { opacity: 0.88; }

/* Handy und Tablet: Burger + ausklappbares Menue */
.jn-burger {
    display: none; margin-left: auto;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 8px; background: none; border: 0; cursor: pointer;
}
.jn-burger span { display: block; width: 22px; height: 2px; background: #000; border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.jn-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.jn-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.jn-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.jn-mobil {
    display: none; flex-direction: column;
    background: var(--jn-gelb); padding: 8px 24px 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    max-height: calc(100vh - var(--jn-hoehe)); overflow-y: auto;
}
.jn-mobil.offen { display: flex; }
.jn-mobil-titel {
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
    color: rgba(0, 0, 0, 0.45); padding: 16px 0 4px;
}
.jn-mobil a {
    color: #000; text-decoration: none; font-weight: 600; font-size: 16px;
    padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.jn-mobil a[aria-current="page"] { font-weight: 800; }
.jn-mobil .jn-mobil-start {
    margin-top: 18px; background: #000; color: var(--jn-gelb); text-align: center;
    padding: 15px; border-radius: 10px; border-bottom: 0; font-weight: 700;
}

@media (max-width: 1279px) {
    .jn .jn-nav, .jn .jn-start { display: none !important; }
    .jn-burger { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
    .jn-auf svg, .jn-burger span { transition: none; }
}
