card = header.closest('.site-card');
    card.classList.toggle('expanded');
}

function showTab(button, tabId) {
    const tabs = button.parentElement.querySelectorAll('.detail-tab');
    tabs.forEach(tab => tab.classList.remove('active'));
    button.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('a