/* ──────────────────────────────────────────────────────────────────
   Past Events Grid Styles
   ────────────────────────────────────────────────────────────────── */

.er-past-events-container {
    width: 100%;
    /* Typically full width for Divi rows or specific max-width based on parent. We'll let Divi control max-width, but just in case: */
    position: relative;
    padding: 20px 0;
}

.er-past-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.er-past-event-card {
    background-color: #252525;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.er-past-event-card:hover {
    transform: translateY(-5px);
}

.er-past-event-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.er-past-event-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    background-color: #111;
}

.er-past-event-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.er-past-event-date {
    color: #fff;
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 500;
}

h3.er-past-event-title {
    color: #FF8DA1 !important;
    font-size: 26px !important;
    font-weight: 400;
    margin: 0 0 20px 0;
    line-height: 1.3;
    font-family: inherit;
}

.er-past-event-excerpt {
    color: #e0e0e0;
    font-size: 15px;
    line-height: 1.6;
    margin-top: auto;
}

/* Pagination Styles */
.er-past-events-pagination {
    margin-top: 50px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.er-past-events-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #252525;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.er-past-events-pagination .page-numbers:hover {
    background-color: #FF8DA1;
    color: #ffffff !important;
}

.er-past-events-pagination .page-numbers.current {
    background-color: #FF8DA1;
    color: #ffffff !important;
    font-weight: bold;
}

.er-past-events-pagination .next,
.er-past-events-pagination .prev {
    width: auto;
    padding: 0 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .er-past-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .er-past-events-grid {
        grid-template-columns: 1fr;
    }

    .er-past-event-content {
        padding: 25px 20px;
    }

    h3.er-past-event-title {
        font-size: 22px !important;
    }
}