/* Menu */
/* Header with scroll hiding functionality */
header {
    background-color: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(5px);
    color: #0803D3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

/* Ensure mobile header transitions work smoothly */
header.hidden {
    transform: translateY(-100%);
}

header.visible {
    transform: translateY(0);
}

/* Add top padding to body to compensate for fixed header */
body {
    padding-top: 80px;
}

.logo {
    max-width: 200px;
    height: auto;
    transition: max-width 0.3s ease;
    flex-shrink: 0; /* Forhindrer logo i at blive komprimeret */
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0px;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #0803D3;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

nav ul li a:hover {
    background-color: #0803D3;
    color: white;
}

.desktop-menu ul {
    list-style-type: none;
    padding: 0;
    display: flex;
}

.desktop-menu ul li {
    margin-left: 20px;
}

.desktop-menu ul li a {
    text-decoration: none;
    color: #0803D3;
    font-size: 18px;
}

.burger-menu {
    display: none;
}

/* Mobile menu styles */
@media screen and (max-width: 768px) {
    header {
        position: fixed;
        padding: 10px 20px;
        display: flex;
        justify-content: space-between; /* Skiller logo og burger menu fra hinanden */
    }
    
    .logo {
        max-width: 120px;
        flex-shrink: 0; /* Forhindrer logo i at blive komprimeret */
    }
    
    .desktop-menu {
        display: none;
    }
    
    .burger-menu {
        display: flex;
        align-items: center;
        z-index: 1001;
    }
    
    .burger-icon {
        cursor: pointer;
        padding: 8px;
        background-color: transparent;
        border-radius: 5px;
        border: none;
        outline: none;
    }
    
    .burger-icon span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #0803D3;
        margin: 4px 0;
        transition: 0.4s;
        border-radius: 2px;
    }
    
    /* Burger animation when active */
    .burger-icon.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .burger-icon.active span:nth-child(2) {
        opacity: 0;
    }
    
    .burger-icon.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .mobile-menu {
        position: fixed;
        top: 0;
        right: -250px;
        width: 250px;
        height: 100vh;
        background-color: #ffffff;
        transition: right 0.4s ease-in-out;
        padding-top: 80px; /* Matcher header højde */
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: 1000;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-menu.active {
        right: 0;
    }
    
    .close-menu {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 28px;
        cursor: pointer;
        color: #333;
        background: none;
        border: none;
        padding: 5px;
    }
    
    .mobile-menu ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .mobile-menu ul li {
        padding: 15px 20px;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-menu ul li:last-child {
        border-bottom: none;
    }
    
    .mobile-menu ul li a {
        text-decoration: none;
        color: #333;
        font-size: 18px;
        display: block;
        padding: 10px;
        transition: color 0.3s;
    }
    
    .mobile-menu ul li a:hover {
        color: #0803D3;
    }
    
    /* Ensure mobile header transitions work smoothly */
    header.hidden {
        transform: translateY(-100%);
    }
    
    header.visible {
        transform: translateY(0);
    }
}