/**
 * Timeline for Elementor
 *
 * Base layout for the horizontal (carousel) and vertical layouts, the card
 * arrangement variants, responsive behaviour and animations. Every value that
 * the Style tab controls is exposed as a CSS custom property or overridden by
 * a more specific Elementor selector, so nothing here is final.
 *
 * Specificity note: Elementor writes its rules as
 * ".elementor-NN .elementor-element-ID .tfe-xxx" (4+ classes), so the base
 * rules below stay at 3 classes or fewer and are always overridable.
 */

/* ==========================================================================
   1. Root, custom properties
   ========================================================================== */

.tfe-timeline {
	--tfe-marker-size: 50px;
	--tfe-line-thickness: 3px;
	--tfe-line-color: #d5d9e0;
	--tfe-line-progress: #ff3d6e;
	--tfe-line-style: solid;
	--tfe-card-gap: 30px;
	--tfe-item-gap: 40px;
	--tfe-meta-gap: 15px;
	--tfe-pointer-size: 12px;
	--tfe-nav-size: 22px;
	--tfe-nav-color: #333;
	--tfe-anim-duration: 600ms;
	--tfe-gutter: 0px;

	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.tfe-timeline *,
.tfe-timeline *::before,
.tfe-timeline *::after {
	box-sizing: border-box;
}

.tfe-timeline.tfe-has-arrows {
	--tfe-gutter: calc(var(--tfe-nav-size) * 1.6 + 12px);
}

.tfe-carousel {
	position: relative;
}

/* ==========================================================================
   2. Line
   ========================================================================== */

.tfe-line {
	position: absolute;
	z-index: 0;
	pointer-events: none;
	border: 0 var(--tfe-line-style) var(--tfe-line-color);
}

.tfe-line__progress {
	display: none;
	position: absolute;
	top: 0;
	left: calc(var(--tfe-line-thickness) * -1);
	width: var(--tfe-line-thickness);
	height: 0;
	background-color: var(--tfe-line-progress);
}

/* ==========================================================================
   3. Cards
   ========================================================================== */

.tfe-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--tfe-img-gap, 0);
	width: 100%;
	max-width: 100%;
	background-color: #fff;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	color: inherit;
	text-align: center;
	text-decoration: none;
	transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

a.tfe-card:focus-visible,
.tfe-card__button:focus-visible,
.tfe-card__title a:focus-visible {
	outline: 2px solid #ff3d6e;
	outline-offset: 3px;
}

.tfe-card__body {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	min-width: 0;
	padding: 24px;
}

.tfe-card__date {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 700;
	color: #ff3d6e;
}

.tfe-timeline .tfe-card__title {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: #333;
}

.tfe-timeline .tfe-card__title a {
	color: inherit;
	text-decoration: none;
}

.tfe-card__desc {
	font-size: 14px;
	line-height: 1.6;
	color: #777;
}

.tfe-card__desc > :last-child {
	margin-bottom: 0;
}

.tfe-card__button {
	display: inline-block;
	margin-top: 14px;
	padding: 8px 18px;
	border: 0 solid transparent;
	border-radius: 4px;
	background-color: #ff3d6e;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Image */
.tfe-card__image {
	position: relative;
	z-index: 1;
	overflow: hidden;
	border-radius: inherit;
	line-height: 0;
}

.tfe-card__image img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	object-fit: cover;
	transition: transform 0.4s ease, filter 0.3s ease;
}

.tfe-card--img-bottom .tfe-card__image {
	order: 2;
}

.tfe-card--img-top .tfe-card__image {
	border-bottom-right-radius: 0;
	border-bottom-left-radius: 0;
}

.tfe-card--img-bottom .tfe-card__image {
	border-top-right-radius: 0;
	border-top-left-radius: 0;
}

.tfe-card--img-left {
	flex-direction: row;
}

.tfe-card--img-right {
	flex-direction: row-reverse;
}

.tfe-card--img-left .tfe-card__image,
.tfe-card--img-right .tfe-card__image {
	flex: 0 0 40%;
	max-width: 40%;
}

.tfe-card--img-left .tfe-card__image {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.tfe-card--img-right .tfe-card__image {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.tfe-card--img-left .tfe-card__image img,
.tfe-card--img-right .tfe-card__image img {
	height: 100%;
}

/* Image as card background. */
.tfe-card--img-background {
	justify-content: center;
}

.tfe-card--img-background .tfe-card__image {
	position: absolute;
	z-index: 0;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100% !important;
	max-width: none !important;
	border-radius: inherit;
}

.tfe-card--img-background .tfe-card__image img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}

.tfe-card--img-background .tfe-card__image::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: rgba(255, 255, 255, 0.75);
}

/* Pointer arrow (square rotated 45deg, inherits the card colour). */
.tfe-has-pointer .tfe-card::before {
	content: "";
	position: absolute;
	z-index: 2;
	width: var(--tfe-pointer-size);
	height: var(--tfe-pointer-size);
	background-color: inherit;
	transform: rotate(45deg);
}

/* ==========================================================================
   4. Marker
   ========================================================================== */

.tfe-marker {
	position: relative;
	z-index: 2;
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--tfe-marker-size);
	height: var(--tfe-marker-size);
	isolation: isolate;
	border-radius: 50%;
	background-color: #ff3d6e;
	color: #fff;
	line-height: 1;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.tfe-marker i {
	font-size: 22px;
	line-height: 1;
}

.tfe-marker svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.tfe-marker--text {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.tfe-marker img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
}

.tfe-marker--dot {
	transform: scale(0.4);
}

.tfe-marker--none {
	visibility: hidden;
}

/* Pulse. */
.tfe-has-pulse .tfe-marker:not(.tfe-marker--none)::after {
	content: "";
	position: absolute;
	z-index: -1;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	border-radius: inherit;
	background-color: inherit;
	animation: tfe-pulse 2s ease-out infinite;
}

@keyframes tfe-pulse {
	0% {
		opacity: 0.6;
		transform: scale(1);
	}

	100% {
		opacity: 0;
		transform: scale(1.7);
	}
}

/* ==========================================================================
   5. Date / subtitle
   ========================================================================== */

.tfe-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	text-align: center;
}

.tfe-meta__date {
	display: block;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: #333;
}

.tfe-meta__subtitle {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	line-height: 1.4;
	color: #777;
}

/* ==========================================================================
   6. Horizontal layout
   ========================================================================== */

.tfe-layout-horizontal .tfe-line {
	top: var(--tfe-line-y, 50%);
	right: var(--tfe-gutter);
	left: var(--tfe-gutter);
	height: 0;
	border-top-width: var(--tfe-line-thickness);
	transform: translateY(-50%);
}

.tfe-layout-horizontal .tfe-swiper {
	position: relative;
	z-index: 1;
	overflow: hidden;
	margin: 0 var(--tfe-gutter);
	padding: 30px 0;
}

/*
 * Themes and Elementor widgets ship rules such as
 * .swiper-container:not(.swiper-container-initialized) > .swiper-wrapper { overflow: hidden }
 * that would clip every slide away, so the carousel wrapper pins its own values.
 */
.tfe-layout-horizontal .tfe-wrapper {
	overflow: visible !important;
	gap: 0 !important;
	position: relative;
	display: flex;
	width: 100%;
	height: 100%;
	box-sizing: content-box;
	transition-property: transform;
}

.tfe-layout-horizontal .tfe-item {
	position: relative;
	display: grid;
	flex-shrink: 0;
	grid-template-columns: minmax(0, 1fr);
	justify-items: center;
	width: 100%;
	height: auto;
}

.tfe-layout-horizontal .tfe-marker {
	grid-row: 2;
}

/* Row templates: card row | marker row | meta row. */
.tfe-layout-horizontal.tfe-arrange-same.tfe-side-top .tfe-item {
	grid-template-rows: 1fr auto var(--tfe-meta-h, auto);
}

.tfe-layout-horizontal.tfe-arrange-same.tfe-side-bottom .tfe-item {
	grid-template-rows: var(--tfe-meta-h, auto) auto 1fr;
}

.tfe-layout-horizontal.tfe-arrange-alternate .tfe-item {
	grid-template-rows: 1fr auto 1fr;
}

/* Variant A: card above the line, meta below. */
.tfe-layout-horizontal.tfe-arrange-same.tfe-side-top .tfe-card,
.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-top .tfe-item--odd .tfe-card,
.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-bottom .tfe-item--even .tfe-card {
	grid-row: 1;
	align-self: end;
	margin-bottom: var(--tfe-card-gap);
}

.tfe-layout-horizontal.tfe-arrange-same.tfe-side-top .tfe-meta,
.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-top .tfe-item--odd .tfe-meta,
.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-bottom .tfe-item--even .tfe-meta {
	grid-row: 3;
	align-self: start;
	padding-top: var(--tfe-meta-gap);
}

/* Variant B: card below the line, meta above. */
.tfe-layout-horizontal.tfe-arrange-same.tfe-side-bottom .tfe-card,
.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-bottom .tfe-item--odd .tfe-card,
.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-top .tfe-item--even .tfe-card {
	grid-row: 3;
	align-self: start;
	margin-top: var(--tfe-card-gap);
}

.tfe-layout-horizontal.tfe-arrange-same.tfe-side-bottom .tfe-meta,
.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-bottom .tfe-item--odd .tfe-meta,
.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-top .tfe-item--even .tfe-meta {
	grid-row: 1;
	align-self: end;
	padding-bottom: var(--tfe-meta-gap);
}

/* Pointer: variant A points down, variant B points up. */
.tfe-has-pointer.tfe-layout-horizontal.tfe-arrange-same.tfe-side-top .tfe-card::before,
.tfe-has-pointer.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-top .tfe-item--odd .tfe-card::before,
.tfe-has-pointer.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-bottom .tfe-item--even .tfe-card::before {
	bottom: calc(var(--tfe-pointer-size) / -2);
	left: calc(50% - var(--tfe-pointer-size) / 2);
}

.tfe-has-pointer.tfe-layout-horizontal.tfe-arrange-same.tfe-side-bottom .tfe-card::before,
.tfe-has-pointer.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-bottom .tfe-item--odd .tfe-card::before,
.tfe-has-pointer.tfe-layout-horizontal.tfe-arrange-alternate.tfe-side-top .tfe-item--even .tfe-card::before {
	top: calc(var(--tfe-pointer-size) / -2);
	left: calc(50% - var(--tfe-pointer-size) / 2);
}

/* Navigation arrows. */
.tfe-nav {
	position: absolute;
	z-index: 3;
	top: var(--tfe-line-y, 50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--tfe-nav-size) * 1.6);
	height: calc(var(--tfe-nav-size) * 1.6);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--tfe-nav-radius, 0);
	background: none;
	background-color: var(--tfe-nav-bg, transparent);
	box-shadow: none;
	color: var(--tfe-nav-color);
	font-size: var(--tfe-nav-size);
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
	transition: color 0.3s ease, opacity 0.3s ease;
	-webkit-appearance: none;
	appearance: none;
}

.tfe-timeline .tfe-nav:hover,
.tfe-timeline .tfe-nav:focus {
	background-color: var(--tfe-nav-bg, transparent);
	color: var(--tfe-nav-hover-color, var(--tfe-nav-color));
}

.tfe-nav:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.tfe-nav i {
	font-size: inherit;
	line-height: 1;
}

.tfe-nav svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.tfe-nav-prev {
	left: var(--tfe-nav-offset, 0);
}

.tfe-nav-next {
	right: var(--tfe-nav-offset, 0);
}

.tfe-nav.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
}

/* Pagination dots. */
.tfe-pagination {
	position: relative;
	z-index: 1;
	top: auto;
	right: auto;
	bottom: auto;
	left: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--tfe-dot-gap, 8px);
	width: auto;
	margin-top: var(--tfe-dot-offset, 20px);
}

.tfe-timeline .tfe-pagination .swiper-pagination-bullet {
	display: block;
	width: var(--tfe-dot-size, 10px);
	height: var(--tfe-dot-size, 10px);
	margin: 0;
	border-radius: 50%;
	background: var(--tfe-dot-color, rgba(0, 0, 0, 0.25));
	opacity: 1;
	transition: background-color 0.3s ease;
}

.tfe-timeline .tfe-pagination .swiper-pagination-bullet-active {
	background: var(--tfe-dot-active, #ff3d6e);
}

.tfe-pagination .swiper-pagination-bullet:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ==========================================================================
   7. Vertical layout
   ========================================================================== */

/*
 * Base vertical rules = "same side, line on the left". They also serve as the
 * collapsed layout below the tablet breakpoint, so the alternating / left-side
 * variants only exist inside the min-width media query further down.
 */
.tfe-layout-vertical .tfe-nav,
.tfe-layout-vertical .tfe-pagination {
	display: none;
}

.tfe-layout-vertical .tfe-swiper {
	position: relative;
	z-index: 1;
	overflow: visible;
	margin: 0;
	padding: 0;
}

.tfe-layout-vertical .tfe-wrapper {
	display: flex;
	flex-direction: column;
	gap: var(--tfe-item-gap);
	width: auto !important;
	height: auto !important;
	transform: none !important;
}

.tfe-layout-vertical .tfe-item {
	position: relative;
	display: grid;
	grid-template-columns: var(--tfe-marker-size) minmax(0, 1fr);
	column-gap: var(--tfe-card-gap);
	align-items: start;
	width: auto !important;
	height: auto;
	margin: 0 !important;
}

.tfe-layout-vertical .tfe-marker {
	grid-row: 1 / span 2;
	grid-column: 1;
	align-self: start;
}

.tfe-layout-vertical .tfe-meta {
	grid-row: 1;
	grid-column: 2;
	padding-bottom: var(--tfe-meta-gap);
	text-align: left;
}

.tfe-layout-vertical .tfe-meta:empty {
	padding-bottom: 0;
}

.tfe-layout-vertical .tfe-card {
	grid-row: 2;
	grid-column: 2;
}

.tfe-layout-vertical .tfe-line {
	top: calc(var(--tfe-marker-size) / 2);
	bottom: calc(var(--tfe-marker-size) / 2);
	left: calc(var(--tfe-marker-size) / 2);
	width: 0;
	border-left-width: var(--tfe-line-thickness);
	transform: translateX(-50%);
}

.tfe-layout-vertical .tfe-line__progress {
	display: block;
}

.tfe-has-pointer.tfe-layout-vertical .tfe-card::before {
	top: calc(var(--tfe-marker-size) / 2 - var(--tfe-pointer-size) / 2);
	left: calc(var(--tfe-pointer-size) / -2);
}

/* Marker states for the scroll-progress option. */
.tfe-layout-horizontal .tfe-line__progress {
	display: none;
}

@media (min-width: 768px) {

	/* Same side, cards on the left, line on the right. */
	.tfe-layout-vertical.tfe-arrange-same.tfe-side-left .tfe-item {
		grid-template-columns: minmax(0, 1fr) var(--tfe-marker-size);
	}

	.tfe-layout-vertical.tfe-arrange-same.tfe-side-left .tfe-marker {
		grid-column: 2;
	}

	.tfe-layout-vertical.tfe-arrange-same.tfe-side-left .tfe-meta,
	.tfe-layout-vertical.tfe-arrange-same.tfe-side-left .tfe-card {
		grid-column: 1;
	}

	.tfe-layout-vertical.tfe-arrange-same.tfe-side-left .tfe-meta {
		text-align: right;
	}

	.tfe-layout-vertical.tfe-arrange-same.tfe-side-left .tfe-line {
		right: calc(var(--tfe-marker-size) / 2);
		left: auto;
		transform: translateX(50%);
	}

	.tfe-layout-vertical.tfe-arrange-same.tfe-side-left .tfe-line__progress {
		right: calc(var(--tfe-line-thickness) * -1);
		left: auto;
	}

	.tfe-has-pointer.tfe-layout-vertical.tfe-arrange-same.tfe-side-left .tfe-card::before {
		right: calc(var(--tfe-pointer-size) / -2);
		left: auto;
	}

	/* Alternate: centred line, three columns [card] [marker] [meta]. */
	.tfe-layout-vertical.tfe-arrange-alternate .tfe-item {
		grid-template-columns: minmax(0, 1fr) var(--tfe-marker-size) minmax(0, 1fr);
	}

	.tfe-layout-vertical.tfe-arrange-alternate .tfe-marker {
		grid-row: 1;
		grid-column: 2;
	}

	.tfe-layout-vertical.tfe-arrange-alternate .tfe-card {
		grid-row: 1;
	}

	.tfe-layout-vertical.tfe-arrange-alternate .tfe-meta {
		grid-row: 1;
		justify-content: center;
		min-height: var(--tfe-marker-size);
		padding-bottom: 0;
	}

	.tfe-layout-vertical.tfe-arrange-alternate .tfe-line {
		left: 50%;
	}

	/* Card on the left: card col 1, meta col 3. */
	.tfe-layout-vertical.tfe-arrange-alternate.tfe-side-left .tfe-item--odd .tfe-card,
	.tfe-layout-vertical.tfe-arrange-alternate.tfe-side-right .tfe-item--even .tfe-card {
		grid-column: 1;
	}

	.tfe-layout-vertical.tfe-arrange-alternate.tfe-side-left .tfe-item--odd .tfe-meta,
	.tfe-layout-vertical.tfe-arrange-alternate.tfe-side-right .tfe-item--even .tfe-meta {
		grid-column: 3;
		text-align: left;
	}

	/* Card on the right: card col 3, meta col 1. */
	.tfe-layout-vertical.tfe-arrange-alternate.tfe-side-left .tfe-item--even .tfe-card,
	.tfe-layout-vertical.tfe-arrange-alternate.tfe-side-right .tfe-item--odd .tfe-card {
		grid-column: 3;
	}

	.tfe-layout-vertical.tfe-arrange-alternate.tfe-side-left .tfe-item--even .tfe-meta,
	.tfe-layout-vertical.tfe-arrange-alternate.tfe-side-right .tfe-item--odd .tfe-meta {
		grid-column: 1;
		text-align: right;
	}

	/* Pointers point at the centre line. */
	.tfe-has-pointer.tfe-layout-vertical.tfe-arrange-alternate.tfe-side-left .tfe-item--odd .tfe-card::before,
	.tfe-has-pointer.tfe-layout-vertical.tfe-arrange-alternate.tfe-side-right .tfe-item--even .tfe-card::before {
		right: calc(var(--tfe-pointer-size) / -2);
		left: auto;
	}
}

/* ==========================================================================
   8. Entrance animations (classes are added by JS; vertical layout only, because carousel slides are revealed by Swiper)
   ========================================================================== */

.tfe-layout-vertical.tfe-anim .tfe-item:not(.swiper-slide-duplicate) {
	opacity: 0;
	transition: opacity var(--tfe-anim-duration) ease, transform var(--tfe-anim-duration) ease;
}

.tfe-layout-vertical.tfe-anim--fade-up .tfe-item:not(.swiper-slide-duplicate) {
	transform: translateY(30px);
}

.tfe-layout-vertical.tfe-anim--fade-side .tfe-item--odd:not(.swiper-slide-duplicate) {
	transform: translateX(-30px);
}

.tfe-layout-vertical.tfe-anim--fade-side .tfe-item--even:not(.swiper-slide-duplicate) {
	transform: translateX(30px);
}

.tfe-layout-vertical.tfe-anim--zoom .tfe-item:not(.swiper-slide-duplicate) {
	transform: scale(0.85);
}

.tfe-layout-vertical.tfe-anim .tfe-item.tfe-in-view {
	opacity: 1;
	transform: none;
}

/* ==========================================================================
   9. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

	.tfe-timeline *,
	.tfe-timeline *::before,
	.tfe-timeline *::after {
		animation: none !important;
		transition: none !important;
	}

	.tfe-anim .tfe-item {
		opacity: 1 !important;
		transform: none !important;
	}
}
