/* ARN Smart Vendix — readable, conditional frontend styles. */

/* ARN Smart Logo Carousel */
.arnsc-logo-carousel {
	--arnsc-logo-columns: 5;
	--arnsc-logo-gap: 48px;
	--arnsc-logo-item-height: 100px;
	--arnsc-logo-height: 58px;
	--arnsc-logo-duration: 28s;
	--arnsc-logo-hover-scale: 1.04;
	--arnsc-logo-item-width: 180px;
	position: relative;
	width: 100%;
}

/*
 * The carousel logo width is measured against this strip (container query
 * units). Sized by its content (a row container), the strip is as wide as the
 * visible logos at their full width, not as wide as its padding.
 */
.arnsc-logo-carousel__viewport {
	width: 100%;
	overflow: hidden;
	container-type: inline-size;
	contain-intrinsic-inline-size: calc(var(--arnsc-logo-columns) * var(--arnsc-logo-item-width) + (var(--arnsc-logo-columns) - 1) * var(--arnsc-logo-gap));
}

.arnsc-logo-carousel__track {
	display: flex;
	width: max-content;
	will-change: transform;
	animation: arnscLogoScroll var(--arnsc-logo-duration) linear infinite;
}

.arnsc-logo-carousel--direction-right .arnsc-logo-carousel__track {
	animation-direction: reverse;
}

.arnsc-logo-carousel--pause-hover:hover .arnsc-logo-carousel__track {
	animation-play-state: paused;
}

.arnsc-logo-carousel--pause-interaction.is-interacting .arnsc-logo-carousel__track,
.arnsc-logo-carousel--pause-interaction:focus-within .arnsc-logo-carousel__track {
	animation-play-state: paused;
}

.arnsc-logo-carousel__group {
	display: flex;
	flex-shrink: 0;
	align-items: stretch;
	gap: var(--arnsc-logo-gap);
	padding-inline-end: var(--arnsc-logo-gap);
}

.arnsc-logo-carousel__item {
	display: flex;
	flex: 0 0 var(--arnsc-logo-item-width);
	align-items: center;
	justify-content: center;
	min-width: 0;
	height: var(--arnsc-logo-item-height);
	overflow: hidden;
	transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/*
 * "Visible logos" in the carousel, per screen: a logo is at most
 * --arnsc-logo-item-width wide and narrow enough for that many logos to fit
 * the strip. Wide screens keep the full width (and show more logos); tablets
 * and phones show their own count. Without container query units the logos
 * keep the full width.
 */
@supports (width: 1cqi) {
	.arnsc-logo-carousel__track .arnsc-logo-carousel__item {
		flex-basis: min(var(--arnsc-logo-item-width), (100cqi - (var(--arnsc-logo-columns) - 1) * var(--arnsc-logo-gap)) / var(--arnsc-logo-columns));
	}
}

.arnsc-logo-carousel__link {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: inherit;
	color: inherit;
	text-decoration: none;
	flex-direction: column;
	gap: 10px;
}

.arnsc-logo-carousel__image {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: var(--arnsc-logo-height);
	object-fit: contain;
	transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.arnsc-logo-carousel__item:hover .arnsc-logo-carousel__image {
	transform: scale(var(--arnsc-logo-hover-scale));
}

.arnsc-logo-carousel__item:focus-within .arnsc-logo-carousel__image {
	transform: scale(var(--arnsc-logo-hover-scale));
}

.arnsc-logo-carousel__name {
	display: block;
	max-width: 100%;
	text-align: center;
	overflow-wrap: anywhere;
	white-space: normal;
}

.arnsc-logo-carousel__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

.arnsc-logo-carousel--grayscale .arnsc-logo-carousel__image {
	filter: grayscale(1);
}

.arnsc-logo-carousel--grayscale.arnsc-logo-carousel--color-hover .arnsc-logo-carousel__item:hover .arnsc-logo-carousel__image {
	filter: grayscale(0);
}

.arnsc-logo-carousel--fade-edges {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.arnsc-logo-carousel__grid {
	display: grid;
	grid-template-columns: repeat(var(--arnsc-logo-columns), minmax(0, 1fr));
	gap: var(--arnsc-logo-gap);
}

.arnsc-logo-carousel__grid .arnsc-logo-carousel__item {
	width: 100%;
	min-width: 0;
}

@keyframes arnscLogoScroll {
from {
		transform: translate3d(0, 0, 0);
	}

	to {
		transform: translate3d(-50%, 0, 0);
	}
}

/* In RTL the track overflows to the left, so the loop runs from 0 to +50%. */
@keyframes arnscLogoScrollRtl {
	from {
		transform: translate3d(0, 0, 0);
	}

	to {
		transform: translate3d(50%, 0, 0);
	}
}

[dir="rtl"] .arnsc-logo-carousel__track {
	animation-name: arnscLogoScrollRtl;
}

[dir="rtl"] .arnsc-logo-carousel--direction-left .arnsc-logo-carousel__track {
	animation-direction: reverse;
}

[dir="rtl"] .arnsc-logo-carousel--direction-right .arnsc-logo-carousel__track {
	animation-direction: normal;
}

@media(max-width:767px) {
  .arnsc-logo-carousel {
  --arnsc-logo-gap: 24px;
  }

  .arnsc-logo-carousel--fade-edges {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  		mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  }
}

@media(prefers-reduced-motion:reduce) {
  .arnsc-logo-carousel__track {
  animation-play-state: paused;
  }
}

.arnsc-image-slider {
	--arnsc-image-pos-x: 50%;
	--arnsc-image-pos-y: 50%;
	--arnsc-image-transition-speed: 650ms;
	position: relative;
	width: 100%;
	height: 520px;
	overflow: hidden;
	isolation: isolate;
}

.arnsc-image-slider__track,
.arnsc-image-slider__slide,
.arnsc-image-slider__link,
.arnsc-image-slider picture {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.arnsc-image-slider__slide {
	visibility: hidden;
	opacity: 0;
	z-index: 1;
	overflow: hidden;
	pointer-events: none;
}

.arnsc-image-slider__slide.is-active {
	visibility: visible;
	opacity: 1;
	z-index: 2;
	pointer-events: auto;
}

/* Two classes keep the size above Elementor's ".elementor img { height: auto }". */
.arnsc-image-slider__slide .arnsc-image-slider__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--arnsc-image-pos-x) var(--arnsc-image-pos-y);
}

.arnsc-image-slider__content-wrap {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	padding: 36px;
	pointer-events: none;
}

.arnsc-image-slider__content {
	width: 100%;
	max-width: 60%;
	color: #fff;
	text-align: start;
}

.arnsc-image-slider__title {
	margin: 0 0 10px;
	color: #fff;
}

.arnsc-image-slider__description,
.arnsc-image-slider__description p {
	margin: 0;
	color: #fff;
}

.arnsc-image-slider__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 18px;
	padding: 11px 20px;
	border-radius: 4px;
	background: #fff;
	color: var(--vendix-color-heading, #111827);
	line-height: 1.2;
	text-decoration: none;
	pointer-events: auto;
}

.arnsc-image-slider__button:hover,
.arnsc-image-slider__button:focus-visible {
	color: var(--vendix-color-heading, #111827);
	text-decoration: none;
}

.arnsc-image-slider--fade .arnsc-image-slider__slide {
	transition: opacity var(--arnsc-image-transition-speed) ease, visibility var(--arnsc-image-transition-speed) ease;
}

.arnsc-image-slider--slide .arnsc-image-slider__slide {
	visibility: visible;
	opacity: 1;
	transform: translateX(100%);
	transition: transform var(--arnsc-image-transition-speed) cubic-bezier(0.22, 0.61, 0.36, 1);
}

.arnsc-image-slider--slide .arnsc-image-slider__slide.is-active {
	transform: translateX(0);
}

.arnsc-image-slider--slide .arnsc-image-slider__slide.is-before {
	transform: translateX(-100%);
}

/* Two classes keep theme button:hover / [type="button"]:hover fills off the arrows. */
.arnsc-image-slider .arnsc-image-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.38);
	color: #fff;
	cursor: pointer;
	transform: translateY(-50%);
}

/* Elementor prints the chevron as an unsized SVG: it is kept inside the round button. */
.arnsc-image-slider__arrow svg {
	display: block;
	width: 40%;
	height: 40%;
	fill: currentColor;
}

.arnsc-image-slider__arrow i {
	font-size: 18px;
}

/* In RTL the previous arrow sits on the right, so directional icons are mirrored. */
[dir="rtl"] .arnsc-image-slider__arrow svg,
[dir="rtl"] .arnsc-image-slider__arrow i {
	transform: scaleX(-1);
}

.arnsc-image-slider__arrow:disabled {
	cursor: not-allowed;
	opacity: 0.38;
}

.arnsc-image-slider__arrow:focus-visible,
.arnsc-image-slider__dot:focus-visible,
.arnsc-image-slider__button:focus-visible,
.arnsc-image-slider:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.arnsc-image-slider__arrow--prev {
	inset-inline-start: 18px;
}

.arnsc-image-slider__arrow--next {
	inset-inline-end: 18px;
}

.arnsc-image-slider__dots {
	position: absolute;
	left: 50%;
	bottom: 10px;
	z-index: 5;
	display: flex;
	transform: translateX(-50%);
}

/* The visible dot is the 9 px content box; the transparent padding makes a 25 px touch target. */
/*
 * A 25 px tap target around a 9 px dot (the color fills only the content box).
 * The box size is set for border-box so Elementor's `.elementor *` rule, which a
 * block theme prints later, cannot collapse the dot to nothing.
 */
.arnsc-image-slider .arnsc-image-slider__dot {
	box-sizing: border-box;
	width: 25px;
	height: 25px;
	padding: 8px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	background-clip: content-box;
	cursor: pointer;
}

.arnsc-image-slider__dot.is-active {
	background-color: #fff;
	transform: scale(1.35);
}

[dir="rtl"] .arnsc-image-slider--slide .arnsc-image-slider__slide {
	transform: translateX(-100%);
}

[dir="rtl"] .arnsc-image-slider--slide .arnsc-image-slider__slide.is-active {
	transform: translateX(0);
}

[dir="rtl"] .arnsc-image-slider--slide .arnsc-image-slider__slide.is-before {
	transform: translateX(100%);
}

/* Tablets and phones: the arrows and dots share a row below the text instead of covering the title. */
@media(max-width:1024px) {
  .arnsc-image-slider .arnsc-image-slider__arrow {
  top: auto;
  bottom: 8px;
  transform: none;
  }

  .arnsc-image-slider__arrow--prev {
  inset-inline-start: 12px;
  }

  .arnsc-image-slider__arrow--next {
  inset-inline-end: 12px;
  }

  .arnsc-image-slider__dots {
  bottom: 18px;
  }

  .arnsc-image-slider:has(.arnsc-image-slider__arrow, .arnsc-image-slider__dots) .arnsc-image-slider__content {
  margin-block-end: 44px;
  }
}

@media(max-width:767px) {
  .arnsc-image-slider {
  height: 300px;
  }

  .arnsc-image-slider .arnsc-image-slider__arrow {
  width: 40px;
  height: 40px;
  }

  .arnsc-image-slider__dots {
  bottom: 16px;
  }

  .arnsc-image-slider__content-wrap {
  padding: 20px;
  }

  .arnsc-image-slider:has(.arnsc-image-slider__arrow, .arnsc-image-slider__dots) .arnsc-image-slider__content {
  margin-block-end: 40px;
  }

  .arnsc-image-slider__content {
  max-width: 100%;
  }
}

@media(prefers-reduced-motion:reduce) {
  .arnsc-image-slider__slide,
  .arnsc-image-slider__arrow,
  .arnsc-image-slider__dot {
  transition: none !important;
  }
}

/* ARN Testimonials */
.arnsc-testimonials {
	--arnsc-testimonial-columns: 3;
	--arnsc-testimonial-gap: 24px;
	position: relative;
	min-width: 0;
}

.arnsc-testimonials__track {
	display: grid;
	grid-template-columns: repeat(var(--arnsc-testimonial-columns), minmax(0, 1fr));
	gap: var(--arnsc-testimonial-gap);
}

.arnsc-testimonial {
	position: relative;
	display: flex;
	min-width: 0;
	height: 100%;
	flex-direction: column;
	padding: 30px;
	background: #fff;
	overflow: hidden;
}

/*
 * Stars and quote mark in a darker shade of the accent color (about 3:1 on a
 * white card, still clear on a dark one); Rating / Quote Color replaces it.
 */
.arnsc-testimonial__mark {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 22px;
	color: color-mix(in srgb, var(--vendix-color-accent, var(--vt-accent, #d8b25b)) 75%, var(--vendix-color-heading, #111827));
	font: 700 72px/1 Georgia, serif;
	opacity: 0.18;
	pointer-events: none;
}

.arnsc-testimonial__rating {
	position: relative;
	margin-block-end: 16px;
	color: color-mix(in srgb, var(--vendix-color-accent, var(--vt-accent, #d8b25b)) 75%, var(--vendix-color-heading, #111827));
	font-size: 18px;
	letter-spacing: 2px;
}

.arnsc-testimonial__quote {
	position: relative;
	margin: 0 0 24px;
	padding: 0;
	border: 0;
	font: inherit;
	flex: 1;
}

.arnsc-testimonial__footer {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-block-start: auto;
}

/* Two classes keep the round photo and the logo size above Elementor's ".elementor img" rule. */
.arnsc-testimonial .arnsc-testimonial__photo {
	width: 52px;
	height: 52px;
	flex: 0 0 auto;
	border-radius: 50%;
	object-fit: cover;
}

.arnsc-testimonial__person {
	min-width: 0;
	flex: 1;
}

.arnsc-testimonial__name {
	font-weight: 700;
}

.arnsc-testimonial__role {
	margin-block-start: 3px;
	font-size: 0.9em;
	opacity: 0.72;
}

.arnsc-testimonial .arnsc-testimonial__logo {
	width: auto;
	max-width: 80px;
	height: 34px;
	object-fit: contain;
}

.arnsc-testimonial__source {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.arnsc-testimonial:has(.arnsc-testimonial__source):focus-within,
.arnsc-testimonial:has(.arnsc-testimonial__source):hover {
	transform: translateY(-2px);
}

.arnsc-testimonial__source:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -4px;
}

.arnsc-testimonials--carousel .arnsc-testimonials__viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-inline: contain;
}

.arnsc-testimonials--carousel .arnsc-testimonials__viewport::-webkit-scrollbar {
	display: none;
}

.arnsc-testimonials--carousel .arnsc-testimonials__track {
	display: flex;
	gap: var(--arnsc-testimonial-gap);
}

/* The visible cards share the strip from the first paint (the track is as wide as the strip). */
.arnsc-testimonials--carousel .arnsc-testimonial {
	flex: 0 0 calc((100% - (var(--arnsc-testimonial-columns) - 1) * var(--arnsc-testimonial-gap)) / var(--arnsc-testimonial-columns));
	scroll-snap-align: start;
}

.arnsc-testimonials__nav {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-block-start: 18px;
}

.arnsc-testimonials__arrow {
	display: grid;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font: 400 28px/1 Arial, sans-serif;
	cursor: pointer;
	place-items: center;
}

.arnsc-testimonials__arrow:disabled {
	cursor: not-allowed;
	opacity: 0.35;
}

.arnsc-testimonials__arrow:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

@media(max-width:1024px) {
  .arnsc-testimonials {
  --arnsc-testimonial-columns: 2;
  }
}

@media(max-width:767px) {
  .arnsc-testimonials {
  --arnsc-testimonial-columns: 1;
  }

  .arnsc-testimonial .arnsc-testimonial__logo {
  max-width: 64px;
  }
}

@media(prefers-reduced-motion:no-preference) {
  .arnsc-testimonial {
  transition: transform 0.2s ease;
  }

  .arnsc-testimonials--carousel .arnsc-testimonials__viewport {
  scroll-behavior: smooth;
  }
}

/*
 * First load animation of Image Slider, Logo Carousel and Testimonials
 * (VDX-P-078), timed like the ARN Hero widgets: the first slide's text, the
 * logos or the cards rise one after another, 0.8s each, from 0.18s with 90ms
 * steps. The stylesheet plays it as soon as the slider is drawn, on the page and
 * in the editor (each new render), so nothing waits for the script or flickers.
 * frontend-sliders.js holds a slider that starts below the screen
 * (is-intro-waiting: the hold keeps the items hidden) until it comes into view,
 * then the animation starts from the beginning, and ends it (is-intro-done) once
 * it has run, on the first slide change and for "None". Without the script the
 * animation plays once at load and the items stay; reduced motion shows them at
 * once. The motion is vertical or a zoom, the same in both reading directions.
 */
@media (prefers-reduced-motion: no-preference) {
	.arnsc-image-slider[data-intro="fade"],
	.arnsc-logo-carousel[data-intro="fade"],
	.arnsc-testimonials[data-intro="fade"] {
		--arnsc-slider-intro-name: arnscSliderIntroFade;
	}

	.arnsc-image-slider[data-intro="zoom"],
	.arnsc-logo-carousel[data-intro="zoom"],
	.arnsc-testimonials[data-intro="zoom"] {
		--arnsc-slider-intro-name: arnscSliderIntroZoom;
	}

	.arnsc-image-slider[data-intro="none"],
	.arnsc-logo-carousel[data-intro="none"],
	.arnsc-testimonials[data-intro="none"] {
		--arnsc-slider-intro-name: none;
	}

	.arnsc-image-slider.is-intro-waiting,
	.arnsc-logo-carousel.is-intro-waiting,
	.arnsc-testimonials.is-intro-waiting {
		--arnsc-slider-intro-name: arnscSliderIntroHold;
	}

	.arnsc-image-slider:not(.is-intro-done) .arnsc-image-slider__slide:first-child .arnsc-image-slider__content > *,
	.arnsc-logo-carousel:not(.is-intro-done) .arnsc-logo-carousel__item,
	.arnsc-testimonials:not(.is-intro-done) .arnsc-testimonial {
		animation: var(--arnsc-slider-intro-name, arnscSliderIntroFadeUp) 0.8s cubic-bezier(0.22, 0.7, 0.18, 1) both;
		animation-delay: calc(0.18s + var(--arnsc-slider-intro-order, 0) * 90ms);
	}

	/* One step per item; the fourth and later items come together. */
	.arnsc-image-slider__content > :nth-child(2),
	.arnsc-logo-carousel__item:nth-child(2),
	.arnsc-testimonial:nth-child(2) {
		--arnsc-slider-intro-order: 1;
	}

	.arnsc-image-slider__content > :nth-child(3),
	.arnsc-logo-carousel__item:nth-child(3),
	.arnsc-testimonial:nth-child(3) {
		--arnsc-slider-intro-order: 2;
	}

	.arnsc-logo-carousel__item:nth-child(n+4),
	.arnsc-testimonial:nth-child(n+4) {
		--arnsc-slider-intro-order: 3;
	}
}

@keyframes arnscSliderIntroFadeUp {
	from {
		opacity: 0;
		translate: 0 22px;
	}
}

@keyframes arnscSliderIntroFade {
	from {
		opacity: 0;
	}
}

@keyframes arnscSliderIntroZoom {
	from {
		opacity: 0;
		scale: 0.94;
	}
}

@keyframes arnscSliderIntroHold {
	from,
	to {
		opacity: 0;
	}
}
