/* =========================================================================
   Before & After Slider: heading + intro, then a paired-image carousel
   ========================================================================= */

.nhc-ba {
	--nhc-ba-gap: 30px;
	--nhc-ba-per: 2;
}

/* ---------- Head (left-aligned) ---------- */
.nhc-ba__head {
	text-align: left;
	margin: 0 0 40px;
}
.nhc-ba__heading {
	margin: 0 0 18px;
	font-size: 46px;
	line-height: 1.15;
	font-weight: 400;       /* inherits the theme heading font (e.g. Lora) */
	color: #3a3a3a;
}
.nhc-ba__heading span {
	font-style: italic;
	font-weight: 700;
	background-image: linear-gradient(to right, #00A1B180 0, rgba(255, 107, 48, 0.01) 100%);
	background-repeat: no-repeat;
	background-size: 0% 0.4em;
	background-position: 0 78%;
	transition: background-size 1.04s cubic-bezier(0.19, 1, 0.22, 1);
	padding: 0 .02em;
}

.nhc-ba__heading span.nhc-hl-in { background-size: 100% 0.4em; }
.nhc-ba__intro {
	max-width: 820px;
	margin: 0;
	font-size: 16px;
	line-height: 1.7;
	color: #6f6f6f;
}
.nhc-ba__intro > :first-child { margin-top: 0; }
.nhc-ba__intro > :last-child  { margin-bottom: 0; }

/* ---------- Carousel ---------- */
.nhc-ba__carousel {
	position: relative;
	padding: 0 71px;        /* 46px arrow + 25px gap to the image */
}
.nhc-ba__viewport {
	position: relative;
	overflow: hidden;
	padding: 8px 0 0;       /* small top room for the subtle hover lift */
	transition: height .35s ease;   /* adapt smoothly to each slide's height */
}
.nhc-ba__track {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: var(--nhc-ba-gap);
	transition: transform .45s ease;
	will-change: transform;
}
.nhc-ba__item {
	flex: 0 0 calc((100% - (var(--nhc-ba-per) - 1) * var(--nhc-ba-gap)) / var(--nhc-ba-per));
	min-width: 0;
}

.nhc-ba__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	transition: transform .3s ease;
	will-change: transform;
}
/* Subtle lift on hover (no shadow) */
.nhc-ba__item:hover .nhc-ba__img,
.nhc-ba__item:focus-within .nhc-ba__img {
	transform: translateY(-6px);
}
.nhc-ba__title {
	margin: 20px 0 8px;
	font-size: 22px;
	line-height: 1.3;
	font-weight: 400;       /* inherits the theme heading font (e.g. Lora) */
	font-style: italic;
	color: #3a3a3a;
	text-align: center;
}
.nhc-ba__text {
	font-size: 15px;
	line-height: 1.7;
	color: #6f6f6f;
	text-align: center;
	overflow-wrap: anywhere;
}
.nhc-ba__text > :first-child { margin-top: 0; }
.nhc-ba__text > :last-child  { margin-bottom: 0; }

/* ---------- Arrows (round; subtle move on hover) ---------- */
.nhc-ba .nhc-ba__arrow {
	position: absolute;
	top: 38%;               /* JS refines this to the image centre */
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 46px;
	height: 46px;
	min-width: 0 !important;        /* beat theme button min-width */
	padding: 0 !important;          /* beat theme button padding */
	margin: 0;
	border: 0 !important;
	border-radius: 50% !important;  /* force a perfect circle over theme styles */
	-webkit-appearance: none;
	appearance: none;
	background: #b5bebe;
	color: #ffffff;
	font-size: 0;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transform: translateY(-50%);
	transition: transform .25s ease, background-color .25s ease, color .25s ease, box-shadow .25s ease, opacity .25s ease;
}
.nhc-ba .nhc-ba__arrow--prev { left: 0; }
.nhc-ba .nhc-ba__arrow--next { right: 0; }

.nhc-ba .nhc-ba__arrow:hover,
.nhc-ba .nhc-ba__arrow:focus-visible {
	background-color: #2d7d82;
	color: #ffffff;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
.nhc-ba .nhc-ba__arrow--prev:hover,
.nhc-ba .nhc-ba__arrow--prev:focus-visible { transform: translateY(-50%) translateX(-2px) scale(1.04); }
.nhc-ba .nhc-ba__arrow--next:hover,
.nhc-ba .nhc-ba__arrow--next:focus-visible { transform: translateY(-50%) translateX(2px) scale(1.04); }
.nhc-ba .nhc-ba__arrow:active { transform: translateY(-50%) scale(0.97); }

.nhc-ba .nhc-ba__arrow[disabled] {
	opacity: .35;
	cursor: default;
	pointer-events: none;
}

.nhc-ba .nhc-ba__arrow svg {
	display: block;
}

/* ---------- Responsive: mobile = one image per slide ---------- */
@media only screen and (max-width: 600px) {
	.nhc-ba__heading { font-size: 32px; }
	.nhc-ba__carousel { padding: 0; }
	.nhc-ba__viewport { padding: 0; }
	.nhc-ba__item { flex-basis: 100%; }
	.nhc-ba .nhc-ba__arrow { width: 40px; height: 40px; background: #b5bebe; }
	.nhc-ba .nhc-ba__arrow--prev { left: 8px; }
	.nhc-ba .nhc-ba__arrow--next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.nhc-ba__track { transition: none; }
	.nhc-ba__viewport { transition: none; }
	.nhc-ba__img { transition: none; }
	.nhc-ba__item:hover .nhc-ba__img,
	.nhc-ba__item:focus-within .nhc-ba__img { transform: none; }
	.nhc-ba .nhc-ba__arrow { transition: background-color .2s ease; }
	.nhc-ba .nhc-ba__arrow--prev:hover,
	.nhc-ba .nhc-ba__arrow--next:hover { transform: translateY(-50%); }
}
