Side Menu to Reveal Content with Accordion on Mobile

hey there,

im trying to build a side menu with a few items that when clicked shows content to its right BUT it has to have a different accordion layout for mobile. see screenshot below. any thoughts on how best to do it? i was trying to prevent having duplicate content that I show and hide depending on viewport.

thanks a million!

my current plan is to use two element groups

  1. for the desktop view that shows and hides content on click
  2. dropdown elements to create the accordion so that only one of them can be open at a time.

and then hide 1 or 2 depending on viewport