/**
 * SFD Experts block
 * Flip-card grid layout for expert team members.
 */

/* ── Section wrapper ── */
.sfd-experts-section {
	background: #fff;
}

.sfd-experts-section .sfd-section-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 80px 24px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.sfd-experts-section .sfd-section-label {
	font-family: 'Nunito', sans-serif;
	font-weight: 700;
	font-size: 13px;
	line-height: 1.2;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #F34188;
	margin: 0;
}

.sfd-experts-section .sfd-section-title {
	font-family: 'Nunito', sans-serif;
	font-weight: 700;
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: #181d27;
	margin: 0;
}

.sfd-experts-section .sfd-section-subtitle {
	font-family: 'Nunito', sans-serif;
	font-weight: 400;
	font-size: 1.125rem;
	line-height: 1.65;
	color: #535862;
	margin: 0;
	max-width: 720px;
	text-align: left;
}

/* ── Grid ── */
.sfd-experts-section .sfd-experts-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 24px;
	margin-top: 40px;
}

/* ── Flip-card expert ── */
.sfd-experts-section .sfd-experts-card {
	perspective: 1000px;
	text-decoration: none;
	color: inherit;
	display: flex;
}

/* 
 * Card inner fills the full card height so all cards in a row match.
 * The front face drives the height (position: relative),
 * and the back face is absolutely positioned to match.
 */
.sfd-experts-section .sfd-experts-card__inner {
	position: relative;
	width: 100%;
	height: 100%;
	transition: transform 0.6s ease;
	transform-style: preserve-3d;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sfd-experts-section .sfd-experts-card:hover .sfd-experts-card__inner,
.sfd-experts-section .sfd-experts-card:focus-within .sfd-experts-card__inner {
	transform: rotateY(180deg);
}

/* Shared face styles */
.sfd-experts-section .sfd-experts-card__front,
.sfd-experts-section .sfd-experts-card__back {
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #f0f0f0;
}

/* Front face: relative so it defines the card height */
.sfd-experts-section .sfd-experts-card__front {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Back face: absolute so it fills the same space as the front */
.sfd-experts-section .sfd-experts-card__back {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform: rotateY(180deg);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px;
	text-align: center;
	gap: 8px;
	box-sizing: border-box;
}

/* ── Front face children ── */
.sfd-experts-section .sfd-experts-photo {
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #f3f4f6;
	flex-shrink: 0;
}

.sfd-experts-section .sfd-experts-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 20%;
	display: block;
	filter: grayscale(100%);
	transition: filter 0.3s ease;
}

.sfd-experts-section .sfd-experts-card:hover .sfd-experts-photo img,
.sfd-experts-section .sfd-experts-card:focus-within .sfd-experts-photo img {
	filter: grayscale(0%);
}

.sfd-experts-section .sfd-experts-photo--placeholder {
	background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

.sfd-experts-section .sfd-experts-card__front-text {
	padding: 12px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	justify-content: center;
}

.sfd-experts-section .sfd-experts-name {
	font-family: 'Nunito', sans-serif;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.3;
	color: #181d27;
	margin: 0;
}

.sfd-experts-section .sfd-experts-role {
	font-family: 'Nunito', sans-serif;
	font-weight: 600;
	font-size: 0.8rem;
	line-height: 1.3;
	color: #ee7290;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	margin: 0;
}

/* ── Back face children ── */
.sfd-experts-section .sfd-experts-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	background: #f3f4f6;
}

.sfd-experts-section .sfd-experts-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sfd-experts-section .sfd-experts-card__back .sfd-experts-name {
	font-size: 1rem;
}

.sfd-experts-section .sfd-experts-card__back .sfd-experts-role {
	font-size: 0.75rem;
}

.sfd-experts-section .sfd-experts-bio {
	font-family: 'Nunito', sans-serif;
	font-weight: 400;
	font-size: 0.8rem;
	line-height: 1.5;
	color: #535862;
	margin: 0;
}

/* ── Dummy / placeholder cards ── */
.sfd-experts-section .sfd-experts-card--dummy {
	pointer-events: none;
}

.sfd-experts-section .sfd-experts-card--dummy .sfd-experts-card__front {
	opacity: 0.5;
}

/* ── Responsive ── */
@media (max-width: 900px) {
	.sfd-experts-section .sfd-section-inner {
		padding: 40px 20px;
	}
}

@media (max-width: 600px) {
	.sfd-experts-section .sfd-experts-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.sfd-experts-section .sfd-section-title {
		font-size: 28px;
		line-height: 36px;
	}

	.sfd-experts-section .sfd-section-inner {
		padding: 48px 16px;
	}
}

@media (max-width: 400px) {
	.sfd-experts-section .sfd-experts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
