According to Catholic teaching, for an act to be considered morally good, which of the following conditions must be met?