/* Carousel: a row of image cards on the shared slider (com_pxbuilder slider.css).
   below = image then text, overlay = text on the image, card = surface box (as the card element). */
.px-page .px-carousel { --px-slider-per: 3; --px-carousel-r: 4 / 3; }
.px-page .px-carousel--per-2 { --px-slider-per: 2; }
.px-page .px-carousel--per-4 { --px-slider-per: 4; }
.px-page .px-carousel--peek { --px-slider-peek: .12; --px-slider-pg: 1; }
.px-page .px-carousel--r-1x1 { --px-carousel-r: 1 / 1; }
.px-page .px-carousel--r-3x4 { --px-carousel-r: 3 / 4; }
.px-page .px-carousel--r-16x9 { --px-carousel-r: 16 / 9; }
.px-page .px-carousel__slide { display: flex; }
.px-page .px-carousel__card { position: relative; display: grid; grid-template-rows: auto 1fr; width: 100%; min-width: 0; }
.px-page .px-carousel__media { position: relative; overflow: hidden; aspect-ratio: var(--px-carousel-r); border-radius: var(--px-radius); background: var(--px-color-soft); }
.px-page .px-carousel__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.px-page .px-carousel__empty { display: block; width: 100%; height: 100%; }
.px-page .px-carousel__body { display: grid; gap: var(--px-space-xs); align-content: start; justify-items: start; min-width: 0; padding-top: var(--px-space-s); }
.px-page .px-carousel__tag {
	padding: 0 var(--px-space-s);
	background: var(--px-color-primary-soft);
	color: var(--px-color-primary-text);
	border-radius: 999px;
	font-size: var(--px-text-small);
	font-weight: 600;
	line-height: 1.7;
	overflow-wrap: anywhere;
}
.px-page .px-carousel__title {
	margin: 0;
	color: var(--px-color-heading);
	font-family: var(--px-font-heading);
	font-size: var(--px-text-h4);
	font-weight: var(--px-weight-heading);
	line-height: var(--px-leading-tight);
	overflow-wrap: anywhere;
}
.px-page .px-carousel__text { margin: 0; color: var(--px-color-muted); font-size: var(--px-text-body); line-height: var(--px-leading-body); white-space: pre-line; overflow-wrap: anywhere; }

/* Link: the title link covers the whole card (one link, nothing nested). */
.px-page .px-carousel__link { color: inherit; text-decoration: none; }
.px-page .px-carousel__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--px-radius); }
.px-page .px-carousel__card--linked:hover .px-carousel__title { color: var(--px-color-primary-text); }
.px-page .px-carousel__link:focus-visible { outline: none; }
.px-page .px-carousel__link:focus-visible::after { outline: 3px solid var(--px-color-primary); outline-offset: -3px; }
.px-page .px-carousel__card--linked .px-carousel__img { transition: transform .5s ease; }
.px-page .px-carousel__card--linked:hover .px-carousel__img { transform: scale(1.04); }

/* card: surface, border, the image flush with the top. */
.px-page .px-carousel--card .px-carousel__card { overflow: hidden; background: var(--px-color-surface); border: 1px solid var(--px-color-border); border-radius: var(--px-radius); }
.px-page .px-carousel--card .px-carousel__media { border-radius: 0; }
.px-page .px-carousel--card .px-carousel__body { padding: var(--px-space-m); }

/* overlay: the image fills the card, a dark gradient rises from the bottom, white text. */
.px-page .px-carousel--overlay .px-carousel__card { grid-template-rows: 1fr; overflow: hidden; border-radius: var(--px-radius); }
.px-page .px-carousel--overlay :is(.px-carousel__media, .px-carousel__body) { grid-area: 1 / 1; }
.px-page .px-carousel--overlay .px-carousel__body {
	z-index: 0;
	align-self: end;
	padding: var(--px-space-xl) var(--px-space-m) var(--px-space-m);
	background: linear-gradient(to top, rgb(0 0 0 / .78), rgb(0 0 0 / 0));
	border-radius: 0 0 var(--px-radius) var(--px-radius);
}
.px-page .px-carousel--overlay :is(.px-carousel__title, .px-carousel__text) { color: rgb(255 255 255); }
.px-page .px-carousel--overlay .px-carousel__card--linked:hover .px-carousel__title { color: rgb(255 255 255); }
.px-page .px-carousel--overlay .px-carousel__tag { background: transparent; color: rgb(255 255 255); border: 1px solid rgb(255 255 255); }
.px-page .px-carousel--overlay .px-carousel__link:focus-visible::after { outline-color: rgb(255 255 255); }

@container (max-width: 1000px) {
	.px-page .px-carousel--per-4 { --px-slider-per: 3; }
}
@container (max-width: 760px) {
	.px-page :is(.px-carousel--per-3, .px-carousel--per-4) { --px-slider-per: 2; }
}
@container (max-width: 520px) {
	.px-page .px-carousel { --px-slider-per: 1; --px-slider-peek: .15; --px-slider-pg: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.px-page .px-carousel__card--linked .px-carousel__img { transition: none; }
	.px-page .px-carousel__card--linked:hover .px-carousel__img { transform: none; }
}

/* 1.10: text for screen readers when the link opens in a new tab. */
.px-page .px-carousel__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
