/* ==========================================================================
   Vesta team — clickable member cards that open a bio modal with a vCard
   download (Acquisitions & Development "Our Team"). Rendered by the
   [vesta_team] shortcode; modal behavior in team.js.
   ========================================================================== */

/* ---- card grid ----
   minmax(0,1fr) rather than 1fr: a bare 1fr track floors at min-content, and
   the long titles ("Senior Vice President of Property Management") wouldn't
   shrink, so cards blew past the viewport and the page scrolled sideways on
   phones. Paired with min-width:0 on the card + meta below. */
.vesta-team {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	width: 100%;
}
@media ( max-width: 767px ) {
	.vesta-team { grid-template-columns: minmax(0, 1fr); }
}

/* the card is a <button>, so neutralize the kit's global button theme
   (coral fill, padding, etc.) in every state. */
.vesta-team .vteam-card,
.vesta-team .vteam-card:hover,
.vesta-team .vteam-card:focus,
.vesta-team .vteam-card:focus-visible,
.vesta-team .vteam-card:active {
	background-color: var(--vesta-color-white) !important;
	color: var(--vesta-color-navy) !important;
	border: 1px solid var(--vesta-color-border-subtle) !important;
	border-radius: var(--vesta-radius-md);
	padding: 18px 20px !important;
	box-shadow: var(--vesta-shadow-card);
}
.vesta-team .vteam-card {
	display: flex;
	align-items: center;
	gap: 18px;
	width: 100%;
	min-width: 0;
	text-align: left;
	cursor: pointer;
	font: inherit;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.vesta-team .vteam-card:hover,
.vesta-team .vteam-card:focus-visible {
	box-shadow: var(--vesta-shadow-card-hover);
	transform: translateY(-2px);
	outline: none;
}
.vesta-team .vteam-avatar {
	flex: 0 0 84px;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	overflow: hidden;
}
.vesta-team .vteam-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}
/* The card is a <button>, so it inherits the kit's global button
   white-space:nowrap. That forced long titles ("Senior Vice President of Human
   Resources") onto one unbreakable line — 323px of text in a 185px box — which
   overflowed the card and scrolled the page sideways on phones. nowrap disables
   wrapping outright, so overflow-wrap alone can't fix it: reset white-space.
   min-width:0 then lets the flex child actually shrink. */
.vesta-team .vteam-card,
.vesta-team .vteam-meta,
.vesta-team .vteam-name,
.vesta-team .vteam-title { white-space: normal; }
.vesta-team .vteam-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vesta-team .vteam-name,
.vesta-team .vteam-title { overflow-wrap: anywhere; }
.vesta-team .vteam-name {
	font-family: var(--vesta-font-heading);
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--vesta-color-navy);
}
.vesta-team .vteam-title {
	font-family: var(--vesta-font-body);
	font-size: 13px;
	color: var(--vesta-color-text-muted);
}
.vesta-team .vteam-more {
	margin-left: auto;
	color: var(--vesta-color-coral);
	font-size: 18px;
	flex: 0 0 auto;
}

/* ---- modal ---- */
.vteam-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 16px;
	background: rgba(31, 58, 95, 0.6);
	overflow-y: auto;
}
.vteam-modal.is-open { display: flex; }

.vteam-dialog {
	position: relative;
	width: 100%;
	max-width: 620px;
	background: var(--vesta-color-white);
	border: 3px solid var(--vesta-color-teal);
	border-radius: var(--vesta-radius-md);
	padding: 36px 40px 40px;
	box-shadow: var(--vesta-shadow-card-hover);
}
/* close (X) is a <button> too — strip the kit button theme; subtle X with a
   very light grey hover (no coral). */
.vteam-modal .vteam-close,
.vteam-modal .vteam-close:hover,
.vteam-modal .vteam-close:focus,
.vteam-modal .vteam-close:active {
	background-color: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	color: var(--vesta-color-text-muted) !important;
}
.vteam-modal .vteam-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 36px;
	height: 36px;
	border-radius: var(--vesta-radius-sm);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.vteam-modal .vteam-close:hover {
	background-color: var(--vesta-color-off-white) !important;
	color: var(--vesta-color-navy) !important;
}

.vteam-photo {
	width: 190px;
	height: 190px;
	margin: 0 auto 24px;
	border-radius: 50%;
	overflow: hidden;
}
.vteam-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }

.vteam-rule { height: 2px; background: var(--vesta-color-coral); border: 0; margin: 0 0 22px; }

.vteam-modal-name {
	font-family: var(--vesta-font-heading);
	font-weight: 800;
	font-size: 22px;
	color: var(--vesta-color-navy);
	margin: 0 0 16px;
}
.vteam-modal-name .vteam-modal-title { font-weight: 600; }

.vteam-bio p {
	font-family: var(--vesta-font-body);
	font-size: 16px;
	line-height: 1.7;
	color: var(--vesta-color-text-muted);
	margin: 0 0 16px;
}

.vteam-modal .vteam-vcard {
	display: inline-block;
	margin: 12px auto 0;
	padding: 12px 34px;
	border: 1px solid var(--vesta-color-coral) !important;
	border-radius: var(--vesta-radius-button);
	color: var(--vesta-color-coral) !important;
	background-color: transparent !important;
	font-family: var(--vesta-font-heading);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease;
}
/* very light grey hover (no red fill) */
.vteam-modal .vteam-vcard:hover {
	background-color: var(--vesta-color-off-white) !important;
	color: var(--vesta-color-coral) !important;
	border-color: var(--vesta-color-coral) !important;
}
.vteam-vcard-wrap { text-align: center; }

@media ( max-width: 767px ) {
	.vteam-dialog { padding: 32px 22px 32px; }
	.vteam-photo { width: 150px; height: 150px; }
}

body.vteam-locked { overflow: hidden; }
