/* Shared events listing, homepage and training cards. */
.events-hero { background: var(--blue); color: white; padding: calc(var(--site-header-height) + 3rem) clamp(1.3rem, 8vw, 9rem) 3.5rem; }
.events-hero .eyebrow { color: var(--yellow); }
.events-hero h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1.05; max-width: 22ch; margin: .75rem 0; }
.events-hero p { max-width: 48rem; line-height: 1.7; }
.events-section { padding: 3.5rem clamp(1.3rem, 8vw, 9rem); background: var(--paper, #faf9f5); color: var(--blue); }
.events-section h2 { font-size: clamp(2rem, 3.7vw, 3.4rem); line-height: 1.1; margin: 0 0 1.5rem; }
.events-section > p { line-height: 1.7; }
.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.event-card { background: #fff; border: 1px solid #d9dce7; border-top: .3rem solid var(--blue); border-radius: 16px; padding: 1.5rem; min-width: 0; color: var(--blue); }
.event-card[data-next] { border-top-color: var(--red); }
.event-card h3 { font-size: 1.35rem; line-height: 1.35; margin: 1rem 0; }
.event-card p, .event-card dd { line-height: 1.6; }
.event-card dl { margin: 1rem 0; }
.event-card dt { font-weight: 800; font-size: .85rem; margin-top: .8rem; }
.event-card dd { margin: .2rem 0 0; }
.event-badges { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.event-badge { font-size: .75rem; font-weight: 800; line-height: 1.5; letter-spacing: .04em; text-transform: uppercase; }
.event-status { display: inline-flex; align-items: center; gap: .4rem; color: #505777; font-size: .8rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.event-status::before { content: ""; width: .4rem; height: .4rem; flex: 0 0 .4rem; border-radius: 50%; background: currentColor; }
.event-card[data-status="CANCELLED"] .event-status { color: var(--red); }
.event-card .event-participation { margin: 1.25rem 0 0; padding-top: .85rem; border-top: 1px solid #e4e6ee; color: #505777; font-size: .85rem; font-weight: 500; line-height: 1.5; }
.event-next { color: var(--red); font-weight: 800; }
.event-card a, .events-section > a, .events-section p a { text-decoration: underline; text-underline-offset: .2em; font-weight: 700; }
.event-actions { display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; margin-top: 1rem; }
.event-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.event-image { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; }
.event-filters { display: flex; flex-wrap: wrap; gap: .6rem; border: 0; margin: 0 0 1.5rem; padding: 0; }
.event-filters legend { font-weight: 800; margin-bottom: .75rem; }
.event-filters button { background: white; color: var(--blue); border: 2px solid var(--blue); border-radius: 999px; padding: .65rem 1rem; min-height: 44px; font: inherit; cursor: pointer; }
.event-filters button[aria-pressed="true"] { background: var(--blue); color: white; }
.event-empty { padding: 1.4rem; background: #edf0f7; border-radius: 12px; line-height: 1.7; }
.events-recruitment { background: var(--red); color: white; }
.events-recruitment p { max-width: 52rem; }
.events-recruitment .event-actions a { color: white; }
.events-recruitment .event-actions .button-light { background: white; color: var(--blue); }
.events-section :where(a, button):focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
[hidden] { display: none !important; }
/* Reserve the filters' natural, wrapping height before enhancement reveals them.
   With scripting disabled, the hidden controls still take up no space. */
@layer base {
  @media (scripting: enabled) {
    .event-filters[hidden] { display: flex !important; visibility: hidden; }
  }
}
@media (max-width: 1050px) { .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .event-grid { grid-template-columns: minmax(0, 1fr); } .events-section { padding-block: 2.5rem; } }
