/* =========================================================
   Avada Projects – shared "card" design
   Same visual used inside the static grid AND inside each
   slider slide, so both look like one consistent design.
   ========================================================= */

.ap-item {
	display: block;
	color: inherit;
	text-decoration: none;
	outline: none;
	-webkit-user-drag: none;
	user-drag: none;
}

.ap-item__image-wrap {
	position: relative !important;
	width: 100% !important;
	aspect-ratio: 1 / 1 !important;
	overflow: hidden !important;
	background: #e9e4da;
}

.ap-item__image {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	object-position: center;
	display: block;
	transform: scale(1);
	transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
	-webkit-user-drag: none;
	user-drag: none;
}

.ap-item:hover .ap-item__image,
.ap-item:focus-visible .ap-item__image {
	transform: scale(1.06);
}

.ap-item__content {
	margin-top: 20px;
}

.ap-item__title {
	margin: 0;
	font-weight: 700;
	font-size: clamp(20px, 1.7vw, 28px);
	line-height: 1.2;
	color: #161513;
	letter-spacing: -0.01em;
}

.ap-item__desc {
	margin: 4px 0 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	color: #9a968d;
}

.ap-item__hover {
	margin: 0;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #161513;
	transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.35s ease;
}

.ap-item:hover .ap-item__hover,
.ap-item:focus-visible .ap-item__hover {
	max-height: 40px;
	opacity: 1;
	margin-top: 10px;
}

.ap-empty {
	opacity: 0.7;
}

/* =========================================================
   Static grid — 2 columns desktop, 1 column mobile
   ========================================================= */

.ap-grid {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: 40px 24px;
	width: 100%;
}

@media (max-width: 767px) {
	.ap-grid {
		grid-template-columns: 1fr !important;
	}
}

/* =========================================================
   Slider — "peek" horizontal carousel
   (identical structure/behaviour to the reference WIS slider,
   only the class prefix changed from wis- to ap-)
   ========================================================= */

.ap-slider {
	--ap-items-desktop: 2.25;
	--ap-items-tablet: 1.60;
	--ap-items-mobile: 1.15;
	--ap-gap: 24px;
	--ap-side-pad: clamp(20px, 3.6vw, 56px);

	position: relative;
	width: 100%;
	box-sizing: border-box;
	padding: 56px 0 40px;
	outline: none;
	-webkit-font-smoothing: antialiased;
}

/* Break fully out of the theme's boxed/contained content area so the
   slider touches both edges of the browser window. Measured in JS
   from the element's real on-screen position, so it works correctly
   no matter what page-builder column wraps it. */
.ap-slider.ap-slider--full-bleed {
	width: var(--ap-vw, 100vw) !important;
	max-width: var(--ap-vw, 100vw) !important;
	margin-left: calc(50% - (var(--ap-vw, 100vw) / 2)) !important;
	margin-right: calc(50% - (var(--ap-vw, 100vw) / 2)) !important;
}

.ap-slider *,
.ap-slider *::before,
.ap-slider *::after {
	box-sizing: border-box;
}

.ap-slider__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 32px;
	gap: 20px;
	padding: 0 var(--ap-side-pad) !important;
}

.ap-slider__heading {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ap-slider__title {
	margin: 0;
	font-weight: 800;
	font-size: clamp(28px, 2.8vw, 40px);
	line-height: 1;
	color: #161513;
	letter-spacing: -0.02em;
}

.ap-slider__subtitle {
	margin: 0;
	font-weight: 400;
	font-size: clamp(15px, 1.1vw, 18px);
	line-height: 1.5;
	color: #8f8a80;
	max-width: 640px;
}

.ap-slider__nav {
	display: flex;
	align-items: center;
	gap: 28px;
	flex-shrink: 0;
}

.ap-slider__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	background: transparent;
	color: #1a1a1a;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.15s ease;
	opacity: 0.85;
}

.ap-slider__arrow:hover { opacity: 1; }
.ap-slider__arrow:active { transform: scale(0.9); }
.ap-slider__arrow:disabled { opacity: 0.25; cursor: default; }

.ap-slider__arrow svg {
	pointer-events: none;
	width: 24px;
	height: auto;
}

.ap-slider__viewport {
	position: relative;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	cursor: grab;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.ap-slider__viewport--dragging {
	cursor: grabbing;
	scroll-behavior: auto;
	user-select: none;
	-webkit-user-select: none;
}

.ap-slider__viewport--dragging .ap-item__image {
	transform: none !important;
}

.ap-slider__viewport::-webkit-scrollbar {
	display: none;
	height: 0;
}

.ap-slider__track {
	display: flex;
	align-items: flex-start;
	gap: var(--ap-gap);
	width: 100%;
	padding: 0;
	margin: 0;
}

.ap-slider__track::before {
	content: '';
	display: block;
	flex: 0 0 auto;
	width: max( 0px, calc( var(--ap-side-pad) - var(--ap-gap) ) );
	height: 1px;
}

.ap-slide {
	flex: 0 0 auto;
	width: calc((100% - var(--ap-side-pad) - (var(--ap-items-mobile) - 1) * var(--ap-gap)) / var(--ap-items-mobile));
}

@media (min-width: 700px) {
	.ap-slide {
		width: calc((100% - var(--ap-side-pad) - (var(--ap-items-tablet) - 1) * var(--ap-gap)) / var(--ap-items-tablet));
	}
}

@media (min-width: 1100px) {
	.ap-slide {
		width: calc((100% - var(--ap-side-pad) - (var(--ap-items-desktop) - 1) * var(--ap-gap)) / var(--ap-items-desktop));
	}
}

@media (max-width: 600px) {
	.ap-slider { padding: 36px 0 28px; }
	.ap-slider__title { font-size: 24px; }
	.ap-slider__nav { gap: 18px; }
}
