/* Globale Header-Stile */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
    z-index: 1000;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.desktop-nav ul {
    display: flex;
    align-items: center;
    list-style-type: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.desktop-nav .menu-left { flex: 1; justify-content: flex-start; }
.desktop-nav .menu-center { flex: 1; justify-content: center; }
.desktop-nav .menu-right { flex: 1; justify-content: flex-end; }

.menu-icon {
    display: inline-block;
    max-height: 22px;
    max-width: 22px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Das <li> schneidet nur noch den Hintergrund ab */
.desktop-nav ul li {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    /* Der Rand wurde auf das a-Element verschoben */
}

.desktop-nav ul li:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* FINALE KORREKTUR: Der Link selbst ist jetzt der abgerundete Button mit Rand */
.desktop-nav ul li a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 15px;
    display: block;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px; /* Abgerundete Ecken für den Link */
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    background-color: #333;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    padding: 5px 0;
    margin-top: 5px;
    border-radius: 4px;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    list-style: none;
}

.dropdown:hover > .dropdown-content {
    visibility: visible;
    opacity: 1;
}
.dropdown-content li a {
    padding: 12px 16px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    color: white;
}

.nav-button-link {
    background: none; border: none; color: #333;
    text-decoration: none;
    font-size: 16px; padding: 8px 15px; border-radius: 4px;
    transition: background-color 0.3s; cursor: pointer; font-family: inherit;
    width: 100%; text-align: left;
}
.nav-button-link:hover { background-color: rgba(0, 0, 0, 0.1); }

/* --- Mobile Navigation --- */
.mobile-nav-toggle { display: none; }
.mobile-nav { display: none; }

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-nav-toggle { display: block; background: none; border: none; color: white; font-size: 2rem; cursor: pointer; z-index: 1001; }
    .mobile-nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #2c3e50;
        z-index: 1000;
        padding-top: 60px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    .mobile-nav.active { display: flex; transform: translateX(0); }
    .mobile-nav ul { flex-direction: column; width: 100%; align-items: flex-start; }
    .mobile-nav ul li { width: 100%; }
    .mobile-item-wrapper { display: flex; justify-content: space-between; align-items: center; width: 100%; }
    .mobile-item-wrapper a { flex-grow: 1; padding: 15px 20px; display: flex; align-items: center; color: white; position: relative; z-index: 1;}
    .mobile-submenu-toggle { background: none; border: none; color: white; font-size: 1.5rem; padding: 15px; cursor: pointer; flex-shrink: 0; }
    .mobile-dropdown-content { display: none; list-style: none; padding-left: 20px; background-color: #34495e; width: 100%; }
}

/* Menü-Punkt Hintergrundbilder Korrektur */
.menu-item-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
