.staff-directory-department {
	margin-bottom: 2.5em;
}

.staff-directory-department-name {
	text-align: left;
	margin-bottom: 1.5em;
}

.staff-directory-department-description {
	margin: 0 0 1.5em;
	text-align: left;
	color: #333;
}

.staff-directory-members {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.staff-directory-member {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
	padding: 24px;
	margin: 0;
	text-align: center;
	flex: 0 0 calc((100% - 48px) / 3);
	max-width: calc((100% - 48px) / 3);
}

.staff-directory-member-photo img {
	display: block;
	width: 120px;
	height: 120px;
	margin: 0 auto 16px;
	object-fit: cover;
}

.staff-directory-member-name {
	display: block;
	font-weight: 600;
	font-size: 1.1em;
	text-transform: capitalize;
}

.staff-directory-member-title {
	display: block;
	color: #555;
	margin-top: 2px;
}

.staff-directory-member-gender {
	color: #777;
	font-size: 0.9em;
	font-weight: normal;
	margin-left: 2px;
}

.staff-directory-member-description {
	max-width: 60ch;
	margin: 12px auto 0;
	color: #333;
}

.staff-directory-member-qualifications {
	max-width: 60ch;
	margin: 12px auto 0;
	color: #333;
	font-style: italic;
}

@media (min-width: 821px) {
	.staff-directory-member:last-child:nth-child(3n + 1),
	.staff-directory-member:nth-last-child(2):nth-child(3n + 1),
	.staff-directory-member:nth-last-child(2):nth-child(3n + 1) ~ .staff-directory-member {
		flex-basis: calc((100% - 24px) / 2);
		max-width: calc((100% - 24px) / 2);
	}
}

@media (max-width: 820px) {
	.staff-directory-member {
		flex-basis: calc((100% - 24px) / 2);
		max-width: calc((100% - 24px) / 2);
	}
}

@media (max-width: 600px) {
	.staff-directory-member {
		flex-basis: 100%;
		max-width: none;
	}
}
