/* cc-font-inherit-reset: some theme stylesheets set font-family directly on
 * span/a/strong (e.g. "p, a, strong, span { font-family: Poppins }"), which
 * stops a parent's Typography control from reaching inner text. Kept at the top
 * so explicit rules below and Elementor controls still win. */
.cc-team :where(span, a, strong, b, em, i), .cc-team-modal :where(span, a, strong, b, em, i) {
	font-family: inherit;
}

/*
 * The cards are size containers, so the widget has no intrinsic width. Inside a
 * wrapping (e.g. mobile) Elementor container the browser would measure it at
 * ~0px wide and keep that huge height. Fill the row unless Advanced > Width is set.
 */
:is(.e-con, .e-con-inner) > .elementor-widget-cc_team:not([class*="elementor-widget__width-"]) {
	width: 100%;
}

.cc-team {
	--cc-team-cols: 2;
	--cc-team-lift: -4px;
	--cc-team-zoom: 1.03;
	display: grid;
	gap: 28px;
	grid-template-columns: repeat(var(--cc-team-cols), minmax(0, 1fr));
	width: 100%;
}

/* ---- Card ---------------------------------------------------------------- */

.cc-team-card {
	--cc-team-photo-w: 40%;
	--cc-team-areas: "photo body";
	--cc-team-columns: var(--cc-team-photo-w) minmax(0, 1fr);
	background: linear-gradient(135deg, #ffffff 0%, #f3f7fd 100%);
	border: 1px solid rgba(197, 211, 235, 0.6);
	border-radius: 18px;
	box-shadow: 0 18px 40px -26px rgba(16, 42, 110, 0.28);
	box-sizing: border-box;
	container-type: inline-size;
	padding: 24px;
	position: relative;
	transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease, background 300ms ease;
}

.cc-team-card:hover {
	box-shadow: 0 26px 50px -28px rgba(16, 42, 110, 0.38);
	transform: translateY(var(--cc-team-lift));
}

.cc-team-card__layout {
	display: grid;
	gap: 28px;
	grid-template-areas: var(--cc-team-areas);
	grid-template-columns: var(--cc-team-columns);
	height: 100%;
}

/* Narrow cards stack the photo on top (unless a position was chosen). */
@container (max-width: 520px) {
	.cc-team-card__layout {
		gap: 22px;
		grid-template-areas: var(--cc-team-areas-narrow, "photo" "body");
		grid-template-columns: var(--cc-team-columns-narrow, minmax(0, 1fr));
	}
}

/* ---- Photo ---------------------------------------------------------------- */

.cc-team-card__photo {
	background: #0d3fb0;
	border-radius: 12px;
	grid-area: photo;
	min-height: 280px;
	overflow: hidden;
	position: relative;
}

.cc-team-card__photo img {
	display: block;
	height: 100%;
	inset: 0;
	max-width: none;
	object-fit: cover;
	object-position: top center;
	position: absolute;
	transition: transform 500ms ease;
	width: 100%;
}

.cc-team-card:hover .cc-team-card__photo img {
	transform: scale(var(--cc-team-zoom));
}

/* ---- Text ------------------------------------------------------------------ */

.cc-team-card__body {
	display: flex;
	flex-direction: column;
	grid-area: body;
	min-width: 0;
	padding: 6px 4px 4px 0;
}

.cc-team-card__name {
	color: #0b1a5c;
	font-family: "Archivo", sans-serif;
	font-size: var(--cc-fc-type-author-name-size, 28px);
	font-style: normal;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: var(--cc-fc-type-author-name-line-height, 1.15);
	margin: 0 0 10px;
	transition: color 300ms ease;
}

.cc-team-card__role,
.cc-team-card__company {
	font-family: "Archivo", sans-serif;
	font-size: var(--cc-fc-type-eyebrow-size, 12px);
	font-style: normal;
	letter-spacing: 0.2em;
	line-height: 1.5;
	text-transform: uppercase;
	transition: color 300ms ease;
}

.cc-team-card__role {
	color: #1a5fe0;
	font-weight: 700;
	margin: 0 0 6px;
}

.cc-team-card__company {
	color: #5d6475;
	font-weight: 600;
	margin: 0;
}

.cc-team-card__accent {
	background: #3fd0ef;
	border-radius: 2px;
	display: block;
	flex: 0 0 auto;
	height: 2px;
	margin: 18px var(--cc-team-accent-mr, auto) 18px var(--cc-team-accent-ml, 0);
	width: 40px;
}

.cc-team-card__bio {
	-webkit-box-orient: vertical;
	color: #4a5162;
	display: -webkit-box;
	font-family: "Poppins", sans-serif;
	font-size: var(--cc-fc-type-author-bio-size, 16px);
	font-style: normal;
	font-weight: 400;
	-webkit-line-clamp: var(--cc-team-bio-lines, 5);
	line-clamp: var(--cc-team-bio-lines, 5);
	line-height: var(--cc-fc-type-author-bio-line-height, 1.7);
	margin: 0;
	overflow: hidden;
	transition: color 300ms ease;
}

/* ---- Actions --------------------------------------------------------------- */

.cc-team-card__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	justify-content: var(--cc-team-justify, flex-start);
	margin-top: auto;
	padding-top: 28px;
}

.cc-team .cc-team-card__button {
	-webkit-appearance: none;
	align-items: center;
	appearance: none;
	background: linear-gradient(180deg, #1366f0 0%, #0a56d6 100%);
	border: 1px solid transparent;
	border-radius: 6px;
	box-shadow: 0 10px 20px -12px rgba(11, 95, 232, 0.7);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-family: "Poppins", sans-serif;
	font-size: var(--cc-fc-type-button-size, 15px);
	font-style: normal;
	font-weight: 500;
	gap: 10px;
	letter-spacing: normal;
	line-height: 1.3;
	margin: 0;
	padding: 12px 24px;
	text-decoration: none;
	text-transform: none;
	transition: background 250ms ease, box-shadow 250ms ease, transform 250ms ease, color 250ms ease, border-color 250ms ease, filter 250ms ease;
}

/* Brighten instead of swapping the background, so a custom Normal background
   keeps its color on hover (set a Hover background to change it). */
.cc-team .cc-team-card__button:hover,
.cc-team .cc-team-card__button:focus-visible {
	color: #fff;
	filter: brightness(1.1);
	text-decoration: none;
	transform: translateY(-1px);
}

.cc-team .cc-team-card__button:focus-visible,
.cc-team .cc-team-card__social:focus-visible,
.cc-team-modal__close:focus-visible {
	outline: 2px solid #3fd0ef;
	outline-offset: 3px;
}

.cc-team-card__button-icon {
	flex: 0 0 auto;
	height: 1.1em;
	transition: transform 250ms ease;
	width: 1.1em;
}

.cc-team-card__button:hover .cc-team-card__button-icon,
.cc-team-card__button:focus-visible .cc-team-card__button-icon {
	transform: translateX(3px);
}

.cc-team-card__divider {
	background: rgba(11, 26, 92, 0.15);
	display: block;
	height: 34px;
	width: 1px;
}

.cc-team-card__social {
	align-items: center;
	background: transparent;
	border: 1.5px solid #0b5fe8;
	border-radius: 6px;
	box-sizing: border-box;
	color: #0b5fe8;
	display: inline-flex;
	font-size: 22px;
	height: 40px;
	justify-content: center;
	text-decoration: none;
	transition: background 250ms ease, color 250ms ease, border-color 250ms ease;
	width: 40px;
}

.cc-team-card__social:hover,
.cc-team-card__social:focus-visible {
	background: #0b5fe8;
	color: #fff;
}

.cc-team-card__social svg {
	display: block;
	fill: currentColor;
	height: 1em;
	width: 1em;
}

.cc-team-card__social i {
	font-size: inherit;
	line-height: 1;
}

.cc-team .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/* ---- Full bio pop-up (native <dialog>) ------------------------------------- */

.cc-team-modal {
	--cc-team-overlay: rgba(6, 14, 40, 0.65);
	background: #fff;
	border: 0;
	border-radius: 18px;
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.5);
	box-sizing: border-box;
	color: inherit;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 32px);
	max-width: 880px;
	overflow: auto;
	padding: 0;
	width: calc(100% - 32px);
}

.cc-team-modal::backdrop {
	background: rgba(6, 14, 40, 0.65);
	background: var(--cc-team-overlay, rgba(6, 14, 40, 0.65));
}

.cc-team-modal[open] {
	animation: cc-team-pop 250ms ease;
}

.cc-team-modal__inner {
	display: grid;
	gap: 32px;
	grid-template-columns: 260px minmax(0, 1fr);
	padding: 32px;
	position: relative;
}

.cc-team-modal__photo {
	align-self: start;
	aspect-ratio: 4 / 5;
	background: #0d3fb0;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
}

.cc-team-modal__photo img {
	display: block;
	height: 100%;
	inset: 0;
	max-width: none;
	object-fit: cover;
	object-position: top center;
	position: absolute;
	width: 100%;
}

.cc-team-modal__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding-right: 24px;
}

.cc-team-modal__bio,
.cc-team-modal__bio p {
	color: #3f4656;
	font-family: "Poppins", sans-serif;
	font-size: var(--cc-fc-type-author-bio-size, 16px);
	line-height: 1.75;
}

.cc-team-modal__bio p {
	margin: 0 0 14px;
}

.cc-team-modal__bio p:last-child {
	margin-bottom: 0;
}

.cc-team-modal .cc-team-card__actions {
	margin-top: 0;
	padding-top: 22px;
}

.cc-team-modal__close {
	-webkit-appearance: none;
	align-items: center;
	appearance: none;
	background: #f1f5fb;
	border: 0;
	border-radius: 50%;
	color: #0b1a5c;
	cursor: pointer;
	display: inline-flex;
	height: 40px;
	justify-content: center;
	padding: 0;
	position: absolute;
	right: 14px;
	top: 14px;
	transition: background 200ms ease;
	width: 40px;
}

.cc-team-modal__close:hover,
.cc-team-modal__close:focus {
	background: #e2eaf7;
	color: #0b1a5c;
}

@keyframes cc-team-pop {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ---- Responsive -------------------------------------------------------------- */

@media (max-width: 1024px) {
	.cc-team {
		--cc-team-cols: 1;
	}
}

@media (max-width: 767px) {
	.cc-team {
		gap: 20px;
	}

	.cc-team-card {
		padding: 18px;
	}

	.cc-team-modal__inner {
		gap: 22px;
		grid-template-columns: minmax(0, 1fr);
		padding: 24px 20px;
	}

	.cc-team-modal__photo {
		aspect-ratio: 4 / 3;
	}

	.cc-team-modal__body {
		padding-right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cc-team-card,
	.cc-team-card__photo img,
	.cc-team .cc-team-card__button,
	.cc-team-card__button-icon,
	.cc-team-modal[open] {
		animation: none;
		transition: none;
	}

	.cc-team-card:hover,
	.cc-team-card:hover .cc-team-card__photo img {
		transform: none;
	}
}
