.block-team {
	--bt-card-bg: #f7f8fc;
	--bt-stat-bg: var(--c-light-grey);
	--bt-nav-bg: var(--c-light-blue);
	--bt-divider: rgba(0, 0, 0, 0.10);
	--bt-radius: 1.5625rem;
	--bt-card-pad: 2rem;
	--bt-gap: 1.25rem;
	--bt-photo-size: 10rem;
	--bt-btn-color: var(--c-brand-blue);

	margin-top: 8.75rem;
	margin-bottom: 8.75rem;
	color: var(--c-dark-blue);
	opacity: 0;
}

@keyframes block-team-slide-up {
	from { opacity: 0; transform: translateY(40px); }
	to   { opacity: 1; transform: translateY(0); }
}

.block-team.is-in-view {
	animation: block-team-slide-up 800ms ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
	.block-team { opacity: 1; }
	.block-team.is-in-view { animation: none; }
}

.block-team__inner {
	display: flex;
	flex-direction: column;
	gap: 3.75rem;
}

/* ===========================================================
   Top section: header (left) + stats (right) + nav arrows (right bottom)
   =========================================================== */

.block-team__top {
	display: grid;
	grid-template-columns: minmax(0, 31.5625rem) minmax(0, 1fr);
	gap: 5.1875rem;
	align-items: start;
}

.block-team__header {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.block-team__title {
	margin: 0;
	font-size: 3.5rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.125rem;
	color: var(--c-dark-blue);
}

.block-team__title span {
	color: var(--c-brand-orange);
}

.block-team__lead {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--c-dark-blue);
}

.block-team__description {
	margin: 0;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.3;
	color: var(--c-dark-blue);
}

/* Title→lead is 32px (flex gap), lead→description should be 20px.
   Pull description up 12px to compensate uniform gap. */
.block-team__lead + .block-team__description {
	margin-top: -0.75rem;
}

/* ---------- Right column: stats + nav ---------- */

.block-team__right {
	display: flex;
	flex-direction: column;
	gap: 7.7rem;
	align-items: flex-end;
}

.block-team__stats {
	width: 100%;
	max-width: 44.5rem;
	display: grid;
	grid-template-columns:
		minmax(0, 13.375rem)
		minmax(0, 13.6875rem)
		minmax(0, 14.9375rem);
	gap: var(--bt-gap);
}

.block-team__stat {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 1.25rem 1.875rem;
	border-radius: var(--bt-radius);
	background: var(--bt-stat-bg);
}

.block-team__stat-value {
	font-size: 2.375rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.0375rem;
	color: var(--c-brand-blue);
	white-space: nowrap;
}

.block-team__stat-label {
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.3;
	color: var(--c-brand-blue);
}

/* ---------- Slider navigation buttons ---------- */

.block-team__nav {
	display: flex;
	gap: 1.25rem;
}

/* Mobile-position nav lives inside the slider section but is hidden on
   tablet/desktop. The visible set switches in the mobile media query. */
.block-team__nav--mobile {
	display: none;
}

.block-team__nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.75rem;
	height: 3.75rem;
	padding: 0;
	border: 0;
	border-radius: 1rem;
	background: var(--bt-nav-bg);
	color: var(--c-white);
	cursor: pointer;
	transition: var(--transition);
}

.block-team__nav-btn:hover {
	background: var(--c-light-blue-hover);
}

.block-team__nav-btn:disabled,
.block-team__nav-btn.swiper-button-disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.block-team__nav-btn svg {
	width: 0.9375rem;
	height: 1.625rem;
	display: block;
}

/* ===========================================================
   Slider (Swiper)
   =========================================================== */

.block-team__slider {
	width: 100%;
	overflow: hidden;
}

.block-team__slider .swiper-wrapper {
	display: flex;
}

.block-team__card {
	width: 24rem;
	flex-shrink: 0;
	height: auto;
	box-sizing: border-box;
}

.block-team__card-link {
	display: flex;
	flex-direction: column;
	gap: 1.6875rem;
	padding: var(--bt-card-pad);
	border-radius: var(--bt-radius);
	background: var(--bt-card-bg);
	height: 100%;
	box-sizing: border-box;
	color: inherit;
	text-decoration: none;
}

.block-team__card-link:hover,
.block-team__card-link:focus-visible {
	color: inherit;
	text-decoration: none;
}

.block-team__card-link:focus-visible {
	outline: 2px solid var(--c-brand-blue);
	outline-offset: 3px;
}

.block-team__photo {
	position: relative;
	width: var(--bt-photo-size);
	height: var(--bt-photo-size);
	border-radius: 50%;
}

.block-team__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.block-team__card-body {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.block-team__card-name {
	margin: 0;
	font-size: 2.375rem;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.125rem;
	color: var(--c-dark-blue);
}

.block-team__card-meta {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.block-team__card-role {
	font-size: 1rem;
	line-height: 1.3;
	color: var(--c-dark-blue);
}

.block-team__divider {
	margin: 0;
	border: 0;
	height: 1px;
	background: var(--bt-divider);
}

.block-team__card-desc {
	margin: 0;
	font-size: 1rem;
	line-height: 1.3;
	color: var(--c-dark-blue);
}

.block-team__card-button {
	align-self: flex-start;
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 213px;
	max-width: 100%;
	height: 70px;
	padding: 0 1rem;
	border: 1px solid var(--bt-btn-color);
	border-radius: 20px;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--bt-btn-color);
	text-decoration: none;
	transition: background-color 0.25s ease;
}

.block-team__card-button:hover,
.block-team__card-button:focus-visible {
	color: var(--bt-btn-color);
	text-decoration: none;
	background-color: color-mix(in srgb, var(--bt-btn-color) 10%, transparent);
}

.block-team__card-button:focus-visible {
	outline: 2px solid var(--bt-btn-color);
	outline-offset: 3px;
}

/* ===========================================================
   Mid-desktop (max-width: 1339.98px) — top stacks single-column
   because the right column can no longer fit the 712px stats group.
   =========================================================== */

@media (max-width: 1339.98px) and (min-width: 1200px) {
	.block-team__top {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	.block-team__right {
		align-items: flex-end;
		gap: 1.5rem;
	}
}

/* ===========================================================
   Tablet (max-width: 1199.98px)
   =========================================================== */

@media (max-width: 1199.98px) {
	.block-team {
		--bt-card-pad: 1.75rem;
		margin-top: 7.5rem;
		margin-bottom: 7.5rem;
	}

	.block-team__top {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	.block-team__title {
		font-size: 2.5rem;
		letter-spacing: -0.0625rem;
	}

	.block-team__lead {
		font-size: 1.125rem;
	}

	.block-team__right {
		gap: 1.5rem;
		align-items: stretch;
	}

	/* Single-column top: let stats stretch to full row width */
	.block-team__stats {
		max-width: none;
	}

	.block-team__stat-value {
		font-size: 1.875rem;
	}

	.block-team__nav {
		align-self: flex-end;
	}

	.block-team__nav-btn {
		width: 3.125rem;
		height: 3.125rem;
		border-radius: 0.8125rem;
	}

	.block-team__card {
		width: 20rem;
	}

	.block-team__card-name {
		font-size: 1.875rem;
	}
}

/* ===========================================================
   Mobile (max-width: 767.98px) — stacked single column
   =========================================================== */

@media (max-width: 767.98px) {
	.block-team {
		--bt-card-pad: 1.25rem;
		--bt-photo-size: 7.5rem;
		margin-top: 6.25rem;
		margin-bottom: 6.25rem;
	}

	.block-team__inner {
		gap: 2rem;
	}

	.block-team__top {
		grid-template-columns: 1fr;
		gap: 2rem;
		text-align: center;
	}

	.block-team__header {
		align-items: center;
	}

	.block-team__title {
		font-size: 2rem;
	}

	.block-team__stats {
		grid-template-columns: 1fr 1fr;
		gap: 0.75rem;
	}

	.block-team__stat {
		gap: 0.25rem;
		padding: 0.75rem;
		border-radius: 0.9375rem;
	}

	.block-team__stat-value {
		font-size: 1.75rem;
	}

	.block-team__stat-label {
		max-width: none;
		font-size: 0.875rem;
		min-width: 0;
		text-align: left;
	}

	/* 3rd badge spans both columns and goes back to horizontal */
	.block-team__stat:nth-child(3) {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
		gap: 1.25rem;
	}

	/* On mobile the visible nav lives inside the slider section, pinned
	   to the top-right corner above the first card (right next to the
	   teacher photo). The desktop nav is hidden. */
	.block-team__slider-section {
		position: relative;
	}

	.block-team__nav--desktop {
		display: none;
	}

	.block-team__nav--mobile {
		display: flex;
		position: absolute;
		top: 1.25rem;
		right: 1.3125rem;
		gap: 1rem;
		z-index: 5;
	}

	.block-team__card {
		width: 100%;
	}

	.block-team__card-link {
		gap: 1.5rem;
	}

	.block-team__card-body {
		gap: 1rem;
	}

	.block-team__card-meta {
		gap: 0.5rem;
	}

	.block-team__card-name {
		font-size: 1.75rem;
	}

	.block-team__card-role,
	.block-team__card-desc {
		font-size: 0.875rem;
	}

	.block-team__card-button {
		width: 275px;
	}
}

/* ---------- Вариант под страницу «Английский для детей и подростков» ---------- */

.block-team--kids {
	--bt-nav-bg: var(--c-light-blue);
}

.block-team--kids .block-team__stat {
	background: var(--c-light-grey);
}

.block-team--kids .block-team__stat-value,
.block-team--kids .block-team__stat-label {
	color: var(--c-dark-blue);
}

@media (max-width: 767.98px) {
	.block-team--kids .block-team__stats {
		max-width: 335px;
		height: 168px;
		grid-template-columns: 164px 164px;
		gap: 12px 7px;
	}

	.block-team--kids .block-team__stat:not(:nth-child(3)) {
		width: 164px;
		height: 96px;
		gap: 0;
	}

	.block-team--kids .block-team__stat:nth-child(1) .block-team__stat-label {
		max-width: 128px;
	}

	.block-team--kids .block-team__stat:nth-child(2) .block-team__stat-label {
		max-width: 140px;
	}

	.block-team--kids .block-team__stat:nth-child(3) .block-team__stat-label {
		max-width: 99px;
	}
}

@media (min-width: 1340px) {
	.block-team--kids .block-team__top {
		grid-template-columns: 530px minmax(0, 1fr);
		gap: 20px;
	}

	.block-team--kids .block-team__header {
		height: 296px;
	}

	.block-team--kids .block-team__stats {
		width: 750px;
		max-width: none;
		height: 126px;
		grid-template-columns: 190px 219px 301px;
	}

	.block-team--kids .block-team__stat-value {
		font-size: 34px;
		font-weight: 700;
		line-height: 130%;
		letter-spacing: -0.6px;
	}

	.block-team--kids .block-team__stat-label {
		font-size: 16px;
		font-weight: 400;
		line-height: 130%;
		letter-spacing: 0;
	}
}

/* Промежуточные ширины: фиксированная раскладка режима не влезает,
   поэтому статистика становится резиновой в три равные колонки,
   а длинное значение «Сертификаты» может переноситься и не обрезается. */
@media (min-width: 768px) and (max-width: 1339.98px) {
	.block-team--kids .block-team__stats {
		max-width: none;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.block-team--kids .block-team__stat-value {
		white-space: normal;
	}

	.block-team--kids .block-team__lead {
		max-width: 640px;
	}
}
