/* =================================================================
   Hero Slider Block
   Hero with rotating background gallery + overlapping brand cards.
   Slideshow timings are fixed in code (not exposed to the editor):
     - Slide duration:    6.5s (CSS / JS in sync)
     - Crossfade:         1.8s, eased
     - Ken-burns zoom:    7.5s, slow scale 1.06 → 1
   ================================================================= */

.hero-slider {
	position: relative;
	display: grid;
	color: var(--wp--preset--color--white);
	background-color: var(--wp--preset--color--bg-dark);
}

/* Background gallery */
.hero-slider__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
}

.hero-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slider__slide.is-active {
	opacity: 1;
}

.hero-slider__slide-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1.06);
	transform-origin: center;
	transition: transform 7.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hero-slider__slide.is-active .hero-slider__slide-img {
	transform: scale(1);
}

.hero-slider__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-color: var(--wp--preset--color--black);
	pointer-events: none;
}

/* Container */
.hero-slider__container {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-rows: 1fr auto;
	height: 100%;
	gap: var(--wp--preset--spacing--32);
}

/* Padding variants */
.hero-slider--py-md {
	min-height: 60vh;
	padding-block: var(--wp--preset--spacing--64) 0;
}
.hero-slider--py-lg {
	min-height: 80vh;
	padding-block: var(--wp--preset--spacing--72) 0;
}
.hero-slider--py-xl {
	min-height: 100vh;
	padding-block: var(--wp--preset--spacing--96) 0;
}

/* Vertical alignment of content */
.hero-slider--valign-top .hero-slider__container {
	align-items: start;
}
.hero-slider--valign-center .hero-slider__container {
	align-items: stretch;
}
.hero-slider--valign-bottom .hero-slider__container {
	align-items: end;
}

/* Content */
.hero-slider__content {
	max-width: 56rem;
	display: grid;
	align-content: center;
	gap: var(--wp--preset--spacing--16);
	padding-block: var(--wp--preset--spacing--48);
	color: var(--wp--preset--color--white);
}

.hero-slider--align-center .hero-slider__content {
	margin-inline: auto;
	text-align: center;
}

.hero-slider--align-center .hero-slider__actions {
	justify-content: center;
}

.hero-slider--valign-top .hero-slider__content {
	align-content: start;
}
.hero-slider--valign-bottom .hero-slider__content {
	align-content: end;
}

/* Tagline */
.hero-slider__tagline {
	position: relative;
	display: inline-block;
	margin: 0;
	padding-left: var(--wp--preset--spacing--32);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--primary);
	font-size: clamp(1rem, 1.4vw, 1.5rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	width: 80%;
	text-align: left;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.hero-slider__tagline::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: var(--wp--preset--spacing--24);
	height: 0.25rem;
	background-color: var(--wp--preset--color--accent);
}

.hero-slider--align-center .hero-slider__tagline {
	margin-inline: auto;
}

/* Title */
.hero-slider__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--secondary);
	color: var(--wp--preset--color--white);
	font-size: clamp(2.25rem, 5.5vw, 4rem);
	font-weight: 900;
	line-height: 1.125;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	text-wrap: balance;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.hero-slider__title .highlight {
	color: var(--wp--preset--color--accent);
	background-color: transparent;
}

.hero-slider__title p {
	margin: 0;
}

/* Subtitle */
.hero-slider__subtitle,
.hero-slider__subtitle h1,
.hero-slider__subtitle h2,
.hero-slider__subtitle p {
	color: var(--wp--preset--color--white);
	margin: 0;
	font-size: clamp(1rem, 1.6vw, 1.5rem);
	line-height: 1.5;
	font-weight: 500;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
	text-wrap: balance;
}

/* Actions */
.hero-slider__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--12);
	margin-top: var(--wp--preset--spacing--16);
}

/* =================================================================
   Brand cards (overlap the bottom of the hero)
   ================================================================= */

.hero-slider__brands {
	position: relative;
	z-index: 3;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--16);
	margin-top: var(--wp--preset--spacing--32);
	margin-bottom: calc(var(--wp--preset--spacing--48) * -1);
}

.hero-slider__brand {
	position: relative;
	display: flex;
	overflow: hidden;
	min-height: 12rem;
	color: var(--wp--preset--color--white);
	text-decoration: none;
	background-color: var(--wp--preset--color--bg-dark);
	isolation: isolate;
}

.hero-slider__brand:hover {
	text-decoration: none;
}

.hero-slider__brand-bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

a.hero-slider__brand:hover .hero-slider__brand-bg,
a.hero-slider__brand:focus-visible .hero-slider__brand-bg {
	transform: scale(1.04);
}

.hero-slider__brand-overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.35) 0%,
		rgba(0, 0, 0, 0.7) 100%
	);
	pointer-events: none;
}

.hero-slider__brand-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--12);
	padding: var(--wp--preset--spacing--32);
	text-align: center;
	width: 100%;
}

.hero-slider__brand-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 3.5rem;
}

.hero-slider__brand-logo-img {
	max-width: min(60%, 12rem);
	min-width: 10rem;
	height: auto;
	max-height: 4rem;
	object-fit: contain;
}

.hero-slider__brand-text {
	margin: 0;
	font-size: var(--wp--preset--font-size--16);
	color: var(--wp--preset--color--white);
	opacity: 0.95;
}

.hero-slider__brand-cta {
	margin-top: var(--wp--preset--spacing--4);
	line-height: 1.5;
	font-weight: 700 !important;
}

/* =================================================================
   Responsive
   ================================================================= */

@media (min-width: 48rem) {
	.hero-slider__brands {
		grid-template-columns: 1fr 1fr 1fr;
		gap: var(--wp--preset--spacing--0);
		margin-bottom: calc(var(--wp--preset--spacing--64) * -1);
	}

	.hero-slider__brand {
		min-height: 14rem;
	}
}

@media (min-width: 64rem) {
	.hero-slider--py-md {
		min-height: 70vh;
	}
	.hero-slider--py-lg {
		min-height: 80vh;
	}

	.hero-slider {
		margin-block-end: var(--wp--preset--spacing--80) !important;
	}

	.hero-slider__content {
		margin-top: var(--wp--preset--spacing--64);
	}

	.hero-slider__brand {
		min-height: 16rem;
	}

	.hero-slider__brand-content {
		padding: var(--wp--preset--spacing--64) var(--wp--preset--spacing--40);
	}
}

/* =================================================================
   Pause / play control (WCAG 2.2.2 compliance for auto-rotating content)
   ================================================================= */

.hero-slider__pause {
	position: absolute;
	right: var(--wp--preset--spacing--16);
	bottom: var(--wp--preset--spacing--16);
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	color: var(--wp--preset--color--white);
	background-color: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	cursor: pointer;
	opacity: 0.75;
	transition:
		opacity 200ms ease,
		background-color 200ms ease,
		transform 200ms ease;
}

.hero-slider__pause:hover,
.hero-slider__pause:focus-visible {
	opacity: 1;
	background-color: rgba(0, 0, 0, 0.6);
}

.hero-slider__pause:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.hero-slider__pause:active {
	transform: scale(0.95);
}

@media (min-width: 64rem) {
	.hero-slider__pause {
		right: var(--wp--preset--spacing--24);
		bottom: var(--wp--preset--spacing--24);
	}
}

/* =================================================================
   Reduced motion
   ================================================================= */

@media (prefers-reduced-motion: reduce) {
	.hero-slider__slide,
	.hero-slider__slide-img,
	.hero-slider__brand-bg,
	.hero-slider__pause {
		transition: none;
	}

	.hero-slider__slide-img {
		transform: none;
	}

	.hero-slider__pause {
		display: none;
	}
}
