/* Keta Flip Team Grid v1.1.0 */

.ktfc-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

.ktfc-card {
	perspective: 1200px;
	outline: none;
	cursor: pointer;
}
.ktfc-card.ktfc-no-bio {
	cursor: default;
}
.ktfc-card.ktfc-hidden {
	display: none;
}
.ktfc-card:focus-visible .ktfc-inner {
	box-shadow: 0 0 0 3px rgba(46, 117, 182, 0.55);
	border-radius: 20px;
}

.ktfc-inner {
	position: relative;
	width: 100%;
	min-height: 340px;
	transform-style: preserve-3d;
	transition: transform 0.6s;
	transition-property: transform;
}

/* ---------- faces ---------- */
.ktfc-front,
.ktfc-back {
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 4px 22px rgba(62, 80, 118, 0.08);
}

/* FRONT — white card, centered circular photo, name + role below */
.ktfc-front {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 6px;
	min-height: inherit;
	padding: 30px 22px 28px;
	background: #fff;
}
.ktfc-photo-circle {
	width: 150px;
	height: 150px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	margin-bottom: 14px;
	background: #E9EFFA;
}
.ktfc-photo-circle img.ktfc-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}
.ktfc-name {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	color: #3E5076;
}
.ktfc-role {
	font-size: 14px;
	line-height: 1.4;
	color: #5A6B87;
}
.ktfc-hint {
	display: none;
	font-size: 12px;
	font-weight: 600;
	color: #2E75B6;
	margin-top: 8px;
}
@media (hover: none) {
	.ktfc-card:not(.ktfc-no-bio) .ktfc-hint {
		display: block;
	}
}

/* BACK — light blue bordered card, small avatar, scrollable bio */
.ktfc-back {
	position: absolute;
	inset: 0;
	transform: rotateY(180deg);
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px 20px 18px;
	background: #EAF2FD;
	border: 1px solid #BFD4F2;
}
.ktfc-avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	background: #fff;
}
.ktfc-avatar img.ktfc-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}
.ktfc-bio {
	font-size: 14px;
	line-height: 1.6;
	color: #3B4A66;
	text-align: center;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding-right: 4px;
	flex: 1 1 auto;
	min-height: 0;
}
.ktfc-bio p {
	margin: 0 0 10px;
}
.ktfc-bio p:last-child {
	margin-bottom: 0;
}

/* ---------- flip states ---------- */
.ktfc-card.is-flipped .ktfc-inner {
	transform: rotateY(180deg);
}
@media (hover: hover) and (pointer: fine) {
	.ktfc-card:not(.ktfc-no-bio):hover .ktfc-inner {
		transform: rotateY(180deg);
	}
}

/* ---------- load more footer ---------- */
.ktfc-footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-top: 28px;
}
.ktfc-counter {
	font-size: 13.5px;
	color: #5A6B87;
}
.ktfc-loadmore {
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	background: #3E5076;
	border: none;
	border-radius: 999px;
	padding: 13px 30px;
	cursor: pointer;
	transition: background 0.15s;
}
.ktfc-loadmore:hover {
	background: #2D3A55;
}
.ktfc-loadmore:focus-visible {
	outline: 3px solid rgba(46, 117, 182, 0.55);
	outline-offset: 2px;
}
.ktfc-footer.ktfc-done .ktfc-loadmore {
	display: none;
}

.ktfc-empty {
	padding: 24px;
	background: #EAF2FD;
	border-radius: 12px;
	color: #5A6B87;
	font-size: 15px;
}

/* ---------- reduced motion: crossfade ---------- */
@media (prefers-reduced-motion: reduce) {
	.ktfc-inner {
		transition: none;
		transform-style: flat;
	}
	.ktfc-front,
	.ktfc-back {
		backface-visibility: visible;
		transition: opacity 0.2s;
	}
	.ktfc-back {
		transform: none;
		opacity: 0;
		pointer-events: none;
	}
	.ktfc-card.is-flipped .ktfc-inner,
	.ktfc-card:hover .ktfc-inner {
		transform: none;
	}
	.ktfc-card.is-flipped .ktfc-back {
		opacity: 1;
		pointer-events: auto;
	}
	.ktfc-card.is-flipped .ktfc-front {
		opacity: 0;
	}
	@media (hover: hover) and (pointer: fine) {
		.ktfc-card:not(.ktfc-no-bio):hover .ktfc-back {
			opacity: 1;
			pointer-events: auto;
		}
		.ktfc-card:not(.ktfc-no-bio):hover .ktfc-front {
			opacity: 0;
		}
	}
}

/* ---------- LinkedIn link ---------- */
.ktfc-linkedin {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 14px;
	font-size: 14px;
	font-weight: 600;
	color: #2E75B6;
	text-decoration: none;
}
.ktfc-linkedin:hover {
	text-decoration: underline;
}
.ktfc-li-icon {
	color: #0A66C2;
	flex-shrink: 0;
}
.ktfc-back .ktfc-linkedin {
	margin-top: 10px;
	align-self: center;
	flex-shrink: 0;
}
