.hm-team {
	padding: var(--hm-layout-section-top) var(--hm-layout-gutter) var(--hm-layout-section-bottom);
}

.hm-team__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2vw;
	width: 100%;
	margin: 0 0 var(--hm-layout-block-gap);
}

.hm-team__title {
	margin: 0;
	color: var(--hm-color-text);
	font-size: clamp(2rem, 3vw, 3.4rem);
	font-weight: 400;
	line-height: 1.05;
}

/* Manuelle Navigation für horizontale Teamlisten auf Geräten mit Maus. */
.hm-team__controls {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.hm-team__controls[hidden] {
	display: none;
}

.hm-team__control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: clamp(2.7rem, 3vw, 3.15rem);
	aspect-ratio: 1;
	padding: 0;
	border: 1px solid var(--hm-color-border-strong);
	border-radius: 50%;
	background: var(--hm-color-surface);
	color: var(--hm-color-text);
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.hm-team__control svg {
	width: 46%;
	height: 46%;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.hm-team__control:hover:not(:disabled),
.hm-team__control:focus-visible:not(:disabled) {
	border-color: var(--hm-color-accent-hover);
	background: var(--hm-color-accent-hover);
	color: var(--hm-color-surface);
}

.hm-team__control:disabled {
	border-color: var(--hm-color-border-soft);
	background: var(--hm-color-surface-soft);
	color: var(--hm-color-muted);
	cursor: default;
}

.hm-team__control:focus-visible {
	outline: 2px solid var(--hm-color-accent);
	outline-offset: 3px;
}

.hm-team__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 21vw;
	gap: 1.4vw;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0.75rem 0 1.25rem;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}

.hm-team__track::-webkit-scrollbar {
	display: none;
}

.hm-team-card {
	position: relative;
	z-index: 0;
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--hm-color-border-soft);
	border-radius: clamp(1rem, 1.2vw, 1.4rem);
	background: var(--hm-color-surface-soft);
	scroll-snap-align: start;
	transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.hm-team-card:hover,
.hm-team-card:focus-within {
	z-index: 1;
	border-color: var(--hm-color-accent);
	background: var(--hm-color-surface);
	box-shadow: 0 1rem 2.25rem -1.2rem var(--hm-color-border-strong);
	transform: translateY(-0.35rem);
}

.hm-team-card__media {
	margin: clamp(0.7rem, 0.9vw, 1rem) clamp(0.7rem, 0.9vw, 1rem) 0;
	overflow: hidden;
	aspect-ratio: 4 / 4.35;
	border-radius: clamp(0.8rem, 1vw, 1.15rem);
	background: var(--hm-color-background);
}

.hm-team-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform 320ms ease;
}

.hm-team-card:hover .hm-team-card__image,
.hm-team-card:focus-within .hm-team-card__image {
	transform: scale(1.035);
}

.hm-team-card__content {
	display: flex;
	min-height: 12vw;
	flex: 1;
	flex-direction: column;
	justify-content: space-between;
	gap: clamp(1.2rem, 1.8vw, 2rem);
	padding: clamp(1rem, 1.35vw, 1.5rem);
}

.hm-team-card__text {
	display: grid;
	gap: 0.45rem;
}

.hm-team-card__name {
	margin: 0;
	color: var(--hm-color-text);
	font-size: clamp(1.2rem, 1.45vw, 1.7rem);
	font-weight: 600;
	line-height: 1.15;
}

.hm-team-card__role {
	margin: 0;
	color: var(--hm-color-muted);
	font-size: clamp(0.95rem, 1.05vw, 1.15rem);
	line-height: 1.4;
}

.hm-team-card__experience {
	width: fit-content;
	margin: 0;
	padding: 0.55em 0.9em;
	border: 1px solid var(--hm-color-border-soft);
	border-radius: 999px;
	background: var(--hm-color-background);
	color: var(--hm-color-muted);
	font-size: clamp(0.85rem, 0.95vw, 1rem);
	line-height: 1.2;
}

.hm-team-card__experience strong {
	color: var(--hm-color-accent);
	font-weight: 600;
}

@media (max-width: 767px) {
	.hm-team__controls {
		display: none;
	}

	.hm-team__track {
		grid-auto-columns: 82vw;
		gap: 4vw;
	}

	.hm-team-card__content {
		min-height: 44vw;
		padding: 5vw;
	}
}

/* Kompakter Kartenmodus für Telefone und kleine Tablets im Querformat. */
@media (orientation: landscape) and (max-width: 1100px) and (max-height: 600px) {
	.hm-team {
		padding-top: 2rem;
		padding-bottom: 2rem;
	}

	.hm-team__header {
		margin-bottom: 1.25rem;
	}

	.hm-team__track {
		grid-auto-columns: min(68vw, 36rem);
		gap: 1rem;
		padding-top: 0.35rem;
		padding-bottom: 0.8rem;
	}

	.hm-team-card {
		display: grid;
		grid-template-columns: minmax(10rem, 38%) minmax(0, 1fr);
		min-height: var(--hm-layout-landscape-card-height);
	}

	.hm-team-card__media {
		align-self: stretch;
		margin: 0.75rem 0 0.75rem 0.75rem;
		aspect-ratio: auto;
	}

	.hm-team-card__content {
		min-height: 0;
		gap: 0.75rem;
		padding: 1rem;
	}

	.hm-team-card__name {
		font-size: clamp(1.05rem, 2.3vw, 1.35rem);
	}

	.hm-team-card__role {
		font-size: 0.95rem;
		line-height: 1.3;
	}

	.hm-team-card__experience {
		padding: 0.45em 0.75em;
		font-size: 0.85rem;
	}
}

@media (hover: none) and (pointer: coarse) {
	.hm-team__controls {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hm-team-card,
	.hm-team-card__image,
	.hm-team__control {
		transition: none;
	}

	.hm-team-card:hover,
	.hm-team-card:focus-within,
	.hm-team-card:hover .hm-team-card__image,
	.hm-team-card:focus-within .hm-team-card__image {
		transform: none;
	}
}