/* Enhanced Navigation with Nested Dropdowns */
.site-nav {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.brand {
    font-weight: 700;
    font-size: 1.2em;
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}

.brand:hover {
    color: #3b82f6;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Top-level nav items */
.nav-item {
    position: relative;
}

.nav-item > a,
.nav-item > span {
    display: block;
    padding: 8px 16px;
    color: #475569;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95em;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.nav-item > a:hover,
.nav-item > span:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Dropdown menus */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    min-width: 240px;
    padding: 8px;
    margin-top: 4px;
    z-index: 1000;
}

.nav-item:hover > .dropdown-menu {
    display: block;
}

/* Dropdown items */
.dropdown-item {
    display: block;
    padding: 10px 12px;
    color: #475569;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.15s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Category headers in dropdowns */
.dropdown-category {
    position: relative;
    padding: 6px 12px;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}

.dropdown-category:hover {
    background: #f8fafc;
}

.dropdown-category::after {
    content: "›";
    font-size: 1.2em;
    color: #94a3b8;
}

/* Nested submenu */
.submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    min-width: 220px;
    padding: 8px;
    margin-left: 4px;
}

.dropdown-category:hover > .submenu {
    display: block;
}

/* Divider */
.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .nav-inner {
        flex-direction: column;
        height: auto;
        padding: 12px 20px;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 4px;
    }

    .nav-item {
        width: 100%;
    }

    .nav-item > a,
    .nav-item > span {
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        margin-top: 4px;
    }

    .submenu {
        position: static;
        margin-left: 12px;
        margin-top: 4px;
    }

    .nav-item:hover > .dropdown-menu,
    .dropdown-category:hover > .submenu {
        display: none; /* Disable hover on mobile */
    }

    /* Click to open on mobile - requires JS */
    .nav-item.active > .dropdown-menu,
    .dropdown-category.active > .submenu {
        display: block;
    }
}

/* Icons in nav items */
.nav-item .icon {
    margin-right: 6px;
    font-size: 1.1em;
}

/* Badge for "New" items */
.badge-new {
    display: inline-block;
    background: #3b82f6;
    color: white;
    font-size: 0.65em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
