/* ==========================================================================
   NAVBAR & BRANDING STYLES (navbar.css)
   ========================================================================== */

/* --- DER UNSICHTBARE CONTAINER (Zentriert alles mathematisch perfekt) --- */
.top-bar {
    position: fixed;
    top: 30px;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

/* --- BRANDING (Logo & Name) --- */
.nav-brand {
    position: fixed;
    top: 55px;
    left: 24px;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
}


/* --- NAVBAR GRUNDZUSTAND (Container) --- */
.glass-nav {
    position: fixed;
    top: 55px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px; /* Der kompakte Wortabstand */

    padding: 6px 12px !important; /* Der schlanke Rahmen */

    white-space: nowrap;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0);

    background: transparent;
    transition: all 0.4s ease-in-out;
}

/* --- ZUSTAND BEIM SCROLLEN (Der Glas-Effekt wird aktiviert) --- */
.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    /* Rahmen und Schatten werden weich eingeblendet */
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    border-left: 1px solid rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* --- DIE EINZELNEN LINKS --- */
/* --- DIE EINZELNEN LINKS --- */
.glass-nav a {
    position: relative;
    z-index: 1;
    text-decoration: none;
    color: #333333;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: normal;


    border-radius: 30px;

    border: 1px solid transparent;

    font-size: clamp(0.85rem, 1.2vw, 1.1rem);

    /* 🔥 DICKER & DYNAMISCH: Das Padding im Inneren der Buttons */
    /* Erster Wert (oben/unten) macht den Button "höher" */
    padding: clamp(12px, 1.5vw, 16px) clamp(15px, 2.5vw, 32px);

    transition: all 0.3s ease;
}

/* --- DER NEUE SLIDER-KASTEN (Magic Line) --- */
.nav-indicator {
    position: absolute;
    background: #333333;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);

    /* Das macht das butterweiche Sliden: */
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);

    z-index: 0; /* Bleibt im Hintergrund */
    opacity: 0; /* Ist unsichtbar, bis JavaScript ihn aktiviert */
    pointer-events: none; /* Blockiert keine Klicks */
}

/* --- HOVER EFFEKT (Wenn man mit der Maus drüberfährt, aber der Link nicht aktiv ist) --- */
.glass-nav a:hover:not(.active) {
    background: rgba(255, 255, 255, 0.25); /* Helles, edles Glas */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #333333;
}

.glass-nav.nav-dark-hover a:hover:not(.active) {
    /* Ein sehr weiches, transparentes Dunkelgrau */
    background: rgba(51, 51, 51, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    /* Ein zarter Rand, der sich vom weißen Hintergrund abhebt */
    border: 1px solid rgba(51, 51, 51, 0.15);
    color: #111111; /* Die Schrift wird noch einen Tick knackiger */
}

/* --- ACTIVE STATE (Wenn der Link durch den Slider markiert ist) --- */
.glass-nav a.active {
    /* Das alte Active-Design wird minimalistisch, weil der Slider das Styling übernimmt */
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: #ffffff; /* Nur die Schriftfarbe ändert sich beim aktiven Wort */
}

/* --- HILFSKLASSE ZUM VERSTECKEN --- */
.versteckt {
    display: none !important;
}




/* Stellt sicher, dass das Logo und der Text immer verschwinden, wenn die Klasse aktiv ist */
.nav-brand.hide-logo {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}


.nav-logo {
    width: clamp(28px, 4vw, 40px); /* 🔥 Dynamische Logo-Größe */
    height: clamp(28px, 4vw, 40px);
    object-fit: contain;
    flex-shrink: 0;
}

.nav-title {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem); /* 🔥 Dynamische Schriftgröße */
    font-weight: 700;
    color: #333333;
    letter-spacing: 0.5px;
}





@media (max-width: 768px) {
    .nav-brand {
        display: none !important;
    }

    .glass-nav {
        top: 48px;

        /* 🔥 EXAKT 24px LINKS & RECHTS: (100% minus 2x 24px) */
        width: calc(100% - 48px);

        /* 🔥 Etwas mehr "Fleisch" auch auf dem Handy */
        padding: 8px 10px !important;
        justify-content: space-between;
    }

    .glass-nav a {
        flex: 1;
        /* Auf dem Handy etwas flacher, damit es nicht den halben Schirm einnimmt */
        padding: 14px 4px 12px 4px;
        font-size: 0.9rem; /* Feste Größe für bessere Lesbarkeit auf kleinen Screens */
    }
}