A train travels between two cities, City A and City B. The journey consists of three segments.
For the first 1/3 of the journey, the train travels at an average speed of 60 miles per hour.
For the next 1/4 of the journey, the train speeds up to 80 miles per hour.
For the remaining part of the journey, the train slows down to 40 miles per hour.
If the total distance between City A and City B is 180 miles, how long does the entire journey take?