/* Fade non-active slides */
.wp-block-query.is-carousel .swiper-slide {
	opacity: 0.34;
	transition: opacity 200ms ease;
}
.wp-block-query.is-carousel .swiper-slide.swiper-slide-active {
	opacity: 1;
}

/* Featured image: cap height + crop to fill */
.wp-block-query.is-carousel .wp-block-post-featured-image {
	/* use a fixed track height so all slides align cleanly */
	width: 100%;
	max-height: 60vh;
	overflow: hidden;
}

/* If the image is wrapped in a link, make the link fill the box */
.wp-block-query.is-carousel .wp-block-post-featured-image > a {
	display: block;
	width: 100%;
	height: 100%;
}

/* Make the image cover the box */
.wp-block-query.is-carousel .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Replace Swiper arrows with custom SVGs */
.wp-block-query.is-carousel .swiper-button-prev,
.wp-block-query.is-carousel .swiper-button-next {
	width: 3rem;
	height: auto;
	background-image: url("../images/carousel_arrow.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	border: none;
	opacity: 0.85;
	transition: opacity 0.2s ease;
	color: transparent; /* hides default arrow text */
	top: 50% !important;
	transform: translateY(-50%);
}

.wp-block-query.is-carousel .swiper-button-prev:hover,
.wp-block-query.is-carousel .swiper-button-next:hover {
	opacity: 1;
}

/* Rotate the left arrow */
.wp-block-query.is-carousel .swiper-button-prev {
	transform: rotate(180deg) translateY(50%);
}
