.posts-archive-with-filter{
    margin: var(--block-margin) auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: var(--column-gap);
    row-gap: var(--row-gap);
    align-items: start;
}

.posts-archive-with-filter header {
    text-align: center;
}

.posts-archive-with-filter-content-wrapper {
    order: 2;
}

.posts-archive-with-filter-filters-wrapper {
    display: grid;
    row-gap: var(--item-row-gap);
}

.posts-archive-with-filter-search {
    display: grid;
    border-radius: calc(var(--element-border-radius) / 2);
    border: 0.1rem solid var(--color-grey);
    grid-template-columns: 5rem 1fr;
}

.posts-archive-with-filter-search button {
    grid-column: 1;
    grid-row: 1;
    max-width: 5rem;
    margin: 0 auto;
}

.blocks-container .posts-archive-with-filter .posts-archive-with-filter-search input[type="search"] {
    grid-column: 2;
    grid-row: 1;
    border-width: 0;
    padding-left: 0;
    padding-right: 0;
}

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

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

.posts-archive-with-filter-filters-group-clear{
    position: absolute;
    top: 50%;
    right: 3rem;
    width: 4rem;
    height: calc(100% - 0.2rem);
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--title-color);
    z-index: 1;
}

.posts-archive-with-filter-filters-group-clear:disabled{
    cursor: default;
}

.posts-archive-with-filter-filters-group-clear.visible{
    opacity: 1;
}

.posts-archive-with-filter-filters-group-clear::before,
.posts-archive-with-filter-filters-group-clear::after{
    content: '';
    display: block;
    width: 1.5rem;
    height: 0.2rem;
    background-color: currentColor;
    position: absolute;
    top: 42%;
    left: 50%;
}

.posts-archive-with-filter-filters-group-clear::before{
    transform: translate(-50%, -50%) rotateZ(45deg);
}

.posts-archive-with-filter-filters-group-clear::after{
    transform: translate(-50%, -50%) rotateZ(-45deg);
}

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

.posts-archive-with-filter-filters-group-title h2{
    font: var(--font-headline-5);
}

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

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

.posts-archive-with-filter-filters-group-options{
    transition: all 0.3s ease;
    max-height: 0;
    overflow: auto;
    margin-top: 1rem;
    scrollbar-color: var(--text-color);
    scrollbar-width: thin;
    padding: 0.8rem 0;
}

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

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

.posts-archive-with-filter-filters-group.open .posts-archive-with-filter-filters-group-options{
    max-height: 47rem;
}

.posts-archive-with-filter-filters-group-options-item{
    overflow: hidden;
    margin-top: 0.8rem;
    position: relative;
    display: flex;
    column-gap: 1rem;
}

.posts-archive-with-filter-filters-group-options-item label{
    cursor: pointer;
    margin: 0;
    transition: all 0.3s ease;
    font: var(--font-body-small);
    position: relative;
    overflow: hidden;
}

.posts-archive-with-filter-filters-group-options-item label:is(:hover, :focus, :active){
    text-decoration-color: var(--color-black);
    transition: 0.3s ease all;
}

.posts-archive-with-filter-filters-group-options-item input:checked ~ label{
    font-weight: var(--primary-font-weight);
}

.posts-archive-with-filter-filters-group-options-item input:checked ~ label{
    padding-right: 2em;
}

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

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

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

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

.posts-archive-with-filter-content-grid .read-more{
    padding: 0;
}

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

.posts-archive-with-filter-content-pagination .nav-links{
    display: flex;
    flex-wrap: wrap;
    column-gap: 0.5em;
}

.posts-archive-with-filter-content-pagination .nav-links .page-numbers{
    padding: 0.5em;
    font: var(--font-headline-5);
    line-height: 1;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--link-color);
}

.posts-archive-with-filter-content-pagination .nav-links .page-numbers.current{
    color: var(--accent-color);
}

.posts-archive-with-filter-content-pagination .nav-links a.page-numbers:is(:hover, :focus, :active){
    color: var(--hover-link-color);
}

.posts-archive-with-filter-content-pagination .nav-links .page-numbers:is(.prev, .next){
    padding-left: 0;
    padding-right: 0;
}

@media (min-width: 768px){
    .posts-archive-with-filter{
        grid-template-columns: minmax(0, 1fr) 24rem;
    }

    .posts-archive-with-filter header{
        grid-column: span 2;
    }

    .posts-archive-with-filter-content-wrapper {
        order: 0;
    }

    .posts-archive-with-filter-filters-group-clear{
        right: 0;
        width: 2rem;
    }

    .posts-archive-with-filter-filters-group-options{
        max-height: 47rem;
    }

    .posts-archive-with-filter-filters-group-title{
        cursor: default;
    }

    .posts-archive-with-filter-filters-group-title::after{
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 920px){
    .posts-archive-with-filter-content-grid{
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

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