.sidebar-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.16);
    z-index: 1999;
    display: none;
}

nav{
    background: linear-gradient(90deg, rgba(42,51,155,0.92) 0%, rgba(87,199,96,0.92) 50%, rgba(199,83,44,0.92) 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    position: relative;
    z-index: 2002;
}

nav ul{
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav li{
    height: 50px;
}

nav a{
    height: 100%;
    padding: 0 24px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

nav a:hover{
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateY(-1px);
}

nav a::after{
    content: "";
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.25s ease;
    transform: translateX(-50%);
}

nav a:hover::after{
    width: 70%;
}

/* vis hvilken menu der er aktiv i topmenuen*/
nav a.active{
    background: rgba(255,255,255,0.18);
    color: white;
    text-decoration: none;
}

nav a.active::after{
    width: 70%;
}

nav li:first-child{
    margin-right: auto;
}

.icon-button{
    height: 50px;
    min-width: 58px;
    padding: 0 16px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.2s ease;
}

.icon-button:hover{
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.icon-button svg{
    pointer-events: none;
}

.sidebar{
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    z-index: 2001;

    background: rgba(0,0,0,0.35);
    
    -webkit-backdrop-filter: blur(14px);    /* Til Safari */
    backdrop-filter: blur(14px);    /* Til alle andre moderne browsere */

    box-shadow: -10px 0 24px rgba(0,0,0,0.25);
    border-left: 1px solid rgba(255,255,255,0.15);

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    margin: 0;
    padding: 8px 0 0 0;

    transform: translateX(100%);
    transition: transform 0.35s ease;
}

.sidebar.open{
    transform: translateX(0);
}

.sidebar li{
    width: 100%;
    height: auto;
    list-style: none;
}

.sidebar-close-row{
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 8px;
}

.sidebar a{
    width: 100%;
    min-height: 56px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    position: relative;
    z-index: 2;
    font-size: 1.08rem;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-shadow:
        0 1px 2px rgba(0,0,0,0.6),
        0 2px 8px rgba(0,0,0,0.4);
    transition: background 0.25s ease, color 0.25s ease;
}

.sidebar a:hover{
    background: rgba(255,255,255,0.18);
    color: #ffffff;
    transform: none;
}

.sidebar a::after{
    display: none;
}

.sidebar a::before{
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: rgba(255,255,255,0.30);
    transition: width 0.25s ease;
    pointer-events: none;
}

.sidebar a:hover::before{
    width: 6px;
}

/* vis hvilken menu der er aktiv i sidebaren*/
.sidebar a.active{
    background: rgba(255,255,255,0.18);
    text-decoration: none;
}

.sidebar a.active::before{
    width: 6px;
}

nav a.active,
.sidebar a.active {
    border-radius: 8px;
}


.sidebar .icon-button{
    color: white;
}

.sidebar .icon-button:hover{
    background: rgba(255,255,255,0.12);
    transform: none;
}

.menu-button{
    display: none;
}

/* Tablet */
@media (min-width: 601px) and (max-width: 1024px) {

}

/* landscape */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: landscape){
    .hideOnMobile{
        display: none;
    }

    .menu-button{
        display: block;
    }

    .sidebar{
        width: 100%;
    }

    nav a{
        padding: 0 16px;
    }

    nav li{
    height: 30px;
    }

    .icon-button{
    height: 30px;
    min-width: 58px;
    padding: 0 16px;
    }

    nav a::after{
    bottom: 6px;
    width: 0;
    height: 1px;
    }
}

/* mobil */
@media (min-width: 0px) and (max-width: 600px){

    .hideOnMobile{
        display: none;
    }

    .menu-button{
        display: block;
    }

    .sidebar{
        width: 100%;
    }

    nav a{
        padding: 0 16px;
    }
}