header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.logo {
    font-size: 24px;
    color: #f8bc41;
    font-weight: bold;
    font-family: 'Source Sans Pro';
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: lightgrey;
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: white;
}

.burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    height: 21px;
}

.burger div {
    width: 25px;
    height: 2px;
    background-color: #f8bc41;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.buttons {
    justify-content: flex-end;
    flex-grow: 1;
}

.mobile-flex {
    display: none !important;
}

.desktop-flex {
    display: flex !important;
}

@media screen and (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #0a0b19;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none; /* Gör länkarna oklickbara */
        transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, pointer-events 0.5s ease-in-out;

        padding: 2rem;
        border-bottom-left-radius: 0.5rem;
        border-bottom-right-radius: 0.5rem;

        z-index: 999;
    }

    .nav-links li {
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 24px;
        padding: 20px;
    }

    .burger {
        display: flex;
    }

    .nav-active {
        max-height: 500px;
        opacity: 1;
        pointer-events: auto; /* Gör länkarna klickbara */
    }

    .buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 2rem;
    }

    .buttons a {
        font-size: 1.2rem;
        padding-block: 0.5rem;
        padding-inline: 0.8rem;
        color: #0a0b19;
    }

    .burger.toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 8px);
    }

    .burger.toggle .line2 {
        opacity: 0;
    }

    .burger.toggle .line3 {
        transform: rotate(45deg) translate(-5px, -8px);
    }

    .desktop-flex {
        display: none !important;
    }

    .mobile-flex {
        display: flex !important;
    }
}

@media screen and (min-width: 769px) {
    .buttons {
        display: flex;
    }

    .burger {
        display: none;
    }
}