/**
 * Netlogic Photo Slider
 * Cinematic glass cards, edge-faded marquee, accessible lightbox.
 * All text colors are from the approved WCAG AA palette on dark backgrounds.
 */

.nl-ps {
	--nl-ps-w: 250px;
	--nl-ps-h: 330px;
	--nl-ps-gap: 22px;
	--nl-ps-radius: 20px;
	position: relative;
	width: 100%;
	box-sizing: border-box;
	font-family: 'Manrope', sans-serif;
}
.nl-ps *,
.nl-ps *::before,
.nl-ps *::after { box-sizing: border-box; }

.nl-ps--small  { --nl-ps-w: 190px; --nl-ps-h: 250px; --nl-ps-gap: 18px; }
.nl-ps--medium { --nl-ps-w: 250px; --nl-ps-h: 330px; --nl-ps-gap: 22px; }
.nl-ps--large  { --nl-ps-w: 320px; --nl-ps-h: 420px; --nl-ps-gap: 26px; }

/* ---------- Viewport + edge fade ---------- */
.nl-ps__viewport {
	position: relative;
	overflow: hidden;
	padding: 28px 0 34px;
	cursor: grab;
	touch-action: pan-y;               /* vertical page scroll still works on touch */
	-webkit-user-select: none;
	user-select: none;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.nl-ps__viewport.is-dragging { cursor: grabbing; }

.nl-ps__track {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--nl-ps-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	width: max-content;
	will-change: transform;
	transform: translate3d(0, 0, 0);
}
.nl-ps__item {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- Cards ---------- */
/* Gutenberg button reset (see workspace rule): neutralise .wp-element-button styling. */
button.nl-ps__card,
.nl-ps__card {
	position: relative !important;
	display: block !important;
	width: var(--nl-ps-w) !important;
	height: var(--nl-ps-h) !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	background: #131022 !important;
	border: 1px solid rgba(165, 180, 252, 0.18) !important;
	border-radius: var(--nl-ps-radius) !important;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 0 rgba(129, 140, 248, 0) !important;
	font-family: inherit !important;
	color: #ffffff !important;
	text-align: left !important;
	cursor: inherit !important;
	-webkit-touch-callout: none;
	touch-action: pan-y !important;    /* horizontal swipes go to the slider, vertical still scrolls the page */
	transition: transform 0.45s cubic-bezier(.2, .8, .2, 1), box-shadow 0.45s ease, opacity 0.45s ease, border-color 0.45s ease;
}
.nl-ps__media,
.nl-ps__media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
}
.nl-ps__media img {
	object-fit: cover;
	transform: scale(1.04);
	filter: saturate(0.92) brightness(0.9);
	transition: transform 0.9s cubic-bezier(.2, .8, .2, 1), filter 0.6s ease;
	pointer-events: none;
	-webkit-user-drag: none;
}
.nl-ps__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, rgba(11, 9, 20, 0.96) 0%, rgba(11, 9, 20, 0.62) 34%, rgba(11, 9, 20, 0) 62%),
		linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(99, 102, 241, 0) 45%);
	transition: opacity 0.5s ease;
}
.nl-ps__text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: block;
	padding: 18px 18px 20px;
}
.nl-ps__title {
	display: block;
	font-size: 1.0625rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.2px;
	color: #ffffff;
}
.nl-ps__title::before {
	content: '';
	display: block;
	width: 28px;
	height: 3px;
	margin-bottom: 10px;
	border-radius: 3px;
	background: linear-gradient(90deg, #818cf8, #a5b4fc);
	transition: width 0.45s ease;
}
.nl-ps__caption {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-height: 0;
	margin-top: 0;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.5;
	color: #e2e8f0;
	opacity: 0;
	transform: translateY(8px);
	transition: max-height 0.5s ease, opacity 0.45s ease, transform 0.45s ease, margin-top 0.45s ease;
}
.nl-ps__zoom {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: #ffffff;
	background: rgba(19, 16, 34, 0.62);
	border: 1px solid rgba(255, 255, 255, 0.2);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	transform: scale(0.8);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Hover / keyboard focus state: lift, brighten, reveal caption */
.nl-ps__card:hover,
.nl-ps__card:focus-visible {
	transform: translateY(-10px) scale(1.04) !important;
	border-color: rgba(165, 180, 252, 0.7) !important;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 38px 2px rgba(129, 140, 248, 0.38) !important;
	z-index: 2;
}
.nl-ps__card:hover .nl-ps__media img,
.nl-ps__card:focus-visible .nl-ps__media img {
	transform: scale(1.1);
	filter: saturate(1.08) brightness(1.04);
}
.nl-ps__card:hover .nl-ps__title::before,
.nl-ps__card:focus-visible .nl-ps__title::before { width: 54px; }
.nl-ps__card:hover .nl-ps__caption,
.nl-ps__card:focus-visible .nl-ps__caption {
	max-height: 6em;
	margin-top: 8px;
	opacity: 1;
	transform: translateY(0);
}
.nl-ps__card:hover .nl-ps__zoom,
.nl-ps__card:focus-visible .nl-ps__zoom {
	opacity: 1;
	transform: scale(1);
}
.nl-ps__card:focus-visible {
	outline: 3px solid #a5b4fc !important;
	outline-offset: 4px !important;
}

/* Spotlight: dim the neighbours while a pointer is over the bar (mouse only) */
@media (hover: hover) and (pointer: fine) {
	.nl-ps__viewport:hover .nl-ps__card:not(:hover):not(:focus-visible) {
		opacity: 0.5;
	}
}

/* Dwell progress ring-less cue: soft pulse while the large view is about to open */
.nl-ps__card.is-arming { border-color: rgba(165, 180, 252, 0.9) !important; }

/* ---------- Control bar ---------- */
.nl-ps__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 0 4px;
}
.nl-ps__hint {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.3px;
	color: #94a3b8;
}
.nl-ps__controls { display: flex; gap: 10px; }

button.nl-ps__btn,
.nl-ps__btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 46px !important;
	height: 46px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	margin: 0 !important;
	padding: 0 !important;
	color: #ffffff !important;
	background: rgba(99, 102, 241, 0.15) !important;
	border: 1px solid rgba(165, 180, 252, 0.35) !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	font-family: inherit !important;
	cursor: pointer !important;
	transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.nl-ps__btn:hover {
	background: rgba(99, 102, 241, 0.4) !important;
	border-color: #a5b4fc !important;
	transform: translateY(-2px);
}
.nl-ps__btn:focus-visible {
	outline: 3px solid #a5b4fc !important;
	outline-offset: 3px !important;
}
.nl-ps__btn--toggle .nl-ps__ico-play { display: none; }
.nl-ps.is-paused .nl-ps__btn--toggle .nl-ps__ico-play { display: block; }
.nl-ps.is-paused .nl-ps__btn--toggle .nl-ps__ico-pause { display: none; }

/* ---------- Lightbox ---------- */
.nl-ps-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: 'Manrope', sans-serif;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.nl-ps-lb.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.35s ease;
}
.nl-ps-lb__backdrop {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 50% 40%, rgba(49, 46, 129, 0.55), rgba(11, 9, 20, 0.96) 70%);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}
.nl-ps-lb__figure {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(1100px, 100%);
	max-height: 100%;
	margin: 0;
	overflow: hidden;
	background: rgba(19, 16, 34, 0.82);
	border: 1px solid rgba(165, 180, 252, 0.25);
	border-radius: 24px;
	box-shadow: 0 40px 100px rgba(0, 0, 0, 0.75), 0 0 80px rgba(99, 102, 241, 0.2);
	transform: translateY(16px) scale(0.97);
	transition: transform 0.45s cubic-bezier(.2, .8, .2, 1);
}
.nl-ps-lb.is-open .nl-ps-lb__figure { transform: translateY(0) scale(1); }
.nl-ps-lb__imgwrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	max-height: 68vh;
	background: #0b0914;
}
.nl-ps-lb__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 68vh;
	object-fit: contain;
	transition: opacity 0.3s ease;
}
.nl-ps-lb__img.is-swapping { opacity: 0; }
.nl-ps-lb__caption {
	padding: 22px 28px 26px;
	overflow-y: auto;
}
.nl-ps-lb__count {
	display: block;
	margin-bottom: 8px;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #a5b4fc;
}
.nl-ps-lb__title {
	margin: 0 0 8px;
	font-size: 1.625rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.3px;
	color: #ffffff;
}
.nl-ps-lb__text {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 500;
	line-height: 1.7;
	color: #cbd5e1;
}
button.nl-ps-lb__btn,
.nl-ps-lb__btn {
	position: absolute !important;
	z-index: 3;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 48px !important;
	height: 48px !important;
	margin: 0 !important;
	padding: 0 !important;
	color: #ffffff !important;
	background: rgba(19, 16, 34, 0.75) !important;
	border: 1px solid rgba(165, 180, 252, 0.45) !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	cursor: pointer !important;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: background 0.3s ease, transform 0.3s ease;
}
.nl-ps-lb__btn:hover { background: rgba(99, 102, 241, 0.65) !important; }
.nl-ps-lb__btn:focus-visible { outline: 3px solid #a5b4fc !important; outline-offset: 3px !important; }
.nl-ps-lb__btn--close { top: 20px; right: 20px; }
.nl-ps-lb__btn--prev  { left: 20px; top: 34%; }
.nl-ps-lb__btn--next  { right: 20px; top: 34%; }
body.nl-ps-lb-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
	.nl-ps--large  { --nl-ps-w: 280px; --nl-ps-h: 370px; }
}
@media (max-width: 768px) {
	.nl-ps--small  { --nl-ps-w: 150px; --nl-ps-h: 200px; --nl-ps-gap: 14px; }
	.nl-ps--medium { --nl-ps-w: 200px; --nl-ps-h: 270px; --nl-ps-gap: 16px; }
	.nl-ps--large  { --nl-ps-w: 240px; --nl-ps-h: 320px; --nl-ps-gap: 18px; }
	.nl-ps__viewport { padding: 20px 0 26px; }
	/* Touch has no hover: always show the caption's first line cue via the title bar only */
	.nl-ps__bar { justify-content: center; text-align: center; }
	.nl-ps-lb { padding: 12px; }
	.nl-ps-lb__caption { padding: 18px 20px 22px; }
	.nl-ps-lb__title { font-size: 1.3125rem; }
	.nl-ps-lb__btn--prev { left: 10px; top: 26%; }
	.nl-ps-lb__btn--next { right: 10px; top: 26%; }
	.nl-ps-lb__btn--close { top: 12px; right: 12px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.nl-ps__card,
	.nl-ps__media img,
	.nl-ps__caption,
	.nl-ps__zoom,
	.nl-ps-lb,
	.nl-ps-lb__figure,
	.nl-ps-lb__img { transition: none !important; }
}
