They were all based firmly in fantasy. Just because they were set in space doesn't change that. The science elements, remember, were fantasy too.

I think you're splitting hairs. But my definition of Fantasy would be more akin to Potter or Lord of the Rings whereas Trek is sci-fi

In other words, fantasy employs zero or very little scientific conjecture or reality to the plot where as Trek [or other sci-fi] attempts to make make their 'science,' plausible at some point in the future.

Nonetheless I agree Trek has some fantasy elements - the magical crystals that power the ships being one. And some of the omnipotent beings they come accross through the series.