/* Team cards and modal are intentionally scoped to the B&F Elementor widget. */
.bf-team {
	--bf-team-accent: #319d08;
	--bf-team-ink: #1d2226;
	--bf-team-muted: #717679;
	color: var(--bf-team-ink);
}

.bf-team,
.bf-team *,
.bf-team *::before,
.bf-team *::after {
	box-sizing: border-box;
}

.bf-team__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px;
}

.bf-team__card {
	min-width: 0;
	position: relative;
	overflow: hidden;
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 22px 46px rgba(17, 24, 39, .07);
	transition: box-shadow .25s ease, transform .25s ease;
}

.bf-team__card:hover,
.bf-team__card:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 24px 48px rgba(17, 24, 39, .12);
}

.bf-team__portrait {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: linear-gradient(135deg, #e9e9e9 0%, #f4f4f4 100%);
	border-radius: 15px 15px 15px 95px;
}

.bf-team__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .4s ease;
}

/* Override Elementor's global "img { height: auto; }" so the card image fills the square. */
.bf-team__portrait > .bf-team__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

.bf-team__card:hover .bf-team__image {
	transform: scale(1.04);
}

.bf-team__initial {
	font-size: clamp(80px, 11vw, 145px);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -.07em;
	color: #b6babc;
	user-select: none;
}

.bf-team__card-body {
	padding: 33px clamp(22px, 4vw, 48px) 34px;
}

.bf-team__name {
	margin: 0 0 11px;
	font-size: clamp(22px, 2.5vw, 30px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -.035em;
	color: var(--bf-team-ink);
}

.bf-team__role {
	margin: 0;
	color: var(--bf-team-muted);
	font-size: clamp(16px, 2vw, 21px);
	font-weight: 400;
	line-height: 1.45;
}

.bf-team__trigger {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: inherit;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	appearance: none;
}

.bf-team__trigger:hover,
.bf-team__trigger:active,
.bf-team__trigger:focus {
	background: transparent;
	box-shadow: none;
}

.bf-team__trigger:focus-visible {
	outline: 3px solid var(--bf-team-accent);
	outline-offset: -4px;
}

/* Native dialog provides keyboard focus management, Escape handling and the top layer. */
.bf-team__dialog {
	position: fixed;
	inset: 0;
	box-sizing: border-box;
	display: block;
	width: min(900px, calc(100vw - 36px));
	max-width: 900px;
	max-height: 90vh;
	max-height: 90dvh;
	margin: auto;
	padding: 0;
	overflow: auto;
	border: 0;
	border-radius: 22px;
	background: #fff;
	color: #1d2226;
	box-shadow: 0 30px 100px rgba(10, 18, 19, .24);
}

.bf-team__dialog:not([open]) {
	display: none;
}

.bf-team__dialog::backdrop {
	background: rgba(14, 24, 27, .7);
	backdrop-filter: blur(5px);
}

.bf-team__modal {
	display: grid;
	grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
	position: relative;
	min-height: 480px;
}

.bf-team__modal-visual {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 480px;
	overflow: hidden;
	background: linear-gradient(135deg, #e9e9e9 0%, #f4f4f4 100%);
}

.bf-team__modal-visual .bf-team__initial {
	font-size: 155px;
}

.bf-team__modal-details {
	min-width: 0;
	padding: 64px 52px 52px;
}

.bf-team__close {
	position: absolute;
	z-index: 2;
	top: 18px;
	right: 18px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f3f1;
	color: #242a28;
	cursor: pointer;
	appearance: none;
	transition: background .2s ease, transform .2s ease;
}

.bf-team__close:hover,
.bf-team__close:focus-visible {
	background: #e1ece0;
	color: #1d2226;
	transform: rotate(90deg);
}

.bf-team__close:focus-visible {
	outline: 2px solid var(--bf-team-accent);
	outline-offset: 2px;
}

.bf-team__eyebrow {
	margin: 0 0 8px;
	color: var(--bf-team-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.bf-team__modal-name {
	margin: 0;
	color: #1d2226;
	font-size: clamp(28px, 3vw, 38px);
	font-weight: 600;
	letter-spacing: -.045em;
	line-height: 1.15;
}

.bf-team__modal-role {
	margin: 12px 0 0;
	font-size: 19px;
	line-height: 1.4;
	color: #747a7b;
}

.bf-team__bio {
	margin: 24px 0 0;
	font-size: 15px;
	line-height: 1.6;
	color: #4f5757;
}

.bf-team__bio p {
	margin: 0 0 12px;
}

.bf-team__contacts {
	margin-top: 28px;
	border-top: 1px solid #e9ecea;
}

.bf-team__contact {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid #e9ecea;
}

.bf-team__contact-icon {
	display: grid;
	place-items: center;
	flex: 0 0 39px;
	width: 39px;
	height: 39px;
	border-radius: 50%;
	background: #f0f7ed;
	color: var(--bf-team-accent);
}

.bf-team__contact-body {
	min-width: 0;
	padding-top: 1px;
}

.bf-team__contact-label {
	display: block;
	margin-bottom: 3px;
	color: #858c89;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .035em;
	text-transform: uppercase;
}

.bf-team__contact-value,
.bf-team__contact-value:link,
.bf-team__contact-value:visited {
	display: block;
	color: #1d2226;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	overflow-wrap: anywhere;
	text-decoration: none;
}

.bf-team__contact-value:hover,
.bf-team__contact-value:focus-visible {
	color: var(--bf-team-accent);
}

html.bf-team-modal-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.bf-team__card-body {
		padding: 26px 25px 29px;
	}

	.bf-team__portrait {
		border-bottom-left-radius: 72px;
	}

	.bf-team__dialog {
		width: calc(100vw - 24px);
		max-height: calc(100vh - 24px);
		max-height: calc(100dvh - 24px);
		border-radius: 15px;
	}

	.bf-team__modal {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.bf-team__modal-visual {
		height: 220px;
		min-height: 0;
	}

	.bf-team__modal-visual .bf-team__initial {
		font-size: 110px;
	}

	.bf-team__modal-details {
		padding: 30px 26px 33px;
	}

	.bf-team__close {
		top: 12px;
		right: 12px;
		background: #fff;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bf-team__card,
	.bf-team__image,
	.bf-team__close {
		transition: none;
	}
}
