/**
 * Rasa June - Next Project (slider)
 *
 * Scoped under .rjcs-nextproject. See class-next-project-widget.php for
 * editable typography, colors and spacing. The slider is a native
 * scroll-snap track, so swiping works on phone and iPad with no library.
 */

.rjcs-nextproject,
.rjcs-nextproject *,
.rjcs-nextproject *::before,
.rjcs-nextproject *::after {
	box-sizing: border-box;
}

.rjcs-nextproject {
	width: 100%;
}

.rjcs-nextproject__inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.rjcs-nextslider__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 20px;
}

.rjcs-nextproject__eyebrow {
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.rjcs-nextslider__nav {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
}

/* Bare arrows - no circle, no border, no fill. */
.rjcs-nextslider__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 44px;
	padding: 0;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	color: #0E0E0E;
	cursor: pointer;
	transition: color 0.2s ease, opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.rjcs-nextslider__arrow svg {
	width: 26px;
	height: 26px;
	display: block;
}

.rjcs-nextslider__arrow:hover:not(:disabled) {
	background: none !important;
	opacity: 0.55;
}

.rjcs-nextslider__arrow:focus-visible:not(:disabled) {
	background: none !important;
	opacity: 1;
	outline: 2px solid #0E0E0E;
	outline-offset: 3px;
}

.rjcs-nextslider__arrow:active:not(:disabled) {
	opacity: 0.8;
}

/* Disabled = navigation in that direction is not available.
 * The inline slider script sets/removes the real `disabled` attribute on each
 * arrow from the scroll position, so this state is dynamic and identical in
 * NO, EN and LT. Previously both arrows inherited the same grey, so an
 * unavailable arrow was indistinguishable from an available one. */
.rjcs-nextslider__arrow:disabled,
.rjcs-nextslider__arrow[disabled] {
	color: #C4C4BF;
	opacity: 1;
	cursor: default;
	pointer-events: none;
}

.rjcs-nextslider__track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 0;
	margin: 0;
	list-style: none;
}

.rjcs-nextslider__track::-webkit-scrollbar {
	display: none;
}

.rjcs-nextslider__track:focus {
	outline: none;
}

.rjcs-nextslider__track:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.rjcs-nextslider__slide {
	flex: 0 0 100%;
	max-width: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: block;
	text-decoration: none;
	color: inherit;
}

.rjcs-nextslider__image {
	display: block;
	width: 100%;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.rjcs-nextslider__image img,
.rjcs-nextproject__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.25s ease, transform 0.4s ease;
}

.rjcs-nextslider__slide:hover .rjcs-nextproject__img,
.rjcs-nextslider__slide:focus-visible .rjcs-nextproject__img {
	opacity: 0.9;
}

.rjcs-nextslider__text {
	display: block;
	margin: 18px 0 0;
}

/* The old single-project widget carried per-page Elementor typography
   (1px services text, a title line-height smaller than its font-size).
   The slider sets its own readable sizes so those leftovers cannot apply. */
.rjcs-nextslider .rjcs-nextproject__title {
	display: block;
	margin: 0 0 10px;
	font-weight: 400;
	font-size: clamp(24px, 5.5vw, 34px) !important;
	line-height: 1.2 !important;
	letter-spacing: normal !important;
}

.rjcs-nextslider .rjcs-nextproject__services {
	display: block;
	margin: 0;
	opacity: 0.72;
	font-size: 15px !important;
	line-height: 1.5 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
}

.rjcs-nextslider__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 22px 0 0;
}

.rjcs-nextslider__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: currentColor;
	opacity: 0.25;
	cursor: pointer;
	transition: opacity 0.2s ease, width 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.rjcs-nextslider__dot.is-active {
	opacity: 0.85;
	width: 22px;
}

@media (max-width: 1024px) {
	.rjcs-nextslider__image {
		aspect-ratio: 4 / 3;
	}

	.rjcs-nextslider__track {
		gap: 16px;
	}
}

@media (max-width: 767px) {
	.rjcs-nextslider__head {
		margin-bottom: 16px;
	}

	.rjcs-nextslider__image {
		aspect-ratio: 1 / 1;
	}

	.rjcs-nextslider__track {
		gap: 14px;
	}

	.rjcs-nextslider__arrow {
		width: 30px;
		height: 40px;
	}

	.rjcs-nextslider__arrow svg {
		width: 24px;
		height: 24px;
	}

	.rjcs-nextslider__text {
		margin-top: 14px;
	}

	.rjcs-nextslider__dots {
		margin-top: 18px;
	}
}

