/* Category Template - Blog Card Grid */

/* Header */
.category_template_header {
    padding-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--pearl-dark);
}

/* Breadcrumbs */
.category_template_header .breadcrumbs {
    color: #202020;
    font-style: italic;
    font-size: 14px;
    text-transform: lowercase;
    margin-bottom: 15px;
}
.category_template_header .breadcrumbs a {
    text-decoration: none;
}
.category_template_header .breadcrumbs span:last-of-type {
    text-decoration: underline;
}

/* Category bubbles */
.category_template_header .top_categories.bubbles {
    margin-top: 5px;
    margin-bottom: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.category_template_header .top_categories.bubbles a {
    font-size: 16px;
    white-space: nowrap;
    text-decoration: none;
    border: 1px solid;
    border-radius: 99px;
    padding: 3px 7px;
    margin-right: 5px;
}
.category_template_header .top_categories.bubbles a.active {
    background-color: var(--jade);
    color: #fff;
    border-color: var(--jade);
}
    .category_template_header .top_categories.bubbles a:active {
        background-color: var(--jade);
        color: #fff;
        border-color: var(--jade);
    }
    @media (min-width: 992px){
        .category_template_header .top_categories.bubbles a:hover {
            background-color: var(--jade);
            color: #fff;
            border-color: var(--jade);
        }
    }

/* Post grid */
.category_posts_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 40px 0;
}

/* Post card */
.category_post_card {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--pearl-dark);
    padding-bottom: 5px;
}
.category_post_card .card_image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    margin-bottom: 12px;
}
.category_post_card .card_image a {
    display: block;
    width: 100%;
    height: 100%;
}
.category_post_card .card_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Title + readtime inline row */
.category_post_card .card_title_row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}
.category_post_card .card_title {
    font-size: 18px;
    margin: 0;
    flex: 1;
    min-width: 0;
    font-family: 'FoundersGrotesk';
    text-transform: none;
}
.category_post_card .card_title a {
    text-decoration: none;
    color: inherit;
}
.category_post_card .card_readtime {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--onyx-light);
    white-space: nowrap;
    flex-shrink: 0;
}
.category_post_card .card_readtime svg {
    width: 14px;
    height: 14px;
    margin-top: -2px;
}

.category_post_card .card_snippet {
    color: var(--onyx-light);
    font-size: 16px;
    margin: 0 0 8px;
}

/* Pagination */
.category_pagination {
    padding-bottom: 40px;
    text-align: center;
}
.category_pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    text-decoration: none;
    border: 1px solid var(--pearl-dark);
}
.category_pagination .page-numbers.current {
    background: var(--onyx);
    color: #fff;
    border-color: var(--onyx);
}

/* Mobile: single column, images hidden except every 5th post */
@media (max-width: 991px) {
    .category_posts_grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .category_post_card .card_image {
        display: none;
    }
    .category_post_card.show-image .card_image {
        display: block;
    }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .category_posts_grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
