.epf-event-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.epf-event-to-be-confirmed {
    font-weight: 700;
    text-transform: uppercase;
}

.epf-events-intro .epf-events-today-key {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.6;
}

.epf-events-today-key > span {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    background: #000;
}

.epf-events-shell .epf-event-card.epf-event-card--today .epf-event-card-heading {
    background: #173e39;
    color: #fffdf0;
}

.epf-event-card .epf-event-cancelled {
    color: #c00000;
    text-transform: uppercase;
}

section.epf-event-information h2 {
    font-weight: 500;
    font-size: 48px;
    line-height: 1.2em;
    color: #000;
}

section.epf-event-information .epf-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 16px 0 28px;
    flex-direction: column;
}

.epf-event-meta p {
    font-size: 18px;
}

.events time {
    color: #f79a33;
    font-weight: 600;
}

section.epf-event-information .epf-event-details {
    margin: 32px 0;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.epf-event-details > .event-thumb {
    display: block;
    flex: 0 0 calc((100% - 20px) * .2);
    width: calc((100% - 20px) * .2);
    min-width: 0;
    max-width: none;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.epf-event-details > .epf-event-details-text {
    flex: 1 1 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.epf-event-details-text p {
    font-size: 18px;
    color: #000;
}

@media (max-width: 767px) {
    .epf-event-details > .event-thumb {
        display: none;
    }
}

nav.epf-event-calendar {
    padding: 0 0 20px;
}

nav.epf-event-calendar a {
    display: inline-block;
    padding: 4px 2px;
    color: #083b4a;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
    border-radius: 3px;
    transition: background-color 200ms ease, color 200ms ease;
}

nav.epf-event-calendar a:hover,
nav.epf-event-calendar a:focus-visible {
    background-color: #fffdf0;
    color: #000;
    text-decoration-thickness: 2px;
}

nav.epf-event-calendar a:focus-visible {
    outline: 3px solid #083b4a;
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    nav.epf-event-calendar a {
        transition: none;
    }
}

header.epf-events-intro.epf-events-intro--standalone h2 {
    color: #000;
    font-weight: 500;
    font-size: 48px;
    line-height: 1.2em;
}

header.epf-events-intro.epf-events-intro--standalone p {
    font-size: 18px;
    line-height: 1.6em;
    color: #000;
    font-weight: 500;
}

.epf-events-shell .epf-event-card .epf-event-card-heading {
    flex-shrink: 0;
    box-sizing: border-box;
    margin: 0;
    font-family: "DIN Neuzeit Grotesk";
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2em;
    color: #000;
    letter-spacing: -0.02em;
    background-color: #fffdf0;
    height: calc(2.4em + 20px);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    border-radius: 7px 7px 0 0;
}

.epf-event-card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    max-height: 2.4em;
}

.epf-event-card-summary {
    display: grid;
    grid-template-columns: minmax(0, 45%) minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    padding: 0 20px 18px;
}

.epf-event-card-summary .epf-event-card-image {
    display: block;
    width: 100%;
    max-width: 116px;
    height: auto;
    aspect-ratio: 1;
    margin: 0;
    object-fit: cover;
}

.epf-event-card-summary .epf-event-card-image--logo {
    object-fit: contain;
}

.epf-event-card-schedule {
    min-width: 0;
}

.epf-events-shell .epf-event-card .epf-event-card-schedule p {
    padding: 0 20px 0 0;
    margin: 0 0 16px;
    text-align: right;
}

.epf-events-shell .epf-event-card .epf-event-card-schedule p:last-child {
    margin-bottom: 0;
}

.epf-events-shell .epf-event-card p {
    margin: 8px 0;
    padding: 0 10px;
}

.epf-events-shell .epf-event-card > .epf-event-card-button {
    display: block;
    flex-shrink: 0;
    box-sizing: border-box;
    width: calc(100% - 40px);
    margin: auto 20px 20px;
    padding: 10px 18px;
    border: 1px solid #a8c0b9;
    border-radius: 0;
    background: #fff;
    color: #173e39;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
    text-transform: none;
    text-decoration: none;
    letter-spacing: normal;
}

.epf-events-shell .epf-event-card > p:last-of-type {
    margin-bottom: 20px;
}

.epf-events-shell .epf-event-card > .epf-event-card-button:hover {
    background: #d8f0f4;
}

.epf-events-shell .epf-event-card > .epf-event-card-button:focus-visible {
    outline: 3px solid #173e39;
    outline-offset: 3px;
}

.epf-event-card:hover {
    box-shadow: none;
    background-color: #f6fdff;
}

@media (max-width: 980px) {
    .epf-event-card-summary img,
    .epf-event-card-summary .epf-event-card-image--logo {
        display: none !important;
    }

    .epf-event-card-summary {
        gap: 0;
        padding: 0 20px 18px;
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        flex-wrap: wrap;
        flex-direction: row;
        align-content: flex-start;
        text-align: left;
    }

    .epf-events-shell .epf-event-card .epf-event-card-schedule p {
        text-align: left;
    }
}

@media (max-width: 767px) {
    .epf-events-shell .epf-event-card .epf-event-card-schedule p {
        margin: 0 0 5px;
    }
}

.epf-calendar-frame.et_pb_row {
    min-height: 0 !important;
    padding: 0 !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    scroll-margin-top: 120px;
}

.epf-calendar-frame > .et_pb_column {
    margin: 0 !important;
    padding: 0 !important;
}

.epf-calendar-frame:not(.epf-calendar-ready),
.epf-calendar-frame.epf-calendar-unframed {
    background-image: none !important;
}

.epf-calendar-frame.epf-calendar-ready:not(.epf-calendar-unframed) {
    background-image: none !important;
    border-style: solid;
    border-color: transparent;
    border-width: var(--epf-calendar-top, 0px) var(--epf-calendar-side, 0px) var(--epf-calendar-bottom, 0px);
    border-image-source: var(--epf-calendar-image);
    border-image-slice: 24% 7% 7% fill;
    border-image-width: 1;
    border-image-repeat: stretch;
    box-sizing: border-box;
}

.epf-calendar-ready:not(.epf-calendar-unframed) > .et_pb_column {
    position: relative;
    width: 100% !important;
}

.epf-calendar-frame .epf-events-shell--list {
    max-width: none;
    padding: 0 !important;
}

.epf-calendar-frame .epf-event-list {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    align-content: start;
}

body.admin-bar .epf-calendar-frame {
    scroll-margin-top: 166px;
}

.epf-calendar-frame .epf-event-card {
    box-sizing: border-box;
    padding: 0;
    min-width: 0;
    min-height: var(--epf-card-height, 0px);
    overflow-wrap: anywhere;
    transition: border 300ms ease 0ms, filter 300ms ease 0ms;
}

.epf-calendar-frame .epf-event-card[hidden],
.epf-events-pager[hidden] {
    display: none !important;
}

.epf-events-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 0;
    color: #173c38;
}

.epf-events-pager--automatic {
    box-sizing: border-box;
    width: 80%;
    max-width: 1080px;
    margin: 24px auto 0;
}

.epf-events-pager button {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    border: 2px solid #214d47;
    background: #fff;
    color: #214d47;
    font: inherit;
    cursor: pointer;
}

.epf-events-pager button:disabled {
    opacity: .5;
    cursor: default;
}

.epf-events-pager button[aria-current="page"] {
    background: #214d47;
    color: #fff;
}

.epf-events-page-numbers {
    display: contents;
}

.epf-events-pager button:focus-visible {
    outline: 3px solid #087bb5;
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .epf-calendar-frame.epf-calendar-ready,
    .epf-calendar-frame.epf-calendar-ready:not(.epf-calendar-unframed) {
        padding: 0 !important;
        border: 0;
        border-image: none;
        background-image: none !important;
    }

    .epf-calendar-frame.epf-calendar-ready > .et_pb_column {
        position: relative;
        inset: auto;
        width: 100% !important;
    }
}

/* Keep the key centered while the action and current event range stay right-aligned. */
.epf-events-intro-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px 16px;
    margin: 20px 0 0;
}

.epf-events-intro-controls .epf-events-today-key {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    margin: 0;
}

.epf-events-show-all {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    min-height: 44px;
    /* Both labels share one box so the button cannot resize when it toggles:
       124px is the natural width of the longer label ("Show less"). */
    min-width: 124px;
    margin: 0;
    padding: 10px 22px;
    border: 1px solid #a8c0b9;
    border-radius: 0;
    background: #fff;
    color: #173e39;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.5;
    text-transform: uppercase;
    cursor: pointer;
}

.epf-events-count {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    margin: 0;
    color: #173e39;
    font-size: 14px;
    line-height: 1.4;
    text-align: right;
}

.epf-events-show-all:hover {
    background: #d8f0f4;
}

.epf-events-show-all:focus-visible {
    outline: 3px solid #173e39;
    outline-offset: 4px;
}

@media (max-width: 600px) {
    .epf-events-intro-controls {
        grid-template-columns: 1fr;
    }

    .epf-events-intro-controls .epf-events-today-key,
    .epf-events-show-all,
    .epf-events-count {
        grid-column: 1;
        justify-self: center;
        text-align: center;
    }

    .epf-events-intro-controls .epf-events-today-key {
        grid-row: 1;
    }

    .epf-events-show-all {
        grid-row: 2;
    }

    .epf-events-count {
        grid-row: 3;
    }
}
