;
                }
            }
        }

        // Update the modal functions
        function openModal() {
            const modal = document.getElementById('teamModal');
            if (modal) {
                modal.style.display = "block";
            } else {
                console.error("Team modal element not found");
            }
        }

        function closeModal() {
            const modal = document.getElementById('teamModal');
            if (modal) {
                modal.style.disp