/**
 * Noble Workshops — Image Strip
 *
 * A single row of fixed-height images that runs off both sides of the screen.
 *  - Scroll mode: the viewport scrolls natively (trackpad, touch, keyboard);
 *    its own scrollbar is hidden and replaced by .nw-strip__bar.
 *  - Loop mode: the viewport clips, and the script translates the track,
 *    with cloned copies of the images appended so the loop has no seam.
 *
 * Values below come from Figma: Noble Workshops Redesign → Home section
 * (node 2206:3201). 320px-tall images with 6px corners and 20px gaps; a
 * 1011×11 round-capped track (#4E6863) with a 260px (25.7%) white thumb,
 * 57px below. Elementor controls default to these same numbers.
 *
 * The testimonial variant (node 2206:3300) is the same widget with text
 * slides: 409px height, 10px corners, 25px gaps, 307px #4E6863 text cards and
 * a #D8D2C7 track with a #2F403D thumb, all set from the controls.
 */

.nw-strip {
	--nw-strip-h: 320; /* unitless, so slide widths can scale against it */
	--nw-strip-ref: 320; /* the desktop Height; slide widths are 1:1 at it */
	--nw-strip-gap: 20px;
	--nw-strip-radius: 6px;

	--nw-bar-space: 57px;
	--nw-bar-width: 1011px;
	--nw-bar-thickness: 11px;
	--nw-thumb-width: 25.7%; /* 260px of the 1011px track */
	--nw-track-color: #4e6863;
	--nw-thumb-color: #ffffff;

	--nw-card-bg: #4e6863;
	--nw-card-valign: center;
	--nw-card-gap: 20px;

	position: relative;
}

.nw-strip *,
.nw-strip *::before,
.nw-strip *::after {
	box-sizing: border-box;
}

/*
 * Break out of the parent container to the full viewport. The script replaces
 * these with measured values (100vw counts the page scrollbar on Windows, and
 * the calc assumes the container is centred).
 */
.nw-strip--full {
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* --- Images -------------------------------------------------------------- */

.nw-strip__viewport {
	overflow: hidden;
	outline: none;
	cursor: grab;
}

.nw-strip.is-dragging .nw-strip__viewport {
	cursor: grabbing;
	user-select: none;
}

/* Loop mode has no native scroll, so horizontal touch drags go to the script
   while vertical swipes still scroll the page. */
.nw-strip--loop .nw-strip__viewport {
	touch-action: pan-y;
}

.nw-strip--scroll .nw-strip__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.nw-strip--scroll .nw-strip__viewport::-webkit-scrollbar {
	display: none;
}

.nw-strip__viewport:focus-visible {
	outline: 2px solid var(--nw-thumb-color);
	outline-offset: 4px;
}

.nw-strip__track {
	display: flex;
	gap: var(--nw-strip-gap);
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nw-strip--loop .nw-strip__track {
	will-change: transform;
}

.nw-strip__slide {
	flex: 0 0 auto;
	width: calc(var(--nw-strip-h) * var(--nw-slide-w, 265) / var(--nw-strip-ref) * 1px);
	height: calc(var(--nw-strip-h) * 1px);
	margin: 0;
	overflow: hidden;
	border-radius: var(--nw-strip-radius);
}

/* Doubled class so it outranks Elementor's `.elementor img { height: auto }`,
   which would otherwise leave the photo short of its frame. */
.nw-strip .nw-strip__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: var(--nw-focal, 50% 50%);
	border-radius: 0;
	-webkit-user-drag: none;
	user-select: none;
}

/* --- Text slides ---------------------------------------------------------- */

/* Doubled classes throughout so theme figure / blockquote styles cannot win. */
.nw-strip .nw-strip__card {
	display: flex;
	flex-direction: column;
	justify-content: var(--nw-card-valign);
	gap: var(--nw-card-gap);
	height: 100%;
	margin: 0;
	padding: 15px 20px;
	overflow: hidden;
	background: var(--nw-card-bg);
	overflow-wrap: break-word;
}

.nw-strip .nw-strip__quote {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #ffffff;
	font-family: "Marcellus", Georgia, "Times New Roman", serif;
	font-size: 28px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.2;
	quotes: none;
}

.nw-strip .nw-strip__quote::before,
.nw-strip .nw-strip__quote::after {
	content: none;
}

.nw-strip .nw-strip__name {
	margin: 0;
	padding: 0;
	color: #ffffff;
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 18px;
	font-style: normal;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* --- Scroll bar ---------------------------------------------------------- */

.nw-strip__bar {
	position: relative;
	width: min(var(--nw-bar-width), calc(100% - 32px));
	height: var(--nw-bar-thickness);
	margin: var(--nw-bar-space) auto 0;
	border-radius: 999px;
	background: var(--nw-track-color);
	cursor: pointer;
	touch-action: none;
}

/* Taller hit area than the 11px line, so it is easy to grab. */
.nw-strip__bar::before {
	content: "";
	position: absolute;
	inset: -10px 0;
}

.nw-strip__thumb {
	position: absolute;
	top: 0;
	left: 0;
	width: min(var(--nw-thumb-width), 100%);
	height: 100%;
	border-radius: inherit;
	background: var(--nw-thumb-color);
	cursor: grab;
	will-change: transform;
}

.nw-strip.is-dragging,
.nw-strip.is-dragging .nw-strip__thumb {
	cursor: grabbing;
	user-select: none;
}

/* Nothing to scroll: the bar would only mislead. */
.nw-strip.is-static .nw-strip__bar {
	visibility: hidden;
}
