nav {
    position: relative;
    z-index: 18;
}

.menu {
    list-style-type: none;
    margin: 0;
    padding: 0.55rem min(2vw, 1.5rem);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: rgba(13, 22, 17, 0.66);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(6px);
}

.menu > li {
    position: relative;
}

.menu > li > a,
.dropbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    color: #f4f9ff;
    text-decoration: none;
    padding: 0.56rem 1.04rem;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(50, 78, 56, 0.92), rgba(30, 52, 36, 0.96));
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    transition: filter 150ms ease, transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.menu > li > a:hover,
.menu > li > a:focus-visible,
.dropbtn:hover,
.dropbtn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
    filter: brightness(1.06);
}

.menu > li > a:active,
.dropbtn:active {
    transform: translateY(0);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 232px;
    background: rgba(13, 24, 18, 0.96);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-2);
    z-index: 25;
    list-style-type: none;
    margin: 0;
    padding: 0.4rem;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content li a {
    color: #edf5ff;
    padding: 0.56rem 0.72rem;
    text-decoration: none;
    display: block;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.26rem;
}

.dropdown-content li a:hover,
.dropdown-content li a:focus-visible {
    background: rgba(114, 201, 142, 0.2);
}

.dropdown-content li:last-child a {
    margin-bottom: 0;
}

.burger-menu {
    display: none;
    margin: 0;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 0;
    background: rgba(13, 24, 18, 0.92);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.burger-menu img {
    width: 30px;
    height: 30px;
}

.fullscreen-menu {
    position: relative;
    width: 100%;
    background: rgba(10, 20, 15, 0.98);
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.fullscreen-menu.active {
    max-height: 78vh;
    overflow-y: auto;
}

.fullscreen-menu ul {
    list-style: none;
    padding: 0.65rem;
    width: min(100%, 560px);
}

.fullscreen-menu li {
    width: 100%;
    text-align: center;
    margin-bottom: 0.32rem;
}

.fullscreen-menu a,
.dropbtn-burger {
    color: #f4f9ff;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    display: block;
    width: 100%;
    padding: 0.64rem 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-content-burger {
    display: none;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    width: 100%;
    list-style-type: none;
    margin-top: 0.26rem;
    padding: 0.3rem;
}

.dropdown-content-burger.show {
    display: block;
}

.dropdown-content-burger li a {
    color: #f6faff;
    padding: 0.5rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.88rem;
    margin-bottom: 0.24rem;
}

.dropdown-content-burger li:last-child a {
    margin-bottom: 0;
}

@media screen and (max-width: 900px) {
    .menu {
        display: none;
    }

    .burger-menu {
        display: block;
    }

    main {
        margin-top: 0.35rem;
    }
}
