/**
 * Блок «Наша команда» (acf/our-team).
 * Карточка специалиста + слайдер; навигация визуально повторяет mobile-кнопки из «Кейсы / результаты».
 */

.wp-block-acf-our-team {
	margin: 0;
	max-width: none !important;
	width: 100%;
	min-width: 0;
}

.amsi-our-team {
	--ot-navy: #0b132b;
	--ot-blue: #0000ff;
	--ot-cyan: #48cae4;
	--ot-muted: rgba(11, 19, 43, 0.65);
	--ot-inner-max: 1232px;
	--ot-pad-x: clamp(16px, 4vw, 24px);
	--ot-pad-y: clamp(56px, 7vw, 96px);
	--ot-header-gap: 12px;
	--ot-header-to-slider: 48px;
	--ot-title-fs: 56px;
	--ot-title-lh: 70px;
	--ot-title-weight: 700;
	--ot-subtitle-fs: 20px;
	--ot-subtitle-lh: 32.5px;
	--ot-subtitle-weight: 300;
	--ot-subtitle-max: 440px;

	--ot-slide-gap: 24px;
	--ot-card-radius: 24px;
	--ot-card-min-h: 270px;
	--ot-card-border: 1px solid rgba(11, 19, 43, 0.06);
	--ot-card-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
	--ot-card-bg: #ffffff;
	--ot-card-topline-h: 5px;
	--ot-card-topline-inset: 24px;
	--ot-card-topline-offset: -2px;
	--ot-card-topline-gradient: linear-gradient(
		90deg,
		var(--ot-topline-grad-start, #0024f2) 0%,
		var(--ot-topline-grad-end, #00c4f5) 100%
	);
	--ot-card-pad: 20px;

	--ot-name-fs: 28px;
	--ot-name-lh: 34px;
	--ot-name-weight: 700;
	--ot-name-color: #2d48c8;
	--ot-role-fs: 15px;
	--ot-role-lh: 22px;
	--ot-role-weight: 300;
	--ot-desc-fs: 14px;
	--ot-desc-lh: 20px;
	--ot-desc-weight: 400;
	--ot-desc-color: var(--ot-name-color);

	/* Портрет полностью внутри карточки */
	--ot-photo-overhang: 0px;
	--ot-photo-inset: 14px;
	--ot-photo-glow: radial-gradient(circle at 48% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 62%),
		radial-gradient(circle at 52% 55%, rgba(72, 202, 228, 0.35), rgba(72, 202, 228, 0) 70%);

	--ot-photo-w: 50%;
	--ot-photo-max-w: 240px;
	--ot-photo-h: 230px;
	--ot-tag-fs: 14px;
	--ot-tag-lh: 20px;
	--ot-tag-weight: 700;
	--ot-tag-pad-x: 18px;
	--ot-tag-h: 40px;

	--ot-nav-inset: -16px;
	--ot-nav-size: 44px;
	--ot-nav-radius: 12px;
	--ot-nav-border-w: 0.75px;
	--ot-nav-border: #e5e7eb;
	--ot-nav-bg: #ffffff;
	--ot-nav-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
	--ot-nav-icon-opacity: 0.7;

	position: relative;
	width: 100%;
	min-width: 0;
	background: #fff;
	color: var(--ot-navy);
	font-family: var(--amsi-font, "Montserrat", system-ui, sans-serif);
	padding: var(--ot-pad-y) 0;
	overflow-x: clip;
	overflow-y: visible;
}

.amsi-our-team *,
.amsi-our-team *::before,
.amsi-our-team *::after {
	box-sizing: border-box;
}

.amsi-our-team__inner {
	width: 100%;
	max-width: var(--ot-inner-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--ot-pad-x);
	padding-right: var(--ot-pad-x);
}

.amsi-our-team__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin: 0 0 var(--ot-header-to-slider);
}

.amsi-our-team__title {
	margin: 0 0 var(--ot-header-gap);
	font-size: var(--ot-title-fs);
	font-weight: var(--ot-title-weight);
	line-height: var(--ot-title-lh);
	letter-spacing: -0.02em;
	color: var(--ot-navy);
}

.amsi-our-team__title-accent {
	color: var(--ot-blue);
}

.amsi-our-team__subtitle {
	margin: 0;
	max-width: min(var(--ot-subtitle-max), 100%);
	font-size: var(--ot-subtitle-fs);
	font-weight: var(--ot-subtitle-weight);
	line-height: var(--ot-subtitle-lh);
	color: var(--ot-muted);
}

.amsi-our-team__slider {
	position: relative;
	width: 100%;
	min-width: 0;
}

.amsi-our-team__viewport-shell {
	position: relative;
	max-width: 100%;
}

.amsi-our-team__viewport {
	width: 100%;
	min-width: 0;
	overflow-x: auto;
	overflow-y: visible;
	padding-top: 0;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
}

.amsi-our-team__viewport::-webkit-scrollbar {
	display: none;
}

.amsi-our-team__track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: var(--ot-slide-gap);
	width: max-content;
	min-width: 100%;
}

.amsi-our-team__item {
	flex: 0 0 100%;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-self: stretch;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

.amsi-our-team__card {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	min-height: var(--ot-card-min-h);
	border-radius: var(--ot-card-radius);
	border: var(--ot-card-border);
	box-shadow: var(--ot-card-shadow);
	background: var(--ot-card-bg);
	/* Фото и блик должны быть внутри скруглённой карточки */
	overflow: hidden;
}

.amsi-our-team__card-topline {
	position: absolute;
	left: var(--ot-card-topline-inset);
	top: 0;
	right: var(--ot-card-topline-inset);
	height: var(--ot-card-topline-h);
	background: var(--ot-card-topline-gradient);
	z-index: 2;
	border-radius: 999px;
	pointer-events: none;
	box-shadow: 0 1px 2px rgba(0, 36, 242, 0.12);
}

.amsi-our-team__content {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: stretch;
	min-height: var(--ot-card-min-h);
	padding: var(--ot-card-pad);
}

.amsi-our-team__copy {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: min(58%, 100%);
	max-width: 58%;
	padding-right: 12px;
}

.amsi-our-team__name {
	margin: 0 0 8px;
	font-size: var(--ot-name-fs);
	font-weight: var(--ot-name-weight);
	line-height: var(--ot-name-lh);
	color: var(--ot-name-color);
}

.amsi-our-team__role {
	margin: 0 0 12px;
	font-size: var(--ot-role-fs);
	font-weight: var(--ot-role-weight);
	line-height: var(--ot-role-lh);
	color: var(--ot-muted);
}

.amsi-our-team__description {
	margin: 0;
	font-size: var(--ot-desc-fs);
	font-weight: var(--ot-desc-weight);
	line-height: var(--ot-desc-lh);
	color: var(--ot-desc-color);
}

.amsi-our-team__media {
	position: absolute;
	inset: 0 0 0 auto;
	right: 0;
	bottom: 0;
	height: auto;
	width: var(--ot-photo-w);
	max-width: var(--ot-photo-max-w);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	pointer-events: none;
	z-index: 3;
	padding: var(--ot-photo-inset);
	padding-bottom: 0;
	border-top-right-radius: var(--ot-card-radius);
	border-bottom-right-radius: var(--ot-card-radius);
	overflow: hidden;
}

.amsi-our-team__media::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--ot-photo-glow);
	filter: blur(14px);
	opacity: 0.95;
	z-index: 0;
	pointer-events: none;
}

.amsi-our-team__img {
	display: block;
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: bottom center;
}

.amsi-our-team__photo-placeholder {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 40% 20%, rgba(72, 202, 228, 0.32), transparent 48%),
		radial-gradient(circle at 75% 72%, rgba(0, 0, 255, 0.25), transparent 45%),
		linear-gradient(180deg, rgba(241, 245, 249, 1) 0%, rgba(226, 232, 240, 1) 100%);
}

.amsi-our-team__photo-placeholder-text {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 88px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ot-blue);
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
}

.amsi-our-team__tag {
	position: absolute;
	right: 20px;
	bottom: 20px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--ot-tag-h);
	padding: 0 var(--ot-tag-pad-x);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 10px 24px rgba(0, 0, 255, 0.18);
	color: var(--ot-blue);
	font-size: var(--ot-tag-fs);
	font-weight: var(--ot-tag-weight);
	line-height: var(--ot-tag-lh);
	white-space: nowrap;
}

.amsi-our-team__nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--ot-nav-size);
	height: var(--ot-nav-size);
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
	border: var(--ot-nav-border-w) solid var(--ot-nav-border);
	border-radius: var(--ot-nav-radius);
	background: var(--ot-nav-bg);
	box-shadow: var(--ot-nav-shadow);
	color: #000;
	cursor: pointer;
	transition: opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.amsi-our-team__nav--prev {
	left: var(--ot-nav-inset);
}

.amsi-our-team__nav--next {
	right: var(--ot-nav-inset);
}

.amsi-our-team__nav:hover:not(:disabled) {
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
	border-color: #d1d5db;
}

.amsi-our-team__nav:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.amsi-our-team__nav[hidden] {
	display: none;
}

.amsi-our-team__nav-icon {
	display: block;
	opacity: var(--ot-nav-icon-opacity);
}

@media (max-width: 1099px) {
	.amsi-our-team {
		--ot-title-fs: clamp(32px, 5vw, 56px);
		--ot-title-lh: 1.15;
		--ot-card-min-h: 250px;
		--ot-name-fs: 24px;
		--ot-name-lh: 30px;
		--ot-photo-max-w: 200px;
	}
}

@media (max-width: 767px) {
	.amsi-our-team {
		--ot-card-topline-inset: 18px;
		--ot-header-to-slider: 32px;
		--ot-subtitle-fs: 16px;
		--ot-subtitle-lh: 24px;
		--ot-card-min-h: 320px;
		--ot-card-pad: 18px;
		--ot-name-fs: 20px;
		--ot-name-lh: 25px;
		--ot-role-fs: 14px;
		--ot-role-lh: 20px;
		--ot-desc-fs: 13px;
		--ot-desc-lh: 18px;
		--ot-photo-w: 52%;
		--ot-photo-max-w: 200px;
		--ot-nav-inset: -12px;
	}

	.amsi-our-team__content {
		flex-direction: column;
		gap: 16px;
		padding: var(--ot-card-pad) var(--ot-card-pad) 0;
	}

	.amsi-our-team__copy {
		width: 100%;
		max-width: 100%;
		padding-right: 0;
		flex: 1 1 auto;
		min-height: 0;
	}

	.amsi-our-team__media {
		position: relative;
		inset: auto;
		right: auto;
		bottom: auto;
		flex-shrink: 0;
		margin-top: auto;
		/* Фото до нижнего края карточки (визуально «прижато» к подошве) */
		margin-left: calc(-1 * var(--ot-card-pad));
		margin-right: calc(-1 * var(--ot-card-pad));
		margin-bottom: 0;
		width: calc(100% + (2 * var(--ot-card-pad)));
		max-width: none;
		height: var(--ot-photo-h);
		padding: 0;
		border-radius: 0 0 var(--ot-card-radius) var(--ot-card-radius);
		align-items: flex-end;
	}

	.amsi-our-team__media::before {
		filter: blur(18px);
	}

	.amsi-our-team__img,
	.amsi-our-team__photo-placeholder {
		height: 100%;
	}

	.amsi-our-team__img {
		width: auto;
		max-width: min(100%, 280px);
		height: 100%;
		max-height: 100%;
	}

	.amsi-our-team__photo-placeholder {
		align-items: flex-end;
		justify-content: center;
	}

	.amsi-our-team__tag {
		right: 16px;
		bottom: 16px;
		max-width: calc(100% - 32px);
		z-index: 6;
	}
}

@media (max-width: 479px) {
	.amsi-our-team {
		--ot-card-topline-inset: 14px;
		--ot-card-min-h: 300px;
		--ot-photo-max-w: 170px;
	}

	.amsi-our-team__copy {
		width: 100%;
		max-width: 100%;
	}
}
