#events.ech-anchor-target {
    display: block;
    position: static !important;
    height: 0;
    margin: 0;
    padding: 0;
    visibility: hidden;
    pointer-events: none;
    scroll-margin-top: 120px;
}

#ech-preview-sticky {
    --ech-green: #5e7f42;
    --ech-panel-width: 260px;
    position: fixed;
    z-index: 999999;
    top: 50%;
    right: 0;
    display: flex;
    align-items: center;
    transform: translateY(-50%);
    pointer-events: none;
}

#ech-preview-sticky .ech-ep-toggle {
    pointer-events: auto;
    appearance: none;
    border: 0;
    border-radius: 0 12px 12px 0;
    background: var(--ech-green);
    color: #fff;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    cursor: pointer;
    box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}

#ech-preview-sticky .ech-ep-toggle:hover {
    background: #4f6d38;
}

.ech-ep-panel {
    width: 0;
    visibility: hidden;
    opacity: 0;
    overflow: hidden;
    transition: width .35s ease, opacity .25s ease, visibility 0s .35s;
}

.is-open > .ech-ep-panel {
    width: var(--ech-panel-width);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}

.ech-ep-card {
    box-sizing: border-box;
    width: var(--ech-panel-width);
    max-height: 80vh;
    overflow: auto;
    padding: 14px;
    background: var(--ech-green);
    border-radius: 16px 0 0 16px;
}

#ech-preview-sticky .ech-ep-primary,
#ech-preview-sticky .ech-ep-pdf {
    display: block;
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.ech-ep-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.ech-ep-card .ech-ep-image {
    max-height: min(50vh, 380px);
    object-fit: contain;
}

.ech-ep-pdf {
    display: inline-block;
    margin-top: 8px;
    text-decoration: underline;
}

.ech-ep-inline .ech-ep-image {
    width: auto;
    max-width: 100%;
    margin-inline: auto;
}

.ech-ep-inline {
    text-align: center;
}

.ech-ep-sticky .screen-reader-text,
.ech-ep-inline .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

#ech-preview-sticky :focus-visible {
    outline: 2px solid #fff;
    outline-offset: -3px;
}

@media (max-width: 767px), (max-height: 380px) {
    #events.ech-anchor-target {
        scroll-margin-top: 80px;
    }

    #ech-preview-sticky {
        top: auto;
        right: 12px;
        bottom: 18px;
        bottom: max(18px, env(safe-area-inset-bottom));
        left: 12px;
        display: block;
        transform: none;
    }

    #ech-preview-sticky .ech-ep-toggle {
        width: 100%;
        border-radius: 12px;
        writing-mode: horizontal-tb;
        transform: none;
    }

    .ech-ep-panel,
    .is-open > .ech-ep-panel {
        width: 100%;
    }

    .ech-ep-panel {
        max-height: 0;
        transition-property: max-height, opacity, visibility;
    }

    .is-open > .ech-ep-panel {
        max-height: 70vh;
        margin-top: 8px;
    }

    .ech-ep-card {
        width: 100%;
        max-height: 70vh;
        border-radius: 12px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    html:has(#ech-preview-sticky) {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ech-ep-panel {
        transition: none;
    }
}

@media print {
    #ech-preview-sticky {
        display: none;
    }
}

#page .cmsmasters_featured_block.ech_events_anchor {
    padding: 0;
    margin: 20px 0 32px;
    background: transparent;
}

#page .ech_events_anchor .featured_block_text {
    text-align: start;
}

.ech-ep-teaser {
    display: grid;
    grid-template-columns: minmax(110px, 170px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(22px, 5vw, 56px);
    box-sizing: border-box;
    max-width: 820px;
    margin-inline: auto;
    padding: clamp(20px, 4vw, 38px);
    border: 1px solid #dce5d6;
    border-radius: 16px;
    background: #f4f7ef;
    color: #24351e !important;
    text-decoration: none !important;
}

.ech-ep-teaser:not(:has(.ech-ep-teaser-art)) {
    grid-template-columns: 1fr;
}

.ech-ep-teaser-art:has(.ech-ep-pages:empty) {
    aspect-ratio: 0.71;
    border-radius: 6px;
    background: #e4ebde;
}

.ech-ep-teaser-art .ech-ep-image {
    border-radius: 6px;
    box-shadow: 0 5px 20px rgb(36 53 30 / 16%);
}

.ech-ep-teaser-title,
.ech-ep-teaser-description {
    display: block;
}

.ech-ep-teaser-title {
    font-size: clamp(25px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.15;
}

.ech-ep-teaser-description {
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.45;
}

.ech-ep-teaser-action {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
    padding: 9px 15px;
    border-radius: 6px;
    background: #405d31;
    color: #fff;
    font-weight: 700;
}

.ech-ep-teaser:hover .ech-ep-teaser-action {
    background: #2f4924;
}

.ech-ep-teaser:focus-visible {
    outline: 3px solid #405d31;
    outline-offset: 4px;
}

.ech-ep-programme {
    max-width: 1050px;
    margin: 0 auto 36px;
}

.ech-ep-programme-title {
    margin-bottom: 24px;
}

.ech-ep-programme .ech-ep-image {
    width: 100%;
    max-width: 100%;
    margin-bottom: 24px;
    border: 1px solid #e0e5da;
    border-radius: 6px;
    box-sizing: border-box;
}

.ech-ep-programme .ech-ep-pages:empty {
    min-height: 240px;
}

.ech-ep-programme:has(.ech-ep-fallback:not([hidden])) .ech-ep-pages:empty {
    min-height: 0;
}

.ech-ep-panel-action {
    display: block;
    padding: 8px 0 0;
}

.ech-ep-primary > .ech-ep-panel-action:first-child {
    padding-top: 0;
}

@media (max-width: 520px) {
    .ech-ep-teaser {
        grid-template-columns: minmax(76px, 28%) minmax(0, 1fr);
        gap: 14px;
        padding: 15px;
    }

    .ech-ep-teaser-description {
        font-size: 14px;
    }

    .ech-ep-teaser-action {
        margin-top: 12px;
        gap: 6px;
        padding: 7px 9px;
        font-size: 13px;
    }
}
