/*
 * Home & Living and careers: homes listing and home cards, the vacancy
 * pill, the home page hero and gallery, job cards, the job page and the enquiry/apply areas.
 * Loaded with the frelim/homes-listing, home-details, jobs-listing and job-details blocks
 * (block.json "style"). Colours only from --fc-* aliases. No dark surfaces here, so the default
 * focus tokens apply.
 */

/* ---------- Full-bleed summaries: own gutter, content column inside ---------- */

.fc-home-summary,
.fc-job-summary {
	padding-inline: var(--fc-gutter);
}

.fc-home-summary__inner,
.fc-job-summary__inner {
	width: 100%;
	max-width: var(--fc-content);
	margin-inline: auto;
}

/* A list with a check icon on each item (requirements, features). */
.fc-checklist ul,
ul.fc-checklist {
	display: grid;
	gap: var(--fc-space-10);
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.fc-checklist {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: var(--fc-space-20) var(--fc-space-40);
	margin-top: var(--fc-space-30);
}

.fc-checklist li {
	display: flex;
	align-items: flex-start;
	gap: var(--fc-space-10);
}

.fc-checklist li::before {
	content: "";
	flex: none;
	width: 1.4em;
	height: 1.4em;
	margin-top: 0.05em;
	background-color: var(--fc-ember-text);
	mask: url(../svg/icons/check-circle.svg) center / contain no-repeat;
}

/* ---------- Homes listing ---------- */

.fc-homes__group {
	margin-top: var(--fc-space-40);
}

.fc-homes__group + .fc-homes__group {
	margin-top: var(--fc-space-50);
}

.fc-homes__heading {
	display: flex;
	align-items: center;
	gap: var(--fc-space-20);
	margin-bottom: var(--fc-space-30);
	font-size: var(--wp--preset--font-size--x-large);
}

/* A short Ember to Amber lead line after the region, as on the services hub. */
.fc-homes__heading::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, var(--fc-amber) 0 64px, var(--fc-line) 64px);
}

.fc-homes__grid,
.fc-jobs__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: var(--fc-space-30);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- Home card ---------- */

.fc-home-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0;
}

.fc-home-card .fc-home-photo {
	margin: 0;
}

.fc-home-card .fc-home-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.fc-home-photo figcaption {
	padding: 6px var(--fc-space-30) 0;
	font-size: 0.7778rem; /* 14px */
	font-style: italic;
	color: var(--fc-muted);
}

.fc-home-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--fc-space-20);
	padding: var(--fc-space-30);
}

/* Text-only card (no gallery): an Ember to Amber top rule stands in for the photo. */
.fc-home-card--text::before {
	content: "";
	height: 6px;
	background: var(--fc-ember-amber);
}

.fc-home-card__body > * {
	margin: 0;
}

.fc-home-card__title {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
}

.fc-home-card__title a {
	color: var(--fc-indigo);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.fc-home-card__title a:hover {
	color: var(--fc-indigo-deep);
	text-decoration-thickness: 2px;
}

.fc-home-card__facts,
.fc-home-card__features,
.fc-job-facts {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fc-home-card__facts li,
.fc-home-card__features li,
.fc-job-facts li {
	display: flex;
	align-items: flex-start;
	gap: var(--fc-space-10);
	line-height: 1.4;
}

.fc-home-card__facts .fc-icon,
.fc-job-facts .fc-icon {
	--fc-icon-size: 1.25em;
	color: var(--fc-indigo);
	vertical-align: 0;
}

.fc-home-card__features {
	padding-top: var(--fc-space-20);
	border-top: 1px solid var(--fc-line);
}

.fc-home-card__features .fc-icon {
	--fc-icon-size: 1.25em;
	color: var(--fc-ember-text);
}

.fc-home-card__enquire {
	margin-top: auto !important;
	padding-top: var(--fc-space-10);
}

.fc-home-card__enquire .wp-element-button {
	display: flex;
	justify-content: center;
	width: 100%;
	text-align: center;
}

/* ---------- Vacancy pill: a word and an icon; colour only reinforces it ---------- */

.fc-vacancy {
	min-height: 30px;
	padding: 2px 14px 2px 10px;
	font-size: 0.7778rem; /* 14px */
}

.fc-vacancy .fc-icon {
	--fc-icon-size: 1.25em;
	vertical-align: 0;
}

/* Vacancy: white on success green (5.4:1). */
.fc-vacancy--vacancy {
	color: var(--fc-white);
	background-color: var(--fc-success);
}

/* Waitlist: Indigo on cream (8.9:1). */
.fc-vacancy--waitlist {
	color: var(--fc-indigo);
	background-color: var(--fc-cream);
}

/* Full: muted grey on a pale grey, outlined (6.6:1). */
.fc-vacancy--full {
	color: var(--fc-muted);
	background-color: color-mix(in srgb, var(--fc-muted) 8%, var(--fc-white));
	box-shadow: inset 0 0 0 1px var(--fc-line);
}

/* ---------- Home page hero and gallery ---------- */

.fc-home-summary,
.fc-job-summary {
	padding-bottom: var(--fc-space-50);
}

.fc-home-summary__inner {
	display: grid;
	gap: var(--fc-space-40);
	align-items: start;
}

.fc-home-summary__text {
	display: flex;
	flex-direction: column;
	gap: var(--fc-space-20);
}

.fc-home-summary__text > *,
.fc-job-summary__inner > * {
	margin: 0;
}

.fc-home-summary__title,
.fc-job-summary__title {
	margin-bottom: 0;
}

.fc-home-summary .fc-home-card__features {
	max-width: 36em;
}

.fc-home-summary__actions,
.fc-job-summary__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fc-space-20);
	margin-top: var(--fc-space-20) !important;
}

.fc-home-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--fc-space-20);
}

.fc-home-gallery .fc-home-photo {
	margin: 0;
}

.fc-home-gallery .fc-home-photo:first-child {
	grid-column: 1 / -1;
}

.fc-home-gallery img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--fc-radius-card);
}

.fc-home-gallery figcaption {
	padding-inline: 0;
}

@media (min-width: 900px) {
	.fc-home-summary,
	.fc-job-summary {
		padding-bottom: var(--fc-space-60);
	}

	.fc-home-summary:not(.fc-home-summary--text) .fc-home-summary__inner {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
		gap: var(--fc-space-60);
	}
}

/* ---------- Enquiry and apply areas: intro beside the form ---------- */

.fc-enquire,
.fc-job-apply__inner {
	display: grid;
	gap: var(--fc-space-40);
}

.fc-enquire__intro > *,
.fc-job-apply__intro > * {
	margin-block: 0;
}

.fc-enquire__intro h2,
.fc-job-apply__intro h2 {
	margin-bottom: var(--fc-space-20);
}

.fc-enquire .fc-form-wrap,
.fc-job-apply .fc-form-wrap {
	padding: var(--fc-space-30);
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius-card);
	background-color: var(--fc-white);
	box-shadow: var(--fc-shadow-card);
}

@media (min-width: 900px) {
	.fc-enquire,
	.fc-job-apply__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
		gap: var(--fc-space-50);
	}

	.fc-enquire .fc-form-wrap,
	.fc-job-apply .fc-form-wrap {
		padding: var(--fc-space-40);
	}
}

/* ---------- Jobs listing ---------- */

.fc-jobs {
	margin-top: var(--fc-space-30);
}

.fc-job-card {
	display: flex;
	flex-direction: column;
	gap: var(--fc-space-20);
	padding: var(--fc-space-30);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fc-job-card:hover {
	box-shadow: 0 12px 32px color-mix(in srgb, var(--fc-indigo) 14%, transparent);
	transform: translateY(-2px);
}

.fc-job-card > * {
	margin: 0;
}

.fc-job-card__title {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
}

.fc-job-card__apply {
	margin-top: auto !important;
}

.fc-job-card__apply .fc-card__link {
	text-decoration: none;
}

/* The last word and the arrow wrap together, so the arrow follows the end of the text. */
.fc-nowrap {
	white-space: nowrap;
}

.fc-job-card__apply .fc-icon {
	--fc-icon-size: 1.1em;
	margin-left: 0.3em;
	vertical-align: -0.2em;
	transition: transform 0.2s ease;
}

.fc-job-card:hover .fc-card__link {
	text-decoration: underline;
}

.fc-job-card:hover .fc-job-card__apply .fc-icon {
	transform: translateX(3px);
}

.fc-jobs__general {
	margin: var(--fc-space-40) 0 0;
}

.fc-jobs__empty {
	max-width: var(--fc-prose);
}

.fc-jobs__general-button {
	margin-top: var(--fc-space-30);
}

/* ---------- Job page ---------- */

.fc-job-summary__inner {
	display: flex;
	flex-direction: column;
	gap: var(--fc-space-20);
}

.fc-job-summary .fc-job-facts {
	font-size: var(--wp--preset--font-size--large);
}

.fc-job-summary__closed {
	max-width: var(--fc-prose);
	margin-top: var(--fc-space-20) !important;
}

.fc-job-requirements h2 {
	margin-bottom: var(--fc-space-30);
}

.fc-job-requirements + .fc-job-apply {
	margin-top: 0;
}

/* The body and the requirements are both white: one gap between them, not two. */
.fc-job-body + .fc-job-application > .fc-job-requirements:first-child {
	padding-top: 0;
}
