/* --------------------------------------------|
|                                              |
| Component Carousel (teaser cards that fade)  |
|                                              |
| Markup: snippets/blocks/carousel.php         |
| Stacking and fade: [data-fade-slideshow] in  |
| component.slider.css                         |
|                                              |
|-------------------------------------------- */

.carousel__intro {
	margin-bottom: var(--block-gap);
}

.carousel__item {
	display: grid;
	gap: var(--gutter);
	align-items: center;
	padding: var(--surface-pad);
	background-color: var(--color-light);
	color: inherit;
	text-decoration: none;
}

/* Image beside the text once the COLUMN is wide enough (@md), whatever the
   window: a carousel in a third stays stacked on a wide screen. */
@container (width >= 480px) {
	.carousel__item--image {
		grid-template-columns: 1fr 2fr;
	}
}

.carousel__image {
	display: block;
	width: 100%;
	height: auto;
}

.carousel__body {
	display: flex;
	flex-direction: column;
	gap: calc(var(--spacing) * 3);
}

/* .h3 brings size and line height; inside the card it is not a margin box. */
.carousel__title {
	margin: 0;
}

a.carousel__item:is(:hover, :focus-visible) .carousel__title {
	text-decoration: underline;
}
