e;
                });

                // Then filter by thematic group
                if (activeThematicFilters.length > 0) {
                    filteredDatasets = filteredDatasets.filter(dataset =>
                        dataset.thematic_group && activeThematicFilters.includes(dataset.thematic_group)
                    );
                }

                // Then filter by tags
                if (activeTagFilters.length > 0) {
                    filteredDatasets = filteredDatasets.filter(dataset =