/* [rsm_upcoming_events] — mobile-first.
   Phones (~90% of traffic): vertical stack, card order = chronological priority.
   Desktop (>=768px, Divi breakpoint): 3-across grid.
   Brand: green #046a38, blue #005F86, gold #CBA052.
   Images arrive pre-normalized to 600x338 (16:9); aspect-ratio guards the
   slot so layout never shifts, even before the image loads. */

.rsm-events {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25em;
    max-width: 1080px;
    margin: 0 auto;
}

.rsm-events-none {
    text-align: center;
    color: #555;
    font-style: italic;
    padding: 2em 1em;
}

.rsm-event-card {
    background: #fff;
    border: 1px solid #e2e8ef;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rsm-event-media {
    display: block;
    aspect-ratio: 16 / 9;
    background: #f4f6f8;   /* shows while image loads / behind any padding bars */
}

.rsm-event-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;   /* image is already 16:9-canvased; belt and suspenders */
}

.rsm-event-body {
    padding: 1em 1.1em 1.2em;
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}

.rsm-event-date {
    color: #CBA052;
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.rsm-event-title {
    color: #046a38;
    font-size: 1.15em;
    line-height: 1.3;
    margin: 0;
    overflow-wrap: break-word;
}

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

.rsm-event-title a:hover,
.rsm-event-title a:focus {
    color: #005F86;
    text-decoration: underline;
}

.rsm-event-loc {
    color: #005F86;
    font-size: 0.9em;
    margin: 0;
}

.rsm-event-blurb {
    color: #444;
    font-size: 0.92em;
    line-height: 1.5;
    margin: 0.35em 0 0;
    overflow-wrap: break-word;
}

/* ---- Tablet / desktop: three cards across ---- */
@media (min-width: 768px) {
    .rsm-events {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5em;
    }
}
