Add responsive feature for offset calculation