Costa Rica restored its forests and switched to renewable energy — what can the world learn from it?