

/* --- The Flowchart Track --- */
.flowchart {
	display: flex;
	align-items: center;
	justify-content: center;
	list-style: none;
	gap: 0;
	width: max-content;
	margin: 0 auto;
	padding: 0 20px; /* Side padding so tooltip doesn't clip on scroll */
}

/* --- Individual Steps --- */
.step {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	width: 125px;
	text-align: center;
	z-index: 1; /* Base z-index */
	transition: z-index 0s 0.2s; /* Delay z-index reset */
}

.step:hover {
	z-index: 10; /* Bring to front on hover immediately */
	transition: z-index 0s;
}

/* Card Styling */
.card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 1.5rem 1rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	transition: all 0.3s ease;

	width: 125px;
	height: 150px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: help; /* Changes cursor to question mark */
	position: relative;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
	border-color: #4f46e5;
}

/* Step Number */
.step-number {
	background-color: #e0e7ff;
	color: #4f46e5;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	/*font-size: 0.9rem;*/
	font-size: 0.4rem;
	margin-bottom: 1rem;
}

/* Icons */
.icon-container {
	width: 48px;
	height: 48px;
	margin-bottom: 1rem;
	color: #4f46e5;
}

.step:last-child .icon-container { color: #f59e0b; }
.step:last-child .step-number {
	background-color: #fef3c7;
	color: #d97706;
}

/* Text Styling */
.step h3 {
	/*font-size: 1rem;*/
	font-size: 0.90rem;
	font-weight: 600;
	/*line-height: 1.4;*/
	line-height: 1.30;
	color: #1e293b;
	pointer-events: none; /* Let clicks pass through to container if needed */
}

/* --- The Informative Tooltip --- */
.info-tooltip {
	position: absolute;
	top: 100%; /* Position below the card */
	left: 50%;
	transform: translateX(-50%) translateY(10px);
	width: 260px; /* Slightly wider than card */
	background-color: #334155;
	color: #f1f5f9;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 0.9rem;
	line-height: 1.5;
	text-align: left;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
	pointer-events: none; /* Prevent mouse from interacting with tooltip text */
	z-index: 20;
}

/* Tooltip Arrow */
.info-tooltip::before {
	content: '';
	position: absolute;
	bottom: 100%; /* Move above the tooltip box */
	left: 50%;
	margin-left: -6px;
	border-width: 6px;
	border-style: solid;
	border-color: transparent transparent #334155 transparent;
}

/* Reveal Tooltip on Hover */
.card:hover + .info-tooltip,
.step:hover .info-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(15px);
}

/* --- Connectors --- */
.connector {
	display: flex;
	align-items: center;
	justify-content: center;
	/*padding: 0 1.5rem;*/
	color: #cbd5e1;
	z-index: 0; /* Behind cards */
}
.connector svg { width: 32px; height: 32px; stroke-width: 2; }

/* --- Responsive Design --- */
@media (max-width: 1200px) {
	.flowchart {
		flex-direction: column;
		align-items: center;
	}
	.step {
		width: 100%;
		max-width: 300px;
		margin-bottom: 2rem; /* Space for vertical arrows */
	}
	.connector {
		transform: rotate(90deg);
		padding: 0.5rem 0;
		height: 20px;
		margin: -1rem 0; /* Tighten gap */
	}

	/* On mobile, tooltip moves to the right or side to avoid overlapping content below */
	.info-tooltip {
		left: 105%;
		top: 50%;
		transform: translateY(-50%) translateX(10px);
		width: 220px;
	}
	
	/* Adjust arrow for mobile side tooltip */
	.info-tooltip::before {
		top: 50%;
		left: 0;
		bottom: auto;
		margin-top: -6px;
		margin-left: -6px;
		border-color: transparent #334155 transparent transparent;
	}

	.card:hover + .info-tooltip,
	.step:hover .info-tooltip {
		transform: translateY(-50%) translateX(15px);
	}
}
