/* ── Outer layout ────────────────────────────────────────────────────────── */

.jbc-why-choose {
	display: flex;
	align-items: stretch;
	gap: 60px;
	overflow: visible;
}

/* ── Slides column ───────────────────────────────────────────────────────── */

.jbc-why-choose__slides-col {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.jbc-why-choose__slides {
	display: grid;
	width: 100%;
}

@keyframes jbc-slide-up {
	from {
		opacity: 0;
		transform: translateY(28px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.jbc-why-choose__slide {
	grid-area: 1 / 1;
	opacity: 0;
	pointer-events: none;
}

.jbc-why-choose__slide.is-active {
	opacity: 1;
	pointer-events: auto;
	animation: jbc-slide-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.jbc-why-choose__eyebrow {
	font-family: var(--client-font-primary, sans-serif);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #c8102e;
	margin: 0 0 10px;
}

.jbc-why-choose__title {
	font-family: var(--client-font-display, sans-serif);
	font-size: clamp(1.8rem, 3vw, 2.5rem);
	color: var(--client-heading, #003e72);
	margin: 0 0 16px;
	line-height: 1.1;
}

.jbc-why-choose__body {
	font-family: var(--client-font-primary, sans-serif);
	font-size: 1.1rem;
	color: var(--client-text, #003e72);
	margin: 0 0 12px;
	line-height: 1.6;
}

.jbc-why-choose__fine {
	font-family: var(--client-font-primary, sans-serif);
	font-size: 0.8rem;
	color: var(--client-text, #003e72);
	opacity: 0.6;
	font-style: italic;
	margin: 0;
}

/* ── Staggered clickable boards ──────────────────────────────────────────── */

.jbc-why-choose__images {
	flex: 1 1 0;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	/* Bleed beyond section padding */
	margin-top: -80px;
	margin-bottom: -80px;
	margin-right: -40px;
}

.jbc-why-choose__img-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
	border-radius: 9999px;
	overflow: hidden;
	cursor: pointer;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
	--stagger-y: 0px;
	--hover-y: 0px;
	translate: 0 calc(var(--stagger-y) + var(--hover-y));
	transition: translate 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.jbc-why-choose__img-wrap:hover:not(.is-active) {
	--hover-y: -8px;
}

.jbc-why-choose__img-wrap:hover:not(.is-active)::before {
	opacity: 0.55;
}

.jbc-why-choose__img-wrap:hover:not(.is-active) .jbc-why-choose__img {
	opacity: 0.5;
	filter: blur(1px) brightness(0.85);
}

/* Dim/blur only the image — number stays full opacity */
.jbc-why-choose__img {
	opacity: 0.28;
	filter: blur(2px) brightness(0.75);
	transition: opacity 0.5s ease, filter 0.5s ease;
}

.jbc-why-choose__img-wrap.is-active .jbc-why-choose__img {
	opacity: 1;
	filter: none;
}

/* Navy tint on inactive boards — makes white text readable */
.jbc-why-choose__img-wrap::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 62, 114, 0.82);
	pointer-events: none;
	z-index: 1;
	transition: opacity 0.5s ease;
}

.jbc-why-choose__img-wrap.is-active::before {
	opacity: 0;
}

/* Gradient at top for number readability on active board */
.jbc-why-choose__img-wrap::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 100px;
	background: linear-gradient(to bottom, rgba(0, 30, 60, 0.55), transparent);
	pointer-events: none;
	z-index: 1;
}

/* Number on the board */
.jbc-why-choose__board-num {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	font-family: var(--client-font-display, sans-serif);
	font-size: 1.5rem;
	font-weight: 500;
	color: #fff;
	line-height: 1;
	z-index: 2;
	background: #c8102e;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Short label — vertical, inactive boards only */
.jbc-why-choose__board-label {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(-90deg);
	white-space: nowrap;
	font-family: var(--client-font-primary, sans-serif);
	font-size: 1.2rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #fff;
	z-index: 2;
	opacity: 1;
	transition: opacity 0.4s ease;
}

.jbc-why-choose__img-wrap.is-active .jbc-why-choose__board-label {
	opacity: 0;
}

/* Stagger — translate is a separate property from transform, so both can coexist */
.jbc-why-choose__img-wrap:nth-child(1) { height: 460px; --stagger-y: 125px; animation-delay: 0s;   }
.jbc-why-choose__img-wrap:nth-child(2) { height: 460px; --stagger-y:  60px; animation-delay: 0.1s; }
.jbc-why-choose__img-wrap:nth-child(3) { height: 460px; --stagger-y:  20px; animation-delay: 0.2s; }
.jbc-why-choose__img-wrap:nth-child(4) { height: 460px; --stagger-y:  80px; animation-delay: 0.3s; }

/* ── Entrance animation ──────────────────────────────────────────────────── */

@keyframes jbc-board-from-top {
	from { opacity: 0; transform: translateY(-70px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes jbc-board-from-bottom {
	from { opacity: 0; transform: translateY(70px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Hidden before visible */
.jbc-why-choose__images:not(.is-visible) .jbc-why-choose__img-wrap {
	opacity: 0;
}

.jbc-why-choose__images.is-visible .jbc-why-choose__img-wrap:nth-child(odd) {
	animation: jbc-board-from-top 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.jbc-why-choose__images.is-visible .jbc-why-choose__img-wrap:nth-child(even) {
	animation: jbc-board-from-bottom 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.jbc-why-choose__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}

.jbc-why-choose__img-placeholder {
	width: 100%;
	height: 100%;
	background: rgba(0, 62, 114, 0.1);
	opacity: 0.28;
	transition: opacity 0.5s ease;
}

.jbc-why-choose__img-wrap.is-active .jbc-why-choose__img-placeholder {
	opacity: 1;
}

/* ── Dots nav ────────────────────────────────────────────────────────────── */

.jbc-why-choose__dots {
	display: flex;
	gap: 8px;
	margin-top: 28px;
}

.jbc-why-choose__dot {
	width: 8px;
	height: 8px;
	min-width: 0;
	border-radius: 50% !important;
	border: none;
	background: rgba(0, 62, 114, 0.25);
	cursor: pointer;
	padding: 0 !important;
	font-size: 0 !important;
	transition: background 0.25s ease, transform 0.25s ease;
}

.jbc-why-choose__dot.is-active {
	background: #c8102e;
	transform: scale(1.3);
}

/* ── Mobile nav (hidden on desktop) ─────────────────────────────────────── */

.jbc-why-choose__mobile-nav {
	display: none;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	.jbc-why-choose {
		flex-direction: column;
		gap: 32px;
	}

	.jbc-why-choose__images {
		display: none;
	}

	.jbc-why-choose__dots {
		display: none;
	}

	.jbc-why-choose__mobile-nav {
		display: flex;
		gap: 10px;
		margin-top: 24px;
	}

	.jbc-why-choose__mobile-btn {
		box-sizing: border-box;
		width: 36px;
		height: 36px;
		min-width: 36px;
		border-radius: 50%;
		border: 2px solid rgba(0, 62, 114, 0.35);
		background: transparent;
		color: rgba(0, 62, 114, 0.5);
		font-family: var(--client-font-display, sans-serif);
		font-size: 1rem;
		font-weight: 500;
		cursor: pointer;
		padding: 0 !important;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	}

	.jbc-why-choose__mobile-btn.is-active {
		background: #c8102e;
		border-color: #c8102e;
		color: #fff;
	}
}

/* ── Editor canvas ───────────────────────────────────────────────────────── */

.jbc-why-choose-editor {
	background: #f0f4f8;
	border: 2px dashed #003e72;
	border-radius: 4px;
	padding: 20px 24px;
}

.jbc-why-choose-editor__header {
	font-weight: 700;
	color: #003e72;
	font-size: 1rem;
	margin-bottom: 12px;
}

.jbc-why-choose-editor__list {
	margin: 0 0 12px;
	padding-left: 20px;
}

.jbc-why-choose-editor__list li {
	margin-bottom: 6px;
	font-size: 0.875rem;
	color: #333;
}

.jbc-why-choose-editor__hint {
	font-size: 0.75rem;
	color: #666;
	font-style: italic;
	margin: 0;
}
