/* ─── NAVBAR ─── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 0;
    height: 60px;
    padding: 0 16px;
    background: #EDE9FE;
    border-bottom: 1px solid #8B5CF6;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 20px;
    flex-shrink: 0;
    min-width: auto;
    gap: 12px;
}

.logo-icon {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-main {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #2E1065;
}

.skill-text {
    color: #0A54B3 !important; 
}

.hub-text {
    color: #00BFA5 !important;
}

.logo-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 2px;
}

/* Categories dropdown */
.nav-dropdown {
    position: relative;
    flex-shrink: 0;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #2E1065;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    white-space: nowrap;
    user-select: none;
    transition: border-color 0.15s;
}

.nav-dropdown-trigger i {
    font-size: 11px !important;
}

.nav-dropdown-trigger:hover {
    border-color: #A78BFA;
    color: #A78BFA;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #EDE9FE;
    border: 1px solid #8B5CF6;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    min-width: 220px;
    z-index: 600;
    border-radius: 4px;
}

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

.nav-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 14px;
    color: #2E1065;
    text-decoration: none;
    transition: background 0.12s;
}

.nav-dropdown-item:hover {
    background: #F5F3FF;
    color: #A78BFA;
}

/* Search */
.nav-search {
    flex: 1;
    max-width: 520px;
    min-width: 120px;
    margin: 0 12px;
    display: flex;
    align-items: center;
    border: 1px solid #8B5CF6;
    border-radius: 100px;
    overflow: hidden;
    background: #F5F3FF;
}

.nav-search-icon {
    background: none;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    color: #2E1065;
    font-size: 14px;
    flex-shrink: 0;
}

.nav-search form {
    display: flex;
    flex: 1;
}

.nav-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    padding: 8px 14px 8px 0;
    background: transparent;
    color: #2E1065;
    min-width: 0;
}

/* Nav right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-link {
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 500;
    color: #2E1065;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: color 0.15s, border-color 0.15s;
}

.nav-link:hover {
    color: #8B5CF6;
}

.nav-btn-outline {
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #2E1065;
    text-decoration: none;
    border: 1.5px solid #2E1065;
    border-radius: 4px;
    transition: background 0.15s;
    white-space: nowrap;
}

.nav-btn-outline:hover {
    background: #8B5CF6;
    border-color: #8B5CF6;
    color: #fff;
}

.nav-btn-primary {
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #F5F3FF;
    background: #8B5CF6;
    text-decoration: none;
    border: 1.5px solid #8B5CF6;
    border-radius: 4px;
    transition: background 0.15s;
    white-space: nowrap;
}

.nav-btn-primary:hover {
    background: #7C3AED;
    border-color: #7C3AED;
}

.nav-icon {
    font-size: 18px;
    color: #2E1065;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-icon:hover {
    background-color: rgba(139, 92, 246, 0.2);
    color: #2E1065;
}

.nav-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    background: #ff4d4d;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff; /* Authentic cutout border */
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 50;
    line-height: normal;
    padding: 0 3px;
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #8B5CF6;
    color: #F5F3FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 8px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.nav-avatar:hover {
    border-color: #2E1065;
}

.nav-user-dropdown {
    position: relative;
}

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

.nav-user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: #EDE9FE;
    border: 1px solid #8B5CF6;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    z-index: 600;
    border-radius: 4px;
    overflow: hidden;
}

.nav-user-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 6px;
}

.nav-user-menu-header {
    padding: 12px 16px;
    border-bottom: 1px solid #8B5CF6;
}

.nav-user-menu-header .name {
    font-weight: 700;
    font-size: 14px;
    color: #2E1065;
}

.nav-user-menu-header .email {
    font-size: 12px;
    color: #7C3AED;
    word-break: break-all;
}

.nav-user-menu a,
.nav-user-menu button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    color: #2E1065;
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.12s;
}

.nav-user-menu a:hover,
.nav-user-menu button:hover {
    background: #F5F3FF;
    color: #8B5CF6;
}

.nav-user-menu-divider {
    border-top: 1px solid #8B5CF6;
    margin: 4px 0;
    opacity: 0.3;
}

.nav-mobile-toggle {
    display: none;
    font-size: 22px;
    color: #2E1065;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

/* ─── DESKTOP/LAPTOP ADAPTATION ─── */
@media (max-width: 1200px) and (min-width: 861px) {
    .nav-logo {
        margin-right: 12px;
        gap: 8px;
    }
    .logo-main {
        font-size: 18px;
    }
    .logo-icon {
        height: 28px;
    }
    .logo-tagline {
        display: none;
    }
    .nav-dropdown-trigger {
        padding: 6px 8px;
        font-size: 13px;
    }
    .nav-search {
        max-width: 260px;
        margin: 0 8px;
    }
    .nav-link {
        padding: 6px 7px;
        font-size: 13px;
    }
    .nav-icon {
        padding: 6px;
        font-size: 16px;
    }
    .nav-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
        margin-left: 4px;
    }
}

/* ─── TABLET & MOBILE RESPONSIVE ─── */
@media (max-width: 860px) {
    .navbar {
        height: 60px;
        padding: 0 12px;
        position: relative;
    }

    .nav-mobile-toggle {
        display: block;
        order: 1;
    }

    .nav-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        font-size: 18px;
    }

    .nav-dropdown,
    .nav-search {
        display: none !important; /* Managed by JS/Toggle */
    }

    .nav-right {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #EDE9FE;
        flex-direction: column;
        padding: 12px 0;
        box-shadow: 0 6px 16px rgba(0,0,0,0.15);
        border-top: 1px solid #8B5CF6;
        z-index: 1000;
        gap: 0;
    }

    .nav-right.mobile-visible {
        display: flex !important;
    }

    .nav-right .nav-link,
    .nav-right .nav-icon,
    .nav-right .nav-btn-outline,
    .nav-right .nav-btn-primary {
        width: 100%;
        padding: 12px 24px;
        border: none;
        border-radius: 0;
        justify-content: flex-start;
        text-align: left;
        font-size: 15px;
    }

    .nav-avatar {
        display: none; /* Hide in mobile menu or show at top */
    }
}

@media (max-width: 412px) {
    /* Pixel Specific */
    .logo-main {
        font-size: 17px;
    }
}
