/* News carousel on the home page (includes/banners.php): width of the tiles, a third of it in height, hidden on phones. */
.jc-banners {
	position: relative;
	margin-bottom: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius, 4px);
	overflow: hidden;
	background-color: var(--wp--preset--color--ink, #141414);
}

.jc-banners__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.jc-banners__track::-webkit-scrollbar {
	display: none;
}

.jc-banners__track:focus-visible {
	outline: 2px solid var(--wp--preset--color--red, #C4373A);
	outline-offset: -2px;
}

.jc-banner {
	position: relative;
	flex: 0 0 100%;
	aspect-ratio: 3 / 1;
	scroll-snap-align: start;
}

.jc-banner__link {
	display: block;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.jc-banner__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Text on the left over a dark fade, so a light photo keeps the text readable. */
.jc-banner__body {
	position: absolute;
	inset: 0 auto 0 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
	width: min(55%, 520px);
	padding: 32px 40px 32px 72px;
	background: linear-gradient(90deg, rgba(20, 20, 20, 0.88) 0%, rgba(20, 20, 20, 0.6) 70%, rgba(20, 20, 20, 0) 100%);
	color: var(--wp--preset--color--paper, #F6F4F2);
}

.jc-banner__title {
	margin: 0;
	color: inherit;
	font-family: var(--wp--preset--font-family--tektur, inherit);
	font-size: clamp(22px, 2.4vw, 32px);
	line-height: 1.15;
	text-wrap: balance;
}

.jc-banner__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	text-wrap: pretty;
}

.jc-banner__button {
	align-self: flex-start;
	margin-top: 4px;
}

.jc-banners__arrow {
	position: absolute;
	top: 50%;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	border: 0;
	border-radius: 50%;
	background: rgba(20, 20, 20, 0.6);
	cursor: pointer;
}

.jc-banners__arrow::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	border-top: 2px solid #F6F4F2;
	border-right: 2px solid #F6F4F2;
}

.jc-banners__arrow--prev {
	left: 12px;
}

.jc-banners__arrow--prev::before {
	transform: translate(-30%, -50%) rotate(-135deg);
}

.jc-banners__arrow--next {
	right: 12px;
}

.jc-banners__arrow--next::before {
	transform: translate(-70%, -50%) rotate(45deg);
}

.jc-banners__arrow:focus-visible,
.jc-banners__dot:focus-visible {
	outline: 2px solid var(--wp--preset--color--red, #C4373A);
	outline-offset: 2px;
}

.jc-banners__dots {
	position: absolute;
	right: 16px;
	bottom: 12px;
	display: flex;
	gap: 0;
	padding: 0 6px;
	border-radius: 22px;
	background: rgba(20, 20, 20, 0.55);
}

/* 24 px dots with a 44 px touch area. */
.jc-banners__dot {
	position: relative;
	width: 24px;
	height: 44px;
	border: 0;
	background: none;
	cursor: pointer;
}

.jc-banners__dot::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	border-radius: 50%;
	background: rgba(246, 244, 242, 0.5);
}

.jc-banners__dot[aria-current="true"]::before {
	background: var(--wp--preset--color--red, #C4373A);
}

@media (hover: hover) and (pointer: fine) {
	.jc-banners__arrow:hover {
		background: rgba(20, 20, 20, 0.85);
	}
}

@media (prefers-reduced-motion: reduce) {
	.jc-banners__track {
		scroll-behavior: auto;
	}
}

@media (max-width: 781px) {
	.jc-banners {
		display: none;
	}
}
