/* ==========================================================
   4.5.4 — Events Directory Cleanup
   A focused final pass for consistent event art, action hierarchy,
   completed-event archives, and responsive directory presentation.
   ========================================================== */

/* More restrained directory heading. */
.events-directory__heading h2 {
    max-width: 720px;
    font-size: clamp(3.2rem, 4.8vw, 5.35rem);
    line-height: .94;
}
.events-directory__heading > p {
    max-width: 700px;
}

/* Upcoming event cards: one consistent flyer window and action rhythm. */
.event-directory-card {
    align-items: stretch;
}
.event-directory-card__media {
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 5;
    align-self: center;
    margin-block: 1.35rem;
    border: 1px solid rgba(104,17,38,.09);
    border-radius: 18px;
    background: linear-gradient(145deg, #fffdf9, #f7ece7);
    box-shadow: 0 16px 36px rgba(76,42,51,.07);
}
.event-directory-card__media img {
    width: 100%;
    height: 100%;
    padding: .8rem;
    object-fit: contain;
    object-position: center;
}
.event-directory-card__media-label {
    right: .75rem;
    bottom: .75rem;
    left: .75rem;
}
.event-directory-card__media-label span {
    padding: .52rem .72rem;
    font-size: .54rem;
}
.event-directory-card__content {
    padding-block: clamp(2rem,3vw,3rem);
}
.event-directory-card__content h3 {
    max-width: 820px;
    font-size: clamp(2.45rem,3.4vw,3.95rem);
    line-height: .98;
}
.event-directory-card__summary {
    max-width: 780px;
}
.event-directory-card__facts {
    max-width: 860px;
}
.event-directory-card__actions {
    gap: .65rem;
}
.event-directory-card__actions .button {
    min-width: 142px;
    justify-content: center;
    text-align: center;
}
.event-directory-card__actions .button--primary {
    order: 2;
}
.event-directory-card__actions .button--quiet:first-child {
    order: 1;
}
.event-directory-card__actions .event-document-link {
    order: 3;
}

/* Completed gatherings read as a deliberate editorial archive. */
.events-history__grid {
    grid-template-columns: 1fr !important;
    max-width: 1320px;
    margin-inline: auto;
    gap: clamp(1.5rem,2.8vw,2.4rem);
}
.event-history-card {
    grid-template-columns: minmax(270px, 350px) minmax(0,1fr);
    align-items: center;
    min-height: 0;
    overflow: hidden;
}
.event-history-card__media {
    position: relative;
    align-self: center;
    min-height: 0 !important;
    aspect-ratio: 4 / 5;
    margin: 1.25rem 0 1.25rem 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(104,17,38,.10);
    border-radius: 20px;
    background: linear-gradient(145deg,#f8eee8,#efe1dc);
    box-shadow: 0 15px 34px rgba(76,42,51,.08);
}
.event-history-card__media > a,
.event-history-card__media > button,
.event-history-card__media img,
.event-history-card__monogram {
    width: 100%;
    height: 100%;
    min-height: 0 !important;
}
.event-history-card__media > a,
.event-history-card__media > button {
    display: block;
}
.event-history-card__media img {
    object-fit: contain;
    object-position: center;
    background: #f7ece7;
}
.event-history-card__media::after {
    background: linear-gradient(180deg, rgba(255,250,246,.015) 0%, rgba(90,42,57,.02) 62%, rgba(67,29,41,.18) 100%);
}

/* Completed label stays unmistakable without covering the center of the flyer. */
.event-history-card__completion-mark {
    top: 1rem;
    right: 1rem;
    bottom: auto;
    left: 1rem;
    width: auto;
    padding: .72rem .85rem .68rem;
    transform: none;
    border-radius: 14px;
    background: rgba(79,35,49,.94);
    text-align: left;
}
.event-history-card__completion-mark::before,
.event-history-card__completion-mark::after {
    display: none;
}
.event-history-card__completion-mark small {
    font-size: .48rem;
    letter-spacing: .14em;
}
.event-history-card__completion-mark strong {
    margin: .15rem 0 .12rem;
    font-size: clamp(1.45rem,2.2vw,1.9rem);
    line-height: .96;
}
.event-history-card__completion-mark span {
    font-size: .50rem;
    line-height: 1.35;
}

/* If a gallery exists, the visible CTA belongs in the copy, not twice on the image. */
.event-history-card--gallery .event-history-card__media-action {
    display: none !important;
}
.event-history-card__media > button > .event-history-card__media-action {
    right: .75rem;
    bottom: .75rem;
    left: .75rem;
    padding: .62rem .72rem;
    border-radius: 12px;
    font-size: .58rem;
}
.event-history-card__copy {
    padding: clamp(1.8rem,3.2vw,3rem);
}
.event-history-card__copy h3 {
    max-width: 720px;
    font-size: clamp(2.45rem,3.4vw,3.9rem);
    line-height: .98;
}
.event-history-card__copy p {
    max-width: 720px;
}
.event-history-card__actions .button {
    min-width: 155px;
    justify-content: center;
    text-align: center;
}

/* The archive section should end cleanly after the last card. */
.events-history {
    padding-bottom: clamp(4rem,7vw,7rem);
}

@media (max-width: 1120px) {
    .event-directory-card {
        grid-template-columns: 100px minmax(235px,300px) minmax(0,1fr);
    }
    .event-history-card {
        grid-template-columns: minmax(250px,320px) minmax(0,1fr);
    }
}

@media (max-width: 900px) {
    .event-directory-card__media {
        aspect-ratio: 4 / 5;
        margin: 1rem;
    }
    .event-history-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .event-history-card__media {
        width: min(420px,calc(100% - 2rem));
        margin: 1rem auto 0;
    }
    .event-history-card__copy {
        padding-top: 1.25rem;
    }
}

@media (max-width: 620px) {
    .events-directory__heading h2 {
        font-size: clamp(2.8rem,13vw,4rem);
    }
    .event-directory-card__media {
        width: min(420px,calc(100% - 2rem));
        margin: 1rem auto;
    }
    .event-directory-card__actions,
    .event-history-card__actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .event-directory-card__actions .button,
    .event-history-card__actions .button {
        width: 100%;
    }
}
