The basic sentence is "Afternoons are fun." The prepositional phrase that is used as an adjective telling WHICH afternoons are fun (the ones "with friends") should be kept close to the noun it describes, in this case it is "afternoons."
So i got a clue, divertido in Spanish is considered an adjective whereas fun in English is considered a noun. This demands a sense of humor in translating from one language to another. I hope this helps.