/* ==========================================================================
   PPLT Timeline (custom Enfold ALB element)
   Defaults live in the variables below. Sizes, spacing and marker/line colors
   set in the element are written inline as these variables; label/description
   sizes and colors come from Enfold's styling engine, so those two are left
   without !important (otherwise they would block the element's own settings).
   Everything the theme could override (list padding, margins) uses !important.
   ========================================================================== */

.pplt-timeline {
	--ptl-marker: 14px;
	--ptl-line-width: 2px;
	--ptl-space: 24px;
	--ptl-indent: 34px;
	--ptl-gap: #F5EAD8;                    /* ring between marker and line: match the section background */
	--ptl-marker-color: #8C491A;           /* terracotta 700 */
	--ptl-marker-hover: #643312;           /* terracotta 800 */
	--ptl-line-color: rgba(140, 73, 26, .28);
	--ptl-line-hover: #8C491A;
	--ptl-ease: cubic-bezier(.16, 1, .3, 1);
}

#top .pplt-timeline .pplt-timeline__items {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

/* Each step carries the LABEL's font size (the element's "Label Font Sizes" setting is
   applied here, responsive). The label inherits it, and the marker and line are placed
   in em, so they stay centered on the label's first line at any size or breakpoint:
   first-line center = half the label's line-height (1.3em) = 0.65em. */
#top #wrap_all .pplt-timeline .pplt-timeline__item {
	position: relative !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 0 var(--ptl-space) var(--ptl-indent) !important;
	border: 0 !important;
	font-size: 18px;              /* default label size; no !important so the element setting wins */
	line-height: 1.3 !important;
}
#top #wrap_all .pplt-timeline .pplt-timeline__item:last-child { padding-bottom: 0 !important; }

/* The line: runs from this marker's center down to the next marker's center */
#top .pplt-timeline .pplt-timeline__item::before {
	content: "" !important;
	position: absolute !important;
	left: calc(var(--ptl-marker) / 2 - var(--ptl-line-width) / 2) !important;
	top: .65em !important;
	bottom: -.65em !important;
	width: 0 !important;
	border-left: var(--ptl-line-width) solid var(--ptl-line-color) !important;
	transition: border-color .45s ease !important;
}
#top .pplt-timeline .pplt-timeline__item:last-child::before { display: none !important; }
#top .pplt-timeline--line-dotted .pplt-timeline__item::before { border-left-style: dotted !important; }
#top .pplt-timeline--line-dashed .pplt-timeline__item::before { border-left-style: dashed !important; }
#top .pplt-timeline--line-none .pplt-timeline__item::before { display: none !important; }

/* The marker ("big dot") */
#top .pplt-timeline .pplt-timeline__marker {
	position: absolute !important;
	left: 0 !important;
	top: calc(.65em - var(--ptl-marker) / 2) !important;   /* centered on the label's first line */
	z-index: 1 !important;
	display: block !important;
	width: var(--ptl-marker) !important;
	height: var(--ptl-marker) !important;
	border-radius: 50% !important;
	background: var(--ptl-marker-color) !important;
	box-shadow: 0 0 0 4px var(--ptl-gap) !important;
	transition: transform .5s var(--ptl-ease), background-color .3s ease, box-shadow .5s var(--ptl-ease) !important;
}
/* The pulse ring: a copy of the marker behind it that grows out and fades on hover */
#top .pplt-timeline .pplt-timeline__marker::after {
	content: "" !important;
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	z-index: -1 !important;
	border-radius: inherit !important;
	background: var(--ptl-pulse, var(--ptl-marker-color)) !important;
	opacity: 0;                         /* no !important: the pulse animation must be able to change it */
	pointer-events: none !important;
}
@keyframes pplt-timeline-pulse {
	0%   { transform: scale(1);   opacity: .55; }
	70%  { transform: scale(2.6); opacity: 0; }
	100% { transform: scale(2.6); opacity: 0; }
}
#top .pplt-timeline--square .pplt-timeline__marker { border-radius: 3px !important; }
#top .pplt-timeline--diamond .pplt-timeline__marker { border-radius: 2px !important; transform: rotate(45deg) scale(.86) !important; }

#top .pplt-timeline .pplt-timeline__label {
	display: block !important;
	font-family: 'noto-serif', Helvetica, Arial, sans-serif !important;
	font-size: inherit !important;   /* from the step (see above) */
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: -0.015em !important;
	text-transform: none !important;
	color: #8C491A;
	margin: 0 0 4px !important;
	padding: 0 !important;
	transition: transform .45s var(--ptl-ease) !important;
}

#top .pplt-timeline .pplt-timeline__text {
	font-family: 'figtree', Helvetica, Arial, sans-serif !important;
	font-size: 17px;
	line-height: 1.6 !important;
	color: #474238;
	transition: transform .45s var(--ptl-ease) !important;
}
#top .pplt-timeline .pplt-timeline__text p {
	font-size: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
	margin: 0 !important;
	padding: 0 !important;
}
#top .pplt-timeline .pplt-timeline__text p + p { margin-top: .5em !important; }

/* Linked steps: the label link takes the label's color, and its ::after
   covers the whole step so the step is one big click target */
#top .pplt-timeline .pplt-timeline__link,
#top .pplt-timeline .pplt-timeline__link:hover {
	color: inherit !important;
	text-decoration: none !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: .18em !important;
}
#top .pplt-timeline .pplt-timeline__link::after {
	content: "" !important;
	position: absolute !important;
	top: -6px !important;
	right: -8px !important;
	bottom: calc(var(--ptl-space) - 6px) !important;
	left: -8px !important;
	z-index: 2 !important;
	border-radius: 12px !important;
}
#top .pplt-timeline .pplt-timeline__item--linked:last-child .pplt-timeline__link::after { bottom: -6px !important; }
#top .pplt-timeline .pplt-timeline__item--linked:hover .pplt-timeline__link { text-decoration: underline !important; }
#top .pplt-timeline .pplt-timeline__link:focus-visible { outline: none !important; }
#top .pplt-timeline .pplt-timeline__link:focus-visible::after { outline: 3px solid var(--ptl-marker-hover) !important; outline-offset: 0 !important; }

/* --------------------------------------------------------------------------
   Hover: the marker grows and a ring pulses out of it (repeating while the
   pointer stays), the line below it fills in, and the text slides a few
   pixels toward it. Only for visitors who haven't asked for reduced motion;
   "Marker only" skips the line and text; "No animation" skips everything.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	#top .pplt-timeline:not(.pplt-timeline--no-hover) .pplt-timeline__item:hover .pplt-timeline__marker,
	#top .pplt-timeline:not(.pplt-timeline--no-hover) .pplt-timeline__item:focus-within .pplt-timeline__marker {
		transform: scale(1.25) !important;
		background: var(--ptl-marker-hover) !important;
	}
	#top .pplt-timeline:not(.pplt-timeline--no-hover) .pplt-timeline__item:hover .pplt-timeline__marker::after,
	#top .pplt-timeline:not(.pplt-timeline--no-hover) .pplt-timeline__item:focus-within .pplt-timeline__marker::after {
		animation: pplt-timeline-pulse 1.6s cubic-bezier(.22, .61, .36, 1) infinite !important;
	}
	#top .pplt-timeline--diamond:not(.pplt-timeline--no-hover) .pplt-timeline__item:hover .pplt-timeline__marker,
	#top .pplt-timeline--diamond:not(.pplt-timeline--no-hover) .pplt-timeline__item:focus-within .pplt-timeline__marker {
		transform: rotate(45deg) scale(1.15) !important;
	}

	#top .pplt-timeline:not(.pplt-timeline--no-hover):not(.pplt-timeline--hover-marker) .pplt-timeline__item:hover::before,
	#top .pplt-timeline:not(.pplt-timeline--no-hover):not(.pplt-timeline--hover-marker) .pplt-timeline__item:focus-within::before {
		border-left-color: var(--ptl-line-hover) !important;
	}

	#top .pplt-timeline:not(.pplt-timeline--no-hover):not(.pplt-timeline--hover-marker) .pplt-timeline__item:hover .pplt-timeline__label,
	#top .pplt-timeline:not(.pplt-timeline--no-hover):not(.pplt-timeline--hover-marker) .pplt-timeline__item:hover .pplt-timeline__text,
	#top .pplt-timeline:not(.pplt-timeline--no-hover):not(.pplt-timeline--hover-marker) .pplt-timeline__item:focus-within .pplt-timeline__label,
	#top .pplt-timeline:not(.pplt-timeline--no-hover):not(.pplt-timeline--hover-marker) .pplt-timeline__item:focus-within .pplt-timeline__text {
		transform: translateX(5px) !important;
	}
}

/* Mobile (767px and below) */
@media only screen and (max-width: 767px) {
	.pplt-timeline { --ptl-indent: 30px; }
	#top .pplt-timeline .pplt-timeline__text { font-size: 16px; }
}
