/* Hilder & Associates – Timeline (Swiper)
   Colors come from Elementor's global colors (Site Settings > Global Colors).
   Base slider styles come from Elementor's Swiper CSS (handle "swiper"). */

.hilder-timeline {
	position: relative;
	padding: 0 64px;
}

/* width 0 + min-width 100%: fill the column without forcing Elementor
   to widen it to fit every slide (that pushed the right arrow off-screen) */
.hilder-timeline .hilder-timeline__swiper {
	width: 0;
	min-width: 100%;
	margin: 0;
}

.hilder-timeline .hilder-timeline__track {
	margin: 0;
	padding: 0;
	list-style: none;
	/* All slides take the height of the tallest one, so the circles stay aligned */
	align-items: stretch;
}

/* Each item: row 1 = text above, row 2 = circle, row 3 = text below.
   Swiper sets the width; height auto lets the slide stretch */
.hilder-timeline .hilder-timeline__item {
	height: auto;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: minmax(150px, 1fr) auto minmax(150px, 1fr);
	justify-items: center;
}

/* Horizontal line, centered behind the circle */
.hilder-timeline__item::before {
	content: "";
	grid-row: 2;
	grid-column: 1;
	justify-self: stretch;
	align-self: center;
	height: 4px;
	background: currentColor;
	opacity: 0.35;
}

.hilder-timeline__year {
	grid-row: 2;
	grid-column: 1;
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 175px;
	height: 175px;
	border: 5px solid var(--e-global-color-secondary, currentColor);
	border-radius: 50%;
	background: var(--e-global-color-background, #fff);
	font-size: 2.9rem;
	font-weight: 300;
	line-height: 1;
}

/* Alternate highlighted circles, like the reference */
.hilder-timeline__item:nth-child(odd) .hilder-timeline__year {
	border-color: var(--e-global-color-accent, currentColor);
}

.hilder-timeline__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 0 6px;
	text-align: center;
}

.hilder-timeline__item.is-top .hilder-timeline__content {
	grid-row: 1;
	justify-content: flex-end;
	padding-bottom: 12px;
}

.hilder-timeline__item.is-bottom .hilder-timeline__content {
	grid-row: 3;
	flex-direction: column-reverse;
	justify-content: flex-end;
	padding-top: 12px;
}

.hilder-timeline__text {
	margin: 0;
	font-size: 1rem;
	line-height: 1.45;
}

.hilder-timeline__connector {
	flex-shrink: 0;
	width: 2px;
	height: 30px;
	background: currentColor;
	opacity: 0.6;
}

/* Arrows
   Scoped to .hilder-timeline so they win over the theme's global button styles */
.hilder-timeline .hilder-timeline__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	width: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0 8px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--e-global-color-accent, currentColor);
	font-size: 3.5rem;
	line-height: 1;
	cursor: pointer;
}

.hilder-timeline .hilder-timeline__nav:hover,
.hilder-timeline .hilder-timeline__nav:focus {
	background: none;
	color: var(--e-global-color-primary, currentColor);
}

/* Swiper adds this class when every item already fits (nothing to slide) */
.hilder-timeline .hilder-timeline__nav.swiper-button-lock {
	display: none;
}

.hilder-timeline .hilder-timeline__nav--prev {
	left: 12px;
}

.hilder-timeline .hilder-timeline__nav--next {
	right: 12px;
}

@media (max-width: 767px) {
	.hilder-timeline {
		padding: 0 40px;
	}

	/* One item at a time on mobile: put every text below the circle,
	   so there is no empty space above it */
	.hilder-timeline .hilder-timeline__item {
		grid-template-rows: 0 auto minmax(110px, 1fr);
	}

	.hilder-timeline__item.is-top .hilder-timeline__content {
		grid-row: 3;
		flex-direction: column-reverse;
		justify-content: flex-end;
		padding-top: 12px;
		padding-bottom: 0;
	}

	/* Arrows centered on the circle (110px tall, first row is 0) */
	.hilder-timeline .hilder-timeline__nav {
		top: 55px;
	}

	.hilder-timeline__year {
		width: 110px;
		height: 110px;
		border-width: 4px;
		font-size: 1.9rem;
	}

	.hilder-timeline__text {
		font-size: 0.9rem;
	}

	.hilder-timeline__connector {
		height: 32px;
	}
}
