.team-section {
	position: relative;
	overflow: hidden;
}

.team-section__accent {
	position: absolute;
	width: min(62vw, 1187px);
	height: auto;
	pointer-events: none;
	color: var(--secondary-color);
	z-index: 0;
}

.team-section__accent svg {
	display: block;
	width: 100%;
	height: auto;
}

.team-section__accent--top {
	top: 0;
	left: 0;
}

.team-section__accent--bottom {
	right: 0;
	bottom: 0;
	transform: rotate(180deg);
}

.team-section .container {
	position: relative;
	z-index: 1;
}

.team-section__top {
	margin-bottom: 50px;
}

.team-section__top > *:first-child {
	margin-top: 0;
}

.team-section__top > *:last-child {
	margin-bottom: 0;
}

/* Individual team member */
.team-section__individual {
	display: flex;
	align-items: center;
	gap: 32px;
}

.team-section__individual-media {
	position: relative;
	flex: 0 0 528px;
	width: 528px;
	max-width: 45%;
	padding: 0 20px 20px 0;
}

.team-section__individual-image-shadow,
.team-section__individual-image-main {
	display: block;
	border-radius: 10px;
	overflow: hidden;
}

.team-section__individual-image-shadow {
	position: absolute;
	top: 20px;
	left: 20px;
	right: 0;
	bottom: 0;
	z-index: 0;
	opacity: 0.2;
	pointer-events: none;
}

.team-section__individual-image-shadow .team-section__individual-image {
	filter: blur(8px);
	transform: scale(1.05);
}

.team-section__individual-image-main {
	position: relative;
	z-index: 1;
	aspect-ratio: 508 / 477;
}

.team-section__individual-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.team-section__individual-content {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 30px;
	padding-left: 18px;
}

.team-section__individual-header {
	display: flex;
	flex-direction: column;
	gap: 15px;
	width: 100%;
}

.team-section__individual-name {
	margin: 0;
	font-size: 45px;
	line-height: 1;
	font-weight: 700;
	color: var(--heading-text-color);
}

.team-section__individual-position {
	margin: 0;
	font-size: 18px;
	line-height: 1;
	font-weight: 900;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--paragraph-text-color);
}

.team-section__individual-bio {
	color: var(--paragraph-text-color);
	font-size: 18px;
	line-height: 28px;
}

.team-section__individual-bio > *:first-child {
	margin-top: 0;
}

.team-section__individual-bio > *:last-child {
	margin-bottom: 0;
}

.team-section__individual .team-section__bio-contacts {
	margin-top: 0;
	padding-left: 0;
}

.team-section--individual.bg-medium .team-section__individual-name,
.team-section--individual.bg-dark .team-section__individual-name,
.team-section--individual.bg-medium .team-section__individual-position,
.team-section--individual.bg-dark .team-section__individual-position,
.team-section--individual.bg-medium .team-section__individual-bio,
.team-section--individual.bg-dark .team-section__individual-bio {
	color: var(--body-with-dark-background);
}

.team-section--individual.bg-medium .team-section__bio-contacts a,
.team-section--individual.bg-dark .team-section__bio-contacts a {
	color: var(--primary-color);
}

.team-section__bio-contacts a:hover {
	color: var(--dark);
	text-decoration: none !important;
}

.team-section__bio-contacts a:hover .team-section__bio-icon {
	background: var(--dark);
	transform: scale(1.08);
}

.bg-medium .team-section__bio-contacts a:hover,
.bg-dark .team-section__bio-contacts a:hover {
	color: var(--white);
	text-decoration: none !important;
}

.bg-medium .team-section__bio-contacts a:hover .team-section__bio-icon{
	background: var(--dark);
	color: var(--white);
}

.bg-medium .team-section__bio-contacts a:hover,
.bg-dark .team-section__bio-contacts a:hover {
	color: var(--white);
	text-decoration: none !important;
}


.bg-dark .team-section__bio-contacts a:hover .team-section__bio-icon {
	background: var(--medium);
	color: var(--white);
}


.team-section--individual.bg-medium .team-section__bio-icon,
.team-section--individual.bg-dark .team-section__bio-icon {
	background: var(--primary-color);
	color: var(--dark);
}

.team-section__groups {
	display: flex;
	flex-direction: column;
	gap: 50px;
}

.team-section__group-title {
	margin: 0 0 30px;
	text-align: center;
	font-size: 35px;
	line-height: 35px;
	font-weight: 700;
	color: var(--heading-text-color);
}

.team-section__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 32px;
}

.team-section__card {
	position: relative;
	display: block;
	flex: 0 0 292px;
	width: 292px;
	max-width: 100%;
	height: 400px;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.06);
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.team-section__card-media,
.team-section__card-image {
	display: block;
	width: 100%;
	height: 100%;
}

.team-section__card-image {
	object-fit: cover;
}

.team-section__card-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 25px 20px;
	text-align: center;
	color: var(--white);
	background: linear-gradient(to bottom, rgba(3, 11, 29, 0) 0%, var(--dark) 100%);
	transition: opacity 0.3s ease;
}

.team-section__card-name {
	display: block;
	width: 100%;
	font-weight: 700;
	font-size: 20px;
	line-height: 1.2;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.team-section__card-position {
	display: block;
	width: 100%;
	margin-top: 2px;
	font-size: 18px;
	line-height: 28px;
	font-weight: 400;
}

.team-section__card-hover {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 0 20px 20px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.team-section__card-hover-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 25px 20px;
	border-radius: 10px;
	background: var(--white);
	text-align: center;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.team-section__card-hover .team-section__card-name {
	color: var(--heading-text-color);
}

.team-section__card-hover .team-section__card-position {
	color: var(--paragraph-text-color);
	margin-bottom: 15px;
}

.team-section__view-bio {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 900;
	font-size: 18px;
	line-height: 1;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--secondary-color);
}

.team-section__view-bio svg {
	display: block;
}

.team-section__card:hover .team-section__card-overlay,
.team-section__card:focus-visible .team-section__card-overlay {
	opacity: 0;
}

.team-section__card:hover .team-section__card-hover,
.team-section__card:focus-visible .team-section__card-hover {
	opacity: 1;
	transform: translateY(0);
}

.team-section__bios {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.team-section__bio {
	position: relative;
	width: min(1100px, 92vw);
	max-width: 1048px;
	padding: 40px;
	background: var(--white);
	border-radius: 10px;
}

.team-section__bio-close {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #7a7a7a;
	cursor: pointer;
}

.team-section__bio-inner {
	display: flex;
	align-items: stretch;
	gap: 40px;
}

.team-section__bio-media {
	position: relative;
	flex: 0 0 333px;
	width: 333px;
	max-width: 42%;
	/* Room for the 20px offset duplicate behind the photo */
	padding: 0 20px 20px 0;
}

.team-section__bio-image-shadow,
.team-section__bio-image-main {
	display: block;
	border-radius: 10px;
	overflow: hidden;
}

.team-section__bio-image-shadow {
	position: absolute;
	top: 20px;
	left: 20px;
	right: 0;
	bottom: 0;
	z-index: 0;
	opacity: 0.2;
	pointer-events: none;
}

.team-section__bio-image-shadow .team-section__bio-image {
	filter: blur(8px);
	transform: scale(1.05);
}

.team-section__bio-image-main {
	position: relative;
	z-index: 1;
	aspect-ratio: 313 / 362;
}

.team-section__bio-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.team-section__bio-content {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 20px;
}

.team-section__bio-name {
	margin: 0 0 8px;
	font-size: 35px;
	line-height: 1.15;
	font-weight: 700;
	color: var(--heading-text-color);
}

.team-section__bio-position {
	margin: 0 0 24px;
	font-size: 25px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--heading-text-color);
}

.team-section__bio-text {
	color: var(--paragraph-text-color);
	font-size: 18px;
	line-height: 28px;
}

.team-section__bio-text > *:first-child {
	margin-top: 0;
}

.team-section__bio-text > *:last-child {
	margin-bottom: 0;
}

.team-section__bio-contacts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 25px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.team-section__bio-contacts li {
	margin: 0;
	padding: 0;
}

.team-section__bio-contacts li::before {
	display: none;
}

.team-section__bio-contacts a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
	font-size: 18px;
	line-height: 1.2;
	color: var(--secondary-color);
	text-decoration: none;
	transition: color 0.3s ease;
}

.team-section__bio-contacts a > span:last-child {
	display: inline-block;
	position: relative;
	padding-bottom: 2px;
}

.team-section__bio-contacts a > span:last-child::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform: scaleX(1);
	transform-origin: left center;
	pointer-events: none;
}

.team-section__bio-contacts a:hover,
.team-section__bio-contacts a:focus-visible {
	text-decoration: none;
}

.team-section__bio-contacts a:hover > span:last-child::after,
.team-section__bio-contacts a:focus-visible > span:last-child::after {
	animation: team-section-bio-underline 0.45s ease;
}

.team-section__bio-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--secondary-color);
	color: #fff;
	transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

@keyframes team-section-bio-underline {
	0% {
		transform: scaleX(1);
		transform-origin: right center;
	}
	45% {
		transform: scaleX(0);
		transform-origin: right center;
	}
	55% {
		transform: scaleX(0);
		transform-origin: left center;
	}
	100% {
		transform: scaleX(1);
		transform-origin: left center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.team-section__bio-contacts a:hover > span:last-child::after,
	.team-section__bio-contacts a:focus-visible > span:last-child::after {
		animation: none;
	}
}

.team-section__bio-icon svg {
	display: block;
	flex: 0 0 auto;
}

/* Fancybox skin for team bios.
   Fancybox adds .fancybox-content onto the inline bio node itself. */
.team-section-fancybox .fancybox-bg {
	background: rgba(0, 0, 0, 0.65);
}

.team-section-fancybox .fancybox-content.team-section__bio {
	background: #fff;
	background: var(--white);
	padding: 40px 40px 20px;
}

.team-section-fancybox .fancybox-close-small {
	display: none;
}

/* Medium / Dark */
.team-section.bg-medium .team-section__group-title,
.team-section.bg-dark .team-section__group-title {
	color: var(--body-with-dark-background);
}

.team-section.bg-medium .team-section__accent,
.team-section.bg-dark .team-section__accent {
	color: var(--primary-color);
	opacity: 0.5;
}

@media (max-width: 1199px) {
	.team-section__individual-media {
		flex-basis: 420px;
		width: 420px;
	}
}

@media (max-width: 991px) {
	.team-section__individual {
		flex-direction: column;
		align-items: stretch;
		gap: 28px;
	}

	.team-section__individual-media {
		flex: none;
		width: min(508px, 100%);
		max-width: none;
		margin: 0 auto;
	}

	.team-section__individual-content {
		padding-left: 0;
	}

	.team-section__individual-name {
		font-size: 36px;
	}

	.team-section__bio,
	.team-section-fancybox .fancybox-content.team-section__bio {
		padding: 28px 20px 24px;
	}

	.team-section__bio-inner {
		flex-direction: column;
		gap: 24px;
	}

	.team-section__bio-media {
		flex: none;
		width: min(333px, 100%);
		max-width: none;
		margin: 0 auto;
	}

	.team-section__bio-image-main {
		max-height: 360px;
	}

	.team-section__bio-content {
		padding-right: 0;
	}
}

@media (max-width: 767px) {
	.team-section__card {
		flex-basis: min(292px, 100%);
		width: min(292px, 100%);
		height: auto;
		aspect-ratio: 292 / 400;
	}

	.team-section__group-title {
		font-size: 28px;
		line-height: 1.2;
	}

	.team-section__individual-name {
		font-size: 32px;
	}

	.team-section__bio-name {
		font-size: 28px;
	}

	.team-section__accent {
		opacity: 0.7;
	}
}
