I'm a very fresh DM in 5e, having never played the game before, although I have played computer games based on DnD. Likewise, all of my friends are first time players so we're trying to teach each other the game as we progress. We decided to try play the Lost Mine of Phandelver adventure and it's going well, but I'm worried that as a DM I'm not really handling surprise properly.
For example, in the Lost Mines story it starts with the goblin ambush. In my case, once the party was quite close to the ambush, I rolled the stealth for each goblin and 3 out of 4 came under 15, which was the passive Perception of our ranger, so the ranger noticed the goblins while others were surprised (nobody was actively looking). I also took the approach that once either side notices the other and they aren't sneaking, combat starts (provided the creatures are hostile), so once the ranger noticed the goblins the combat was on and everybody rolled initiative.
However, is there a limit to passive perception, or does it extend to the edge of normal vision? So if a character is walking in broad daylight, can they spot a goblin ambush from, for example, 300 ft away, or is it up to me as a DM to determine if they have to be, say 50 ft from the ambush to notice? Likewise, would the goblins see the players advancing down the road from hundreds of feet away? I saw the section about the range of passive Perception to find traps in the player handbook, but nothing on this issue.
If I were to rely on my guts, I would say that the goblins can see the players coming down the road (no chance of hiding in plain sight), and would attack when the players are within 80 ft (normal range of their shortbow), while players would have no chance of spotting goblins hiding in the bushes, but this would mean the players would always be surprised, which I think would unfairly disadvantage people who have invested in Wisdom/Perception.
I know that I shouldn't get hung up on rules and ultimately it's my call, but I was just wondering if there is something written on this in the handbook that I have missed? I don't want to mishandle an important game mechanic.