Dual-level Behavioral Consistency for Inter-group and Intra-group Coordination in Multi-Agent Systems