/* WP Consultant Toolkit — Team widget. Based on .people-mosaic / .team-photo in outputs/style.css. */

.wpct-team-mosaic {
	display: flex;
	gap: var(--wpct-team-gap, 16px);
}

.wpct-team-secondary {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: var(--wpct-team-gap, 16px);
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Makes the card inside each <li> the actual flex item. */
.wpct-team-slot {
	display: contents;
}

/* Needed because `display: contents` above overrides the browser's own [hidden] rule. */
.wpct-team-slot[hidden] {
	display: none;
}

.wpct-team-photo {
	box-sizing: border-box;
	position: relative;
	display: flex;
	flex: 1 1 0;
	min-width: 0;
	min-height: var(--wpct-team-photo-h, 220px);
	align-items: flex-end;
	overflow: hidden;
	padding: 24px;
	border-radius: 28px;
	color: #ffffff;
	box-shadow: 0 8px 24px rgba(7, 24, 47, .08);
}

.wpct-team-photo.wpct-team-hero {
	flex: 1.25 1 0;
	min-height: var(--wpct-team-hero-h, 560px);
}

.wpct-team-photo--navy {
	background: var(--wpct-team-shape, none), linear-gradient(145deg, var(--wpct-team-navy-start, #123056), var(--wpct-team-navy-end, #245bff));
}

.wpct-team-photo--mint {
	color: #07182f;
	background: var(--wpct-team-shape, none), linear-gradient(145deg, var(--wpct-team-mint-start, #baf6e5), var(--wpct-team-mint-end, #42d9b0));
}

.wpct-team-photo--coral {
	color: #07182f;
	background: var(--wpct-team-shape, none), linear-gradient(145deg, var(--wpct-team-coral-start, #ffd0c6), var(--wpct-team-coral-end, #ff7357));
}

/* Decorative circle + curve; only visible behind the initials (a photo covers them). */
.wpct-team--shapes .wpct-team-photo {
	--wpct-team-shape: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .2) 0 15%, transparent 15.5%);
}

.wpct-team--shapes .wpct-team-photo::after {
	position: absolute;
	right: -12%;
	bottom: -24%;
	width: 78%;
	height: 70%;
	border-radius: 50% 50% 20% 20%;
	background: rgba(255, 255, 255, .12);
	content: "";
}

/* Two classes deep so a theme reset like `.entry-content img { height: auto }` can't win. */
.wpct-team-photo .wpct-team-photo-img {
	position: absolute;
	z-index: 1;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.wpct-team-initials {
	position: absolute;
	top: 50%;
	left: 50%;
	font-family: "Manrope", Arial, sans-serif;
	font-size: clamp(4rem, 8vw, 7rem);
	font-weight: 800;
	line-height: 1;
	opacity: .9;
	transform: translate(-50%, -50%);
}

.wpct-team-caption {
	position: relative;
	z-index: 2;
	display: flex;
	width: 100%;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
}

.wpct-team-caption-text {
	min-width: 0;
}

.wpct-team-photo .wpct-team-name {
	margin: 0;
	color: inherit;
	font-family: "Manrope", Arial, sans-serif;
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1.3;
}

.wpct-team-photo .wpct-team-role {
	display: block;
	margin-top: 2px;
	color: inherit;
	font-size: .76rem;
	opacity: .78;
}

.wpct-team-tag {
	flex: 0 0 auto;
	padding: .3rem .6rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: .66rem;
	font-weight: 800;
	opacity: .8;
	white-space: nowrap;
}

/* Caption backdrop "gradient": a dark fade over the bottom of the photo, white text on top. */
.wpct-team-photo .wpct-team-scrim {
	position: absolute;
	z-index: 1; /* Same as the photo but later in the DOM, so it paints over it. */
	right: 0;
	bottom: 0;
	left: 0;
	height: var(--wpct-team-scrim-h, 55%);
	background: linear-gradient(
		to top,
		var(--wpct-team-scrim-color, rgba(7, 24, 47, .78)) 0%,
		color-mix(in srgb, var(--wpct-team-scrim-color, rgba(7, 24, 47, .78)) 45%, transparent) 50%,
		transparent 100%
	);
	pointer-events: none;
}

.wpct-team-photo.wpct-team-photo--scrim {
	color: #ffffff;
}

.wpct-team-photo--scrim .wpct-team-caption {
	text-shadow: 0 1px 14px rgba(7, 24, 47, .35);
}

/* Caption backdrop "glass": a frosted panel behind the name and the photo label. */
.wpct-team-photo.wpct-team-photo--glass {
	color: var(--wpct-team-glass-text, #07182f);
}

.wpct-team-photo--glass .wpct-team-caption-text,
.wpct-team-photo--glass .wpct-team-tag {
	background: var(--wpct-team-glass-bg, rgba(255, 255, 255, .72));
	-webkit-backdrop-filter: blur(var(--wpct-team-glass-blur, 14px)) saturate(1.4);
	backdrop-filter: blur(var(--wpct-team-glass-blur, 14px)) saturate(1.4);
	box-shadow: 0 8px 24px rgba(7, 24, 47, .12), inset 0 0 0 1px rgba(255, 255, 255, .45);
}

.wpct-team-photo--glass .wpct-team-caption-text {
	padding: 12px 16px;
	border-radius: 16px;
}

.wpct-team-photo--glass .wpct-team-tag {
	border-color: transparent;
	opacity: 1;
}

/* Set by team.js when the photo behind the caption is light. */
.wpct-team-photo.wpct-team-photo--light {
	color: #07182f;
}

.wpct-team-actions {
	display: grid;
	justify-items: center;
	margin-top: var(--wpct-team-gap, 16px);
}

.wpct-team-next {
	font-size: .92rem;
}

/* Breakpoints follow outputs/style.css (767px = Elementor's default mobile breakpoint). */
@media (max-width: 767px) {
	.wpct-team-mosaic {
		flex-direction: column;
	}

	.wpct-team-photo.wpct-team-hero {
		flex: none;
	}

	.wpct-team-secondary {
		flex: none;
		flex-direction: row;
	}
}

@media (max-width: 520px) {
	.wpct-team-secondary {
		flex-direction: column;
	}

	.wpct-team-secondary .wpct-team-photo {
		flex: none;
	}
}

/* Phone arrows; only shown inside the swipe carousel below. */
.wpct-team-arrow {
	display: none;
}

@media (min-width: 768px) {
	.wpct-team-actions--phone-only {
		display: none;
	}
}

/*
 * Swipe carousel on phones: every member side by side in one scroll-snap
 * track (the mosaic itself). The list and its <li>s get `display: contents`
 * so all cards are direct flex items, hidden ones included. Vertical
 * padding leaves room for the card shadow, which overflow-x would clip.
 */
@media (max-width: 767px) {
	.wpct-team--swiper {
		position: relative;
	}

	.wpct-team--swiper .wpct-team-mosaic {
		flex-direction: row;
		margin: -8px 0 -28px;
		padding: 8px 0 28px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.wpct-team--swiper .wpct-team-mosaic::-webkit-scrollbar {
		display: none;
	}

	.wpct-team--swiper .wpct-team-secondary,
	.wpct-team--swiper .wpct-team-slot,
	.wpct-team--swiper .wpct-team-slot[hidden] {
		display: contents;
	}

	.wpct-team--swiper .wpct-team-photo,
	.wpct-team--swiper .wpct-team-photo.wpct-team-hero {
		flex: 0 0 var(--wpct-team-swipe-w, 85%);
		min-height: var(--wpct-team-hero-h, 300px);
		scroll-snap-align: start;
	}

	/* Three classes deep: Elementor kits style every <button>, also on :hover. */
	.wpct-team.wpct-team--arrows .wpct-team-arrow {
		position: absolute;
		z-index: 3;
		top: calc(var(--wpct-team-hero-h, 300px) / 2);
		display: grid;
		width: 44px;
		height: 44px;
		padding: 0;
		place-items: center;
		border: 0;
		border-radius: 50%;
		color: #07182f;
		background: #ffffff;
		box-shadow: 0 8px 24px rgba(7, 24, 47, .18);
		cursor: pointer;
		font: inherit;
		transform: translateY(-50%);
	}

	.wpct-team.wpct-team--arrows .wpct-team-arrow--prev {
		left: var(--wpct-team-arrow-offset, 10px);
	}

	.wpct-team.wpct-team--arrows .wpct-team-arrow--prev svg {
		transform: scaleX(-1);
	}

	.wpct-team.wpct-team--arrows .wpct-team-arrow--next {
		right: var(--wpct-team-arrow-offset, 10px);
	}

	.wpct-team.wpct-team--arrows .wpct-team-arrow:focus-visible {
		outline: 2px solid #245bff;
		outline-offset: 2px;
	}

	.wpct-team--arrows .wpct-team-actions {
		display: none;
	}
}
