/* Container Grid */
.mec-home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 24px 0;
    width: 100%;
}

/* White Content Card Block Frame */
.mec-home-card {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mec-home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Top Event Image Wrapper */
.mec-home-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f8fafc;
}

.mec-home-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card Content Compartment */
.mec-home-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    font-family: 'Sofia Sans', sans-serif;
    text-align: left;
}

/* Event Title */
.mec-home-title {
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 4px 0;
}

/* Date underneath Title */
.mec-home-date {
    color: #475569;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 16px;
    align-self: flex-start;
}

/* Dynamic Category Tag Badge */
.mec-home-tag {
    align-self: flex-start;
    background-color: #fdf2f2;
    color: #991b1b;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-transform: lowercase;
}

/* Event Excerpt Paragraph text */
.mec-home-excerpt {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 24px 0;
    flex-grow: 1;
}

/* Bottom Anchor Action Link */
.mec-home-link {
    align-self: flex-start;
    color: #1e293b;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s ease;
    margin-top: auto;
}

.mec-home-link:hover {
    opacity: 0.7;
}

/* Responsive Structural Breakpoints */
@media (max-width: 1024px) {
    .mec-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .mec-home-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}