/* Module: Our team. Figma "Section – Meet the people behind your care." (1440 / 390). */

.module--team {
	--team-surface: #1e1a15;  /* tabs background */
	--team-frame: #2a251e;    /* photo placeholder */
	--team-line: #3a332a;     /* borders, progress track */
	background: var(--c-ink);
	color: #fff;
	padding-block: clamp(80px, 9.7vw, 140px);
}

/* ---------- Heading row ---------- */

/* Bootstrap .row: title .col-lg | tabs .col-lg-auto, bottom-aligned. */
.team__head {
	--bs-gutter-x: 48px;
	--bs-gutter-y: 32px;
}

.module--team .eyebrow {
	color: var(--c-gold);
}

.team__heading {
	max-width: 610px;
	margin: 0;
	color: #fff;
	text-wrap: pretty;
}

.team__heading em {
	color: var(--c-gold);
}

/* ---------- Clinic tabs ---------- */

.team-tabs {
	display: flex;
	gap: 4px;
	padding: 5px;
	margin-bottom: 5px;
	border: 1px solid var(--team-line);
	border-radius: 999px;
	background: var(--team-surface);
}

.team-tabs__tab {
	min-height: 44px;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--c-muted-dark);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 22.4px;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.team-tabs__tab:hover {
	color: #fff;
}

.team-tabs__tab[aria-selected="true"] {
	background: var(--c-gold);
	color: var(--c-ink);
}

/* ---------- Location + arrows ---------- */

.team-panel__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin: 56px 0 26px;
}

.team-panel__location {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--c-muted-dark);
	font-size: 15px;
	line-height: 24px;
}

.team-panel__location .icon {
	flex: none;
	color: var(--c-gold);
}

.team-panel__nav {
	display: flex;
	gap: 10px;
	margin-left: auto;
}

.team-nav {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	padding: 0;
	border: 1px solid var(--team-line);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease, opacity .2s ease;
}

.team-nav:hover:not(:disabled) {
	border-color: var(--c-gold);
	background: var(--team-surface);
}

.team-nav:disabled {
	opacity: .3;
	cursor: default;
}

.team-nav--prev .icon {
	transform: rotate(180deg);
}

/* Both arrows hidden when every card already fits. */
.team-panel.is-static .team-panel__nav,
.team-panel.is-static .team-progress {
	visibility: hidden;
}

/* ---------- Carousel ---------- */

.team-track {
	--per-view: 4;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--per-view) - 1) * 20px) / var(--per-view));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.team-track::-webkit-scrollbar {
	display: none;
}

.team-card {
	scroll-snap-align: start;
	min-width: 0;
}

.team-card__link {
	display: block;
	color: #fff;
	text-decoration: none;
}

.team-card__link:focus-visible {
	outline: none;
}

.team-card__link:focus-visible .team-card__photo {
	outline: 2px solid var(--c-gold);
	outline-offset: -2px;
}

.team-card__photo {
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 22px;
	background: var(--team-frame);
}

.team-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s var(--ease);
}

.team-card__link:hover .team-card__photo img {
	transform: scale(1.03);
}

.team-card__name {
	display: block;
	margin-top: 13px;
	font-family: var(--ff-heading);
	font-size: 22px;
	line-height: 23.1px;
	letter-spacing: -0.4px;
	font-variation-settings: var(--fvs-heading);
}

.team-card__link:hover .team-card__name {
	color: var(--c-gold);
}

.team-card__role {
	display: block;
	margin-top: 6px;
	color: var(--c-muted-dark);
	font-size: 14px;
	line-height: 22.4px;
}

/* ---------- Progress + link ---------- */

.team-progress {
	position: relative;
	height: 2px;
	margin-top: 40px;
	overflow: hidden;
	border-radius: 1px;
	background: var(--team-line);
}

.team-progress__bar {
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--team-progress-size, 30%);
	background: var(--c-gold);
	transform: translateX(var(--team-progress-offset, 0%));
	transition: transform .15s linear;
}

.team-panel__more {
	margin-top: 35px;
	color: #fff;
}

.team-panel__more:hover {
	color: var(--c-gold);
}

/* Clinic with no team members yet. */
.team-panel__empty {
	display: grid;
	place-items: center;
	min-height: 240px;
	margin: 0;
	padding: 40px 24px;
	border: 1px dashed var(--team-line);
	border-radius: 22px;
	color: var(--c-muted-dark);
	font-family: var(--ff-heading);
	font-size: 22px;
	line-height: 1.3;
	text-align: center;
	font-variation-settings: var(--fvs-heading);
}

.team-panel__empty + .team-panel__more {
	margin-top: 40px;
}

.team__empty {
	padding-block: 24px;
}

/* ---------- Tablet / phone ---------- */

@media (max-width: 1023px) {
	.team-track {
		--per-view: 3;
	}
}

@media (max-width: 767px) {
	.team__head {
		--bs-gutter-y: 37px;
	}

	.team-tabs {
		width: 100%;
		gap: 2px;
		margin-bottom: 0;
	}

	.team-tabs__tab {
		flex: 1 1 0;
		min-height: 40.8px;
		padding: 0 6px;
		font-size: 12px;
		line-height: 20.8px;
	}

	.team-panel__bar {
		flex-direction: column;
		align-items: flex-start;
		margin: 56px 0 20px;
	}

	.team-panel__nav {
		margin-left: 0;
	}

	.team-track {
		grid-auto-columns: 74%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.team-track {
		scroll-behavior: auto;
	}

	.team-card__photo img,
	.team-progress__bar {
		transition: none;
	}
}
