.events-archive-with-filter{
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: var(--column-gap);
    row-gap: var(--row-gap);
    align-items: start;
    padding: var(--block-margin) 0;
} 

.events-archive-with-filter > *{
    width: 100%;
    max-width: var(--wide-width);
    margin: 0 auto;
}

.events-archive-with-filter-heading{
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: var(--column-gap);
    align-items: end;
}

.events-archive-with-filter-heading p{
    margin: 0;
}

.events-archive-with-filter-filters{
    width: 100%;
    display: flex;
    column-gap: var(--item-column-gap);
    row-gap: var(--item-row-gap);
    z-index: 1;
}

.events-archive-with-filter-filters-instructions{
    position: absolute;
}

.events-archive-with-filter-filters-group{
    width: 100%;
    max-width: 40rem;
    position: relative;
}

.events-archive-with-filter-filters-group-heading{
    position: relative;
}

.events-archive-with-filter-filters-group-title{
    display: block;
    width: 100%;
    border-bottom: 0.1rem solid var(--title-color);
    position: relative;
}

.events-archive-with-filter-filters-group-title:is(:hover, :focus, :active){
    text-decoration: none;
}

.events-archive-with-filter-filters-group-title:focus{
    outline: none;
}

.events-archive-with-filter-filters-group-title h2{
    font: var(--font-headline-7);
    margin: 0;
    padding: calc(var(--item-row-gap) / 2) calc(var(--item-column-gap) + 2rem) calc(var(--item-row-gap) / 2) 0;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.events-archive-with-filter-filters-group-title:is(:hover, :focus, :active) h2{
    opacity: 1;
}

.events-archive-with-filter-filters-group-title::after{
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 1rem;
    height: 1rem;
    border-right: 0.2rem solid var(--title-color);
    border-bottom: 0.2rem solid var(--title-color);
    transform: translateY(-50%) rotateZ(45deg) translateX(-50%);
    transition: all 0.3s ease;
    opacity: 0.7;
}

.events-archive-with-filter-filters-group-title:is(:hover, :focus, :active)::after{
    opacity: 1;
}

.events-archive-with-filter-filters-group.open .events-archive-with-filter-filters-group-title::after{
    transform: translateY(0) rotateZ(-135deg) translateX(50%);
}

.events-archive-with-filter-filters-group-options{
    transition: all 0.3s ease;
    max-height: 0;
    overflow: auto;
    scrollbar-color: var(--text-color);
    scrollbar-width: thin;
    padding: 0 var(--item-column-gap) 0;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1);
    background: var(--background-color);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 10;
}

.events-archive-with-filter-filters-group-options::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 0.3rem;
}

.events-archive-with-filter-filters-group-options::-webkit-scrollbar-thumb {
    border-radius: 0.7rem;
    background-color: var(--text-color);
}

.events-archive-with-filter-filters-group.open .events-archive-with-filter-filters-group-options{
    max-height: 50vh;
    padding: var(--item-row-gap) var(--item-column-gap);
}

.events-archive-with-filter-filters-group-options-item{
    overflow: hidden;
    position: relative;
}

.events-archive-with-filter-filters-group-options-item:not(:last-child){
    margin-bottom: calc(var(--item-row-gap) / 2);
}

.events-archive-with-filter-filters-group-options-item input{
    position: absolute;
    bottom: calc(100% + 1rem);
    cursor: pointer;
}

.events-archive-with-filter-filters-group-options-item label{
    cursor: pointer;
    margin: 0;
    transition: all 0.3s ease;
    font: var(--font-body);
    display: flex;
    align-items: center;
    opacity: 0.7;
}

.events-archive-with-filter-filters-group-options-item label:is(:hover, :focus, :active){
    opacity: 1;
}

.events-archive-with-filter-filters-group-options-item label::before{
    content: '';
    display: block;
    width: 1em;
    height: 1em;
    border: 0.1rem solid;
    border-radius: 0.4rem;
    margin-right: 0.3em;
    flex-shrink: 0;
}

.events-archive-with-filter-filters-group-options-item input:checked ~ label{
    opacity: 1;
}

.events-archive-with-filter-filters-group-options-item input:checked ~ label::after{
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    width: 0.3em;
    height: 0.5em;
    border-bottom: 0.2rem solid;
    border-right: 0.2rem solid;
    transform: translate(0.35em, calc(-50% - 0.05em)) rotate(45deg);
}

.events-archive-with-filter-active-filters{
    display: none;
    flex-wrap: wrap;
    row-gap: var(--item-row-gap);
    column-gap: var(--item-column-gap);
    align-items: center;
}

.events-archive-with-filter-active-filters.active{
    display: flex;
}

.events-archive-with-filter-active-filters-list{
    display: flex;
    flex-wrap: wrap;
    row-gap: var(--item-row-gap);
    column-gap: var(--item-column-gap);
}

.events-archive-with-filter-active-filters-list button{
    padding: 0.8rem 1.2rem;
    display: flex;
    column-gap: 0.8rem;
    border-radius: 3rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: var(--text-color);
}

.events-archive-with-filter-active-filters-list button:is(:hover, :focus){
    background-color: var(--primary-button-hover-background-color);
    color: var(--primary-button-hover-text-color);
}

.events-archive-with-filter-active-filters-list button:focus{
    outline: none;
}

.events-archive-with-filter-active-filters-list button::before{
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-color);
    opacity: 0.2;
    z-index: 1;
}

.events-archive-with-filter-active-filters-list button::after{
    content: '\00D7';
    display: block;
    z-index: 1;
}

.events-archive-with-filter-active-filters-list button span{
    position: relative;
    z-index: 1;
}

.events-archive-with-filter-filters-group-clear-all{
    margin-left: auto;
    text-decoration: underline;
}

.events-archive-with-filter-filters-group-clear-all:disabled{
    cursor: pointer;
    opacity: 0.5;
}

.events-archive-with-filter-filters-group-clear-all:focus{
    outline: none;
}

.events-archive-with-filter-content-loading{
    display: none;
    color: var(--title-color);
}

.events-archive-with-filter-content-loading svg{
    display: block;
    width: 15rem;
    height: auto;
    margin: 0 auto;
}

.events-archive-with-filter-content-grid{
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: var(--item-column-gap);
    row-gap: var(--item-row-gap);
}

.events-archive-with-filter .post-loop-tags li.post-loop-flair-upcoming {
    background-color: var(--color-skylight-blue);
    color: var(--color-deepest-blue);
}

.events-archive-with-filter .post-loop-tags li.post-loop-flair-past-event {
    background-color: var(--color-deepest-blue);
}

.events-archive-with-filter .post-loop-event-date {
    color: var(--color-vibrant-blue);
}

.events-archive-with-filter-content-pagination{
    margin-top: var(--row-gap);
}

.events-archive-with-filter[data-animation].animate__animated{
    animation-name: fadeInUp;
}

.events-archive-with-filter .events-archive-with-filter-content-grid .post-loop .post-loop-inner {
    display: flex;
    flex-direction: column;
    row-gap: calc( var(--item-row-gap) - var(--extra-small-row-gap) );
}

.events-archive-with-filter .events-archive-with-filter-content-grid .post-loop .post-loop-inner .post-loop-meta {
    margin-bottom: var(--extra-small-row-gap);
}

.events-archive-with-filter .post-loop .post-loop-image img {
    aspect-ratio: 16 / 9;
    contain-intrinsic-size: none;
    height: 100%;
    object-fit: cover;
    width: 100%;
    object-position: top left;
}

/* PAST EVENTS TOGGLE */
.events-archive-with-filter .events-archive-with-filter-filters-grid {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    column-gap: var(--item-column-gap);
    row-gap: var(--row-gap);

    @media (min-width: 768px) {
        flex-direction: row;
        align-items: flex-end;
    }
}

.events-archive-with-filter .events-archive-with-filter-filters-group {
    width: 100%;
    max-width: 40rem;
    position: relative;
    min-width: 30rem;
}

.events-archive-with-filter .events-archive-with-filter-toggle {
    display: flex;
    z-index: 0;
}

.events-archive-with-filter .events-archive-with-filter-toggle a {
    width: max-content;
    font: var(--font-body-small);

    @media (min-width: 768px) {
        font: var(--font-body);
    }
}

.events-archive-with-filter .events-archive-with-filter-toggle a.secondary-button:is(:hover, :active, :focus) {
    color: var(--color-vibrant-blue) !important;
}

.events-archive-with-filter .events-archive-with-filter-toggle a.active {
    background: var(--color-vibrant-blue);
    border-radius: var(--primary-button-border-radius);
}

.events-archive-with-filter .events-archive-with-filter-toggle a:not(.active) {
    background-color: var(--color-light-gray) !important;
    border-color: transparent !important;
    padding-right: 5rem !important;
}

.events-archive-with-filter .events-archive-with-filter-toggle a:first-child:is(.active) {
    z-index: 1;
}

.events-archive-with-filter .events-archive-with-filter-toggle a:last-child {
    margin-left: calc(3rem * -1);
    padding-left: 3rem;
}

.events-archive-with-filter .events-archive-with-filter-toggle:has(a:first-child:is(.active)) a:last-child {
    padding-left: 5rem !important;
    padding-right: 3rem !important;
}

@media (min-width: 768px){
    .events-archive-with-filter-heading{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .events-archive-with-filter-heading h2{
        margin: 0;
    }

    .events-archive-with-filter-filters{
        flex-wrap: nowrap;
    }

    .events-archive-with-filter-content-grid .post-loop a{
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 27.8rem;
    }

    .events-archive-with-filter-content-grid .post-loop .post-loop-inner:first-child:last-child{
        grid-column: span 2;
    }
}