/**
 * Hero carousel ([imagepress-hero])
 */

.imagepress-hero {
	--imagepress-hero-accent: rgba(255, 255, 255, 0.85);
	--imagepress-hero-shadow: rgba(0, 0, 0, 0.35);
	box-sizing: border-box;
	position: relative;
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
	border-radius: 4px;
	overflow: hidden;
	background: var(--imagepress-hero-shadow);
}

.imagepress-hero *,
.imagepress-hero *::before,
.imagepress-hero *::after {
	box-sizing: border-box;
}

.imagepress-hero__viewport {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 21 / 9;
	min-height: 200px;
}

.imagepress-hero.imagepress-hero--fixed-height .imagepress-hero__viewport {
	aspect-ratio: auto;
	height: var(--imagepress-hero-height);
	min-height: 0;
}

.imagepress-hero__track {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: flex;
	flex-flow: row nowrap;
	margin: 0;
	padding: 0;
	transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
	list-style: none;
}

@media (prefers-reduced-motion: reduce) {

	.imagepress-hero__track {
		transition: none;
	}
}

.imagepress-hero__slide {
	flex: 0 0 100%;
	min-width: 0;
	min-height: 0;
	position: relative;
	height: 100%;
	align-self: stretch;
	z-index: 0;
}

.imagepress-hero__link {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	overflow: hidden;
	line-height: 0;
	z-index: 0;
}

/* Strong specificity + !important so theme img { height:auto !important } cannot break cover fill */
.imagepress-hero .imagepress-hero__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center center !important;
}

/* Visually hide button labels (theme may not load core .screen-reader-text styles) */
.imagepress-hero .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.imagepress-hero__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	background: var(--imagepress-hero-accent);
	color: #111;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	opacity: 0.88;
	transition: opacity 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 8px var(--imagepress-hero-shadow);
}

.imagepress-hero__btn:hover,
.imagepress-hero__btn:focus-visible {
	opacity: 1;
	outline: 2px solid currentColor;
	outline-offset: 2px;
	background: #fff;
}

.imagepress-hero__btn:focus:not(:focus-visible) {
	outline: none;
}

.imagepress-hero__btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.imagepress-hero__prev {
	left: 0.65rem;
}

.imagepress-hero__next {
	right: 0.65rem;
}

.imagepress-hero__dots {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	justify-content: center;
	align-items: center;
	padding: 0.65rem 0.5rem 1rem;
	margin: 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
	min-height: 2.75rem;
}

.imagepress-hero.imagepress-hero--single .imagepress-hero__dots,
.imagepress-hero.imagepress-hero--single .imagepress-hero__btn {
	display: none;
}

.imagepress-hero__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 2px solid var(--imagepress-hero-accent);
	border-radius: 50%;
	cursor: pointer;
	background: transparent;
	vertical-align: middle;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {

	.imagepress-hero__dot {
		transition: none;
	}
}

.imagepress-hero__dot:hover,
.imagepress-hero__dot:focus-visible {
	background: var(--imagepress-hero-accent);
	outline-offset: 2px;
}

.imagepress-hero__dot[aria-current="true"] {
	background: var(--imagepress-hero-accent);
	transform: scale(1.18);
}

.imagepress-hero__sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
