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

.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: 40px;
}

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

.team-section__individual-media::before {
	content: "";
	position: absolute;
	top: 25px;
	left: -25px;
	right: 50px;
	bottom: -8px;
	z-index: 0;
	background: var(--light);
	pointer-events: none;
}

.bg-light .team-section__individual-media::before {
	background: var(--light-accent);
}

.bg-medium .team-section__individual-media::before {
	background: var(--medium-accent);
}

.bg-dark .team-section__individual-media::before {
	background: var(--dark-accent);
}

.team-section__individual-image-main {
	position: relative;
	z-index: 1;
	display: block;
	aspect-ratio: 462 / 520;
	overflow: hidden;
}

.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: 28px;
}

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

.team-section__individual-name {
	margin: 0;
	font-size: 42px;
	line-height: 1.05;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--heading-text-color);
}

.team-section__individual-position {
	margin: 0;
	font-size: 16px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: 1.6px;
	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;
}

.team-section__individual .team-section__bio-icon {
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	border-radius: 0;
	background: var(--medium);
	color: var(--primary-color);
	transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.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(--white);
}

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

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

.team-section.bg-medium .team-section__bio-contacts a:hover,
.team-section.bg-medium .team-section__bio-contacts a:focus-visible,
.team-section.bg-dark .team-section__bio-contacts a:hover,
.team-section.bg-dark .team-section__bio-contacts a:focus-visible {
	color: var(--primary-color);
	text-decoration: none;
}

.team-section.bg-medium .team-section__bio-contacts a:hover .team-section__bio-icon,
.team-section.bg-medium .team-section__bio-contacts a:focus-visible .team-section__bio-icon,
.team-section.bg-dark .team-section__bio-contacts a:hover .team-section__bio-icon,
.team-section.bg-dark .team-section__bio-contacts a:focus-visible .team-section__bio-icon {
	background: var(--primary-color);
	color: var(--white);
	transform: scale(1.08);
}

.team-section__bio-contacts a:hover .team-section__bio-icon,
.team-section__bio-contacts a:focus-visible .team-section__bio-icon {
	background: var(--primary-color);
	color: var(--white);
	transform: scale(1.08);
}


.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: 415px;
	overflow: visible;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	background: none;
}	

.team-section__card-media {
	display: block;
	width: 100%;
	height: 375px;
	overflow: hidden;
}

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

.team-section__card-info {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 18px 20px 16px;
	background: var(--medium);
	color: #fff;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.bg-medium .team-section__card-info {
	background: #182935 ;
}

.bg-dark .team-section__card-info {
	background: #243440 ;
}

.team-section__card-name {
	display: block;
	width: 100%;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.2;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #fff;
}

.team-section__card-divider {
	display: block;
	width: 100%;
	height: 1px;
	background: var(--dark-accent);
}

.team-section__card-position {
	display: block;
	width: 100%;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.9);
}

.team-section__view-bio {
	display: none;
	align-items: center;
	gap: 8px;
	margin: 4px auto 0;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.2;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--white);
}

.team-section__view-bio svg {
	display: block;
	width: 16px;
	height: 12px;
}

.team-section__card:hover .team-section__view-bio,
.team-section__card:focus-visible .team-section__view-bio {
	display: inline-flex;
}

.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: 100%;
	padding: 40px;
	background: var(--white);
	border-radius: 2px;
}

.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%;
	padding: 0 20px 20px 0;
}

.team-section__bio-image-shadow,
.team-section__bio-image-main {
	display: block;
	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;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--heading-text-color);
}

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

.team-section__bio-text p {
	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 {
	font-family: var(--font-family-barlow);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	color: var(--medium);
	text-decoration: none;
	background: 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;
	color: var(--primary-color);
}

.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-contacts a:hover .team-section__bio-icon,
.team-section__bio-contacts a:focus-visible .team-section__bio-icon {
	transform: scale(1.08);
}

@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-contacts a:hover .team-section__bio-icon,
	.team-section__bio-contacts a:focus-visible .team-section__bio-icon {
		transform: none;
	}
}

.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;
}

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

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

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

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

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

	/* Stacked layout leaves no free corner, so reserve a band at the top for
	   the close button instead of letting it sit on the photo. */
	.team-section__bio,
	.team-section-fancybox .fancybox-content.team-section__bio {
		padding: 56px 20px 24px;
	}

	.team-section__bio-close {
		top: 12px;
		right: 12px;
		width: 32px;
		height: 32px;
	}

	.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 / 415;
	}

	.team-section__card-media {
		height: auto;
		aspect-ratio: 292 / 375;
	}

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

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

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