Merge overlapping/adjacent intervals that carry the SAME specialty.
Same-specialty only, because two windows with different specialties are
genuinely different offers — merging "09:00–12:00 dermatology" with
"11:00–14:00 general" would either invent dermatology slots at 13:00 or lose
them at 09:00. Different-specialty overlaps are left alone and resolved at
slot generation, where the requested specialty picks which ones count.
Merge overlapping/adjacent intervals that carry the SAME specialty.
Same-specialty only, because two windows with different specialties are genuinely different offers — merging "09:00–12:00 dermatology" with "11:00–14:00 general" would either invent dermatology slots at 13:00 or lose them at 09:00. Different-specialty overlaps are left alone and resolved at slot generation, where the requested specialty picks which ones count.