/* Open button – behind nav by default */
#nav-open {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 9997;
}

.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    max-width: 30%;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 9998;
    padding: 1rem 4rem 2rem 2rem;
    border-radius: 0 20px 20px 0;
}

.nav-bar #lang-container {
    position: absolute;
    left: 2rem;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
}

.nav-bar #lang-container #lang-switcher {
    appearance: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    background-color: transparent;
    text-decoration: underline;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.nav-bar #lang-container #lang-switcher:hover,
.nav-bar #lang-container #lang-switcher:focus {
    outline: none;
}

.nav-bar #lang-container h1 {
    font-size: 1rem;
    margin: 0;
}

.nav-bar #lang-switcher h1 {
    font-size: medium;
}

/* Show it */
.nav-bar.visible {
    transform: translateX(0);
}

.nav-bar * {
    margin: 0;
    padding: 0;
}

.nav-bar nav ul {
    list-style: none;
    padding: 0;
}

.nav-bar nav ul li {
    margin: 0.5rem 0;
}

.nav-bar nav ul li a {
    text-decoration: none;
    font-size: 1.2rem;
}

.nav-bar nav ul li a.active {
    text-decoration: underline;
}

.nav-bar .close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

/* Hide open button when nav is open */
.nav-bar.visible~#nav-open {
    display: none;
}

.nav-bar nav ul h1 {
    font-size: 2rem;
}



@media (max-width: 768px) {
    .nav-bar {
        max-width: 70%;
        padding-bottom: 6rem;
    }

    .nav-bar #lang-container {
        bottom: 6rem;
    }
}