/*
 * Hero Slider — front-end styles
 * mennerphoto.com - Software (https://software.mennerphoto.com)
 *
 * Layout & sizing are driven by CSS custom properties, most of which are
 * set inline per-slider (colors, gap, speed) or by hs-frontend.js
 * (--hs-vh / --hs-header-h, measured from the real viewport and the
 * theme's header, so the slider always fills the window exactly below
 * the menu bar — including on mobile browsers with dynamic toolbars).
 */

.hs-slider {
	--hs-vh: 100vh;
	--hs-header-h: 0px;
	--hs-mobile-min-vh: 100;
	--hs-height-percent: 100;
	--hs-gap: 16px;
	--hs-overlay-rgba: rgba(17, 17, 17, 0.88);
	--hs-accent: #ffffff;
	--hs-speed: 450ms;

	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	width: 100vw;
	max-width: 100vw;
	/* --hs-height-percent is a unitless number (e.g. 80, not "80%") set
	   by hs-frontend.js only when the admin gave this slider a custom
	   height; it defaults to 100 above, so with no override this is
	   exactly the original "fill the full height below the header"
	   calculation. */
	height: calc((var(--hs-vh) - var(--hs-header-h)) * var(--hs-height-percent) / 100);
	min-height: 340px;
	overflow: hidden;
	box-sizing: border-box;
	color: #fff;
	font-family: var( --hs-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif );
	-webkit-font-smoothing: antialiased;
}

.hs-slider * {
	box-sizing: border-box;
}

.hs-slider img {
	max-width: none;
}

.hs-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin-top: 1.25em;
	padding: 0.85em 1.75em;
	border: 1px solid rgba(255, 255, 255, 0.85);
	border-radius: 2px;
	background: transparent;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
	white-space: nowrap;
}

.hs-btn:hover,
.hs-btn:focus-visible {
	background-color: #fff;
	color: #111;
}

.hs-slider :focus-visible {
	outline: 2px solid var(--hs-accent, #fff);
	outline-offset: 3px;
}

/* -------------------------------------------------------------------- */
/* 3-column hover-reveal grid                                           */
/* -------------------------------------------------------------------- */

.hs-grid {
	display: flex;
	flex-direction: row;
	width: 100%;
	height: 100%;
	gap: var(--hs-gap);
}

.hs-grid-col {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	cursor: pointer;
	background-color: #1a1a1a;
}

.hs-grid-col-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transform: scale(1.04);
	transition: transform 1.4s cubic-bezier(0.19, 1, 0.22, 1);
	will-change: transform;
}

.hs-grid-col:hover .hs-grid-col-bg,
.hs-grid-col.is-active .hs-grid-col-bg {
	transform: scale(1.12);
}

.hs-grid-col-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: clamp(1.25rem, 3vw, 2.75rem);
	background-color: var(--hs-overlay-rgba);
	transform: translateY(100%);
	will-change: transform;
}

/*
 * Plain-CSS fallback for when JS never took over (blocked script, GSAP
 * failed to load, etc.) — scoped to ".hs-slider:not(.hs-js-ready)" only,
 * so it never runs at the same time as GSAP. Both engines writing to the
 * same "transform" property at once — GSAP per animation frame, the CSS
 * transition trying to ease every one of those frames on top — is what
 * made the hover reveal feel laggy/delayed instead of instant.
 */
.hs-slider:not(.hs-js-ready) .hs-grid-col-overlay {
	transition: transform 0.35s ease;
}

.hs-slider:not(.hs-js-ready) .hs-grid-col:hover .hs-grid-col-overlay,
.hs-slider:not(.hs-js-ready) .hs-grid-col:focus-within .hs-grid-col-overlay {
	transform: translateY(0);
}

.hs-grid-col-content {
	max-width: 100%;
}

.hs-grid-col-title {
	margin: 0 0 0.4em;
	font-size: clamp(1.15rem, 1.6vw + 0.6rem, 1.75rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.hs-grid-col-text {
	margin: 0;
	max-width: 34ch;
	font-size: 0.98rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.85);
}

.hs-grid-col-text p {
	margin: 0 0 0.6em;
}

.hs-grid-col-text p:last-child {
	margin-bottom: 0;
}

/* -------------------------------------------------------------------- */
/* Classic full-screen slider                                           */
/* -------------------------------------------------------------------- */

.hs-slider--classic {
	background-color: #111;
}

.hs-classic-track {
	position: relative;
	width: 100%;
	height: 100%;
}

.hs-classic-slide {
	position: absolute;
	inset: 0;
	overflow: hidden;
	visibility: hidden;
}

.hs-classic-slide.is-active {
	visibility: visible;
	z-index: 1;
}

.hs-classic-slide-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.hs-classic-slide-scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient( to top, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.25) 42%, rgba(0, 0, 0, 0.05) 65%, rgba(0, 0, 0, 0.15) 100% );
	pointer-events: none;
}

.hs-classic-slide-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	height: 100%;
	max-width: 720px;
	padding: clamp(1.5rem, 6vw, 6rem) clamp(1.5rem, 6vw, 6rem) clamp(3rem, 9vw, 6.5rem);
}

.hs-classic-slide-heading {
	margin: 0 0 0.3em;
	font-size: clamp(1.9rem, 2.6vw + 1rem, 3.75rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.hs-classic-slide-desc {
	margin: 0;
	max-width: 52ch;
	font-size: clamp(0.98rem, 0.4vw + 0.9rem, 1.2rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
}

.hs-classic-slide-desc p {
	margin: 0 0 0.6em;
}

.hs-classic-slide-desc p:last-child {
	margin-bottom: 0;
}

/* Arrows */

.hs-arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin-top: -1.5rem;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.25);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hs-arrow svg {
	width: 1.15rem;
	height: 1.15rem;
}

.hs-arrow:hover,
.hs-arrow:focus-visible {
	background-color: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.85);
}

.hs-arrow:active {
	transform: scale(0.92);
}

.hs-arrow-prev {
	left: clamp(0.75rem, 2vw, 2rem);
}

.hs-arrow-next {
	right: clamp(0.75rem, 2vw, 2rem);
}

/* Dots */

.hs-dots {
	position: absolute;
	left: 50%;
	bottom: clamp(1rem, 3vw, 2rem);
	z-index: 3;
	display: flex;
	gap: 0.6rem;
	transform: translateX(-50%);
}

.hs-dot {
	width: 0.55rem;
	height: 0.55rem;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.hs-dot.is-active {
	background-color: #fff;
	transform: scale(1.2);
}

/* -------------------------------------------------------------------- */
/* Responsive: tablet & mobile                                          */
/* -------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.hs-grid-col-text {
		font-size: 0.92rem;
	}
}

@media (max-width: 782px) {
	.hs-slider {
		height: max( calc((var(--hs-vh) - var(--hs-header-h)) * var(--hs-height-percent) / 100), calc(var(--hs-mobile-min-vh) * 1vh) );
	}

	.hs-grid {
		flex-direction: column;
	}

	.hs-grid-col {
		flex: 1 1 0;
	}

	/* Touch devices can't hover: overlay content is always legible,
	   condensed, and a tap toggles the full reveal via JS. */
	.hs-grid-col-overlay {
		align-items: flex-end;
		padding: 1.1rem 1.25rem;
	}

	.hs-arrow {
		width: 2.5rem;
		height: 2.5rem;
		margin-top: -1.25rem;
	}

	.hs-classic-slide-content {
		max-width: 100%;
		padding: 1.5rem 1.25rem 4.5rem;
	}
}

@media (max-width: 480px) {
	.hs-grid-col-title {
		font-size: 1.05rem;
	}

	.hs-grid-col-text {
		display: none;
	}

	.hs-btn {
		padding: 0.7em 1.4em;
		font-size: 0.85rem;
	}
}

/* -------------------------------------------------------------------- */
/* Accessibility                                                        */
/* -------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.hs-grid-col-bg,
	.hs-grid-col-overlay,
	.hs-btn,
	.hs-arrow,
	.hs-dot {
		transition-duration: 0.01ms !important;
	}
}
