/* May Group Past Sales: front end. Matches the site skin (Julius Sans One, EB Garamond, Hammersmith One, #8a1c24). */

.mgps-feed,
.mgps-archive {
	--mgps-red: #8a1c24;
	--mgps-red-hover: #b80b26;
	--mgps-ink: #272827;
	--mgps-text: #474847;
	--mgps-line: #dedbd5;
	--mgps-card: #fff;
	/* Match the rest of the site: photos 20px, buttons 5px (Contact and bio CTAs). */
	--mgps-radius-photo: 20px;
	--mgps-radius-button: 5px;
	color: var(--mgps-text);
}

.mgps-feed .screen-reader-text,
.mgps-archive .screen-reader-text,
.mgps-live {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Feed section. No outer padding or width cap: the Beaver Builder row,
   column and module settings decide spacing, width and background. */
.mgps-feed {
	padding: 0;
}
.mgps-feed__inner {
	margin: 0 auto;
}
.mgps-feed__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 24px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}
.mgps-feed__title {
	margin: 0;
	font-family: "Julius Sans One", sans-serif;
	font-weight: 400;
	font-size: clamp(30px, 4vw, 48px);
	line-height: 1.15;
	color: var(--mgps-ink);
}
.mgps-button,
a.mgps-button:visited {
	display: inline-block;
	padding: 12px 26px;
	background: var(--mgps-red);
	border: 1px solid #571217;
	border-radius: var(--mgps-radius-button);
	color: #fff;
	font-family: "Hammersmith One", sans-serif;
	font-size: 16px;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .2s ease, border-color .2s ease;
}
.mgps-button:hover,
.mgps-button:focus-visible {
	background: var(--mgps-red-hover);
	border-color: var(--mgps-red-hover);
	color: #fff;
	text-decoration: none;
}
.mgps-button:focus-visible,
.mgps-filter__item:focus-visible,
.mgps-sort__item:focus-visible,
.mgps-card__agent a:focus-visible {
	outline: 2px solid var(--mgps-red);
	outline-offset: 3px;
}

/* Grid */
.mgps-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

/* Card */
.mgps-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	background: var(--mgps-card);
	border: 1px solid var(--mgps-line);
	border-radius: var(--mgps-radius-photo);
	overflow: hidden;
}
.mgps-card__media {
	position: relative;
	aspect-ratio: 3 / 2;
	background: #e9e6e1;
	overflow: hidden;
}
.mgps-card__img {
	display: block;
	width: 100%;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
}
.mgps-card__noimg {
	width: 100%;
	height: 100%;
	background: #e9e6e1;
}
.mgps-card__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 5px 11px 4px;
	background: var(--mgps-red);
	color: #fff;
	font-family: "Hammersmith One", sans-serif;
	font-size: 13px;
	line-height: 1.3;
	letter-spacing: .06em;
	text-transform: uppercase;
	border-radius: 2px;
}
.mgps-card__body {
	padding: 22px 24px 24px;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}
.mgps-card__body p {
	margin: 0;
}
.mgps-card .mgps-card__price {
	font-family: "Julius Sans One", sans-serif;
	font-size: 30px;
	line-height: 1.15;
	color: var(--mgps-red);
	margin-bottom: 8px;
}
.mgps-card .mgps-card__address {
	margin: 0 0 12px;
	font-family: "EB Garamond", serif;
	font-weight: 600;
	font-size: 22px;
	line-height: 1.25;
	letter-spacing: 0;
	color: var(--mgps-ink);
	text-transform: none;
}
.mgps-card__street,
.mgps-card__city {
	display: block;
}
.mgps-card__city {
	font-weight: 400;
	font-size: 18px;
	color: var(--mgps-text);
}
.mgps-card .mgps-card__facts {
	display: flex;
	flex-wrap: wrap;
	font-family: "Hammersmith One", sans-serif;
	font-size: 15px;
	line-height: 1.3;
	color: var(--mgps-ink);
	margin-bottom: 10px;
}
.mgps-card__units {
	white-space: nowrap;
}
.mgps-card__facts span + span {
	margin-left: 12px;
	padding-left: 12px;
	border-left: 1px solid var(--mgps-line);
}
.mgps-card .mgps-card__meta {
	font-size: 17px;
	line-height: 1.4;
}
.mgps-card__meta span {
	display: block;
}
.mgps-card .mgps-card__agent {
	margin-top: auto;
	padding-top: 14px;
	font-family: "Hammersmith One", sans-serif;
	font-size: 15px;
}
.mgps-card__agent a {
	color: var(--mgps-red);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.mgps-card__agent a:hover {
	color: var(--mgps-red-hover);
}
.mgps-card__listing {
	margin-top: 16px;
}
.mgps-card__listing .mgps-button {
	padding: 10px 20px;
	font-size: 15px;
}

/* A single sale (common on a bio page) reads better as one wide card. */
@media (min-width: 768px) {
	.mgps-feed__inner:has(.mgps-grid--n1) {
		max-width: 980px;
	}
	.mgps-grid--n1 {
		grid-template-columns: minmax(0, 1fr);
		max-width: 980px;
	}
	.mgps-grid--n1 .mgps-card {
		flex-direction: row;
	}
	.mgps-grid--n1 .mgps-card__media {
		flex: 0 0 56%;
		aspect-ratio: auto;
		min-height: 300px;
	}
	.mgps-grid--n1 .mgps-card__body {
		padding: 32px 34px;
		justify-content: center;
	}
	.mgps-grid--n1 .mgps-card__agent {
		margin-top: 0;
	}
}

/* Archive page title band. The site header sits on top of the page (absolute),
   so the Past Sales title gets a dark band under it, like the photo heroes on
   the other inner pages. Heights match the header: 203px, 166px, 127px. */
body:has(.mgps-archive) .fl-content {
	margin-top: 0;
}
body:has(.mgps-archive) .fl-post-header {
	margin: 0 0 40px;
	padding: 240px 0 48px;
	background: #272827;
	box-shadow: 0 0 0 100vmax #272827;
	clip-path: inset(0 -100vmax);
}
body:has(.mgps-archive) .fl-post-header .fl-post-title {
	margin: 0;
	color: #fff;
}
@media (max-width: 991px) {
	body:has(.mgps-archive) .fl-post-header {
		padding: 200px 0 40px;
	}
}
@media (max-width: 767px) {
	body:has(.mgps-archive) .fl-post-header {
		margin-bottom: 28px;
		padding: 152px 0 32px;
	}
}

/* Archive */
.mgps-archive {
	margin: 8px 0 40px;
}
.mgps-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
}
.mgps-filter__item,
a.mgps-filter__item:visited {
	display: inline-block;
	padding: 9px 16px 8px;
	background: #fff;
	border: 1px solid #cfcbc4;
	border-radius: var(--mgps-radius-button);
	color: var(--mgps-ink);
	font-family: "Hammersmith One", sans-serif;
	font-size: 15px;
	line-height: 1.3;
	text-decoration: none;
	transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.mgps-filter__item:hover {
	border-color: var(--mgps-red);
	color: var(--mgps-red);
	text-decoration: none;
}
.mgps-filter__item.is-active,
a.mgps-filter__item.is-active:visited,
.mgps-filter__item.is-active:hover {
	background: var(--mgps-red);
	border-color: var(--mgps-red);
	color: #fff;
}
.mgps-archive__controls {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0 0 18px;
}
.mgps-archive__controls .mgps-filter {
	margin: 0;
}
.mgps-sort {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 18px;
	font-family: "Hammersmith One", sans-serif;
	font-size: 15px;
	line-height: 1.3;
}
.mgps-sort__label {
	color: var(--mgps-ink);
}
.mgps-sort__item,
a.mgps-sort__item:visited {
	padding: 4px 0;
	color: var(--mgps-text);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: color .2s ease, border-color .2s ease;
}
.mgps-sort__item:hover {
	color: var(--mgps-red);
	text-decoration: none;
}
.mgps-sort__item.is-active,
a.mgps-sort__item.is-active:visited {
	color: var(--mgps-red);
	border-bottom-color: var(--mgps-red);
}
.mgps-builder-note {
	padding: 16px 20px;
	border: 1px dashed #cfcbc4;
	color: #474847;
	font-size: 15px;
}
.mgps-archive:focus {
	outline: none;
}
/* While a new filter/sort/page is loading in place. */
.mgps-archive.is-loading .mgps-grid,
.mgps-archive.is-loading .mgps-archive__count,
.mgps-archive.is-loading .mgps-pagination {
	opacity: .45;
	transition: opacity .15s ease;
}
.mgps-archive.is-loading {
	cursor: progress;
}
.mgps-archive__count {
	margin: 0 0 24px;
	font-size: 17px;
}
.mgps-archive__count a,
.mgps-archive__empty a {
	color: var(--mgps-red);
}
.mgps-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 32px;
	font-family: "Hammersmith One", sans-serif;
}
.mgps-pagination .page-numbers {
	padding: 8px 14px;
	border: 1px solid #cfcbc4;
	border-radius: var(--mgps-radius-button);
	color: var(--mgps-ink);
	text-decoration: none;
}
.mgps-pagination .page-numbers.current {
	background: var(--mgps-red);
	border-color: var(--mgps-red);
	color: #fff;
}

/* Tablet: two columns. A feed with an odd number of cards drops the last one so no card sits alone. */
@media (max-width: 1024px) {
	.mgps-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px;
	}
	.mgps-feed .mgps-grid > .mgps-card:last-child:nth-child(odd):not(:first-child) {
		display: none;
	}
}
@media (max-width: 767px) {
	.mgps-feed .mgps-grid--n1 {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Phone: one column, all cards back. */
@media (max-width: 640px) {
	.mgps-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}
	.mgps-feed .mgps-grid > .mgps-card:last-child:nth-child(odd):not(:first-child) {
		display: flex;
	}
	.mgps-card__body {
		padding: 18px 18px 20px;
	}
	.mgps-card .mgps-card__price {
		font-size: 26px;
	}
	.mgps-card .mgps-card__address {
		font-size: 20px;
	}
}
