Transport of a passive scalar in a stratified porous medium