.head {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px; 
    background: rgba(30,33,38, 0.8);
    background: linear-gradient(0deg, rgba(30,33,38,0.8) 0%, rgba(29,34,38,0.8) 100%);
    border-bottom: 1px solid #2b2b2b;
    border-top: 1px solid #4a4a4a;
    left: 10px; 
    right: 10px; 
    top: 10px;
    position: fixed;
    z-index: 1000;
    border-radius: 25px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.636); /* äußerer Schatten nach rechts unten */
}



.head img, .head span {
    margin-right: 10px;   
    vertical-align: middle;
}

.menu {
    
    display: flex;
    align-items: center;
    gap: 30px; /* Zwischenraum zwischen den Links */
    position: relative; /* Damit der wandernde Unterstrich relativ dazu positioniert wird */
}
.menu a {
    font-size: 18px;
    width: 150px;
    color: #fff;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

.menu a.active {
    font-weight: bold;
}

.menu .underline {
    position: absolute;
    bottom: -5px;
    height: 1px;
    background-color: var(--highlight);
    width: 100px; 
    left: 25px; /* Startposition unter dem ersten Link */
    transition: all 0.3s ease-in-out;
}

.menu a:nth-child(1):hover ~ .underline, 
.menu a:nth-child(1).active ~ .underline {
    left: 25px; /* Position unter dem ersten Link */
}

.menu a:nth-child(2):hover ~ .underline, 
.menu a:nth-child(2).active ~ .underline {
    left: 205px; /* Position unter dem zweiten Link (150px + 30px + 25px) */
}

.menu a:nth-child(3):hover ~ .underline, 
.menu a:nth-child(3).active ~ .underline {
    left: 385px; /* Position unter dem dritten Link (2 * 150px + 2 * 30px + 25px) */
}
