﻿nav {
    background: gold;
    padding: 1rem;
    color: black;
}

.menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

    .menu > .item {
        position: relative;
    }

    .menu a {
        color: black;
        text-decoration: none;
        font-weight: bold;
    }

/* Dropdown menu */
.dropdown {
    display: none;
    position: absolute;
    top: 2.2rem;
    left: 0;
    background: white;
    padding: 0.5rem 0;
    min-width: 150px;
    border-radius: 4px;
    z-index: 1000;
}

    .dropdown a {
        display: block;
        padding: 0.4rem 1rem;
        color: black;
        text-decoration: none;
    }

.item.open .dropdown {
    display: block; /* show dropdown when item.open = true */
}

.mobile-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.2rem;
}

/* MOBILE */
.mobile-toggle {
    display: none;
    cursor: pointer;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .menu {
        flex-direction: column;
        display: none;
    }

        .menu.open {
            display: flex;
        }

    .item .dropdown {
        position: static;
    }

    .mobile-toggle {
        display: block;
    }
}
