Text this: Unveiling the dynamic nexuses between foreign investment, trade openness, energy consumption, and CO2 emissions in South Africa