/*
 * JobSpot Jobs – Frontend (mobile-first).
 * Eigenes, in sich geschlossenes Design-System (Navy-Branding der Seite),
 * das Theme-Schriften erbt und nur die Job-Flaechen gestaltet.
 */

.jobspot-archive,
.jobspot-single {
	--js-navy: #0b2545;
	--js-navy-700: #13315c;
	--js-accent: #fca311;
	--js-ink: #1a2533;
	--js-muted: #5b6b7d;
	--js-border: #e3e8ef;
	--js-bg-soft: #f6f8fb;
	--js-card: #ffffff;
	--js-radius: 14px;
	--js-radius-sm: 9px;
	--js-shadow: 0 1px 2px rgba(11, 37, 69, 0.06), 0 6px 20px rgba(11, 37, 69, 0.07);
	--js-shadow-hover: 0 4px 10px rgba(11, 37, 69, 0.10), 0 16px 40px rgba(11, 37, 69, 0.14);

	/* An die Inhaltsbreite des Themes (~1240px) angeglichen, damit die
	   Job-Seiten nicht schmaler wirken als der Rest der Seite. */
	max-width: 1240px;
	margin: 0 auto;
	padding: 1.25rem 1rem 4rem;
	color: var(--js-ink);
}

/* Lesbare Zeilenlaenge fuer den Beschreibungstext auf der breiten Single-Seite. */
.jobspot-job__content {
	max-width: 72ch;
}

.jobspot-archive *,
.jobspot-single * {
	box-sizing: border-box;
}

/* ---------- Hero ---------- */
.jobspot-hero {
	background: linear-gradient(135deg, var(--js-navy) 0%, var(--js-navy-700) 100%);
	color: #fff;
	border-radius: var(--js-radius);
	padding: 2rem 1.5rem;
	margin-bottom: 1.5rem;
}

.jobspot-hero__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	line-height: 1.15;
	color: #fff;
}

.jobspot-hero__lead {
	margin: 0;
	font-size: 1.05rem;
	opacity: 0.92;
	max-width: 60ch;
}

.jobspot-hero__count {
	display: inline-block;
	margin-top: 1rem;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	font-size: 0.9rem;
	font-weight: 600;
}

.jobspot-hero__count strong {
	color: var(--js-accent);
}

/* ---------- Filter ---------- */
.jobspot-filter {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.85rem;
	margin-bottom: 1.75rem;
	padding: 1.1rem;
	background: var(--js-bg-soft);
	border: 1px solid var(--js-border);
	border-radius: var(--js-radius);
}

.jobspot-filter__field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--js-muted);
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.jobspot-filter select,
.jobspot-filter input[type="search"] {
	min-height: 46px;
	padding: 0 0.7rem;
	font-size: 1rem;
	font-weight: 400;
	color: var(--js-ink);
	background: #fff;
	border: 1px solid var(--js-border);
	border-radius: var(--js-radius-sm);
	text-transform: none;
	letter-spacing: 0;
}

.jobspot-filter select:focus,
.jobspot-filter input[type="search"]:focus {
	outline: 2px solid var(--js-navy);
	outline-offset: 1px;
	border-color: var(--js-navy);
}

.jobspot-filter__remote {
	flex-direction: row;
	align-items: center;
	gap: 0.5rem;
	text-transform: none;
	letter-spacing: 0;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--js-ink);
}

.jobspot-filter__remote input {
	width: 20px;
	height: 20px;
	accent-color: var(--js-navy);
}

.jobspot-filter button {
	min-height: 46px;
	padding: 0 1.5rem;
	border: 0;
	border-radius: var(--js-radius-sm);
	background: var(--js-navy);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.jobspot-filter button:hover {
	background: var(--js-navy-700);
}

.jobspot-filter button:focus-visible {
	outline: 2px solid var(--js-accent);
	outline-offset: 2px;
}

/* ---------- Job-Liste ---------- */
.jobspot-joblist {
	display: grid;
	gap: 1rem;
}

.jobspot-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 1.25rem 1.4rem;
	background: var(--js-card);
	border: 1px solid var(--js-border);
	border-radius: var(--js-radius);
	box-shadow: var(--js-shadow);
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.jobspot-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--js-shadow-hover);
	border-color: #cdd6e3;
}

.jobspot-card__title {
	margin: 0 0 0.35rem;
	font-size: 1.2rem;
	line-height: 1.3;
}

.jobspot-card__title a {
	color: var(--js-navy);
	text-decoration: none;
}

/* Ganze Karte klickbar ueber den Titel-Link */
.jobspot-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.jobspot-card:hover .jobspot-card__title a {
	color: var(--js-navy-700);
	text-decoration: underline;
}

.jobspot-card__company {
	margin: 0 0 0.6rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--js-muted);
}

.jobspot-card__meta,
.jobspot-job__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0 0 0.7rem;
	padding: 0;
	list-style: none;
	font-size: 0.85rem;
}

.jobspot-card__meta li,
.jobspot-job__meta li {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: var(--js-bg-soft);
	color: var(--js-muted);
	font-weight: 500;
}

.jobspot-card__salary,
.jobspot-job__salary {
	background: rgba(252, 163, 17, 0.14) !important;
	color: #8a5a00 !important;
	font-weight: 700 !important;
}

.jobspot-card__type a,
.jobspot-job__type a {
	color: inherit;
	text-decoration: none;
}

.jobspot-badge--remote {
	background: rgba(11, 37, 69, 0.08) !important;
	color: var(--js-navy) !important;
	font-weight: 700 !important;
}

.jobspot-card__excerpt {
	margin: 0 0 0.9rem;
	color: var(--js-muted);
	font-size: 0.95rem;
	line-height: 1.55;
}

.jobspot-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: auto;
}

.jobspot-card__date {
	font-size: 0.8rem;
	color: var(--js-muted);
}

.jobspot-card__link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--js-navy);
	text-decoration: none;
}

.jobspot-card__link::after {
	content: "\2192";
	transition: transform 0.15s ease;
}

.jobspot-card:hover .jobspot-card__link::after {
	transform: translateX(3px);
}

/* ---------- Empty-State ---------- */
.jobspot-empty {
	text-align: center;
	padding: 3rem 1.5rem;
	background: var(--js-bg-soft);
	border: 1px dashed var(--js-border);
	border-radius: var(--js-radius);
}

.jobspot-empty__title {
	margin: 0 0 0.5rem;
	font-size: 1.3rem;
	color: var(--js-navy);
}

.jobspot-empty__text {
	margin: 0 0 1.4rem;
	color: var(--js-muted);
}

.jobspot-empty__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: center;
}

/* ---------- Buttons ---------- */
.jobspot-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0.6rem 1.5rem;
	border-radius: var(--js-radius-sm);
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.jobspot-btn--primary {
	background: var(--js-navy);
	color: #fff;
}

.jobspot-btn--primary:hover {
	background: var(--js-navy-700);
}

.jobspot-btn--ghost {
	background: transparent;
	color: var(--js-navy);
	border: 1px solid var(--js-navy);
}

.jobspot-btn--ghost:hover {
	background: var(--js-navy);
	color: #fff;
}

/* ---------- Pagination ---------- */
.jobspot-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	justify-content: center;
	margin-top: 2rem;
}

.jobspot-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.6rem;
	border: 1px solid var(--js-border);
	border-radius: var(--js-radius-sm);
	color: var(--js-navy);
	text-decoration: none;
	font-weight: 600;
}

.jobspot-pagination .page-numbers.current {
	background: var(--js-navy);
	color: #fff;
	border-color: var(--js-navy);
}

.jobspot-pagination a.page-numbers:hover {
	background: var(--js-bg-soft);
}

/* ---------- Einzelansicht ---------- */
.jobspot-job__header {
	padding-bottom: 1.25rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--js-border);
}

.jobspot-job__title {
	margin: 0 0 0.4rem;
	font-size: clamp(1.5rem, 3.5vw, 2.1rem);
	line-height: 1.2;
	color: var(--js-navy);
}

.jobspot-job__company {
	margin: 0 0 0.8rem;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--js-muted);
}

.jobspot-job__company a {
	color: var(--js-navy);
}

.jobspot-job__expired {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.8rem 1.1rem;
	margin-bottom: 1.5rem;
	background: #fff4e5;
	border: 1px solid #ffd9a8;
	border-radius: var(--js-radius-sm);
	color: #8a5a00;
	font-weight: 600;
}

.jobspot-job__content {
	font-size: 1.02rem;
	line-height: 1.7;
}

.jobspot-job__content h2,
.jobspot-job__content h3 {
	color: var(--js-navy);
	margin-top: 1.6rem;
}

.jobspot-job__apply {
	margin-top: 2rem;
	padding: 1.5rem;
	background: var(--js-bg-soft);
	border: 1px solid var(--js-border);
	border-radius: var(--js-radius);
}

.jobspot-job__apply h2 {
	margin: 0 0 1rem;
	color: var(--js-navy);
}

.jobspot-apply-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.7rem 1.8rem;
	border-radius: var(--js-radius-sm);
	background: var(--js-navy);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.jobspot-apply-button:hover {
	background: var(--js-navy-700);
}

/* Sticky-Bewerben-Button (mobile) */
.jobspot-sticky-apply {
	position: fixed;
	left: 1rem;
	right: 1rem;
	bottom: 1rem;
	z-index: 50;
	text-align: center;
	padding: 0.95rem;
	border-radius: var(--js-radius-sm);
	background: var(--js-accent);
	color: var(--js-navy);
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* ---------- Fokus / Bewegung ---------- */
.jobspot-archive a:focus-visible,
.jobspot-single a:focus-visible {
	outline: 2px solid var(--js-accent);
	outline-offset: 2px;
	border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.jobspot-card,
	.jobspot-card__link::after,
	.jobspot-btn {
		transition: none;
	}
}

/* ---------- Ab Tablet ---------- */
@media (min-width: 720px) {
	.jobspot-filter {
		grid-template-columns: 2fr 1fr 1fr 1fr;
		align-items: end;
	}

	.jobspot-filter__search {
		grid-column: 1 / -1;
	}

	.jobspot-filter__remote,
	.jobspot-filter button {
		align-self: center;
	}

	.jobspot-joblist {
		grid-template-columns: 1fr 1fr;
		gap: 1.25rem;
	}

	.jobspot-sticky-apply {
		display: none;
	}
}

@media (min-width: 1000px) {
	.jobspot-joblist {
		grid-template-columns: 1fr 1fr 1fr;
	}
}
