/* Hero slider. From 768px the slides keep the 1920 x 800 shape of the pictures. On a phone that shape is a thin strip and
   the slogan baked into the picture is unreadable, so the slide is taller and the picture is cropped on its right side. */

.ba-slider {
	position: relative;
	overflow: hidden;
}

.ba-slider__viewport {
	overflow: hidden;
	aspect-ratio: 4 / 3;
	touch-action: pan-y;
}

@media (min-width: 768px) {
	.ba-slider__viewport {
		aspect-ratio: 1920 / 800;
	}
}

.ba-slider__viewport:focus-visible {
	outline: 3px solid var(--ba-teal, #00c1c4);
	outline-offset: -3px;
}

.ba-slider__track {
	display: flex;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	transition: transform 0.8s ease;
}

.ba-slider__slide {
	flex: 0 0 100%;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
}

.ba-slider__slide a {
	display: block;
	height: 100%;
}

.ba-slider__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 10% 50%;
	user-select: none;
	-webkit-user-drag: none;
}

.ba-slider__controls {
	position: absolute;
	right: 14px;
	bottom: 14px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.ba-slider__dots {
	display: flex;
	gap: 8px;
}

.ba-slider__dot {
	position: relative;
	width: 14px;
	height: 14px;
	padding: 0;
	border: 2px solid #000;
	border-radius: 50%;
	background: #000;
	cursor: pointer;
}

.ba-slider__dot::before {
	content: "";
	position: absolute;
	inset: -10px; /* A bigger hit area than the 14px dot. */
}

.ba-slider__dot[aria-current="true"] {
	border-color: var(--ba-teal, #00c1c4);
	background: var(--ba-teal, #00c1c4);
}

.ba-slider__dot:focus-visible,
.ba-slider__pause:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.ba-slider__pause {
	position: relative;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.ba-slider__pause::before,
.ba-slider__pause::after {
	content: "";
	position: absolute;
	top: 7px;
	width: 3px;
	height: 10px;
	background: #fff;
}

.ba-slider__pause::before {
	left: 8px;
}

.ba-slider__pause::after {
	right: 8px;
}

.ba-slider__pause[aria-pressed="true"]::before {
	left: 9px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 5px 0 5px 8px;
	border-color: transparent transparent transparent #fff;
	background: none;
}

.ba-slider__pause[aria-pressed="true"]::after {
	display: none;
}

@media (min-width: 768px) {
	.ba-slider__controls {
		right: 20px;
		bottom: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ba-slider__track {
		transition: none;
	}
}
