public long Id {get; set;}
public string Category {get; set;}
public string Name {get; set; }
public string Value {get; set;}
public long Id {get; set;}
public string Name {get; set; }
public string Value {get; set;}
List<Item> list = new List<Item>() {
new Item { Id = 1, Category = "Categoria 1", Name = "Name 1", Value = "Value 100"},
new Item { Id = 2, Category = "Categoria 2", Name = "Name 2", Value = "Value 200"},
new Item { Id = 3, Category = "Categoria 2", Name = "Name 3", Value = "Value 300"},
new Item { Id = 4, Category = "Categoria 3", Name = "Name 4", Value = "Value 400"}
var data = new Dictionary<string, Dictionary<string, List<Item2>>>();
if (!data.ContainsKey(x.Category))
data[x.Category] = new Dictionary<string, List<Item2>>();
data[x.Category]["Benefits"] = new List<Item2>();
data[x.Category]["Benefits"].Add(new Item2() { Id = x.Id, Name = x.Name, Value = x.Value });
display: -webkit-box !important;
display: flex !important;
-webkit-flex-wrap: wrap !important;
flex-wrap: wrap !important;
-webkit-box-pack: center;
justify-content: space-between !important;
margin-bottom: 10px !important;
padding-right: 2px !important;
margin-bottom: 35px !important;
padding-right: 2px !important;
background: rgba(40, 85, 160, 0.12) !important;
display: -webkit-box !important;
display: flex !important;
-webkit-box-pack: center;
justify-content: center !important;
align-items: center !important;
body,table,td{font-family:Helvetica,Arial,sans-serif !important}.ExternalClass{width:100%}.ExternalClass,.ExternalClass p,.ExternalClass span,.ExternalClass font,.ExternalClass td,.ExternalClass div{line-height:150%}a{text-decoration:none}*{color:inherit}a[x-apple-data-detectors],u+#body a,#MessageViewBody a{color:inherit;text-decoration:none;font-size:inherit;font-family:inherit;font-weight:inherit;line-height:inherit}img{-ms-interpolation-mode:bicubic}table:not([class^=s-]){font-family:Helvetica,Arial,sans-serif;mso-table-lspace:0pt;mso-table-rspace:0pt;border-spacing:0px;border-collapse:collapse}table:not([class^=s-]) td{border-spacing:0px;border-collapse:collapse}@@media screen and (max-width: 800px){.d-inline-block{display:inline-block !important}.w-full,.w-full>tbody>tr>td{width:100% !important}*[class*=s-lg-]>tbody>tr>td{font-size:0 !important;line-height:0 !important;height:0 !important}.s-2>tbody>tr>td{font-size:8px !important;line-height:8px !important;height:8px !important}.s-4>tbody>tr>td{font-size:16px !important;line-height:16px !important;height:16px !important}.s-5>tbody>tr>td{font-size:20px !important;line-height:20px !important;height:20px !important}.s-7>tbody>tr>td{font-size:28px !important;line-height:28px !important;height:28px !important}.s-10>tbody>tr>td{font-size:40px !important;line-height:40px !important;height:40px !important}}
@foreach(var item in data) {
@foreach(var benefit in item.Value["Benefits"]) {