/* Desktop navbar */
#navbar > ul > li > a,
.projects-toggle {
    color: var(--primary-text-color);
    text-decoration: none;
    font-size: var(--text-size);
    transition: 0.3s ease-in-out;
}

#navbar {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    z-index: 100;
    position: relative;
}

#navbar > ul {
    list-style-type: none;
    display: flex;
    justify-content: space-around;
    margin: 0;
    padding: 0;
    width: 100%;
}

#navbar > ul > li {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#navbar > ul > li > a:hover,
.projects-toggle:hover,
.projects-submenu li a:hover {
    color: var(--hover-color);
}

/* Desktop dropdown */
.projects-toggle {
    position: relative;
}

.arrow {
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.projects-toggle.open .arrow {
    transform: rotate(180deg);
}

.projects-submenu {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translate(-40%, 10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 200;
    width: 200px;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.projects-submenu li {
    margin: 12px 0;
}

.projects-submenu li a {
    color: var(--primary-text-color);
    font-size: calc(var(--text-size) - 3px);
    text-decoration: none;
}

.projects-submenu.show {
    opacity: 1;
    transform: translate(-40%, 0);
    pointer-events: auto;
}

@media (min-width: 769px) {
    .projects-toggle:hover .projects-submenu {
        opacity: 1;
        transform: translate(-40%, 0);
        pointer-events: auto;
    }

    .projects-toggle:hover .arrow {
        transform: rotate(180deg);
    }
}

/* Burger button */
#burger-menu {
    display: none;
    position: fixed;
    top: 18px;
    right: 18px;
    width: 52px;
    height: 52px;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    border-radius: 12px;
    background: none;
}

#burger-menu-img {
    width: 28px;
    height: 28px;
    margin: 0;
    object-fit: contain;
}

/* Hidden mobile menu */
#hidden-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(82vw, 320px);
    height: 100vh;
    background: rgba(7, 93, 151, 0.97);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
    transition: right 0.35s ease;
    z-index: 1050;
    overflow-y: auto;
    border-left: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 0;
}

#hidden-menu.open {
    right: 0;
}

.mobile-menu-content {
    padding: 90px 24px 30px;
}

#hidden-menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

#hidden-menu > .mobile-menu-content > ul {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#hidden-menu ul li {
    margin: 0;
}

#hidden-menu ul li a,
#hidden-menu .projects-label {
    color: white;
    font-size: 24px;
    font-weight: 500;
    text-decoration: none;
    font-family: "Rubik", sans-serif;
    background: none;
    border: none;
    padding: 0;
}

#hidden-menu .projects-label {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: var(--hand-cursor);
}

#hidden-menu .projects-submenu {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    display: none;
    width: 100%;
    margin-top: 14px;
    padding-left: 14px;
    border-left: 2px solid rgba(255, 255, 255, 0.25);
}

#hidden-menu .projects-submenu.show {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#hidden-menu .projects-submenu li {
    margin: 0;
}

#hidden-menu .projects-submenu li a {
    color: white;
    font-size: 20px;
    font-weight: 400;
    text-decoration: none;
}

#hidden-menu .projects-toggle.open .arrow {
    transform: rotate(180deg);
}

/* Mobile only */
@media (max-width: 768px) {
    #navbar {
        display: none;
    }

    #burger-menu {
        display: flex;
    }
}