.p6-posts-filters,
.p6-resources-filters {
    border-radius: 18px;
    background: #DFE4E7;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

.p6-filter {
    padding: 8px 24px;
    margin: 5px;
    cursor: pointer;
    border-radius: 12px;
    background: #ECEFF1;
    color: #5C6264;
    border: none;
}

.p6-filter:hover,
.p6-filter.active {
    background-color: #ffffff;
    color: #5C6264;
}

#p6-posts-grid,
#p6-resources-grid,
#p6-related-posts-container,
#p6-related-resources-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    row-gap: 50px;
    padding: 20px;
}

.p6-post-item,
.p6-resource-item {
    display: flex;
    flex-direction: column;
}

.p6-post-item a,
.p6-resource-item a {
    display: flex;
}

a.p6-post-category,
a.p6-resource-category {
    border-radius: 30px;
    background: rgba(17, 64, 56, 0.10);
    display: inline-flex;
    height: 32px;
    padding: 0px 16px;
    align-items: center;
    gap: 16px;
    color: var(--darkergreen);
    font-weight: 600;
}

body.single.single-post .hero-section a.p6-post-category,
body.single.single-resources .hero-section a.p6-resource-category {
    color: #95C396;
    background: #32403A;
}

.p6-post-modified-date,
.p6-resource-modified-date {
    color: var(--offWhite);
    font-size: var(--copyFontLarge);
}

.p6-post-item .post-title,
.p6-resource-item .resource-title {
    color: var(--charcol);
}

.p6-post-item img,
.p6-resource-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 275px;
    border-radius: 20px;
}

.p6-post-categories,
.p6-resource-categories {
    display: flex;
    height: 32px;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    font-size: var(--tinyText);
}

.p6-post-categories span,
.p6-resource-categories span {
    border-radius: 30px;
    background: rgba(17, 64, 56, 0.10);
    color: #114038;
    padding: 0 16px;
    font-size: var(--smallestFontMin);
}

.p6-post-author a,
.p6-resource-author a {
    display: flex;
    align-items: center;
}

.p6-post-author img.avatar,
.p6-resource-author img.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.p6-post-author span.p6-author-name,
.p6-resource-author span.p6-author-name {
    color: var(--offWhite);
    font-size: var(--smallestFontMin);
    margin-left: 15px;
}

.p6-post-excerpt,
.p6-resource-excerpt {
    color: #2D3637;
    font-size: var(--smallestFontMin);
    line-height: 1.6;
    margin-bottom: 22px;
}

a.p6-read-more-btn {
    font-size: var(--tinyText);
    align-items: center;
    margin-top: auto;
}

.p6-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.p6-pagination-link {
    margin: 5px;
    padding: 10px;
    border-radius: 34px;
    background: transparent;
    color: #2D3637;
    font-size: var(--tinyText);
    text-decoration: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p6-pagination-link.active,
.p6-pagination-link:hover {
    background: #60A561;
    color: var(--white);
}

#p6-posts-search-container,
#p6-resources-search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    max-width: 333px;
    border-radius: 4px;
    background: var(--greyscale500);
}

#p6-posts-search,
#p6-resources-search {
    width: 100%;
    background: transparent;
    padding: 10px;
    border: 0;
    display: block;
}

#p6-search-button,
#p6-search-resources-button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

#p6-search-button svg,
#p6-search-resources-button svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease-in-out;
}

#p6-search-button:hover svg,
#p6-search-resources-button:hover svg {
    transform: scale(1.1);
}

/* Tablets: 2 items per row */
@media screen and (min-width: 768px) {
    #p6-posts-grid,
    #p6-resources-grid,
    #p6-related-posts-container,
    #p6-related-resources-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 items per row */
@media screen and (min-width: 981px) {
    #p6-posts-grid,
    #p6-resources-grid,
    #p6-related-posts-container,
    #p6-related-resources-container {
        grid-template-columns: repeat(3, 1fr);
    }
    .p6-post-item img,
    .p6-resource-item img {
        height: 275px;
    }
}
