/* Event card: image, category tag, date badge, time, title, place and the
 * registration action. The same markup renders inside a list item on the home
 * page and inside a result link on the search page.
 */

.event {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(22, 36, 27, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.event:hover,
.event:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(22, 36, 27, 0.1);
}

.event-detail-link {
    display: block;
}

.event-thumb {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: var(--chip);
}

.event-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 16px;
}

.event-tag {
    align-self: flex-start;
    max-width: 100%;
    margin: 0;
    padding: 4px 10px;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: var(--chip);
    color: var(--leaf-dark);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.archived-tag {
    background: #e8eee9;
    color: var(--muted);
}
.event-when {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
}

.event-date {
    margin: 0;
    padding: 5px 10px;
    border-radius: 10px;
    background: var(--chip);
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 700;
}

.event-time {
    margin: 0;
    color: var(--leaf);
    font-size: 0.88rem;
    font-weight: 600;
}

.event-title {
    margin: 2px 0 0;
    font-size: 1.05rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.event-title a {
    color: inherit;
    text-decoration: none;
}

.event-title a:hover {
    text-decoration: underline;
}

.event-where {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.event-description {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.88rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch);
    margin-top: auto;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    background: var(--leaf);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s ease;
}

.register:hover {
    background: var(--leaf-dark);
}

/* A cancelled event keeps its slot but offers no registration link. */
.register.is-cancelled,
.register.is-cancelled:hover {
    background: var(--chip);
    color: var(--muted);
    cursor: default;
}

@media (prefers-reduced-motion: reduce) {
    .event,
    .register {
        transition: none;
    }

    .event:hover,
    .event:focus-within {
        transform: none;
    }
}
