/*
Block Name: Post Listings
Description: A block used to loop through your news posts
*/

.recent-posts .post-listing {
	background: #fff;
}

.recent-posts .post-listing-title a {
	color: var(--brand-2);
}

.recent-posts .post-listing-title a:hover {
	color: var(--brand-1);
}

.block-post-listings .post-listing-image {
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.block-post-listings .post-listing-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.block-post-listings .post-listing-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Pagination */
.page-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 3rem;
}

.page-navigation .page-numbers {
    min-width: 3rem;
    height: 3rem;
    padding: 0 1rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: var(--brand-1);
    color: #fff;

    border-radius: 5rem;

    font-weight: 600;
    font-size: 80%;
    line-height: 1;
    text-decoration: none;

    transition: all .15s ease-in-out;
}

/* Hover + current page */
.page-navigation a.page-numbers:hover,
.page-navigation .page-numbers.current {
    background: var(--brand-2);
    color: #fff;
}

/* Previous / Next buttons */
.page-navigation .prev,
.page-navigation .next {
    width: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Don't style the ellipsis as a button */
.page-navigation .page-numbers.dots {
    min-width: auto;
    padding: 0 .25rem;
    background: transparent;
    color: var(--brand-1);
}

/* Keyboard focus */
.page-navigation a.page-numbers:focus-visible {
    outline: 2px solid var(--brand-2);
    outline-offset: 3px;
}

@media (max-width: 768px) and (min-width: 481px) {
    .block-post-listings.recent-posts .grid.post-listings {
        grid-template-columns: repeat(2, 1fr) !important;
    }
	
	    .block-post-listings .grid.post-listings {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .block-post-listings.recent-posts .post-listing:nth-child(3) {
        display: none;
    }
}

/* Mobile */
@media (max-width: 600px) {

    .page-navigation {
        gap: .5rem;
        margin-top: 2rem;
    }

    .page-navigation .page-numbers {
        min-width: 2.75rem;
        height: 2.75rem;
        padding: 0 .75rem;
    }

    .page-navigation .prev,
    .page-navigation .next {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}