/**
 * Jobs listing page — premium Recruvion brand (green + maroon)
 */

.jobs-page main {
	--jobs-green: hsl(var(--brand-green));
	--jobs-maroon: hsl(var(--brand-navy));
	--jobs-green-soft: hsl(var(--brand-green) / 0.12);
	--jobs-maroon-soft: hsl(var(--brand-navy) / 0.1);
	--jobs-glass: hsl(0 0% 100% / 0.88);
}

/* —— Hero —— */
.jobs-hero {
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid hsl(var(--border) / 0.6);
	background: linear-gradient(
		165deg,
		hsl(var(--brand-green) / 0.08) 0%,
		hsl(var(--background)) 38%,
		hsl(var(--brand-navy) / 0.06) 100%
	);
}

.jobs-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(at 8% 20%, hsl(var(--brand-green) / 0.22) 0, transparent 42%),
		radial-gradient(at 92% 8%, hsl(var(--brand-navy) / 0.18) 0, transparent 45%),
		radial-gradient(at 70% 95%, hsl(var(--brand-green) / 0.1) 0, transparent 40%);
	pointer-events: none;
}

.jobs-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.35;
	background-image: linear-gradient(
			hsl(var(--brand-navy) / 0.04) 1px,
			transparent 1px
		),
		linear-gradient(90deg, hsl(var(--brand-navy) / 0.04) 1px, transparent 1px);
	background-size: 48px 48px;
	pointer-events: none;
}

.jobs-hero-inner {
	position: relative;
	z-index: 1;
}

.jobs-hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.85rem;
	border-radius: 9999px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--jobs-green);
	background: hsl(var(--brand-green) / 0.12);
	border: 1px solid hsl(var(--brand-green) / 0.25);
	box-shadow: 0 1px 2px hsl(var(--brand-navy) / 0.06);
}

.jobs-hero-badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--jobs-green);
	animation: jobs-pulse-dot 2s ease-in-out infinite;
}

@keyframes jobs-pulse-dot {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(0.85); }
}

.jobs-hero-title {
	letter-spacing: -0.03em;
	line-height: 1.08;
}

.jobs-hero-title-accent {
	background: linear-gradient(
		120deg,
		hsl(var(--brand-green)) 0%,
		hsl(136 48% 32%) 45%,
		hsl(var(--brand-navy)) 100%
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.jobs-hero-lead {
	font-size: 1.0625rem;
	line-height: 1.65;
	max-width: 36rem;
}

.jobs-search-panel {
	position: relative;
	margin-top: 2rem;
	padding: 1.25rem 1.35rem;
	border-radius: 1.25rem;
	background: var(--jobs-glass);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid hsl(var(--border) / 0.8);
	box-shadow:
		0 1px 0 hsl(0 0% 100% / 0.8) inset,
		0 4px 24px -4px hsl(var(--brand-navy) / 0.12),
		0 0 0 1px hsl(var(--brand-green) / 0.06);
}

.jobs-search-panel::before {
	content: "";
	position: absolute;
	top: 0;
	left: 1.5rem;
	right: 1.5rem;
	height: 3px;
	border-radius: 0 0 4px 4px;
	background: linear-gradient(
		90deg,
		hsl(var(--brand-green)),
		hsl(var(--brand-navy))
	);
	opacity: 0.85;
}

.jobs-search-input-wrap {
	position: relative;
}

.jobs-search-input-wrap .jobs-search-icon {
	position: absolute;
	left: 0.85rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1.1rem;
	height: 1.1rem;
	color: hsl(var(--brand-navy) / 0.55);
	pointer-events: none;
}

.jobs-search-input {
	width: 100%;
	height: 2.75rem;
	padding-left: 2.5rem;
	padding-right: 0.75rem;
	border-radius: 0.625rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--background));
	font-size: 0.9375rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jobs-search-input:focus {
	outline: none;
	border-color: hsl(var(--brand-green) / 0.5);
	box-shadow: 0 0 0 3px hsl(var(--brand-green) / 0.15);
}

.jobs-search-submit {
	height: 2.75rem;
	padding: 0 1.75rem;
	border: none;
	border-radius: 0.625rem;
	font-weight: 600;
	font-size: 0.9375rem;
	color: hsl(var(--primary-foreground));
	background: linear-gradient(
		135deg,
		hsl(var(--brand-navy)) 0%,
		hsl(334 62% 30%) 50%,
		hsl(var(--brand-green)) 100%
	);
	background-size: 200% 200%;
	box-shadow: 0 4px 14px -2px hsl(var(--brand-navy) / 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.35s ease;
}

.jobs-search-submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px -4px hsl(var(--brand-navy) / 0.4);
	background-position: 100% 50%;
}

.jobs-hero-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 2.5rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid hsl(var(--border) / 0.5);
}

.jobs-hero-stat strong {
	display: block;
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--jobs-maroon);
	letter-spacing: -0.02em;
}

.jobs-hero-stat span {
	font-size: 0.8125rem;
	color: hsl(var(--muted-foreground));
}

/* —— Main listing area —— */
.jobs-listing-section {
	position: relative;
	background: linear-gradient(
		180deg,
		hsl(var(--secondary) / 0.35) 0%,
		hsl(var(--background)) 120px
	);
}

.jobs-listing-section::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		hsl(var(--brand-green) / 0.35),
		hsl(var(--brand-navy) / 0.35),
		transparent
	);
}

/* Filters left, job cards right */
.jobs-listing-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}

@media (min-width: 768px) {
	.jobs-listing-layout {
		grid-template-columns: 280px minmax(0, 1fr);
		gap: 2.5rem 3rem;
	}

	.jobs-listing-layout .jobs-filters {
		grid-column: 1;
		grid-row: 1;
	}

	.jobs-listing-layout .jobs-results {
		grid-column: 2;
		grid-row: 1;
		min-width: 0;
	}
}

/* —— Sidebar filters —— */
.jobs-filters {
	position: sticky;
	top: 6.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.jobs-filter-card {
	padding: 1.15rem 1.2rem;
	border-radius: 1rem;
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border) / 0.85);
	box-shadow: 0 2px 12px -4px hsl(var(--brand-navy) / 0.08);
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.jobs-filter-card:hover {
	border-color: hsl(var(--brand-green) / 0.2);
	box-shadow: 0 8px 24px -8px hsl(var(--brand-navy) / 0.12);
}

.jobs-filter-card-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.85rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--jobs-maroon);
}

.jobs-filter-card-title svg {
	width: 1rem;
	height: 1rem;
	color: var(--jobs-green);
	flex-shrink: 0;
}

.jobs-filter-option {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.45rem 0.5rem;
	margin: 0 -0.5rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	color: hsl(var(--muted-foreground));
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.jobs-filter-option:hover {
	background: var(--jobs-green-soft);
	color: hsl(var(--foreground));
}

.jobs-filter-option input {
	accent-color: hsl(var(--brand-navy));
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

.jobs-filter-option:has(input:checked) {
	background: linear-gradient(
		90deg,
		hsl(var(--brand-green) / 0.14),
		hsl(var(--brand-navy) / 0.06)
	);
	color: var(--jobs-maroon);
	font-weight: 600;
}

.jobs-filter-locations {
	max-height: 14rem;
	overflow-y: auto;
	padding-right: 0.25rem;
	scrollbar-width: thin;
	scrollbar-color: hsl(var(--brand-green) / 0.35) transparent;
}

.jobs-filter-cta {
	padding: 1.25rem;
	border-radius: 1rem;
	background: linear-gradient(
		145deg,
		hsl(var(--brand-navy)) 0%,
		hsl(334 58% 28%) 55%,
		hsl(var(--brand-green)) 100%
	);
	color: hsl(var(--primary-foreground));
	box-shadow: 0 12px 32px -8px hsl(var(--brand-navy) / 0.45);
}

.jobs-filter-cta h3 {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	color: #fff;
}

.jobs-filter-cta p {
	margin-top: 0.5rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	opacity: 0.92;
}

.jobs-filter-cta a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 1rem;
	width: 100%;
	padding: 0.6rem 1rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	background: hsl(0 0% 100% / 0.95);
	color: var(--jobs-maroon);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jobs-filter-cta a:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px hsl(0 0% 0% / 0.15);
}

/* —— Results toolbar —— */
.jobs-results-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.jobs-results-count {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: hsl(var(--foreground));
}

.jobs-results-count-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	padding: 0.2rem 0.55rem;
	border-radius: 9999px;
	font-size: 0.8125rem;
	font-weight: 700;
	color: hsl(var(--primary-foreground));
	background: linear-gradient(135deg, hsl(var(--brand-green)), hsl(var(--brand-navy)));
	box-shadow: 0 2px 8px hsl(var(--brand-navy) / 0.2);
}

.jobs-results-hint {
	font-size: 0.8125rem;
	color: hsl(var(--muted-foreground));
}

/* —— Job cards —— */
#jobs-grid {
	gap: 1.35rem;
}

.jobs-card-wrap {
	animation: jobs-card-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes jobs-card-enter {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.jobs-card {
	position: relative;
	height: 100%;
	padding: 1.35rem 1.35rem 1.25rem 1.5rem;
	border-radius: 1rem;
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border) / 0.75);
	box-shadow: 0 2px 8px -2px hsl(var(--brand-navy) / 0.06);
	overflow: hidden;
	transition:
		transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.3s ease,
		border-color 0.3s ease;
}

.jobs-card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: linear-gradient(
		180deg,
		hsl(var(--brand-green)),
		hsl(var(--brand-navy))
	);
	opacity: 0.75;
	transition: width 0.25s ease, opacity 0.25s ease;
}

.jobs-card:hover {
	transform: translateY(-4px);
	border-color: hsl(var(--brand-green) / 0.35);
	box-shadow:
		0 12px 28px -8px hsl(var(--brand-navy) / 0.18),
		0 0 0 1px hsl(var(--brand-green) / 0.08);
}

.jobs-card:hover::before {
	width: 5px;
	opacity: 1;
}

.jobs-card-industry {
	display: inline-block;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--jobs-green);
}

.jobs-card-title {
	margin-top: 0.4rem;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.02em;
	transition: color 0.2s ease;
}

.jobs-card-title a {
	color: inherit;
	text-decoration: none;
}

.jobs-card:hover .jobs-card-title a {
	color: var(--jobs-maroon);
}

.jobs-card-desc {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.55;
	color: hsl(var(--muted-foreground));
}

.jobs-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}

.jobs-card-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.3rem 0.65rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 500;
	color: hsl(var(--foreground) / 0.85);
	background: hsl(var(--secondary) / 0.7);
	border: 1px solid hsl(var(--border) / 0.6);
}

.jobs-card-pill svg {
	width: 0.875rem;
	height: 0.875rem;
	color: hsl(var(--brand-navy) / 0.65);
}

.jobs-card-time {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.75rem;
	color: hsl(var(--muted-foreground));
	white-space: nowrap;
}

.jobs-card-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin-top: 1.15rem;
	padding-top: 1rem;
	border-top: 1px solid hsl(var(--border) / 0.5);
}

.jobs-card-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.5rem 1.1rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: hsl(var(--primary-foreground));
	background: var(--jobs-maroon);
	border: 1px solid hsl(var(--brand-navy) / 0.2);
	box-shadow: 0 2px 8px hsl(var(--brand-navy) / 0.2);
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.jobs-card-cta:hover {
	background: linear-gradient(135deg, hsl(var(--brand-navy)), hsl(var(--brand-green)));
	transform: translateX(2px);
	box-shadow: 0 4px 14px hsl(var(--brand-navy) / 0.28);
}

.jobs-card-cta svg {
	width: 1rem;
	height: 1rem;
	transition: transform 0.2s ease;
}

.jobs-card-cta:hover svg {
	transform: translateX(2px);
}

/* —— Empty & alerts —— */
.jobs-alert-error {
	border-radius: 0.875rem;
	border: 1px solid hsl(38 92% 50% / 0.35);
	background: linear-gradient(135deg, hsl(48 96% 96%), hsl(38 92% 94%));
}

.jobs-empty-state {
	padding: 2.5rem 1.5rem;
	text-align: center;
	border-radius: 1rem;
	background: hsl(var(--card));
	border: 1px dashed hsl(var(--brand-navy) / 0.25);
}

.jobs-empty-state p {
	font-size: 0.9375rem;
	color: hsl(var(--muted-foreground));
}

.jobs-empty-state a {
	font-weight: 600;
	color: var(--jobs-maroon);
}

/* —— Pagination —— */
.jobs-pagination-wrap {
	margin-top: 2.5rem;
	padding: 1.15rem 1.25rem;
	border-radius: 1rem;
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border) / 0.8);
	box-shadow: 0 2px 12px -4px hsl(var(--brand-navy) / 0.08);
}

.jobs-pagination-btn {
	min-width: 2.35rem;
	height: 2.35rem;
	border-radius: 0.5rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--background));
	font-weight: 600;
	transition: all 0.2s ease;
}

.jobs-pagination-btn:hover:not(:disabled) {
	border-color: hsl(var(--brand-green) / 0.4);
	background: var(--jobs-green-soft);
	color: var(--jobs-maroon);
}

.jobs-pagination-btn.is-active {
	background: linear-gradient(135deg, hsl(var(--brand-navy)), hsl(334 58% 32%));
	border-color: transparent;
	color: hsl(var(--primary-foreground));
	box-shadow: 0 2px 10px hsl(var(--brand-navy) / 0.25);
}

#jobs-per-page {
	border-radius: 0.5rem;
	border-color: hsl(var(--border));
	font-weight: 500;
}

#jobs-per-page:focus {
	outline: none;
	border-color: hsl(var(--brand-green) / 0.5);
	box-shadow: 0 0 0 2px hsl(var(--brand-green) / 0.15);
}

/* —— Bottom CTA band —— */
.jobs-bottom-cta {
	margin-top: 0;
	padding: 3rem 0 4rem;
	background: linear-gradient(
		135deg,
		hsl(var(--brand-navy) / 0.04) 0%,
		hsl(var(--brand-green) / 0.08) 50%,
		hsl(var(--brand-navy) / 0.05) 100%
	);
	border-top: 1px solid hsl(var(--border) / 0.5);
}

.jobs-bottom-cta-inner {
	text-align: center;
	padding: 2.5rem 2rem;
	border-radius: 1.25rem;
	background: linear-gradient(
		125deg,
		hsl(var(--brand-navy)) 0%,
		hsl(334 55% 28%) 40%,
		hsl(var(--brand-green)) 100%
	);
	color: hsl(var(--primary-foreground));
	box-shadow: 0 20px 50px -16px hsl(var(--brand-navy) / 0.45);
}

.jobs-bottom-cta-inner h2 {
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
}

.jobs-bottom-cta-inner p {
	margin-top: 0.65rem;
	font-size: 0.9375rem;
	opacity: 0.92;
	max-width: 32rem;
	margin-left: auto;
	margin-right: auto;
}

.jobs-bottom-cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	margin-top: 1.5rem;
}

.jobs-bottom-cta-btn-primary {
	padding: 0.65rem 1.5rem;
	border-radius: 0.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
	background: hsl(0 0% 100%);
	color: var(--jobs-maroon);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jobs-bottom-cta-btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px hsl(0 0% 0% / 0.2);
}

.jobs-bottom-cta-btn-secondary {
	padding: 0.65rem 1.5rem;
	border-radius: 0.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
	border: 1px solid hsl(0 0% 100% / 0.45);
	color: inherit;
	background: hsl(0 0% 100% / 0.1);
	transition: background 0.2s ease;
}

.jobs-bottom-cta-btn-secondary:hover {
	background: hsl(0 0% 100% / 0.2);
}

.job-filter-hidden,
.job-page-hidden {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.jobs-card-wrap,
	.jobs-hero-badge-dot {
		animation: none;
	}
	.jobs-card:hover,
	.jobs-search-submit:hover,
	.jobs-card-cta:hover {
		transform: none;
	}
}

@media (max-width: 767.98px) {
	.jobs-filters {
		position: static;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
		gap: 0.75rem;
	}
	.jobs-filter-cta {
		grid-column: 1 / -1;
	}
}
