/* Organizational Tree Widget Styles */

.org-tree-container {
	width: 100%;
	overflow-x: auto;
	padding: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.org-tree-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	position: relative;
}

.org-tree-list.org-tree-children {
	margin-top: 0px;
	padding-top: 20px;
}

.org-tree-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	margin: 0 20px;
}

.org-tree-card {
	background: #ffffff;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	min-width: 200px;
	max-width: 250px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	text-align: center;
	position: relative;
	z-index: 2;
}

.org-tree-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-color: #4a90e2;
}

.org-tree-image {
	width: 80px;
	height: 80px;
	margin: 0 auto 15px;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid #f0f0f0;
}

.org-tree-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.org-tree-content {
	text-align: center;
}

.org-tree-name {
	font-size: 16px;
	font-weight: 600;
	color: #333333;
	margin-bottom: 5px;
	line-height: 1.4;
}

.org-tree-position {
	font-size: 14px;
	color: #666666;
	margin-bottom: 8px;
	font-weight: 500;
}

.org-tree-description {
	font-size: 12px;
	color: #999999;
	margin-top: 8px;
	line-height: 1.5;
}

/* Vertical line from parent card down */
.org-tree-line {
	width: 2px;
	height: 30px;
	background-color: #cccccc;
	position: relative;
	margin: 0 auto;
	z-index: 1;
}

/* Container for children */
.org-tree-children {
	position: relative;
	padding-top: 20px;
	margin-top: 0;
}

/* Horizontal line connecting all children - positioned by JavaScript */
.org-tree-children::before {
	content: '';
	position: absolute;
	top: 0;
	height: 2px;
	background-color: #cccccc;
	z-index: 1;
	left: var(--line-left, 0);
	width: var(--line-width, 0);
}

/* For single child, hide horizontal line */
.org-tree-children:has(.org-tree-item:only-child)::before {
	display: none;
}

/* Vertical line from horizontal line down to each child card */
.org-tree-children .org-tree-item::before {
	content: '';
	position: absolute;
	top: -20px;
	left: 50%;
	transform: translateX(-50%);
	width: 2px;
	height: 20px;
	background-color: #cccccc;
	z-index: 2;
}

/* For single child, vertical line only */
.org-tree-children .org-tree-item:only-child::before {
	left: 50%;
	transform: translateX(-50%);
	height: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.org-tree-list {
		flex-direction: column;
		align-items: center;
	}

	.org-tree-item {
		margin: 10px 0;
	}

	.org-tree-card {
		min-width: 180px;
		max-width: 220px;
	}

	.org-tree-children::before {
		display: none;
	}

	.org-tree-children .org-tree-item::before {
		display: none;
	}
}

/* Animation */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.org-tree-card {
	animation: fadeInUp 0.5s ease-out;
}

.org-tree-item:nth-child(1) .org-tree-card {
	animation-delay: 0.1s;
}

.org-tree-item:nth-child(2) .org-tree-card {
	animation-delay: 0.2s;
}

.org-tree-item:nth-child(3) .org-tree-card {
	animation-delay: 0.3s;
}

.org-tree-item:nth-child(4) .org-tree-card {
	animation-delay: 0.4s;
}

.org-tree-item:nth-child(5) .org-tree-card {
	animation-delay: 0.5s;
}

