There are three types of more complex conditionals in Latin, all of which take the subjunctive and all of which relate to less concrete (or more abstract) situations. I recommend that you approach these like formulas to be learnt, and then aim to plug in the correct formula when needed in a text. Here they are, with their easier and more technical names (I tend just to use the former).
(i) A were-would clause (or “contrary-to-fact present”): imperfect subjunctive in both halves.
si veniret, laetum essem, “If he were to come, I would be happy.” These are for something that’s possible, but not immediately probable.
(ii) A had-would have clause (or “contrary-to-fact past”): pluperfect subjunctive in both halves.
si venisset, laetus fuissem. “If he had come, I would have been happy.” These are distinguished by the fact that they are no longer possible; you can always add a but to the first half. “If he had come (but he didn’t), I would have been happy.”
(iii) A should-would clause (or “future less vivid”): present subjunctive in both halves.
si veniat, laetus sim. ‘If he should come, I would be happy’. The circumstance imagined in a should-would clause is possible, and more probable than in type (i).