/* =========================================
   GLOBAL VARIABLES & BASE
========================================= */
:root {
    --color-text: #222;
    --color-primary: #0077ff;
    --color-primary-dark: #005fcc;
    --color-border: #ccc;
    --color-border-light: #ddd;
    --color-shadow: rgba(0,0,0,0.1);
    --transition: 0.3s ease;
    --radius: 6px;
}

/* Reset / Base */
nav ul, nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

nav ul li,
nav ul li a {
    display: flex;
    align-items: center;
}

/* =========================================
   NAVIGATION LAYOUT
========================================= */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: bold;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-menu > li > a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
}

/* =========================================
   SUBMENU (Desktop default hidden)
========================================= */
.submenu {
    display: none;
    padding-top: 10px;
}

/* =========================================
   BUTTON (Glass-Pill)
========================================= */
.btn {
    display: inline-block;
    padding: 14px 34px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.75);
    border-radius: 50px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.35s ease;
}

.btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: #fff;
    box-shadow: 0 0 18px rgba(255,255,255,0.45);
    transform: translateY(-3px);
}

/* =========================================
   LOGIN BOX
========================================= */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
}

.login-box {
    width: 100%;
    max-width: 380px;
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.login-box h2 {
    margin-bottom: 24px;
    text-align: center;
}

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.input-group input {
    width: 80%;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    font-size: 1rem;
}

/* =========================================
   BURGER ICON
========================================= */
.burger {
    display: none;
    width: 30px;
    height: 22px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 400;
}

.burger span {
    height: 4px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

.burger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* =========================================
   OVERLAY
========================================= */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 350;
}
.overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* =========================================
   PROFILE BUTTON
========================================= */
.profile-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.profile-btn:hover {
    background: var(--color-primary-dark);
}

/* =========================================
   SORT ICON
========================================= */
.sort-icon {
    width: 20px;
    height: 20px;
    margin-left: 6px;
    opacity: 0.8;
}

th a:hover .sort-icon {
    opacity: 1;
}

/* =========================================
   DESKTOP DROPDOWN
========================================= */
@media (min-width: 769px) {
    .has-submenu {
        position: relative;
    }

    .has-submenu:hover .submenu {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        padding: 10px 15px;
        box-shadow: 0 4px 10px var(--color-shadow);
        border-radius: 5px;
        min-width: 180px;
    }

    .submenu li + li {
        margin-top: 8px;
    }
}

/* =========================================
   MOBILE NAVIGATION
========================================= */
@media (max-width: 768px) {

    .logo span {
        display: none;
    }

    .burger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 250px;
        height: 100vh;
        background: #fff;
        padding: 80px 20px 0 20px;
        flex-direction: column;
        gap: 20px;
        box-shadow: -2px 0 10px var(--color-shadow);
        transition: right var(--transition);
        z-index: 380;
    }

    .nav-menu.active {
        right: 0;
    }

    /* Linien */
    .nav-menu > li {
        border-bottom: 1px solid #999;
        padding: 1px 0 10px;
    }

    .submenu li {
        border-bottom: 1px solid var(--color-border-light);
        padding: 8px 0;
    }

    .nav-menu > li:last-child,
    .submenu li:last-child {
        border-bottom: none;
    }

    /* Mobile Submenu */
    .has-submenu > a {
        display: flex;
        justify-content: space-between;
        padding-right: 20px;
        position: relative;
    }

    .has-submenu:not(.profile-item) > a::before {
        content: "▾";
    }

    .has-submenu > a::before {
        position: absolute;
        right: -5px;
        top: 5px;
        transform: translateY(-50%);
        font-size: 2rem;
        opacity: 0.6;
        transition: var(--transition);
    }
	
    .has-submenu.open {
        display: block;        /* Flex ausschalten */
        padding-top: 0;        /* Text oben */
        padding-bottom: 10px;
		
    }
    .has-submenu.open > a::before {
        content: "";
	}

	.has-submenu.open .submenu {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-left: 5px;
		
    }

    /* Mobile Button bigger */
    .btn {
        padding: 16px 38px;
        font-size: 1.2rem;
    }
}
