.nav {
    position: relative;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-header {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.nav-title {
    display: flex;
    align-items: center;
}

.nav-title a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: opacity 0.2s ease;
}

.nav-title a:hover {
    opacity: 0.85;
    text-decoration: none;
}

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: background-color 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    padding-bottom: 0.75rem;
}

.nav-links > a,
.dropbtn {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links > a:hover,
.dropbtn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}

.dropdown {
    position: relative;
}

.dropbtn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-icon {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    display: none;
    z-index: 1000;
}

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

.dropdown-content a {
    display: block;
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    color: #1f2937;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-content a:hover {
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

/* Tablet and mobile */
@media (max-width: 768px) {
    .nav-inner {
        padding: 0 0.75rem;
    }

    .nav-header {
        min-height: 64px;
    }

    .nav-title a {
        font-size: 1.05rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        padding: 0 0 1rem;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links > a,
    .dropbtn {
        width: 100%;
        justify-content: space-between;
        padding: 0.95rem 1rem;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 14px;
    }

    .nav-links > a:hover,
    .dropbtn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        min-width: 100%;
        margin-top: 0.35rem;
        padding: 0.35rem;
        border-radius: 14px;
        box-shadow: none;
        border: 0;
        background: rgba(255, 255, 255, 0.06);
    }

    .dropdown-content a {
        color: #ffffff;
    }

    .dropdown-content a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }
}