/*
 * Agent page (templates/agent-layout.txt): the photo column.
 *
 * The row centres its columns vertically and makes them equal height, so with a
 * long bio the photo would float mid-column. Instead the photo sits at the top,
 * in one consistent 2:3 shape, and on desktop stays in view while the bio scrolls.
 */
.elite-agent-photo-col .vc_column-inner {
	justify-content: flex-start !important;
}

.elite-agent-portrait {
	position: relative; /* anchors the "All agents" link */
	border-bottom: 8px solid #004c45; /* brand teal accent under the photo */
}

/* "All agents" (corporate only), pinned to the photo's top-left corner. */
.elite-agent-back {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 1;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	color: #004c45 !important;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.elite-agent-back:hover,
.elite-agent-back:focus-visible {
	background: #fff;
}

.elite-agent-portrait__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	object-position: center top;
}

@media (min-width: 1000px) {
	/* Give the photo the full column height to travel in. */
	.elite-agent-photo-col .vc_column-inner > .wpb_wrapper {
		height: 100%;
		flex-grow: 1;
	}

	.elite-agent-photo-block {
		position: sticky;
		top: 100px;
	}

	/*
	 * The theme sets overflow: hidden on both <html> and <body>, which makes the
	 * body a scroll container that never scrolls, and sticky never engages.
	 * `clip` clips the same way without creating a scroll container.
	 */
	body.elite-agent-page {
		overflow: clip;
	}
}

/*
 * Agents page: the grid crops each portrait into a card that is wider than
 * tall on desktop. Cropped from the middle that cuts heads off; keep the top.
 */
.elite-agents-index .nectar-post-grid-item-bg__media {
	object-position: 50% 15%;
}

/*
 * Agents page: one card height. The site's custom CSS makes the cards tall
 * (380px) only once they carry Salient's `animated-in` class, which the cards
 * added by "Load more" never get, so those fell back to 30% of the screen
 * height. Same values here for every card, so both sets match.
 */
.elite-agents-index .nectar-post-grid-item {
	height: 380px !important;
	max-height: 380px !important;
	min-height: 350px !important;
}
