/* Pills (buttons) to filter categories */

#posts-filter-container {
    display: flex;
    justify-content: space-between;
}

#posts-categories {
    display: flex;
    gap: 5px;
    margin-bottom: 50px;
}

.cat-btn {
    color: #52525C;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: -0.15px;
    text-align: center;
    border-radius: 50px;
    background-color: #F4F4F5;
    cursor: pointer;
    padding: 8px 16px;
    width: fit-content;
}

.cat-btn.active,
.cat-btn:hover {
    background-color: #18181B;
    color: #FFF;
}

@media (max-width: 980px) {

    #posts-filter-container {
        flex-direction: column;
    }

    #posts-categories {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-bottom: 20px;
    }

}

/* Search field */

#posts-search {
    background-image: url('/wp-content/uploads/2026/04/blog-search-icon.svg');
    background-repeat: no-repeat;
    background-position-x: 10px;
    background-position-y: center;
    min-width: 288px;
    padding: 11px 10px 11px 35px;
    height: fit-content;
    border: 1px solid rgb(228, 228, 231);
    border-radius: 10px;
    background-color: #FAFAFA;
}

@media (max-width: 980px) {

    #posts-search {
        margin-bottom: 30px;
    }

}

/* Spinner */

.blog-posts-spinner {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;           /* base color */
    border-top: 4px solid #3498db;    /* spin part */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Results posts */

#results > .posts {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
}

.post-item {
    border: 1px solid rgba(228, 228, 231, 1);
    border-radius: 16px;
    padding-bottom: 20px;
}

.post-image {
    margin-bottom: 10px;
}

.post-image img {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.post-content {
    padding: 0 23px;
}

.post-cat-date-container {
    display: flex;
    gap: 10px;
}

.post-category {
    color: #00598A;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0px;
    background-color: #DFF2FE;
    border-radius: 50px;
    padding: 2px 10.5px;
    width: fit-content;
}

.post-date {
    color: #71717B;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: -0.15px;
}

h2.post-title {
    color: #18181B;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.45px;
    margin: 12px 0px 7px;
}

.post-excerpt {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.31px;
    color: #71717B;
    margin-bottom: 23px;
}

.read-more {
    color: #18181B;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: -0.15px;
}

.read-more img {
    margin-left: 8px;
}

@media (min-width: 769px) and (max-width: 980px) {

    .post-item {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .post-cat-date-container {
        flex-direction: column;
    }

}

@media (max-width: 768px) {

    #results > .posts {
        display: flex;
        flex-direction: column;
    }

}

/* Pagination */

.pagination {
    text-align: center;
    margin-top: 10px;
}

.pagination a {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background-color: #FAFAFA;
    padding: 0 5px;
    border-radius: 5px;
    color: #00598A;
    font-weight: bold;
    margin: 5px;
}