Supreme Court ruling gives hope to parents in custody cases