.event-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 0 10px 30px 10px; /* Reduced margins for better spacing */
    text-align: center;
    transition: transform 0.3s ease-in-out;
    overflow: hidden;
    padding: 20px; /* Added padding for better internal spacing */
    flex: 0 0 30%; /* Set the width to fit three items in a row */
}

.event-item:hover {
    transform: scale(1.05);
}

.event-header {
    background-color: #ffd1dc; /* Pastel color for the header */
    padding: 10px;
    border-radius: 10px 10px 0 0; /* Rounded corners for the top */
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin: -20px -20px 20px -20px; /* Adjusted margin to align with the padding */
}

.event-date {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.event-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
}

.event-description {
    font-size: 1rem;
    color: #666;
    padding: 0 0; /* Added padding to the description for better spacing */
}

@media (max-width: 768px) {
    .event-item {
        flex: 0 0 100%; /* Full width on mobile */
        margin: 10px 0; /* Adjusted margins for mobile view */
    }
}

.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the items */
}
