/**
 * Northbridge Slider — horizontal accordion (WPBakery element)
 */

.nb-hacc {
	--nb-hacc-height: min(56vw, 830px);
	--nb-hacc-strip: clamp(44px, 5vw, 64px);
	--nb-hacc-active-flex: 1 1 72%;
	--nb-hacc-muted: rgba(255, 255, 255, 0.92);
	/* Panel open/close — slow, smooth (tweak --nb-hacc-duration to taste) */
	--nb-hacc-duration: 1.85s;
	--nb-hacc-ease: cubic-bezier(0.25, 1, 0.35, 1);
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	font-family: var(--nb-font, "Inter Tight", system-ui, sans-serif);
}

.nb-hacc__track {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	width: 100%;
	height: var(--nb-hacc-height);
	min-height: 280px;
	overflow: hidden;
	background: #0a1520;
}

.nb-hacc__panel {
	position: relative;
	flex: 0 0 var(--nb-hacc-strip);
	min-width: var(--nb-hacc-strip);
	max-width: 100%;
	cursor: pointer;
	overflow: hidden;
	transition: flex var(--nb-hacc-duration) var(--nb-hacc-ease), min-width var(--nb-hacc-duration) var(--nb-hacc-ease), flex-basis var(--nb-hacc-duration) var(--nb-hacc-ease);
	border-left: 1px solid rgba(255, 255, 255, 0.12);
	outline: none;
}

.nb-hacc__panel:first-child {
	border-left: none;
}

.nb-hacc__panel:focus-visible {
	box-shadow: inset 0 0 0 2px var(--nb-gold, #b89d64);
	z-index: 2;
}

.nb-hacc__panel.is-active {
	flex: var(--nb-hacc-active-flex);
	min-width: min(40%, 320px);
}

.nb-hacc__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center right;
	background-repeat: no-repeat;
	transition: transform var(--nb-hacc-duration) var(--nb-hacc-ease);
}

.nb-hacc__panel.is-active .nb-hacc__bg {
	transform: scale(1.02);
}

.nb-hacc__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(10, 21, 32, 0.75) 0%, rgba(10, 21, 32, 0.25) 45%, rgba(10, 21, 32, 0.35) 100%);
	pointer-events: none;
}

.nb-hacc__panel:not(.is-active) .nb-hacc__bg::after {
	background: rgba(10, 21, 32, 0.55);
}

/* Active slide: no dimming overlay on the image */
.nb-hacc__panel.is-active .nb-hacc__bg::after {
	opacity: 0;
}

.nb-hacc__inner {
	position: relative;
	z-index: 1;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: stretch;
	padding: 0;
	box-sizing: border-box;
}

.nb-hacc__copy {
	position: absolute;
	left: clamp(1rem, 4vw, 2.75rem);
	top: 50%;
	transform: translateY(-50%);
	max-width: min(92%, 650px);
	padding: clamp(0.75rem, 2vw, 1.35rem) clamp(1rem, 2.5vw, 2rem) clamp(0.75rem, 2vw, 1.35rem) clamp(0.65rem, 1.5vw, 1.1rem);
	z-index: 2;
	isolation: isolate;
	opacity: 0;
	visibility: hidden;
	/* Leaving active: hide copy quickly so the next slide’s text doesn’t overlap */
	transition: opacity 0.28s ease 0s, visibility 0s linear 0.28s;
	pointer-events: none;
}

.nb-hacc__panel.is-active .nb-hacc__copy {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	/* Visible right away (opacity still 0→1); delay matches panel opening a little */
	transition: opacity 0.55s var(--nb-hacc-ease) calc(var(--nb-hacc-duration) * 0.14);
	background: rgba(0, 0, 0, 0.15);
	border-radius: 16px;
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(3.9px);
	-webkit-backdrop-filter: blur(3.9px);
}

.nb-hacc__heading {
	position: relative;
	margin: 0 0 0.35rem;
	font-family: "Inter Tight", system-ui, sans-serif;
	font-size: clamp(1.15rem, 2.8vw, 2.85rem);
	font-weight: 700;
	line-height: 1.15;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-shadow:
		0 1px 2px rgba(0, 0, 0, 0.55),
		0 2px 12px rgba(0, 0, 0, 0.45),
		0 4px 28px rgba(0, 0, 0, 0.35),
		0 0 40px rgba(0, 0, 0, 0.2);
}

.nb-hacc__sub {
	position: relative;
	margin: 0;
	font-family: "Inter Tight", system-ui, sans-serif;
	/* Sized up toward .nb-hacc__heading (clamp 1.15rem / 2.8vw / 2.85rem) but slightly lighter */
	font-size: clamp(1.05rem, 2.45vw, 2.5rem);
	font-weight: 200;
	line-height: 1.2;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.045em;
	text-shadow:
		0 1px 2px rgba(0, 0, 0, 0.6),
		0 2px 10px rgba(0, 0, 0, 0.5),
		0 3px 22px rgba(0, 0, 0, 0.35);
}

.nb-hacc__label {
	display: block;
	align-self: flex-end;
	margin: 0 0.65rem 1.25rem 0;
	padding: 0;
	font-family: "Inter Tight", system-ui, sans-serif;
	/* Vertical strip labels */
	font-size: clamp(1rem, 2.15vw, 1.6rem);
	font-weight: 600;
	line-height: 1;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	white-space: nowrap;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.nb-hacc__panel.is-active .nb-hacc__label {
	margin-right: clamp(0.75rem, 2vw, 1.5rem);
}

@media screen and (max-width: 782px) {
	.nb-hacc {
		--nb-hacc-height: min(70vw, 420px);
		--nb-hacc-strip: 40px;
	}

	.nb-hacc__panel.is-active {
		min-width: min(55%, 240px);
	}

	.nb-hacc__copy {
		left: 0.85rem;
		max-width: calc(100% - 3rem);
	}
}

/*
 * Very narrow viewports: collapsed strips + active min-width from ≤782px exceed the row
 * (last panel clips / horizontal overflow). Tighter strips, flex-based active width, smaller labels.
 */
@media screen and (max-width: 320px) {
	.nb-hacc {
		--nb-hacc-height: min(68vw, 400px);
		--nb-hacc-strip: 22px;
	}

	.nb-hacc__track {
		min-width: 0;
	}

	.nb-hacc__panel {
		min-width: 0;
	}

	.nb-hacc__panel:not(.is-active) {
		flex: 0 0 var(--nb-hacc-strip);
		min-width: var(--nb-hacc-strip);
		max-width: var(--nb-hacc-strip);
	}

	.nb-hacc__panel.is-active {
		flex: 1 1 0;
		min-width: 0;
		max-width: none;
	}

	.nb-hacc__label {
		font-size: 0.5rem;
		letter-spacing: 0.1em;
		margin-right: 0.2rem;
		margin-bottom: 0.45rem;
	}

	.nb-hacc__panel.is-active .nb-hacc__label {
		margin-right: 0.35rem;
		margin-bottom: 0.55rem;
	}

	.nb-hacc__copy {
		left: 0.45rem;
		max-width: calc(100% - 1.75rem);
		padding-left: 0.3rem;
		padding-right: 0.3rem;
	}

	.nb-hacc__heading {
		font-size: clamp(0.72rem, 4vw, 0.95rem);
	}

	.nb-hacc__sub {
		font-size: clamp(0.65rem, 3.5vw, 0.85rem);
	}
}
