/**
 * Team page — alternating rows, color photo with fade.
 */

.team-page {
	padding-block: var(--space-section);
}

.team-page__header {
	margin-bottom: var(--space-xl);
	text-align: center;
}

.team-page__title {
	margin: 0;
	font-weight: 800;
	color: var(--text-title);
}

.team-page__list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-3xl);
}

.team-page__pagination {
	display: flex;
	justify-content: center;
	margin-top: var(--space-inner);
}

.team-page__pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
	justify-content: center;
}

.team-page__pagination a.page-numbers,
.team-page__pagination span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3.2rem;
	min-height: 3.2rem;
	padding: 0 0.8rem;
	border-radius: var(--radius-xs);
	color: var(--text-body);
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.team-page__pagination span.page-numbers.current {
	background: var(--primary);
	color: var(--text-title);
}

.team-page__pagination a.page-numbers:hover {
	background: var(--primary-5);
	color: var(--text-title);
}

/* Member row */
.team-member {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1.6rem, 3vw, 4rem);
	align-items: center;
	width: 100%;
	max-width: 100rem;
	margin-inline: auto;
}

.team-member--photo-right .team-member__media {
	order: 2;
}

.team-member--photo-right .team-member__content {
	order: 1;
}

.team-member__media {
	display: flex;
	justify-content: center;
}

.team-member__photo {
	position: relative;
	width: 100%;
	max-width: 42rem;
	margin: 0;
	line-height: 0;
}

.team-member__photo img {
	display: block;
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
	height: auto;
	object-fit: contain;
	object-position: center bottom;
}

.team-member__photo::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 45%;
	background: linear-gradient(to top, var(--bg-body) 0%, transparent 100%);
	pointer-events: none;
}

.team-member__name {
	margin: 0 0 var(--space-xs);
	font-size: clamp(2.4rem, 3vw, 3.6rem);
	font-weight: 800;
	line-height: 1.15;
	color: var(--text-title);
}

.team-member__name-link {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.team-member__name-link:hover {
	color: var(--primary);
}

.team-member__position {
	margin: 0 0 var(--space-2xs);
	font-size: var(--text-l);
	font-weight: 700;
	color: var(--text-title);
}

.team-member__experience {
	margin: 0 0 var(--space-s);
	font-size: var(--text-m);
	font-weight: 600;
	color: var(--text-body);
	opacity: 0.9;
}

.team-member__bio {
	margin-bottom: var(--space-m);
	font-size: var(--text-m);
	line-height: 1.65;
	color: var(--text-body);
	opacity: 0.92;
}

.team-member__bio p {
	margin: 0 0 var(--space-s);
}

.team-member__bio p:last-child {
	margin-bottom: 0;
}

.team-member__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-m);
}

.team-member__cta {
	padding: 1.2rem 2.4rem;
	border-radius: var(--radius-xs);
	font-size: var(--text-m);
	font-weight: 700;
}

.team-member__more {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: var(--text-m);
	font-weight: 600;
	color: var(--text-title);
	text-decoration: none;
	transition: color 0.2s ease;
}

.team-member__more:hover {
	color: var(--primary);
}

.team-member__more-arrow {
	font-size: 1.2em;
	line-height: 1;
}

/* Single — card + content */
.team-single__shell {
	max-width: 132rem;
}

.team-single__layout {
	display: grid;
	grid-template-columns: minmax(32rem, 38rem) minmax(0, 1fr);
	gap: clamp(2.4rem, 4vw, 6.4rem);
	align-items: start;
}

.team-single__card {
	position: sticky;
	top: var(--space-m);
	align-self: start;
	border-radius: var(--radius-m);
	background: hsla(0, 0%, 10%, 1);
	border: 1px solid var(--border-primary);
	overflow: hidden;
}

body.has-service-header .team-single__card {
	top: calc(8rem + var(--space-m));
}

body.has-service-header.admin-bar .team-single__card {
	top: calc(8rem + 3.2rem + var(--space-m));
}

.team-single__card-photo {
	position: relative;
	margin: 0;
	line-height: 0;
	background: hsla(0, 0%, 6%, 1);
}

.team-single__card-photo::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 45%;
	background: linear-gradient(to top, hsla(0, 0%, 10%, 1) 0%, transparent 100%);
	pointer-events: none;
}

.team-single__card-photo img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	object-position: center top;
}

.team-single__card-body {
	padding: var(--space-m) var(--space-inner) var(--space-inner);
}

.team-single__card-name {
	margin: 0 0 var(--space-2xs);
	font-size: clamp(2rem, 2.2vw, 2.6rem);
	font-weight: 800;
	line-height: 1.15;
	color: var(--text-title);
}

.team-single__card-position {
	margin: 0 0 var(--space-m);
	font-size: var(--text-m);
	font-weight: 600;
	color: var(--text-body);
	opacity: 0.92;
}

.team-single__socials {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-s);
	margin-bottom: var(--space-m);
}

.team-single__social {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.6rem;
	height: 3.6rem;
	color: var(--text-title);
	font-size: 1.8rem;
	text-decoration: none;
	transition: color 0.2s ease;
}

.team-single__social:hover {
	color: var(--primary);
}

.team-single__card-cta {
	width: 100%;
	padding: 1.4rem 2rem;
	border-radius: var(--radius-xs);
	font-size: var(--text-m);
	font-weight: 700;
}

.team-single__content {
	padding-block: var(--space-xs);
}

.team-single__lead {
	font-size: var(--text-l);
	line-height: 1.65;
	color: var(--text-body);
}

.team-single__lead p {
	margin: 0;
}

.team-single__rule {
	margin: var(--space-m) 0;
	border: none;
	border-top: 1px solid var(--border-primary);
}

.team-single__experience {
	margin: 0;
	font-size: var(--text-l);
	font-weight: 700;
	color: var(--text-title);
}

.team-single__tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.team-single__tag {
	border-radius: var(--radius-xs);
	background: hsla(0, 0%, 18%, 1);
	border: 1px solid var(--border-primary);
	font-size: var(--text-s);
	line-height: 1.4;
	color: var(--text-body);
}

.team-single__tag-link {
	display: block;
	padding: 0.8rem 1.4rem;
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.team-single__tag-link:hover {
	color: var(--primary);
	border-color: var(--primary);
	background: hsla(0, 0%, 22%, 1);
}

/* Vertical career timeline */
.team-vtimeline__title {
	margin: 0 0 var(--space-m);
	font-size: var(--text-xl);
	font-weight: 800;
	color: var(--text-title);
}

.team-vtimeline__list {
	margin: 0;
	padding: 0 0 0 0.4rem;
	list-style: none;
}

.team-vtimeline__step {
	display: grid;
	grid-template-columns: 3.2rem minmax(0, 1fr);
	gap: var(--space-s);
	padding-bottom: var(--space-m);
}

.team-vtimeline__step:last-child {
	padding-bottom: 0;
}

.team-vtimeline__track {
	position: relative;
	display: flex;
	justify-content: center;
}

.team-vtimeline__track::before {
	content: "";
	position: absolute;
	top: 0.6rem;
	bottom: -0.6rem;
	left: 50%;
	width: 2px;
	margin-left: -1px;
	background: var(--border-primary);
}

.team-vtimeline__step:last-child .team-vtimeline__track::before {
	display: none;
}

.team-vtimeline__dot {
	position: relative;
	z-index: 1;
	width: 1.4rem;
	height: 1.4rem;
	margin-top: 0.45rem;
	border-radius: var(--radius-full);
	background: var(--primary);
	box-shadow: 0 0 0 4px hsla(359, 98%, 46%, 0.2);
}

.team-vtimeline__body {
	padding: var(--space-s) var(--space-m);
	border-radius: var(--radius-s);
	background: hsla(0, 0%, 12%, 1);
	border: 1px solid var(--border-primary);
}

.team-vtimeline__year {
	margin: 0 0 0.4rem;
	font-size: var(--text-l);
	font-weight: 800;
	color: var(--primary);
}

.team-vtimeline__role {
	margin: 0 0 0.4rem;
	font-size: var(--text-m);
	font-weight: 700;
	color: var(--text-title);
}

.team-vtimeline__desc {
	margin: 0;
	font-size: var(--text-m);
	line-height: 1.6;
	color: var(--text-body);
	opacity: 0.92;
}

/* Related services */
.team-single__services-title {
	margin: 0 0 var(--space-m);
	font-size: var(--text-xl);
	font-weight: 800;
	color: var(--text-title);
}

.team-single__tags--services {
	margin-bottom: var(--space-m);
}

.team-single__services-sub {
	margin: 0 0 var(--space-s);
	font-size: var(--text-s);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-body);
	opacity: 0.75;
}

.team-single__services-list {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.team-single__service-link {
	display: flex;
	align-items: center;
	gap: var(--space-s);
	padding: var(--space-s) var(--space-m);
	border-radius: var(--radius-s);
	background: hsla(0, 0%, 12%, 1);
	border: 1px solid var(--border-primary);
	color: var(--text-title);
	text-decoration: none;
	transition:
		border-color 0.2s ease,
		background 0.2s ease,
		box-shadow 0.2s ease,
		color 0.2s ease;
}

.team-single__service-link:hover {
	border-color: var(--primary-40);
	background: hsla(0, 0%, 14%, 1);
	color: var(--primary);
}

.team-single__service-icon {
	flex-shrink: 0;
	width: 3.2rem;
	height: 3.2rem;
	background-color: var(--primary);
	mask-image: var(--team-service-icon);
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
	-webkit-mask-image: var(--team-service-icon);
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
}

.team-single__service-title {
	font-size: var(--text-m);
	font-weight: 600;
	line-height: 1.35;
}

.team-single__certs-title {
	margin: 0 0 var(--space-s);
	font-size: var(--text-l);
	font-weight: 700;
}

.team-single__certs-grid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-s);
	margin: 0;
	padding: 0;
	list-style: none;
}

.team-single__certs-grid img {
	display: block;
	max-width: 12rem;
	height: auto;
	border-radius: var(--radius-xs);
}

.team-single__content-cta {
	display: none;
	width: 100%;
	margin-top: var(--space-xl);
}

.team-single__back {
	margin-top: var(--space-xl);
}

.team-single__back a {
	color: var(--text-body);
	text-decoration: none;
}

.team-single__back a:hover {
	color: var(--primary);
}

@media (max-width: 900px) {
	.team-single__layout {
		grid-template-columns: 1fr;
	}

	.team-single__card {
		position: static;
	}

	.team-single__content-cta {
		display: block;
	}

	.team-single__back {
		margin-top: var(--space-m);
	}

	.team-member {
		grid-template-columns: 1fr;
		gap: var(--space-m);
		max-width: none;
	}

	.team-member--photo-right .team-member__media,
	.team-member--photo-right .team-member__content {
		order: unset;
	}

	.team-member__photo img {
		max-width: 36rem;
	}
}

@media (max-width: 782px) {
	body.has-service-header.admin-bar .team-single__card {
		top: calc(8rem + 4.6rem + var(--space-m));
	}
}
