/* ==========================================================================
   Educators / Team Grid Component
   Scoped entirely under .ms-team-grid.
   Used by native WPBakery markup on pages (e.g. About), per
   prototype/educators/educator-prompt.md.
   ========================================================================== */

.ms-team-grid {
	--ms-team-accent: var(--color-coral);
	--ms-team-text: var(--color-charcoal);
	--ms-team-image-bg: #d9d9d9;
	--ms-team-card-width: 376px;
	--ms-team-gap-x: 35px;
	--ms-team-gap-y: 55px;

	box-sizing: border-box;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, var(--ms-team-card-width)));
	justify-content: center;
	column-gap: var(--ms-team-gap-x);
	row-gap: var(--ms-team-gap-y);
	/* When the team is split across separate WPBakery rows (content path) the
	   grid row-gap can't reach between rows, so give each grid a bottom
	   margin equal to the row gap to keep consecutive grids evenly spaced. */
	margin-bottom: var(--ms-team-gap-y);
	max-width: 1198px;
	margin-left: auto;
	margin-right: auto;
}

/* WPBakery-only: the plain .ms-team-grid site-block output has no row/br. */
:is(.compose-mode,.view-mode) .vc_vc_row .vc_row.ms-team-grid .vc_vc_column:is(.vc_col-sm-4) {
	width: 100%;
}
/* WPBakery injects .vc_row::before/::after clearfixes and <br> tags between
   elements. As grid items they create phantom tracks — hide them. */
.ms-team-grid.vc_row::before,
.ms-team-grid.vc_row::after {
	content: none;
	display: none;
}

.ms-team-grid > br,
.ms-team-grid .vc_column-inner > br,
.ms-team-grid .wpb_wrapper > br {
	display: none;
}

.ms-team-grid .vc_column_container {
	width: auto;
	float: none;
	padding-left: 0;
	padding-right: 0;
}

.ms-team-grid .vc_column-inner {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.ms-team-grid .wpb_content_element,
.ms-team-grid .vc_empty_space {
	margin-bottom: 0 !important;
}

.ms-team-card {
	min-width: 0;
	background: var(--color-white);
	color: var(--ms-team-text);
}

.ms-team-card__image {
	overflow: hidden;
	background: var(--ms-team-image-bg);
	border-radius: 2px;
}

.ms-team-card__image .vc_single_image-wrapper,
.ms-team-card__image .vc_figure,
.ms-team-card__image .vc_single_image-wrapper img,
.ms-team-card__image img {
	display: block;
	width: 100%;
	margin: 0;
}

.ms-team-card__image img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center;
}

/* Card text: the class lives on the WPBakery widget (Extra class name →
   el_class) or the element's wrapper div; the inner element is styled via a
   descendant selector. */
.ms-team-card__name {
	margin: 16px 0 0;
}

.ms-team-card__name h3 {
	margin: 0;
	padding: 0;
	font-family: var(--font-heading), 'Noyh R', Arial, sans-serif;
	font-size: 28px;
	font-weight: 500;
	line-height: 0.9;
	text-transform: uppercase;
	color: var(--ms-team-accent);
}

.ms-team-card__title {
	margin: 8px 0 0;
}

.ms-team-card__title p {
	margin: 0;
	padding: 0;
	font-family: var(--font-body), 'DM Sans', Arial, sans-serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--ms-team-text);
	font-weight:bold;
}

.ms-team-card__description {
	padding-bottom: 16px;
	margin: 8px 0 0;
}

.ms-team-card__description p {
	margin: 0;
	padding: 0;
	font-family: var(--font-body), 'DM Sans', Arial, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--ms-team-text);
}

/* "Read bio" link — dormant (renderer gates it behind the
   moerlina_team_show_read_bio filter, off by default). Styles kept ready. */
.ms-team-card__read-bio {
	margin: 0;
}

.ms-team-card__read-bio a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-body), 'DM Sans', Arial, sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--ms-team-text);
	text-decoration: none;
}

.ms-team-card__read-bio a::after {
	content: '';
	flex: 0 0 auto;
	width: 19px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='16' viewBox='0 0 19 16' fill='none'%3E%3Cpath d='M11.1803 0L9.14062 2.08689L13.4784 6.52515L0 6.52515L0 9.47646L13.4784 9.47646L9.14062 13.9131L11.1803 16L19 8.00081L11.1803 0Z' fill='%23D56C55'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Tablet: 3 columns stay — cards shrink via minmax(0,1fr) so a 3/6/9-member
   set always fills full rows (no orphan card in a 2-col grid). */
@media (max-width: 992px) {
	.ms-team-grid {
		--ms-team-gap-x: 24px;
	}

	.ms-team-card__name h3 {
		font-size: 24px;
	}

	.ms-team-card__title p {
		font-size: 18px;
	}

	.ms-team-card__description p {
		font-size: 16px;
	}
}

/* Mobile: 1 column */
@media (max-width: 767px) {
	.ms-team-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
		margin-bottom: 40px;
		max-width: 400px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ms-team-grid *,
	.ms-team-grid *::before,
	.ms-team-grid *::after {
		scroll-behavior: auto;
		transition: none !important;
		animation: none !important;
	}
}