on.classList.add('active');
    
    const card = button.closest('.site-details');
    const contents = card.querySelectorAll('.tab-content');
    contents.forEach(content => content.classList.remove('active'));
    document.getElementById(tabId).classList.add('active');
}

function expandAll() {
    document.querySelectorAll('.site-card').forEach(card => {
        card.classList.add('expanded');
    });
}

function collapseAll() {
    document.querySelectorAll('.site-card').forEach(card => {
        card.c