/*
 * Forschung widget — timeline only.
 * Modal styling lives in ac-modal.css (the shared standard) — the source prototype's
 * 20+ separate per-entry modal divs collapse into that one shared modal here.
 */

.ac-fs-container {
	width: 100%;
	margin: 0 auto;
}

.ac-fs-intro {
	margin-bottom: 35px;
}

.ac-fs-toggle {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 20px;
}

/*
 * appearance:none + explicit background-color/color on every state (base, hover,
 * focus, active) with !important — without this, Elementor's/the theme's own global
 * button styling can bleed through on hover (observed: default Elementor pink), the
 * same class of bug fixed everywhere else in this plugin (see e.g. ac-mobile-nav.css).
 */
.ac-fs-toggle-btn {
	font-family: 'Montserrat', sans-serif;
	appearance: none;
	outline: none;
	background-color: var( --ac-accent, #2e6741 ) !important;
	color: #fff !important;
	border: none;
	padding: 8px 15px;
	margin: 0 5px;
	border-radius: 50px;
	cursor: pointer;
	font-size: 16px;
	transition: all 0.3s ease-in-out;
}

.ac-fs-toggle-btn:hover,
.ac-fs-toggle-btn:focus,
.ac-fs-toggle-btn:active,
.ac-fs-toggle-btn.ac-active {
	background-color: #1e4d31 !important;
	color: #fff !important;
	transform: translateY( -4px );
	box-shadow: 5px 10px 15px rgba( 0, 0, 0, 0.15 );
}

.ac-fs-timeline {
	position: relative;
	margin: 40px auto;
}

.ac-fs-timeline::before {
	content: '';
	position: absolute;
	width: 4px;
	background-color: var( --ac-accent, #2e6741 );
	top: 0;
	bottom: 0;
	left: 50%;
	transform: translateX( -50% );
	border-radius: 2px;
}

.ac-fs-item {
	position: relative;
	margin-bottom: 40px;
	width: 100%;
	cursor: pointer;
	opacity: 0;
	transform: translateY( 20px );
	transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.ac-fs-item.ac-fs-visible {
	opacity: 1;
	transform: translateY( 0 );
}

.ac-fs-item::after {
	content: '';
	display: table;
	clear: both;
}

.ac-fs-dot {
	position: absolute;
	width: 20px;
	height: 20px;
	background-color: var( --ac-accent, #2e6741 );
	border-radius: 50%;
	top: 15px;
	left: 50%;
	margin-left: -10px;
	z-index: 10;
	transition: all 0.3s;
	box-shadow: 0 0 0 4px rgba( 46, 103, 65, 0.25 );
}

.ac-fs-item:hover .ac-fs-dot {
	transform: scale( 1.2 );
}

.ac-fs-content {
	position: relative;
	width: 45%;
	padding: 20px;
	border-radius: 8px;
	background-color: #fff;
	box-shadow: 0 4px 8px rgba( 0, 0, 0, 0.15 );
	transition: all 0.3s ease-in-out;
}

.ac-fs-content:hover {
	transform: scale( 1.02 );
}

.ac-fs-item:nth-child( odd ) .ac-fs-content {
	float: left;
}

.ac-fs-item:nth-child( even ) .ac-fs-content {
	float: right;
}

.ac-fs-item.ac-fs-reverse:nth-child( odd ) .ac-fs-content {
	float: right;
}

.ac-fs-item.ac-fs-reverse:nth-child( even ) .ac-fs-content {
	float: left;
}

.ac-fs-content::after {
	content: '';
	position: absolute;
	top: 15px;
	width: 0;
	height: 0;
	border-style: solid;
}

.ac-fs-item:nth-child( odd ) .ac-fs-content::after {
	right: -10px;
	border-width: 10px 0 10px 10px;
	border-color: transparent transparent transparent #fff;
}

.ac-fs-item:nth-child( even ) .ac-fs-content::after {
	left: -10px;
	border-width: 10px 10px 10px 0;
	border-color: transparent #fff transparent transparent;
}

.ac-fs-item.ac-fs-reverse:nth-child( odd ) .ac-fs-content::after {
	right: auto;
	left: -10px;
	border-width: 10px 10px 10px 0;
	border-color: transparent #fff transparent transparent;
}

.ac-fs-item.ac-fs-reverse:nth-child( even ) .ac-fs-content::after {
	left: auto;
	right: -10px;
	border-width: 10px 0 10px 10px;
	border-color: transparent transparent transparent #fff;
}

.ac-fs-date {
	display: inline-block;
	padding: 5px 10px;
	font-family: 'Montserrat', sans-serif;
	background-color: var( --ac-accent, #2e6741 );
	color: #fff;
	border-radius: 4px;
	font-weight: bold;
	margin-bottom: 10px;
}

.ac-fs-content h3 {
	font-family: 'Montserrat', sans-serif;
	color: var( --ac-accent, #2e6741 );
	margin-bottom: 10px;
}

.ac-fs-content p {
	font-family: 'Amiko', sans-serif;
	letter-spacing: 1px;
	color: #303030;
	line-height: 1.4rem;
	margin: 0;
}

@media ( max-width: 768px ) {
	.ac-fs-timeline::before {
		left: 30px;
	}

	.ac-fs-content h3 {
		font-size: 1.4rem;
		word-wrap: break-word;
	}

	.ac-fs-item:nth-child( odd ) .ac-fs-content,
	.ac-fs-item:nth-child( even ) .ac-fs-content,
	.ac-fs-item.ac-fs-reverse:nth-child( odd ) .ac-fs-content,
	.ac-fs-item.ac-fs-reverse:nth-child( even ) .ac-fs-content {
		float: right;
		width: calc( 100% - 60px );
		margin-left: 60px;
	}

	.ac-fs-dot {
		left: 30px;
		margin-left: -10px;
	}

	.ac-fs-item:nth-child( odd ) .ac-fs-content::after,
	.ac-fs-item:nth-child( even ) .ac-fs-content::after,
	.ac-fs-item.ac-fs-reverse:nth-child( odd ) .ac-fs-content::after,
	.ac-fs-item.ac-fs-reverse:nth-child( even ) .ac-fs-content::after {
		left: -10px;
		right: auto;
		border-width: 10px 10px 10px 0;
		border-color: transparent #fff transparent transparent;
	}
}
