document.addEventListener("DOMContentLoaded", function () {
const summaryItems = document.querySelectorAll(".summary-item"); // Adjust selector if necessary
const today = new Date().setHours(0, 0, 0, 0);
summaryItems.forEach(item => {
const dateElement = item.querySelector(".summary-metadata-item--date"); // Adjust selector if needed
if (dateElement) {
const eventDate = new Date(dateElement.textContent.trim()).setHours(0, 0, 0, 0);
if (eventDate < today) {
item.classList.add("past-event");
} else {
item.classList.add("upcoming-event");
}
}
});
});