.custom-navbar {
    --navbar-height: 70px;
    background-color: #607D8BFF !important;
    height: var(--navbar-height);
    width: 100vw;
    position: fixed;
    z-index: 9999;
}
.navbar-toggler{
    margin: 8px;


}

.navbar-collapse{
    background-color: #607D8BFF;
    margin-left: auto;
    margin-right: auto;
}
.custom-navbar a {
    background-color: #607D8BFF;
    color: black;
    position: relative;
}


.navbar .dropdown-menu a.dropdown-item:hover {
    background-color: #607D8BFF !important;
    color: white;
}

.dropdown-item{
    border-top: 1px solid rgb(222, 226, 230, 0.3);
}
.dropdown-menu li:last-child > .dropdown-item:last-child {
    border-bottom: 1px solid rgb(222, 226, 230, 0.3);
}


.dropdown-menu{
    background-color: #607D8BFF;
    overflow-y: auto;
}

li:hover .sublist,
nav li:focus .submenu {
    padding: auto;
    background-color: #607D8BFF;
    position: absolute;
    display: block;
    visibility: visible;
}



.sublink {
    display: flex;
}

.logo {
    height: 50px;
}

/* Standard: Desktop (groß) -> Logo links */
.logo-container {
    position: relative;
    z-index: 10000;  /* immer über Collapse */
    order: 0;
    /* links */
}

.navbar .nav-link,
.navbar .navbar-brand {
    display: inline-flex;
    align-items: flex-start;
    gap: 5px;
    /* Abstand zwischen Icon und Text */
    white-space: nowrap;
    /* Kein Zeilenumbruch */
}






.navbar .nav-link {
    display: flex;
    flex-direction: column;
    /* Stapelt Icon und Text vertikal */
    align-items: center;
    /* Zentriert horizontal */
    justify-content: center;
    /* Optional: vertikal zentrieren */
    gap: 2px;
    /* Kleiner Abstand zwischen Icon und Text */
    text-align: center;
    /* Text mittig, falls mehrzeilig */
    white-space: nowrap;
    /* Kein Zeilenumbruch */
    max-height: 70px;
}

.navbar .nav-link span {
    display: block;
    /* Macht das Icon zu einem Block-Element */
    /* Abstand zwischen Icon und Text */
}

.nav-item {
    background-color: #607D8BFF;
    /* Oder die gewünschte Hintergrundfarbe */
    z-index: 9999;
    /* Höher als normale Inhalte */
    /*border-bottom: 1px solid #ddd;*/
}


.nav-item a {
    font-size: 18px;
}

/* Vertikale Trennstriche in mobiler Ansicht (collapse) */
.navbar-nav .nav-item+.nav-item {
    border-top: 1px solid #dee2e6;
    /*overflow: auto;*/
}

.navbar-nav i {
    padding-left: 5px;

}

/* Verhindert, dass die Seite hinter der offenen Navbar scrollt */
body.nav-open {
    overflow: hidden;
}

@media (max-width: 1399px) {
    .navbar .logo-container {
        order: 2;
        /* nach rechts schieben */
        margin-left: auto;
        /* zusätzlich sicherstellen, dass es rechts steht */
        position: fixed;
        top: 0;
        right: 0;
    }
    .nav-item:first-child{
        margin-top: 10px;
    }
    .dropdown-menu{
        overflow-y: auto;
    }
}

/* Horizontale Trennstriche in Desktop-Ansicht */
@media (min-width: 1400px) {
    .navbar-nav {
        display: flex;
        gap: 0.3rem;
    }

    .navbar-nav i {
        padding-left: 0;
    }

    .navbar-nav .nav-item+.nav-item {
        border-top: none;
        padding-left: 0.5rem;
    }
}



@media (max-width: 1399px) {
    
    .navbar-collapse {
        max-height: 80vh;
        position: fixed; /* löst es vom Body */
        top: var(--navbar-height, 70px);
        left: 0;
        right: 0;
        bottom: 0; /* bis zum unteren Rand */
        background-color: #607D8BFF; /* Hintergrund */
        overflow-y: auto; /* hier scrollt es */
        -webkit-overflow-scrolling: touch; /* wichtig für iOS smooth scrolling */
        padding: 1rem; /* optional: Innenabstand */
        z-index: 9998;

        /*position: relative;*/
    }
    
    
}

.custom-navbar a:hover,
.custom-navbar a.active {
    color: white !important;
    /* Textfarbe weiß */
    outline: none;
    /* Entfernt mögliche Fokus-Markierung */
    box-shadow: none;
    /* Entfernt mögliche Bootstrap-Schattierungen */
}





