лесу.</p>
    </div>
    <div class="tabpanel" role="tabpanel" id="tabpanel-2" tabindex="0" aria-labelledby="tab-2">
      <p>Травоядные животные, которые живут на мелководье.</p>
    </div>
  </div>

  <script>
    const hideTabpanel = 'tabpanel--hidden'
    let tabpanels = []
    let tabs = []
    let firstTab = null
    let lastTab = null

    tabs = Array.from(document.querySelectorAll('.tab'))

    tabpanels = tabs.map((tab) => {
      const tabpanel = docu