I'm not the technical type, but from what I have read, only the aerodynamic centre of the whole aeroplane must be behind the centre of gravity to ensure positive longitudinal stability. However, modern airliners are designed in a way which allows the aerodynamic centre of the wings to be in front of the centre of gravity.
I believe that's possible due to the combination of sweep, washout and a wing section that varies from root to tip. All tricks used on tailless aircraft to manipulate the pitching moment..
Basic Design of Flying Wing Models