/**
 * Haris Insights for Elementor — frontend styles.
 * Colours, sizes and spacing come from the Elementor Style tab;
 * the values here are structural fallbacks only.
 */

.haris-insights {
	--haris-in-arrow-offset: -8px;
	position: relative;
	display: flex;
	justify-content: center;
	width: 100%;
	padding: 90px 70px 100px;
	background-color: #0a0a0a;
}

.haris-insights,
.haris-insights *,
.haris-insights *::before,
.haris-insights *::after {
	box-sizing: border-box;
}

.haris-insights__inner {
	width: 100%;
	max-width: 1180px;
}

/* ------------------------------------------------------------ Heading row */

.haris-insights__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 56px;
}

.haris-insights__headings {
	min-width: 0;
}

.haris-insights__head-side {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 18px;
}

.haris-insights__title {
	margin: 0 0 12px;
	color: #fff;
	font-size: 34px;
	font-weight: 400;
	line-height: 1.2;
}

.haris-insights__subtitle {
	margin: 0;
	color: #a2a2a2;
	font-size: 14px;
	line-height: 1.6;
}

/* ---------------------------------------------------------- View all link */

.haris-insights__more {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: #e8c547;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 2px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.3s ease;
}

.haris-insights__more-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	line-height: 1;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.haris-insights__more-icon i,
.haris-insights__more-icon svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: inherit;
	fill: none;
}

.haris-insights__more-icon i {
	fill: currentColor;
}

a.haris-insights__more:hover .haris-insights__more-icon {
	transform: translate(3px, -3px);
}

a.haris-insights__more:focus-visible,
a.haris-insights__card-link:focus-visible,
a.haris-insights__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* ------------------------------------------------------------- Stage/track */

.haris-insights__stage {
	position: relative;
}

.haris-insights__viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.haris-insights__track {
	--haris-in-per: 3;
	--haris-in-gap: 36px;
	--haris-in-speed: 600ms;
	display: flex;
	align-items: stretch;
	gap: var(--haris-in-gap);
	width: 100%;
	will-change: transform;
}

.haris-insights--slider .haris-insights__track {
	transition: transform var(--haris-in-speed) cubic-bezier(0.22, 1, 0.36, 1);
}

/* While the finger is down the track follows it with no easing. */
.haris-insights--slider .haris-insights__track.is-dragging {
	transition: none;
	cursor: grabbing;
}

.haris-insights__slide {
	flex: 0 0
		calc(
			(100% - (var(--haris-in-per) - 1) * var(--haris-in-gap)) /
				var(--haris-in-per)
		);
	max-width: calc(
		(100% - (var(--haris-in-per) - 1) * var(--haris-in-gap)) /
			var(--haris-in-per)
	);
	min-width: 0;
}

/* Static grid: the same track, wrapped instead of translated. */
.haris-insights--grid .haris-insights__track {
	display: grid;
	grid-template-columns: repeat(var(--haris-in-per), minmax(0, 1fr));
	transform: none !important;
}

.haris-insights--grid .haris-insights__slide {
	flex: initial;
	max-width: none;
}

/* ------------------------------------------------------------------ Card */

.haris-insights__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 0 solid transparent;
	color: inherit;
	text-decoration: none;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.4s ease, background-color 0.4s ease;
}

/* --------------------------------------------------------------- Image */

.haris-insights__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 2px;
	background-color: #141414;
	line-height: 0;
	text-decoration: none;
}

.haris-insights__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.haris-insights__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(10, 10, 10, 0.55);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

/*
 * Some YouTube sizes (hqdefault in particular) arrive as 4:3 with black bars.
 * Cropping from the centre keeps the subject in frame whatever ratio the card
 * is set to.
 */
.haris-insights__media--video .haris-insights__image {
	object-position: center center;
}

/* ------------------------------------------------------------ Play badge */

.haris-insights__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border: 0 solid transparent;
	border-radius: 50%;
	background-color: rgba(232, 197, 71, 0.92);
	color: #0a0a0a;
	font-size: 26px;
	line-height: 1;
	pointer-events: none;
	transform: translate(-50%, -50%);
	transition: opacity 0.35s ease,
		transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.haris-insights__play i,
.haris-insights__play svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: inherit;
	fill: currentColor;
	/* The play triangle reads better nudged off the optical centre. */
	margin-left: 0.08em;
}

/* Step aside for the hover button rather than stacking on top of it. */
.haris-insights--play-swap.haris-insights--btn-media .haris-insights__card:hover .haris-insights__play,
.haris-insights--play-swap.haris-insights--btn-media .haris-insights__card:focus-within .haris-insights__play {
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.86);
}

/* ------------------------------------------------------------- Card text */

.haris-insights__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1 1 auto;
	padding-top: 22px;
}

.haris-insights__category {
	display: block;
	margin: 0 0 14px;
	color: #c9a227;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 2px;
	line-height: 1;
	text-transform: uppercase;
}

.haris-insights__card-title {
	margin: 0 0 12px;
	color: #fff;
	font-size: 21px;
	font-weight: 400;
	line-height: 1.32;
	transition: color 0.3s ease;
}

.haris-insights__card-link {
	color: inherit;
	text-decoration: none;
}

.haris-insights__excerpt {
	margin: 0;
	color: #9b9b9b;
	font-size: 14px;
	line-height: 1.65;
}

/* Trim to a set number of lines so every card keeps the same height. */
.haris-insights--clamp .haris-insights__excerpt {
	--haris-in-lines: 2;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--haris-in-lines);
	line-clamp: var(--haris-in-lines);
	overflow: hidden;
}

/* ------------------------------------------------------------- The button */

.haris-insights__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 24px;
	border: 0 solid transparent;
	background-color: #e8c547;
	color: #0a0a0a;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.3s ease, color 0.3s ease,
		border-color 0.3s ease, opacity 0.35s ease,
		transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.haris-insights__btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1em;
	line-height: 1;
}

.haris-insights__btn-icon i,
.haris-insights__btn-icon svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: inherit;
	fill: none;
}

.haris-insights__btn-icon i {
	fill: currentColor;
}

/* Over the image, the button sits dead centre. */
.haris-insights--btn-media .haris-insights__btn {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	margin: 0;
	transform: translate(-50%, -50%);
}

/* Below the text, it sits at the end of the card. */
.haris-insights--btn-body .haris-insights__btn {
	margin-top: 20px;
}

/* ------------------------------------------------- Button reveal on hover */

.haris-insights--reveal-hover .haris-insights__btn,
.haris-insights--reveal-touch .haris-insights__btn {
	opacity: 0;
	pointer-events: none;
}

.haris-insights--reveal-hover.haris-insights--btn-media.haris-insights--effect-rise .haris-insights__btn,
.haris-insights--reveal-touch.haris-insights--btn-media.haris-insights--effect-rise .haris-insights__btn {
	transform: translate(-50%, calc(-50% + 14px));
}

.haris-insights--reveal-hover.haris-insights--btn-body.haris-insights--effect-rise .haris-insights__btn,
.haris-insights--reveal-touch.haris-insights--btn-body.haris-insights--effect-rise .haris-insights__btn {
	transform: translateY(12px);
}

.haris-insights--reveal-hover.haris-insights--btn-media.haris-insights--effect-zoom .haris-insights__btn,
.haris-insights--reveal-touch.haris-insights--btn-media.haris-insights--effect-zoom .haris-insights__btn {
	transform: translate(-50%, -50%) scale(0.88);
}

.haris-insights--reveal-hover.haris-insights--btn-body.haris-insights--effect-zoom .haris-insights__btn,
.haris-insights--reveal-touch.haris-insights--btn-body.haris-insights--effect-zoom .haris-insights__btn {
	transform: scale(0.88);
}

.haris-insights--reveal-hover .haris-insights__card:hover .haris-insights__btn,
.haris-insights--reveal-hover .haris-insights__card:focus-within .haris-insights__btn,
.haris-insights--reveal-touch .haris-insights__card:hover .haris-insights__btn,
.haris-insights--reveal-touch .haris-insights__card:focus-within .haris-insights__btn {
	opacity: 1;
	pointer-events: auto;
}

.haris-insights--reveal-hover.haris-insights--btn-media .haris-insights__card:hover .haris-insights__btn,
.haris-insights--reveal-hover.haris-insights--btn-media .haris-insights__card:focus-within .haris-insights__btn,
.haris-insights--reveal-touch.haris-insights--btn-media .haris-insights__card:hover .haris-insights__btn,
.haris-insights--reveal-touch.haris-insights--btn-media .haris-insights__card:focus-within .haris-insights__btn {
	transform: translate(-50%, -50%);
}

.haris-insights--reveal-hover.haris-insights--btn-body .haris-insights__card:hover .haris-insights__btn,
.haris-insights--reveal-hover.haris-insights--btn-body .haris-insights__card:focus-within .haris-insights__btn,
.haris-insights--reveal-touch.haris-insights--btn-body .haris-insights__card:hover .haris-insights__btn,
.haris-insights--reveal-touch.haris-insights--btn-body .haris-insights__card:focus-within .haris-insights__btn {
	transform: none;
}

/* Touch screens have no hover, so the button stays put there. */
@media (hover: none) {
	.haris-insights--reveal-touch .haris-insights__btn {
		opacity: 1;
		pointer-events: auto;
		transform: translate(-50%, -50%);
	}

	.haris-insights--reveal-touch.haris-insights--btn-body .haris-insights__btn {
		transform: none;
	}

	.haris-insights--reveal-touch .haris-insights__overlay {
		opacity: 0.45;
	}
}

.haris-insights--reveal-always .haris-insights__btn {
	opacity: 1;
	pointer-events: auto;
}

/* ---------------------------------------------------------------- Arrows */

.haris-insights__arrows {
	display: flex;
	align-items: center;
	gap: 10px;
}

.haris-insights__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.06);
	color: #e8e8e8;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	transition: background-color 0.3s ease, color 0.3s ease,
		border-color 0.3s ease, opacity 0.3s ease;
}

.haris-insights__arrow-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: inherit;
	line-height: 1;
	pointer-events: none;
}

.haris-insights__arrow-icon i,
.haris-insights__arrow-icon svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: inherit;
	fill: none;
}

.haris-insights__arrow-icon i {
	fill: currentColor;
}

.haris-insights__arrow[disabled] {
	opacity: 0.32;
	cursor: default;
	pointer-events: none;
}

.haris-insights__arrow:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Either side of the cards. */
.haris-insights__arrows--sides {
	position: static;
	display: contents;
}

.haris-insights__arrows--sides .haris-insights__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	transform: translateY(-50%);
}

.haris-insights__arrows--sides .haris-insights__arrow--prev {
	left: var(--haris-in-arrow-offset, -8px);
}

.haris-insights__arrows--sides .haris-insights__arrow--next {
	right: var(--haris-in-arrow-offset, -8px);
}

/* Below the cards. */
.haris-insights__arrows--bottom {
	justify-content: center;
	margin-top: 34px;
}

/* ------------------------------------------------------------------ Dots */

.haris-insights__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 38px;
}

.haris-insights__dots:empty {
	display: none;
}

.haris-insights__dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	border-radius: 99px;
	background-color: rgba(255, 255, 255, 0.22);
	cursor: pointer;
	appearance: none;
	transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		background-color 0.3s ease;
}

.haris-insights__dot.is-active {
	width: 22px;
	background-color: #e8c547;
}

.haris-insights__dot:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 1024px) {
	.haris-insights {
		padding: 70px 32px 80px;
	}

	.haris-insights__title {
		font-size: 30px;
	}

	/* Off-canvas side arrows would sit over the cards on a narrow screen. */
	.haris-insights--arrows-sides .haris-insights__arrows--sides .haris-insights__arrow--prev {
		left: 6px;
	}

	.haris-insights--arrows-sides .haris-insights__arrows--sides .haris-insights__arrow--next {
		right: 6px;
	}
}

@media (max-width: 767px) {
	.haris-insights {
		padding: 52px 20px 60px;
	}

	.haris-insights--head-stack .haris-insights__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
	}

	.haris-insights__title {
		font-size: 26px;
	}

	.haris-insights__dots {
		margin-top: 28px;
	}
}

/* ------------------------------------------------------------ A11y / RM */

@media (prefers-reduced-motion: reduce) {
	.haris-insights *,
	.haris-insights *::before,
	.haris-insights *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}

	.haris-insights--slider .haris-insights__track {
		transition: none !important;
	}
}
