We investigate the behavior of the critical temperature Tc in superconductor/ferromagnet/superconductor (S/F/S) trilayers in the dirty limit as a function of the ferromagnetic layer thickness df and the S/F interface transparency. We perform Tc calculations using the general self-consistent multimode approach based on the Usadel equations in Matsubara Green's functions technique, and compare the results with the single-mode approximation, widely used in literature. Both methods produce similar results for sufficiently low interface transparency. For transparent interfaces, we obtain a qualitatively different Tc(df) behavior. Using the multimode approach, we observe multiple 0-π transitions in critical temperature, which cannot be resolved by the single-mode approximation. We also calculate the critical S layer thickness at given df when an S/F/S trilayer still has a nonzero critical temperature. Finally, we establish the limits of applicability of the single-mode approximation.