/* ==========================================================================
   AFP Job Board  [afp_jobs]  (salient-child)

   Matches https://www.theafp.co.uk/job-board/ — values taken from the old
   theme's style.css / custom-designer.css (#afp_jobs, .job__title
   .fleet-directory-mng, .page-id-8430 .wpjb-*). Everything is scoped
   under .afp-jobs.

   Tip: the live page sits on a #f9f9f9 band with 120px top/bottom padding.
   Set that on the WPBakery row (Background colour + padding) for the same
   look.
   ========================================================================== */

.afp-jobs {
	--afp-jobs-green: #0eb495;
	--afp-jobs-purple: #8e68a6;
	--afp-jobs-purple-hover: #57b197;
	--afp-jobs-text: #3c4547;
	--afp-jobs-line: #eee;

	width: 100%;
	color: var(--afp-jobs-text);
	font-family: "Poppins", sans-serif;
	font-size: 15px;
	line-height: 1.5;
}

.afp-jobs *,
.afp-jobs *::before,
.afp-jobs *::after {
	box-sizing: border-box;
}

/* Two columns: list (1/3) + details (2/3), like col-md-4 / col-md-8. */
.afp-jobs__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	align-items: start;
	gap: 24px;
}

/* ------------------------------------------------------------- job list */
.afp-jobs__list {
	display: grid;
	row-gap: 15px;
}

.afp-jobs .afp-jobs__item {
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 5px;
	border: 2px solid var(--afp-jobs-line);
	border-radius: 0 !important; /* Salient's "rounded" button style forces 200px !important on every <button> */
	background: transparent;
	box-shadow: none;
	color: var(--afp-jobs-text);
	font: inherit;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	cursor: pointer;
	transition: border-color 0.3s ease;
}

.afp-jobs .afp-jobs__item:hover,
.afp-jobs .afp-jobs__item.is-active {
	border-color: var(--afp-jobs-green);
	background: transparent;
	color: var(--afp-jobs-text);
}

.afp-jobs .afp-jobs__item:focus-visible {
	outline: 2px solid var(--afp-jobs-green);
	outline-offset: 3px;
}

.afp-jobs__item-logo {
	display: block;
	padding-top: 22px;
}

.afp-jobs .afp-jobs__item-logo img {
	display: block;
	width: 65%;
	height: 205px;
	margin: 0 auto 10px;
	padding: 0;
	border-radius: 0;
	object-fit: contain;
}

.afp-jobs__item-text {
	display: block;
	padding: 20px;
}

.afp-jobs__item-title {
	display: block;
	color: var(--afp-jobs-green);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.5;
}

.afp-jobs__item-sub {
	display: block;
	padding-top: 3px;
	color: var(--afp-jobs-text);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
}

/* --------------------------------------------------------- job details */
.afp-jobs__details {
	min-width: 0;
	margin-bottom: 2rem;
	padding: 30px;
	border: 2px solid var(--afp-jobs-line);
}

.afp-jobs__panel[hidden] {
	display: none !important;
}

.afp-jobs__panel:focus {
	outline: none;
}

/* Company logo top-right, as on the live site. */
.afp-jobs__body {
	background-repeat: no-repeat;
	background-position: right top;
	background-size: 175px auto;
}

.afp-jobs .afp-jobs__title {
	max-width: 60%;
	margin: 10px 0 15px;
	padding: 0;
	color: var(--afp-jobs-green);
	font-family: "Poppins", sans-serif;
	font-size: 24px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
}

.afp-jobs__body:not(.has-logo) .afp-jobs__title {
	max-width: none;
}

.afp-jobs__company {
	display: block;
	margin-bottom: 5px;
	font-size: 23px;
	font-weight: 500;
	line-height: 1.5;
}

/* "Location: Remote" rows — bold label, regular value. */
.afp-jobs__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 8px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.5;
}

.afp-jobs__meta-value {
	font-size: 17px;
	font-weight: 500;
	line-height: 1.5;
}

.afp-jobs__meta--closing {
	margin-bottom: 32px;
}

.afp-jobs__meta--closing .afp-jobs__meta-value {
	border-bottom: 3px double #00f;
	line-height: 22px;
}

/* Post content (the job description). */
.afp-jobs__content {
	font-size: 15px;
	line-height: 1.5;
}

.afp-jobs__content > *:last-child {
	margin-bottom: 0;
}

.afp-jobs .afp-jobs__content p {
	margin: 0 0 15px;
	padding: 0;
	color: var(--afp-jobs-text);
	font-size: 15px;
	line-height: 1.5;
}

.afp-jobs .afp-jobs__content h4 {
	margin: 0 0 30px;
	padding: 0 0 30px;
	border-bottom: 2px solid var(--afp-jobs-line);
	color: #000;
	font-family: "Poppins", sans-serif;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
}

.afp-jobs .afp-jobs__content h1,
.afp-jobs .afp-jobs__content h2,
.afp-jobs .afp-jobs__content h3,
.afp-jobs .afp-jobs__content h5,
.afp-jobs .afp-jobs__content h6,
.afp-jobs .afp-jobs__section h6 {
	margin: 0 0 15px;
	color: var(--afp-jobs-text);
	font-family: "Poppins", sans-serif;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}

.afp-jobs .afp-jobs__content h6,
.afp-jobs .afp-jobs__section h6 {
	font-size: 20px;
	font-weight: 500;
}

.afp-jobs .afp-jobs__content ul,
.afp-jobs .afp-jobs__content ol,
.afp-jobs .afp-jobs__section ul,
.afp-jobs .afp-jobs__section ol {
	display: grid;
	row-gap: 7px;
	margin: 0 0 15px;
	padding: 0 0 0 22px;
}

.afp-jobs .afp-jobs__content ul li,
.afp-jobs .afp-jobs__section ul li {
	margin: 0;
	padding: 0;
	list-style: disc outside;
}

.afp-jobs .afp-jobs__content ol li,
.afp-jobs .afp-jobs__section ol li {
	margin: 0;
	padding: 0;
	list-style: decimal outside;
}

.afp-jobs .afp-jobs__content a,
.afp-jobs .afp-jobs__section a {
	color: var(--afp-jobs-purple);
	word-break: break-word;
}

.afp-jobs .afp-jobs__content strong,
.afp-jobs .afp-jobs__content b {
	font-weight: 700;
}

.afp-jobs .afp-jobs__content em {
	font-style: italic;
}

.afp-jobs .afp-jobs__content img {
	max-width: 100%;
	height: auto;
}

/* ACF "Job details" repeater rows. */
.afp-jobs__section {
	margin-top: 10px;
}

.afp-jobs .afp-jobs__hr {
	height: 0;
	margin: 20px 0;
	border: 0;
	border-top: 1px solid #ccc;
	background: none;
}

/* Apply button (old .cmn-btn). */
.afp-jobs .afp-jobs__apply {
	display: inline-block;
	margin-top: 15px;
	padding: 12px 30px 11px;
	border: 0;
	border-radius: 50px;
	background-color: var(--afp-jobs-purple);
	color: #fff;
	font-family: "Poppins", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.5s ease;
}

.afp-jobs .afp-jobs__apply:hover,
.afp-jobs .afp-jobs__apply:focus-visible {
	background-color: var(--afp-jobs-purple-hover);
	color: #fff;
}

/* No open jobs. */
.afp-jobs .afp-jobs__empty {
	margin: 0;
	color: #4c5455;
	font-family: "Poppins", sans-serif;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.7;
}

.afp-jobs .afp-jobs__empty a {
	color: var(--afp-jobs-purple);
}

/* ----------------------------------------------------------- responsive */
@media (max-width: 991px) {
	.afp-jobs .afp-jobs__apply {
		padding: 10px 25px;
		font-size: 12px;
	}
}

/* Stack: job list first, then the selected job (as on the live site). */
@media (max-width: 767px) {
	.afp-jobs__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 30px;
	}

	.afp-jobs .afp-jobs__item {
		padding: 10px;
		text-align: center;
	}

	.afp-jobs .afp-jobs__item-logo {
		padding-top: 0;
	}

	.afp-jobs .afp-jobs__item-logo img {
		width: auto;
		max-width: 100%;
		height: auto;
		max-height: 205px;
		margin: 25px auto 10px;
	}

	.afp-jobs__details {
		padding: 10px;
	}

	.afp-jobs__body.has-logo {
		padding-top: 145px;
		background-position: center top;
	}

	.afp-jobs .afp-jobs__title {
		width: 100%;
		max-width: none;
		font-size: 18px;
	}

	.afp-jobs__company {
		font-size: 20px;
	}

	.afp-jobs__meta {
		margin-bottom: 6px;
		column-gap: 15px;
		font-size: 15px;
	}

	.afp-jobs__meta-value {
		font-size: 14px;
	}

	.afp-jobs__meta--closing {
		margin-bottom: 30px;
	}

	.afp-jobs .afp-jobs__content p,
	.afp-jobs .afp-jobs__content li {
		font-size: 14px;
	}

	.afp-jobs .afp-jobs__content strong {
		font-size: 14px;
	}
}

@media (max-width: 575px) {
	.afp-jobs .afp-jobs__content h4 {
		margin-bottom: 20px;
		padding-bottom: 20px;
		font-size: 25px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.afp-jobs .afp-jobs__item,
	.afp-jobs .afp-jobs__apply {
		transition: none;
	}
}
