title: How to show clickable buttons and sub buttons using flex property
body: <p>I am new to web development, I am looking for a similar code to get the result as in the picture attached which is a responsive design with flex property of CSS. Once item1 is clicked the sub items should be visible and if we change the view to mobile they should be visible in a list. Does anyone has an idea about a similar code or can give me a hint. How to do it.</p>
  <p><a href="https://i.stack.imgur.com/YzImQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YzImQ.png" alt="enter image description here" /></a></p>