/* components/navbar.css */
.navbar {
    background-color: var(--color-primary);
    color: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 1001;
}

/* Burger Menu Button */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Burger Menu Animation - wenn aktiv */
.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: block;
}

.nav-link:hover {
    background-color: var(--color-primary-hover);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .burger-menu {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--color-primary);
        flex-direction: column;
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        gap: 0;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--color-primary);
    }

    .nav-link {
        padding: 1rem;
        border-radius: 0;
        width: 100%;
    }

    .nav-link:hover {
        background-color: var(--color-primary-dark);
    }

    /* Overlay wenn Menu geöffnet */
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Dropdown-Menü (z. B. Administration) – früher in companies.css. */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: "▼";
    font-size: 0.7rem;
    margin-left: 0.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Hover-Effekt für Desktop */
@media (min-width: 769px) {
    .nav-item.dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
    }
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-primary);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    border-top: 2px solid var(--color-primary-dark);
}

.dropdown-menu .nav-item {
    margin: 0;
}

.dropdown-menu .nav-link {
    padding: 0.75rem 1.5rem;
    color: white;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border-radius: 0;
    font-size: 0.95rem;
}

.dropdown-menu .nav-link:hover {
    background: var(--color-primary-dark);
    transform: translateX(4px);
}

/* Mobile Styles für Dropdown */
@media (max-width: 768px) {
    .nav-item.dropdown {
        width: 100%;
    }

    .dropdown-toggle::after {
        float: right;
        margin-top: 0.25rem;
    }

    .dropdown-menu {
        position: static;
        display: none;
        background: var(--color-primary-dark);
        box-shadow: none;
        border-radius: 0;
        border-top: 1px solid var(--color-primary-hover);
        padding: 0;
    }

    .dropdown-menu.active {
        display: block;
        animation: slideDown 0.3s ease;
    }

    .dropdown-menu .nav-link {
        padding: 1rem 1.5rem 1rem 2.5rem;
        border-bottom: 1px solid var(--color-primary-hover);
        font-size: 0.9rem;
    }

    .dropdown-menu .nav-link:hover {
        transform: none;
        background: var(--color-primary-hover);
    }

    .nav-item.dropdown:hover .dropdown-menu {
        display: none;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}