But here is the answer to your question:
To keep your PR, you can stay outside Canada for up to 3 years total in any 5 year period. There is no problem leaving for a few months.
When you apply for citizenship, they only look at the last 4 years before you apply. In these 4 years, you need to have at least 1096 days in Canada. That's 3 years total. If you are under 18 and your parents are applying for you, you don't even need to have been in Canada for 3 years, it's enough that your parents have.
When you are getting ready to apply, if one of you finds out that they haven't been in Canada for 1096 days in the last 4 years, it would be best to delay the application until you do because if you apply without meeting the requirements, your application goes through a different process and takes much longer.
To keep your PR, you can stay outside Canada for up to 3 years total in any 5 year period. There is no problem leaving for a few months.
When you apply for citizenship, they only look at the last 4 years before you apply. In these 4 years, you need to have at least 1096 days in Canada. That's 3 years total. If you are under 18 and your parents are applying for you, you don't even need to have been in Canada for 3 years, it's enough that your parents have.
When you are getting ready to apply, if one of you finds out that they haven't been in Canada for 1096 days in the last 4 years, it would be best to delay the application until you do because if you apply without meeting the requirements, your application goes through a different process and takes much longer.