/* Teckform Team widget. Colors and sizes set in the Style tab override these defaults. */

.teckform-team {
	--teckform-team-columns: 4;
	--teckform-team-ratio: 4 / 5;
	--teckform-team-photo-size: 140px;
	--teckform-team-zoom: 1.06;
	--teckform-team-lift: 0px;
	color: var(--teckform-text);
}

.teckform-team__grid {
	display: grid;
	grid-template-columns: repeat(var(--teckform-team-columns), minmax(0, 1fr));
	gap: 32px 28px;
}

/* Card */
.teckform-team__card {
	--teckform-team-justify: center;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--teckform-border);
	border-radius: 16px;
	background-color: var(--teckform-surface);
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.teckform-team__card:hover,
.teckform-team__card:focus-within {
	transform: translateY(var(--teckform-team-lift));
}

/* Photo */
.teckform-team__photo {
	position: relative;
	isolation: isolate;
	aspect-ratio: var(--teckform-team-ratio);
	overflow: hidden;
	background-color: color-mix(in srgb, var(--teckform-accent) 12%, var(--teckform-surface));
}

.teckform-team__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.teckform-team--zoom .teckform-team__card:hover .teckform-team__photo img,
.teckform-team--zoom .teckform-team__card:focus-within .teckform-team__photo img {
	transform: scale(var(--teckform-team-zoom));
}

.teckform-team__initials {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--teckform-accent);
	font-size: 2.5rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

/* Round photo style */
.teckform-team--round .teckform-team__photo {
	align-self: var(--teckform-team-justify);
	width: var(--teckform-team-photo-size);
	max-width: calc(100% - 48px);
	aspect-ratio: 1 / 1;
	margin: 32px 24px 0;
	border-radius: 50%;
}

.teckform-team--round .teckform-team__initials {
	font-size: calc(var(--teckform-team-photo-size) / 3);
}

/* Text */
.teckform-team__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 22px 22px 24px;
}

.teckform-team__name {
	margin: 0 0 4px;
	color: var(--teckform-text);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
}

.teckform-team__name a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.teckform-team__name a:hover,
.teckform-team__name a:focus-visible {
	color: var(--teckform-accent);
}

.teckform-team__role {
	margin: 0 0 12px;
	color: var(--teckform-accent);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
}

.teckform-team__bio {
	margin: 0 0 16px;
	color: var(--teckform-muted);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.teckform-team__body > :last-child {
	margin-block-end: 0;
}

/* Social icons */
.teckform-team__socials {
	--teckform-team-icon: 16px;
	--teckform-team-icon-box: 36px;
	display: flex;
	flex-wrap: wrap;
	justify-content: var(--teckform-team-justify);
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.teckform-team__body .teckform-team__socials {
	margin-block-start: auto;
	padding-block-start: 4px;
}

.teckform-team__socials li {
	margin: 0;
}

.teckform-team__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--teckform-team-icon-box);
	height: var(--teckform-team-icon-box);
	border: 1px solid var(--teckform-border);
	border-radius: 50%;
	background-color: transparent;
	color: var(--teckform-muted);
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.teckform-team__social svg {
	width: var(--teckform-team-icon);
	height: var(--teckform-team-icon);
	fill: currentColor;
}

.teckform-team__social:hover,
.teckform-team__social:focus-visible {
	border-color: var(--teckform-accent);
	background-color: var(--teckform-accent);
	color: var(--teckform-on-accent, #fff);
	transform: translateY(-2px);
}

.teckform-team__social:focus-visible {
	outline: 2px solid var(--teckform-accent);
	outline-offset: 2px;
}

/* Icons over the photo: a bar slides up from the bottom on hover or keyboard focus. */
.teckform-team__photo .teckform-team__socials {
	position: absolute;
	inset-block-end: 0;
	inset-inline: 0;
	z-index: 1;
	justify-content: center;
	padding: 14px;
	background-color: color-mix(in srgb, var(--teckform-surface) 85%, transparent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transform: translateY(100%);
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.teckform-team__photo .teckform-team__social {
	background-color: var(--teckform-surface);
	color: var(--teckform-text);
}

.teckform-team__card:hover .teckform-team__photo .teckform-team__socials,
.teckform-team__card:focus-within .teckform-team__photo .teckform-team__socials {
	transform: none;
}

/* Touch screens have no hover: keep the icons visible. */
@media (hover: none) {
	.teckform-team__photo .teckform-team__socials {
		transform: none;
	}
}

/* Editor-only message when there are no members. */
.teckform-team__placeholder {
	padding: 32px;
	border: 2px dashed var(--teckform-border);
	border-radius: 12px;
	color: var(--teckform-muted);
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.teckform-team *,
	.teckform-team *::before,
	.teckform-team *::after {
		transition: none !important;
	}

	.teckform-team__card:hover,
	.teckform-team__card:focus-within,
	.teckform-team__social:hover,
	.teckform-team__social:focus-visible,
	.teckform-team--zoom .teckform-team__card:hover .teckform-team__photo img,
	.teckform-team--zoom .teckform-team__card:focus-within .teckform-team__photo img {
		transform: none;
	}
}

/* Fallback column counts when the widget's responsive values are not set. */
@media (max-width: 1024px) {
	.teckform-team {
		--teckform-team-columns: 2;
	}
}

@media (max-width: 767px) {
	.teckform-team {
		--teckform-team-columns: 1;
	}
}
