function init() {
    const cards = document.getElementsByClassName('card-wrapper');

    console.log(cards[0]); // Logs the first card-wrapper elementű
    for (let i = 0; i < cards.length; i++) {
        cards[i].addEventListener('click', function() {
            for (let j = 0; j < cards.length; j++) {
                if (j === i) {
                    cards[j].classList.remove('hidden');
                    cards[j].classList.add('active');
                    cards[j].getElementsByClassName('content-wrapper')[0].classList.add('visible');
                    continue;
                }
                cards[j].getElementsByClassName('content-wrapper')[0].classList.remove('visible');
                cards[j].classList.add('hidden');
                cards[j].classList.remove('active');
            }
        });
    }

}

init();