Then filter by search term
                filteredDatasets = initialDatasets.filter(dataset => {
                    // Basic fields search
                    const basicMatch = (
                        dataset.title.toLowerCase().includes(searchTerm) ||
                        (dataset.thematic_group && dataset.thematic_group.toLowerCase().includes(searchTerm))
                    );

                    if (basicMatch) return true;

                    // Tags search if tags exist
                    i