
const tabs = document.querySelectorAll(".book-service-tabs li");
const contents = document.querySelectorAll(".portfolio-tab-content");

function showTab(tabId) {
  contents.forEach((content) => (content.style.display = "none"));
  document.getElementById(tabId).style.display = "block";

  tabs.forEach((tab) => tab.classList.remove("active"));
  document.querySelector(`[data-tab="${tabId}"]`).classList.add("active");
}

tabs.forEach((tab) => {
  tab.addEventListener("click", function () {
    showTab(this.getAttribute("data-tab"));
  });
});

showTab("tab1");
