/* Events page "Programme" ([mdb_events]): upcoming events as a grid of cards, or a message when none is planned.
   Cards follow the theme's image-led cards: media first (4:5, the shape of most Instagram posts), the date on it,
   then the day and time, the title, a short text and the Instagram link. */
/* The cards use the page width (like "Ways to gather"), not the section's reading column: 3, 2 or 1 per row. */
.wp-site-blocks .mdb-events-programme > .mdb-events { max-width: var(--mdb-max, 1560px) !important; width: 100%; }
.mdb-events { margin-top: clamp(32px, 4vw, 56px); }
.mdb-events__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 3vw, 48px) clamp(24px, 2.4vw, 40px); margin: 0; padding: 0 !important; list-style: none; }
.mdb-events__grid > li { margin: 0; padding: 0; }
.mdb-event-tile article { display: flex; flex-direction: column; height: 100%; }

.mdb-event-tile__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: rgb(240 238 231 / 6%); }
.mdb-event-tile__media :is(img, video) { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 420ms var(--mdb-motion-ease, ease), filter 420ms ease; }
.mdb-event-tile:hover .mdb-event-tile__media :is(img, video) { filter: saturate(1.04); transform: scale(1.035); }

.mdb-event-tile__date { position: absolute; top: 16px; left: 16px; z-index: 1; display: grid; justify-items: center; min-width: 58px; margin: 0 !important; padding: 8px 10px 9px; border: 1px solid var(--mdb-gold-line, rgb(201 174 121 / 55%)); border-radius: 2px; background: rgb(14 17 16 / 74%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--mdb-white, #f0eee7); line-height: 1; }
.mdb-event-tile__day { font-family: var(--mdb-display-font); font-size: 30px; font-weight: 500; }
.mdb-event-tile__month { margin-top: 4px; color: var(--mdb-gold, #c9ae79); font-family: var(--mdb-ui-font); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }

.mdb-event-tile__motion { position: absolute; right: 14px; bottom: 14px; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgb(240 238 231 / 38%); border-radius: 50%; background: rgb(18 21 20 / 46%); color: #f0eee7; opacity: .8; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .2s ease, border-color .2s ease; }
.mdb-event-tile__motion:is(:hover, :focus-visible) { opacity: 1; border-color: var(--mdb-gold, #c9ae79); }
.mdb-event-tile__motion:focus-visible { outline: 2px solid var(--mdb-gold, #c9ae79); outline-offset: 3px; }
.mdb-event-tile__motion::before { content: ""; width: 10px; height: 12px; background: linear-gradient(90deg, currentColor 0 3px, transparent 3px 7px, currentColor 7px 10px); }
.mdb-event-tile__motion[aria-pressed="true"]::before { width: 11px; margin-left: 3px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }

.mdb-event-tile__body { display: flex; flex: 1; flex-direction: column; padding-top: 22px; }
.mdb-event-tile__when { margin: 0 0 10px !important; color: var(--mdb-gold, #c9ae79) !important; font-family: var(--mdb-ui-font); font-size: 12px !important; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.mdb-event-tile__title { margin: 0 0 12px !important; font-family: var(--mdb-display-font) !important; font-size: clamp(26px, 2.2vw, 32px) !important; font-weight: 500; line-height: 1.15; }
.mdb-event-tile__text { margin: 0 0 18px !important; color: var(--mdb-text-soft, rgb(240 238 231 / 76%)) !important; font-size: 15px !important; line-height: 1.6; }
.mdb-event-tile__link { align-self: flex-start; margin-top: auto; color: var(--mdb-white, #f0eee7) !important; font-family: var(--mdb-ui-font); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-decoration: none !important; border-bottom: 1px solid var(--mdb-gold-line, rgb(201 174 121 / 55%)); padding-bottom: 3px; transition: border-color .2s ease, color .2s ease; }
.mdb-event-tile__link:is(:hover, :focus-visible) { color: var(--mdb-gold, #c9ae79) !important; border-color: var(--mdb-gold, #c9ae79); }

/* No upcoming event: a calm invitation to check back, in the page's own look. */
.mdb-events-empty { display: grid; justify-items: start; gap: 0; max-width: 760px; padding: clamp(32px, 4vw, 56px); border: 1px solid var(--mdb-hairline, rgb(240 238 231 / 12%)); border-radius: 2px; background: radial-gradient(120% 140% at 100% 0%, rgb(201 174 121 / 10%) 0%, transparent 55%), rgb(240 238 231 / 2%); }
.mdb-events-empty__icon { margin-bottom: 22px; color: var(--mdb-gold, #c9ae79); } /* drawn by the theme's icons.css */
.mdb-events-empty__title { margin: 0 0 14px !important; font-family: var(--mdb-display-font) !important; font-size: clamp(30px, 3vw, 42px) !important; font-weight: 400; line-height: 1.1; }
.mdb-events-empty__text { max-width: 54ch !important; margin: 0 0 26px !important; color: var(--mdb-text-soft, rgb(240 238 231 / 76%)) !important; font-size: 16px !important; line-height: 1.65; }
.mdb-events-empty .wp-block-buttons { margin: 0; }

@media (max-width: 1100px) { .mdb-events__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .mdb-events__grid { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  .mdb-event-tile__media :is(img, video) { transition: none; }
  .mdb-event-tile:hover .mdb-event-tile__media :is(img, video) { transform: none; }
}
