/*
 * Featured Clients grid.
 *
 * Deliberately quiet: type is inherited from the active theme so cards sit
 * inside the existing page without fighting it. Everything tunable is a
 * custom property, so a theme can restyle the grid without touching this file.
 */

.gfc-grid {
	--gfc-gap: 2rem;
	--gfc-radius: 4px;
	--gfc-border: #e4e6e2;
	--gfc-muted: #5d6660;
	--gfc-accent: #4a7c2f;
	--gfc-card-bg: #fff;
	--gfc-shadow: 0 1px 2px rgba(20, 30, 20, .06);
	--gfc-shadow-hover: 0 6px 20px rgba(20, 30, 20, .12);

	display: grid;
	grid-template-columns: repeat(var(--gfc-columns, 3), minmax(0, 1fr));
	gap: var(--gfc-gap);
	margin: 0 0 2rem;
}

.gfc-cols-1 { --gfc-columns: 1; }
.gfc-cols-2 { --gfc-columns: 2; }
.gfc-cols-3 { --gfc-columns: 3; }
.gfc-cols-4 { --gfc-columns: 4; }

.gfc-card {
	display: flex;
	flex-direction: column;
	background: var(--gfc-card-bg);
	border: 1px solid var(--gfc-border);
	border-radius: var(--gfc-radius);
	overflow: hidden;
	box-shadow: var(--gfc-shadow);
	transition: box-shadow .2s ease, transform .2s ease;
}

.gfc-card:hover,
.gfc-card:focus-within {
	box-shadow: var(--gfc-shadow-hover);
	transform: translateY(-2px);
}

.gfc-card__media {
	margin: 0;
	line-height: 0;
	background: #f2f4f1;
}

.gfc-card__img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}

.gfc-card__body {
	padding: 1.25rem 1.25rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

.gfc-card__location {
	margin: 0;
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--gfc-accent);
}

.gfc-card__zip {
	color: var(--gfc-muted);
	font-weight: 400;
	letter-spacing: normal;
}

.gfc-card__zip::before {
	content: " · ";
}

.gfc-card__title {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.35;
}

.gfc-card__title a,
.gfc-card__media a {
	color: inherit;
	text-decoration: none;
}

.gfc-card__title a:hover,
.gfc-card__title a:focus {
	text-decoration: underline;
}

.gfc-card__description {
	margin: 0;
	color: var(--gfc-muted);
	font-size: .9375rem;
	line-height: 1.6;
}

.gfc-card__review {
	margin: .25rem 0 0;
	padding: .75rem 0 0 1rem;
	border: 0;
	border-left: 3px solid var(--gfc-accent);
	font-size: .9375rem;
	line-height: 1.6;
	font-style: italic;
	color: #2f3a33;
	quotes: "\201C" "\201D";
}

.gfc-card__review p {
	margin: 0;
}

.gfc-card__review p::before { content: open-quote; }
.gfc-card__review p::after  { content: close-quote; }

.gfc-empty {
	color: var(--gfc-muted, #5d6660);
	font-style: italic;
}

/* Single project view */
.gfc-single-meta {
	margin: 0 0 1rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	font-size: .8125rem;
	color: #4a7c2f;
}

.gfc-single-review {
	margin: 1.5rem 0;
	padding: 1rem 0 1rem 1.25rem;
	border-left: 3px solid #4a7c2f;
	font-style: italic;
}

.gfc-card__link:focus-visible,
.gfc-card__title a:focus-visible {
	outline: 2px solid var(--gfc-accent);
	outline-offset: 2px;
}

@media (max-width: 900px) {
	.gfc-grid { --gfc-columns: 2; }
}

@media (max-width: 600px) {
	.gfc-grid {
		--gfc-columns: 1;
		--gfc-gap: 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gfc-card {
		transition: none;
	}
	.gfc-card:hover,
	.gfc-card:focus-within {
		transform: none;
	}
}

/*
 * Filterable wrapper around each card. The wrapper carries the town / county /
 * service values so a theme override of card.php keeps filtering correctly.
 * It is a flex column so cards still stretch to equal height in the grid track,
 * which means [hidden] needs an explicit rule to win against display:flex.
 */
.gfc-grid__item {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.gfc-grid__item > .gfc-card {
	flex: 1 1 auto;
}

.gfc-grid__item[hidden] {
	display: none;
}

.gfc-grid__empty {
	color: var(--gfc-muted, #5d6660);
	font-style: italic;
	margin: 0 0 2rem;
}

.gfc-grid__empty[hidden] {
	display: none;
}

/* How long they've been a customer. Quiet, but it is the strongest trust
   signal on the card, so it sits directly under the title. */
.gfc-card__since {
	margin: 0;
	font-size: .8125rem;
	font-weight: 600;
	color: var(--gfc-muted);
	letter-spacing: .02em;
}

/* Links from a project to the town service pages that already rank. */
.gfc-related {
	margin: 2rem 0 0;
	padding: 1.25rem 0 0;
	border-top: 1px solid var(--gfc-border, #e4e6e2);
}

.gfc-related__heading {
	margin: 0 0 .6rem;
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--gfc-muted, #5d6660);
}

.gfc-related__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem .9rem;
}

.gfc-related__item a {
	font-size: .9375rem;
	color: var(--gfc-accent, #4a7c2f);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.gfc-related__item a:hover,
.gfc-related__item a:focus {
	border-bottom-color: currentColor;
}

/* Shared call-to-action block appended to project pages. Beaver Builder
   supplies its own styling; this only controls the spacing around it. */
.gfc-cta {
	margin: 2.5rem 0 0;
}

/* ---------------------------------------------------------------------------
   Single project page.

   Two columns on desktop. The write-up was previously spanning the full 1,100px
   content width — roughly 150 characters a line, about double a comfortable
   reading measure — so the second column improves readability as much as it
   creates somewhere for the call to action to live.
   --------------------------------------------------------------------------- */
.gfc-single {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 2.5rem;
	align-items: start;
}

.gfc-single--full {
	grid-template-columns: minmax(0, 1fr);
}

.gfc-single__main {
	min-width: 0;
}

/* Follows the reader down the page, so the ask is visible while they are
   still deciding rather than only once they reach the bottom. */
.gfc-single__aside {
	position: sticky;
	top: 6rem;
}

.gfc-single__media {
	margin: 0 0 1.25rem;
}

.gfc-single__img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.gfc-single__caption {
	margin: .5rem 0 0;
	font-size: .8125rem;
	color: #5d6660;
}

/* The call-to-action layout was designed as a full-width band; these trim its
   padding so it doesn't look cramped in a narrower column. */
.gfc-single__aside .gfc-cta {
	margin: 0;
}

.gfc-single__aside .fl-row-content-wrap {
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

@media (max-width: 900px) {
	.gfc-single {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	/* Sticky positioning on a single-column layout just pins the block
	   awkwardly mid-scroll, so it is switched off rather than inherited. */
	.gfc-single__aside {
		position: static;
	}
}
