/* CogniaLaw HiBob Careers — front-end styles
 *
 * All typography rules are scoped under .clhb-job-listings or .clhb-job-detail-page
 * so they win over theme h1/h2/h3/p/a defaults via specificity, without needing
 * !important everywhere.
 */

/* Force Nunito on everything inside our containers, including buttons and
   links (which don't inherit font-family by default). */
.clhb-job-listings,
.clhb-job-listings *,
.clhb-job-detail-page,
.clhb-job-detail-page * {
	font-family: 'Nunito', sans-serif;
}

/* ── Job listings grid ──────────────────────────────────────────────────── */
.clhb-job-listings {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin: 32px 0 56px;
	font-weight: 400;
}

.clhb-job-listings .clhb-job-card {
	background: #ffffff;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	padding: 24px 22px 22px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: relative;
	overflow: hidden;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.clhb-job-listings .clhb-job-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: #b4d83a;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.3s ease;
}

.clhb-job-listings .clhb-job-card:hover {
	border-color: #b4d83a;
	box-shadow: 0 10px 24px rgba(10, 35, 62, 0.12);
	transform: translateY(-3px);
}

.clhb-job-listings .clhb-job-card:hover::before {
	transform: scaleX(1);
}

.clhb-job-listings .clhb-job-card-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.clhb-job-listings .clhb-job-department {
	margin: 0;
	padding: 0;
	font-weight: 700;
	font-size: 0.7rem;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6eab00;
	display: inline-block;
}

.clhb-job-listings .clhb-job-card .clhb-job-title {
	margin: 0;
	padding: 0;
	font-weight: 700;
	font-size: 1.15rem;
	color: #0a233e;
	line-height: 1.3;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	overflow-wrap: break-word;
	word-break: break-word;
	hyphens: auto;
}

.clhb-job-listings .clhb-job-excerpt {
	margin: 0;
	padding: 0;
	font-weight: 400;
	font-size: 0.85rem;
	color: #555555;
	line-height: 1.55;
	text-align: left;
	flex: 1;
}

.clhb-job-listings .clhb-apply-card-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: auto;
	background: #b4d83a;
	color: #0a233e !important;
	padding: 11px 18px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 0.85rem;
	line-height: 1.2;
	text-decoration: none !important;
	text-align: center;
	text-transform: none;
	letter-spacing: 0.02em;
	transition: background 0.2s ease, color 0.2s ease;
}

.clhb-job-listings .clhb-apply-card-btn .clhb-apply-arrow {
	display: inline-block;
	transition: transform 0.2s ease;
}

.clhb-job-listings .clhb-apply-card-btn:hover {
	background: #0a233e;
	color: #ffffff !important;
}

.clhb-job-listings .clhb-apply-card-btn:hover .clhb-apply-arrow {
	transform: translateX(4px);
}

.clhb-notice {
	font-family: 'Nunito', sans-serif;
	font-weight: 400;
	text-align: center;
	padding: 40px 24px;
	color: #ffffff;
}

/* ── Job detail page ────────────────────────────────────────────────────── */
.clhb-job-detail-page {
	padding: 60px 24px 80px;
	max-width: 860px;
	margin: 0 auto;
	font-weight: 400;
}

.clhb-job-detail-page .clhb-job-detail-inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.clhb-job-detail-page .clhb-job-title {
	font-size: 2.25rem;
	font-weight: 700;
	color: #0a233e;
	margin: 0;
	padding: 0;
	line-height: 1.2;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
}

.clhb-job-detail-page .clhb-job-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.clhb-job-detail-page .clhb-job-meta span {
	background: #f3f6e8;
	color: #0a233e;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 700;
}

.clhb-job-detail-page .clhb-job-description {
	line-height: 1.75;
	color: #333;
	font-size: 1rem;
}

.clhb-job-detail-page .clhb-job-description h2,
.clhb-job-detail-page .clhb-job-description h3 {
	color: #0a233e;
	margin-top: 1.5em;
}

.clhb-job-detail-page .clhb-apply-btn {
	display: inline-block;
	background: #b4d83a;
	color: #0a233e !important;
	padding: 13px 30px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none !important;
	text-transform: none;
	transition: background 0.2s ease, color 0.2s ease;
	align-self: flex-start;
}

.clhb-job-detail-page .clhb-apply-btn:hover {
	background: #0a233e;
	color: #ffffff !important;
}

.clhb-job-detail-page .clhb-apply-btn--bottom {
	margin-top: 8px;
}

.clhb-job-detail-page .clhb-back-link {
	padding-bottom: 20px;
	margin: 0;
}

.clhb-job-detail-page .clhb-back-link a {
	color: #6eab00;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 700;
}

.clhb-job-detail-page .clhb-back-link a:hover {
	color: #0a233e;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

/* Large tablet / small desktop: 3 columns */
@media (max-width: 1200px) {
	.clhb-job-listings {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Tablet: 2 columns */
@media (max-width: 860px) {
	.clhb-job-listings {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
		margin: 24px 0 40px;
	}

	.clhb-job-listings .clhb-job-card {
		padding: 22px 20px 20px;
	}
}

/* Large phone / small tablet: single column */
@media (max-width: 640px) {
	.clhb-job-listings {
		grid-template-columns: 1fr;
		gap: 14px;
		margin: 20px 0 36px;
	}

	.clhb-job-listings .clhb-job-card {
		padding: 22px 20px 20px;
		gap: 14px;
	}

	.clhb-job-listings .clhb-job-card .clhb-job-title {
		font-size: 1.2rem;
		line-height: 1.35;
	}

	.clhb-job-listings .clhb-job-excerpt {
		font-size: 0.9rem;
		line-height: 1.6;
	}

	.clhb-job-listings .clhb-job-department {
		font-size: 0.72rem;
	}

	.clhb-job-listings .clhb-apply-card-btn {
		padding: 13px 20px;
		font-size: 0.9rem;
		min-height: 44px;
	}

	/* Job detail page */
	.clhb-job-detail-page {
		padding: 32px 16px 60px;
	}

	.clhb-job-detail-page .clhb-job-title {
		font-size: 1.7rem;
		line-height: 1.25;
	}

	.clhb-job-detail-page .clhb-job-meta {
		gap: 8px;
	}

	.clhb-job-detail-page .clhb-job-meta span {
		font-size: 0.8rem;
		padding: 5px 10px;
	}

	.clhb-job-detail-page .clhb-apply-btn {
		display: block;
		text-align: center;
		width: 100%;
		padding: 14px 24px;
		min-height: 44px;
		align-self: stretch;
		box-sizing: border-box;
	}

	.clhb-job-detail-page .clhb-job-description {
		font-size: 0.95rem;
		line-height: 1.7;
	}
}

/* Small phones (iPhone SE etc.) */
@media (max-width: 380px) {
	.clhb-job-listings .clhb-job-card {
		padding: 20px 16px 18px;
	}

	.clhb-job-listings .clhb-job-card .clhb-job-title {
		font-size: 1.1rem;
	}

	.clhb-job-detail-page {
		padding: 24px 14px 48px;
	}

	.clhb-job-detail-page .clhb-job-title {
		font-size: 1.45rem;
	}
}

/* Disable hover transforms on touch devices */
@media (hover: none) {
	.clhb-job-listings .clhb-job-card:hover {
		transform: none;
		box-shadow: none;
		border-color: #e6e6e6;
	}

	.clhb-job-listings .clhb-job-card:hover::before {
		transform: scaleX(0);
	}

	.clhb-job-listings .clhb-apply-card-btn:hover {
		background: #b4d83a;
		color: #0a233e !important;
	}

	.clhb-job-listings .clhb-apply-card-btn:hover .clhb-apply-arrow {
		transform: none;
	}

	.clhb-job-detail-page .clhb-apply-btn:hover {
		background: #b4d83a;
		color: #0a233e !important;
	}

	.clhb-job-listings .clhb-job-card:active {
		transform: scale(0.99);
		border-color: #b4d83a;
		transition: transform 0.1s ease, border-color 0.1s ease;
	}

	.clhb-job-listings .clhb-apply-card-btn:active,
	.clhb-job-detail-page .clhb-apply-btn:active {
		background: #0a233e;
		color: #ffffff !important;
		transition: background 0.1s ease, color 0.1s ease;
	}
}