/**
 * OF Elementor Widgets - Cards Carousel
 *
 * Defaults use the site design system custom properties when they exist
 * (--site-*, --font-sans-10-*) and fall back to fixed values otherwise.
 * Every default can be overridden from the widget's Style tab.
 */

.ofew-cards {
	box-sizing: border-box;
	position: relative;
	/* Empty area on the right for the cards behind the first one (Style tab). */
	padding-inline-end: 34%;
}

.ofew-cards__swiper {
	/* The cards behind the first one are drawn outside of the swiper box. */
	overflow: visible;
}

.ofew-cards .swiper-slide.ofew-card {
	box-sizing: border-box;
	height: auto;
	padding: 24px 24px 32px;
	border-radius: 6px;
	background-color: var(--ofew-card-bg, #147d96);
	color: var(--ofew-card-fg, #fff);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
	/* Swiper's default is "center bottom"; the cards shrink around their center. */
	transform-origin: center center;
}

/* Automatic text color (WCAG AA), chosen in PHP from the background color. */
.ofew-card--text-light {
	--ofew-card-fg: #fff;
}

.ofew-card--text-dark {
	--ofew-card-fg: var(--site-grafite, #3c3c3c);
}

.ofew-card--text-black {
	--ofew-card-fg: #000;
}

.ofew-cards .ofew-card__title {
	margin: 0 0 24px;
	font-family: var(--font-sans-10-medium, inherit);
	font-size: var(--site-size-type-24, 1.5rem);
	font-weight: 500;
	line-height: 1.1;
	color: inherit;
}

.ofew-cards .ofew-card__title::after {
	content: "";
	display: block;
	width: var(--ofew-title-line-width, 80px);
	height: var(--ofew-title-line-height, 2px);
	margin-top: var(--ofew-title-line-gap, 8px);
	background-color: var(--ofew-title-line-color, currentColor);
}

.ofew-title-line-hide .ofew-card__title::after {
	display: none;
}

.ofew-cards .ofew-card__text {
	margin: 0;
	font-family: var(--font-sans-10-regular, inherit);
	font-size: var(--site-size-type-18, 1.125rem);
	line-height: 1.45;
	color: inherit;
}

/* Depth of the stack: a smaller perspective makes the cards behind shrink more (Style tab). */
.ofew-cards {
	--ofew-perspective: 900px;
}

.ofew-cards .swiper-3d {
	perspective: var(--ofew-perspective);
}

/*
 * "Cycle" movement: the transforms are set by the JS on every card. Swiper's fade effect only
 * transitions opacity, so transform and filter are added; opacity must change instantly
 * (loop mode duplicates are identical to a visible card and are just hidden).
 */
.ofew-cards--cycle .swiper-slide.ofew-card {
	transition-property: transform, filter;
}

/*
 * Only the active card shows its content. The cards behind are just colored edges (and are
 * hidden from assistive technology by the JS), so their text must not peek out on the right.
 */
.ofew-cards .swiper-slide > * {
	transition: opacity 0.3s ease;
}

.ofew-cards .swiper-slide:not(.swiper-slide-active) {
	pointer-events: none;
}

.ofew-cards .swiper-slide:not(.swiper-slide-active) > * {
	opacity: 0;
}

/* External arrows (any element with data-ofew-prev / data-ofew-next). */
[data-ofew-prev],
[data-ofew-next] {
	cursor: pointer;
}

[data-ofew-prev][aria-disabled="true"],
[data-ofew-next][aria-disabled="true"],
.ofew-is-disabled {
	cursor: default;
	opacity: 0.4;
}

@media (prefers-reduced-motion: reduce) {
	.ofew-cards .swiper-slide.ofew-card,
	.ofew-cards .swiper-slide > * {
		transition: none;
	}
}
