/**
 * HD Agents grid - large portrait cards, modern take on the Portal design.
 */

.hd-agents {
	display: grid;
	grid-template-columns: repeat(var(--hd-a-cols, 3), 1fr);
	gap: 34px;
}
@media (max-width: 980px) {
	.hd-agents { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.hd-agents { grid-template-columns: 1fr; }
}

.hd-agent-card {
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 4px 22px rgba(16, 42, 67, 0.08);
	display: flex;
	flex-direction: column;
	transition: transform .25s ease, box-shadow .25s ease;
}
.hd-agent-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px rgba(16, 42, 67, 0.14);
}

.hd-agent-card__photo {
	display: block;
	aspect-ratio: 2 / 3; /* preserve the tall portrait format of the originals */
	overflow: hidden;
}
.hd-agent-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform .35s ease;
}
.hd-agent-card:hover .hd-agent-card__photo img {
	transform: scale(1.03);
}

.hd-agent-card__body {
	padding: 20px 22px 22px;
	text-align: left;
}
.hd-agent-card__name {
	margin: 0 0 2px;
	font-size: 20px;
}
.hd-agent-card__name a {
	color: #263238;
	text-decoration: none;
}
.hd-agent-card__name a:hover {
	color: #16add0;
}
.hd-agent-card__company {
	display: block;
	font-size: 13px;
	color: #78909c;
	margin-bottom: 12px;
}
.hd-agent-card__fields {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hd-agent-card__fields li {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	margin-bottom: 6px;
}
.hd-agent-card__fields i {
	color: #16add0;
	font-size: 14px;
	width: 16px;
	text-align: center;
}
.hd-agent-card__fields a {
	color: #546e7a;
	text-decoration: none;
	overflow-wrap: anywhere;
}
.hd-agent-card__fields a:hover {
	color: #16add0;
}

/* ------------------------------------------------------------------
 * Toolbar: view toggle + expanding live search
 * ------------------------------------------------------------------ */
.hd-agents-toolbar {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	margin-bottom: 22px;
}
.hd-agents-view,
.hd-agents-search__btn {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #dfe6ea;
	border-radius: 8px;
	color: #78909c;
	font-size: 15px;
	cursor: pointer;
	transition: all .2s ease;
	padding: 0;
}
.hd-agents-view:hover,
.hd-agents-search__btn:hover {
	border-color: #16add0;
	color: #16add0;
}
.hd-agents-view.is-active {
	background: #16add0;
	border-color: #16add0;
	color: #fff;
}

.hd-agents-search {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.hd-agents-search__input {
	width: 0;
	opacity: 0;
	padding: 0;
	height: 40px;
	border: 1px solid #dfe6ea;
	border-radius: 8px;
	font-size: 14px;
	transition: width .3s ease, opacity .2s ease, padding .3s ease;
	pointer-events: none;
}
.hd-agents-search.is-open .hd-agents-search__input {
	width: 230px;
	opacity: 1;
	padding: 0 14px;
	pointer-events: auto;
}
.hd-agents-search.is-open .hd-agents-search__btn {
	background: #16add0;
	border-color: #16add0;
	color: #fff;
}

.hd-agent-card--hidden {
	display: none;
}
.hd-agents-empty {
	text-align: center;
	color: #78909c;
	margin: 30px 0;
}

/* ------------------------------------------------------------------
 * List view
 * ------------------------------------------------------------------ */
.hd-agents--list {
	grid-template-columns: 1fr;
	gap: 20px;
}
.hd-agents--list .hd-agent-card {
	flex-direction: row;
	align-items: stretch;
}
.hd-agents--list .hd-agent-card__photo {
	flex: 0 0 170px;
	aspect-ratio: auto;
	min-height: 210px;
}
.hd-agents--list .hd-agent-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
@media (max-width: 640px) {
	.hd-agents--list .hd-agent-card__photo { flex-basis: 130px; min-height: 170px; }
}

/* ------------------------------------------------------------------
 * Single agent page
 * ------------------------------------------------------------------ */

/* redundant chrome: prev/next nav, featured-image slider, duplicate
   name headers, Estatik's compact entity strip + native contact form */
.single-agent .single-navigation,
.single-agent .fusion-post-slideshow,
.single-agent h1.entry-title.fusion-post-title,
.single-agent .es-entity__single-block,
.single-agent .es-entity_section--contacts {
	display: none !important;
}

/* profile block: large portrait left, bio right */
.hd-agent-profile {
	display: flex;
	gap: 44px;
	align-items: flex-start;
	margin: 34px 0 44px;
}
.hd-agent-profile__photo {
	flex: 0 0 340px;
	aspect-ratio: 2 / 3; /* same visual crop as the Our Agents cards */
	align-self: flex-start;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 4px 22px rgba(16, 42, 67, 0.12);
}
.hd-agent-profile__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.hd-agent-profile__info {
	flex: 1;
	min-width: 0;
}
.hd-agent-profile__company {
	display: inline-block;
	background: #eef7fb;
	color: #16add0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .4px;
	padding: 5px 14px;
	border-radius: 20px;
	margin-bottom: 16px;
}
.hd-agent-profile__bio {
	font-size: 15px;
	line-height: 1.75;
	color: #455a64;
	margin-bottom: 20px;
}
.hd-agent-profile__fields {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hd-agent-profile__fields li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	margin-bottom: 8px;
}
.hd-agent-profile__fields i {
	color: #16add0;
	width: 17px;
	text-align: center;
}
.hd-agent-profile__fields a {
	color: #37474f;
	text-decoration: none;
}
.hd-agent-profile__fields a:hover {
	color: #16add0;
}
@media (max-width: 800px) {
	.hd-agent-profile { flex-direction: column; gap: 24px; }
	.hd-agent-profile__photo { flex-basis: auto; max-width: 340px; }
}

/* listing type filters as buttons */
.single-agent .es-properties__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 24px;
}
.single-agent .es-properties__categories a {
	display: inline-flex;
	align-items: center;
	padding: 8px 24px;
	border: 1px solid #16add0 !important;
	border-radius: 6px;
	color: #16add0;
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: all .2s ease;
}
.single-agent .es-properties__categories a:hover,
.single-agent .es-properties__categories a.es-active,
.single-agent .es-properties__categories a.active,
.single-agent .es-properties__categories a[data-term=""].js-active {
	background: #16add0;
	color: #fff;
}

/* Contact Me Today CTA + hide Estatik's native request form */
.single-agent .es-request-form {
	display: none !important;
}
.hd-agent-profile__cta {
	display: inline-block;
	margin-top: 18px;
	background: #ff5a5f;
	color: #fff !important;
	border: 1px solid #ff5a5f;
	border-radius: 6px;
	padding: 11px 30px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none !important;
	transition: all .2s ease;
}
.hd-agent-profile__cta:hover {
	background: #fff;
	color: #ff5a5f !important;
}

/* byline + author box: not relevant on agent profiles */
.single-agent .fusion-meta-info,
.single-agent .about-author {
	display: none !important;
}

/* agent listings: match the front-page card treatment */
.single-agent .es-properties .es-listing {
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.09);
}

/* filter counts: label color, bold, 2px larger */
.single-agent .es-properties__categories a .es-count {
	color: inherit !important;
	background: none !important;
	font-weight: 700;
	font-size: calc(1em + 2px);
	line-height: 1;
}
