:root :where(.wp-block-query) {
	.wp-block-post-template .wp-block-post:not(.has-post-thumbnail) .wp-block-cover {
	    background-color: var(--wp--preset--color--bg-2);	
	}
}

@media (min-width:768px) and (max-width:1023px) {
	:root :where(.wp-block-query) {
		.wp-block-post-template {
			&.columns-4,
		    &.columns-5,
		    &.columns-6 {
		        grid-template-columns: repeat(3, minmax(0, 1fr));
		    }
		}
	}
}

:root :where(.wp-block-query) {
	.wp-block-post-template {
		grid-gap: 40px 20px;

		.wp-block-post {
		    .wp-block-group {
		    	&.is-layout-grid {
		    		.wp-block-post-featured-image,
		    		.taxonomy-category {
		    			grid-row-start: 1; 
		    			grid-column-start: 1;
		    		}

		    		.wp-block-post-featured-image + .taxonomy-category {
		    			padding: 20px;
		    		}

		    		.taxonomy-category {
		    			z-index: 2;
		    			align-self: start;
		    		}
		    	}
		    }

		    &.sticky {
		        &:not(.has-post-thumbnail) {
		            .wp-block-group {
		            	&.is-layout-grid {
		            		display: none;
		            	}

		                .taxonomy-category {
		                    justify-content: center; 
		                    a {
				    			background-color: var(--wp--preset--color--white);
				    		}
		                }

		                .taxonomy-category {
		                	display: flex;
		                }
		            }
		        }

		        &.has-post-thumbnail {
		        	.taxonomy-category {
		        		display: none;
		        	}
		        	
		        	.wp-block-post-featured-image + .taxonomy-category {
			        	display: flex;
			        }
		        }

		    }

		    &:not(.has-post-thumbnail) {
		    	.taxonomy-category {
		    		a {
		    			background-color: var(--wp--preset--color--bg-3);
		    			color: var(--wp--preset--color--text-primary);

		    			&:hover {
			                background-color: var(--wp--preset--color--text-primary);
			                color: var(--wp--preset--color--white);
			            }
		    		}
		    	}
		    }
		}

		.wp-block-post-excerpt__more-text {
			display:inline-block;
		}

		.wp-block-post-excerpt__more-link,
		.is-style-post-link {
			display: flex;
            align-items: center;
			text-decoration: none;
    		border-bottom: 1px solid currentColor;

			&:after {
				content: "";
			    display: inline-block;
			    width: 10px;
			    height: 9px;
			    margin-inline-start: 10px;
			    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2210%22%20height%3D%229%22%20viewBox%3D%220%200%2010%209%22%20fill%3D%22none%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M5.09375%200.5L9.03125%204.4375L5.09375%208.375M8.48438%204.4375H0.5%22%20stroke%3D%22currentColor%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E");
			    background-size: contain;
			    background-repeat: no-repeat;
			}
			&.arrow-white {
				&:after {
					filter: invert(1);
				}
			}
		}
	}
}

[dir="rtl"] .wp-block-query .wp-block-post-excerpt__more-link:after,
[dir="rtl"] .wp-block-query .is-style-post-link:after,
body.rtl .wp-block-query .wp-block-post-excerpt__more-link:after,
body.rtl .wp-block-query .is-style-post-link:after {
    transform: scaleX(-1);
}