function closeModal() {
  document.getElementById("myModal").classList.remove('show');
}

function openModal() {
  document.getElementById("myModal").classList.add('show');
}

document.addEventListener('DOMContentLoaded', function() {
  const modalTrigger = document.getElementById("modalTrigger");
  if (modalTrigger) {
    modalTrigger.addEventListener("click", openModal);
  }

  // Close modal when clicking outside
  document.getElementById("myModal").addEventListener("click", function(e) {
    if (e.target === this) {
      closeModal();
    }
  });
});
