/* ============================================================
   KIK Carousel Slider Custom — v1.2.0
   ============================================================ */

.rfj-carousel {
	overflow: hidden;
	position: relative;
	background: transparent;
	width: 100%;
}

.rfj-carousel--vertical {
	/* Height set via Elementor control (default 620px). */
	max-width: 300px;
	/* overridable via Elementor control */
}

.rfj-carousel--horizontal {
	height: auto;
	max-width: 100%;
}

.rfj-carousel-track {
	display: flex;
	will-change: transform;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	transform: translateZ(0);
}

.rfj-carousel--vertical .rfj-carousel-track {
	flex-direction: column;
}

/* height: 100% ensures the track fills the carousel's fixed height so
   items can stretch to it and Y-centering has room to work.          */
.rfj-carousel--horizontal .rfj-carousel-track {
	flex-direction: row;
	height: 100%;
	align-items: stretch;
}

/*
   All items are column-flex containers so .rfj-slide-inner can use
   flex: 1 to reliably fill the full item height in both directions.
*/
.rfj-carousel-item {
	flex-shrink: 0;
	transform: translateZ(0);
	display: flex;
	flex-direction: column;
}

.rfj-carousel--vertical .rfj-carousel-item {
	width: 100%;
	padding-bottom: 20px;
}

.rfj-carousel--horizontal .rfj-carousel-item {
	padding-right: 20px;
}

/*
   --rfj-align-x : left/center/right  (flex-start / center / flex-end)
   --rfj-align-y : top/middle/bottom  (flex-start / center / flex-end)

   The alignment variables are only applied to compound slide types
   (image_text / icon_text) via the rfj-inner--column / rfj-inner--row
   classes.  Simple slides (image, text, icon) use flex defaults so
   that images can size themselves via aspect-ratio without interference.

   Column compound  →  align-items  = X-as,  justify-content = Y-as
   Row compound     →  align-items  = Y-as,  justify-content = X-as
*/
.rfj-slide-inner {
	flex: 1;
	min-height: 0;
	/* prevent flex children from overflowing parent  */
	display: flex;
	flex-direction: column;
	/* No align-items / justify-content here — flex defaults            */
	/* (stretch / flex-start) keep image aspect-ratios intact.         */
	overflow: hidden;
	width: 100%;
	box-sizing: border-box;
}

/* Column compound slides (image_text / icon_text with direction=column) */
.rfj-slide-inner.rfj-inner--column {
	align-items: var(--rfj-align-x, center);
	justify-content: var(--rfj-align-y, flex-start);
}

/* Row compound slides (image_text / icon_text with direction=row).
   flex-direction is set by this class — never via inline style.
   DOM order handles "reverse" so the axes stay predictable.       */
.rfj-slide-inner.rfj-inner--row {
	flex-direction: row;
	align-items: var(--rfj-align-y, center);
	justify-content: var(--rfj-align-x, flex-start);
}

.rfj-slide-inner.rfj-inner--row .rfj-slide-image {
	flex-shrink: 0;
}

.rfj-slide-inner.rfj-inner--row .rfj-slide-text {
	text-align: unset !important;
	min-width: 0;
}

.rfj-slide-image {
	width: 100%;
	line-height: 0;
}

.rfj-carousel--vertical .rfj-slide-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
	border-radius: 8px;
	transform: translateZ(0);
}

.rfj-carousel--horizontal .rfj-slide-image {
	flex: 1;
	min-height: 0;
}

.rfj-carousel--horizontal .rfj-slide-image img {
	width: 100%;
	height: 100%;
	aspect-ratio: 1/1;
	/* override any Elementor control value */
	object-fit: cover;
	display: block;
	border-radius: 8px;
	transform: translateZ(0);
}

.rfj-slide-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
	line-height: 1;
	margin-bottom: 10px;
}

.rfj-slide-icon svg {
	width: 1em;
	height: 1em;
	display: block;
}

/* Remove bottom margin when icon sits beside text (row layout) */
.rfj-slide-inner.rfj-inner--row .rfj-slide-icon {
	margin-bottom: 0;
	margin-right: 0;
	/* gap control handles spacing */
}

.rfj-slide-text {}

/* ── Critical: suppress all transitions to prevent stutter ─── */
.rfj-carousel,
.rfj-carousel *,
.rfj-carousel *::before,
.rfj-carousel *::after {
	transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.rfj-carousel-track {
		animation: none !important;
		transform: none !important;
	}
}