/* Front-end project gallery */
.legend-project-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}
.legend-project-gallery .legend-gallery-cell {
	display: block;
	overflow: hidden;
	border-radius: 3px;
	line-height: 0;
	position: relative;
}
.legend-project-gallery .legend-gallery-img {
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.legend-project-gallery .legend-gallery-cell::after {
	content: "";
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 0 0 rgba(198, 161, 91, 0);
	transition: box-shadow 0.3s ease;
	pointer-events: none;
}
.legend-project-gallery .legend-gallery-cell:hover .legend-gallery-img {
	transform: scale(1.04);
}
.legend-project-gallery .legend-gallery-cell:hover::after {
	box-shadow: inset 0 0 0 2px rgba(198, 161, 91, 0.9);
}

.legend-project-cta {
	margin: 28px 0;
	text-align: center;
}
.legend-single-project-title {
	color: #fff !important;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 700;
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1.2;
	margin: 0;
	text-align: center;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1024px) {
	.legend-project-gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.legend-project-gallery {
		grid-template-columns: 1fr;
		gap: 10px;
	}
}

/* Project + post card grids (featured projects, blog preview) */
.legend-project-cards,
.legend-post-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
}
.legend-project-card,
.legend-post-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(14, 14, 14, 0.08);
	border-radius: 3px;
	overflow: hidden;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.legend-project-card:hover,
.legend-post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(14, 14, 14, 0.12);
}
.legend-project-card__media,
.legend-post-card__media {
	display: block;
	line-height: 0;
	overflow: hidden;
}
.legend-project-card__media img,
.legend-post-card__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.legend-project-card:hover .legend-project-card__media img,
.legend-post-card:hover .legend-post-card__media img {
	transform: scale(1.05);
}
.legend-project-card__body,
.legend-post-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px 22px 24px;
}
.legend-project-card__cat,
.legend-post-card__date {
	font-family: "Inter", system-ui, sans-serif;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #B08D57;
	font-weight: 600;
}
.legend-project-card__title,
.legend-post-card__title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 19px;
	font-weight: 600;
	color: #2B2016;
	line-height: 1.3;
}
.legend-project-card__city {
	font-size: 14px;
	color: #6B5D4F;
}
.legend-post-card__excerpt {
	font-size: 14.5px;
	color: #6B5D4F;
	line-height: 1.6;
}
.legend-empty-note {
	color: #6B5D4F;
	text-align: center;
}

/* Service photo cards */
.legend-service-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
}
.legend-service-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(14, 14, 14, 0.08);
	border-radius: 4px;
	overflow: hidden;
	text-decoration: none;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.legend-service-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 22px 44px rgba(14, 14, 14, 0.12);
	border-color: rgba(198, 161, 91, 0.5);
}
.legend-service-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	line-height: 0;
}
.legend-service-card__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.legend-service-card:hover .legend-service-card__media img {
	transform: scale(1.06);
}
.legend-service-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(14, 14, 14, 0.78) 0%, rgba(14, 14, 14, 0.15) 46%, transparent 72%);
}
.legend-service-card__title {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 18px;
	z-index: 2;
	color: #fff;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 700;
	font-size: 21px;
	line-height: 1.2;
	letter-spacing: -0.01em;
}
.legend-service-card__body {
	padding: 22px 24px 26px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.legend-service-card__desc {
	color: #6B5D4F;
	font-size: 15px;
	line-height: 1.6;
}
.legend-service-card__link {
	font-family: "Inter", system-ui, sans-serif;
	font-weight: 600;
	font-size: 12.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #8A6D3B;
	transition: color 0.2s ease, letter-spacing 0.2s ease;
}
.legend-service-card:hover .legend-service-card__link {
	color: #B08D57;
	letter-spacing: 0.11em;
}
@media (max-width: 1024px) {
	.legend-service-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	/* Compact 2-up photo tiles on phones: image + title overlay, still fully
	   tappable to the service page (descriptions remain on desktop + the
	   service pages). Big reduction in homepage/hub scroll length. */
	.legend-service-cards {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
	.legend-service-card__body {
		display: none;
	}
	.legend-service-card__media img {
		aspect-ratio: 4 / 3;
	}
	.legend-service-card__title {
		font-size: 15px;
		left: 14px;
		right: 14px;
		bottom: 12px;
	}
}

/* Review rating badges */
.legend-review-badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 18px;
	margin: 8px auto 4px;
}
.legend-rb {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-width: 168px;
	padding: 20px 24px;
	background: #fff;
	border: 1px solid rgba(14, 14, 14, 0.10);
	border-radius: 4px;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
/* Fixed-height logo band: every logo is vertically centered in the same slot,
   so the stars / score / meta rows line up across all four cards. */
.legend-rb__logowrap {
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
}
/* Base logo sizing. Specificity must beat Elementor's `.elementor img` reset. */
.legend-review-badges .legend-rb__logo {
	max-height: 28px;
	max-width: 132px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}
/* Per-platform optical balance so all four read at the same visual size.
   Thumbtack is a heavy bold wordmark, so it needs a smaller cap height. */
.legend-review-badges .legend-rb__logo--google    { max-height: 27px; }
.legend-review-badges .legend-rb__logo--houzz     { max-height: 28px; }
.legend-review-badges .legend-rb__logo--thumbtack { max-height: 18px; max-width: 150px; }
.legend-review-badges .legend-rb__logo--facebook  { max-height: 29px; }
.legend-rb:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(14, 14, 14, 0.10);
	border-color: rgba(198, 161, 91, 0.5);
}
.legend-rb__stars {
	display: inline-block;
	font-size: 18px;
	letter-spacing: 2px;
	line-height: 1;
	/* Fill the stars gold up to --lg-star-pct (e.g. 90% = 4.5/5), gray after. */
	background: linear-gradient(90deg, #B08D57 var(--lg-star-pct, 100%), #DAD4C7 var(--lg-star-pct, 100%));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
/* Reserve the stars line on platforms that have no star rating (Facebook), so
   the score and meta rows still line up with the star cards. */
.legend-rb__stars--empty {
	height: 18px;
	background: none;
}
.legend-rb__score {
	font-family: "Inter", system-ui, sans-serif;
	font-weight: 700;
	font-size: 22px;
	color: #2B2016;
	line-height: 1.1;
}
.legend-rb__meta {
	font-family: "Inter", system-ui, sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #6B5D4F;
	text-transform: uppercase;
}

/* Portfolio filter bar */
.legend-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: 34px;
}
.legend-filter__btn {
	font-family: "Inter", system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #2B2016;
	background: transparent;
	border: 1px solid rgba(14, 14, 14, 0.18);
	border-radius: 2px;
	padding: 9px 18px;
	cursor: pointer;
	transition: all 0.2s ease;
}
.legend-filter__btn:hover {
	border-color: #B08D57;
	color: #8A6D3B;
}
.legend-filter__btn.is-active {
	background: #B08D57;
	border-color: #B08D57;
	color: #2B2016;
}

/* Single project dynamic bits */
.legend-project-eyebrow {
	display: inline-block;
	font-family: "Inter", system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #B08D57;
	text-decoration: none;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.legend-project-city-line {
	display: inline-block;
	font-size: 16px;
	color: #E7E7E7;
}
@media (max-width: 1024px) {
	.legend-project-cards,
	.legend-post-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.legend-project-cards,
	.legend-post-cards {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Mobile density: flatter card images + tighter bodies + compact review
   badges, so the single-column stacks do not make pages scroll forever.
   Content is unchanged; only the vertical footprint shrinks.
   ========================================================================== */
@media (max-width: 767px) {
	/* Flatter tiles on phones: a single-column 16/10 tile is ~219px tall at the
	   ~350px content width and inflates the scroll. 16/9 trims each tile to
	   ~197px, and the project/post grids tighten their row gap too. Content is
	   unchanged; only the tile height + gaps shrink. */
	.legend-service-card__media img,
	.legend-project-card__media img,
	.legend-post-card__media img {
		aspect-ratio: 16 / 9;
	}
	.legend-service-cards {
		gap: 16px;
	}
	.legend-project-cards,
	.legend-post-cards {
		gap: 18px;
	}
	.legend-service-card__body {
		padding: 13px 18px 16px;
		gap: 8px;
	}
	.legend-project-card__body,
	.legend-post-card__body {
		padding: 12px 18px 16px;
	}
	/* Review badges: 2 per row, compact (was a tall full-width stack) */
	.legend-review-badges {
		gap: 12px;
	}
	.legend-review-badges .legend-rb {
		min-width: 0;
		width: calc(50% - 6px);
		padding: 15px 8px;
	}
}
