/* up4d Jobs — tokens from the up4d Design System */
.up4dj-listing,
.up4dj-detail,
.up4dj-marquee,
.up4dj-overlay {
	--up4dj-blue: #2196f3;
	--up4dj-blue-hover: #1a7fd4;
	--up4dj-blue-soft: #afddfd;
	--up4dj-text: #606060;
	--up4dj-placeholder: #bebebe;
	--up4dj-border: #dfdfdf;
	--up4dj-bg-gray: #f5f5f5;
	--up4dj-error: #ef4444;
	--up4dj-font: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--up4dj-max: 1140px;
	font-family: var(--up4dj-font);
	color: var(--up4dj-text);
	box-sizing: border-box;
}

.up4dj-listing *,
.up4dj-marquee *,
.up4dj-detail *,
.up4dj-overlay * {
	box-sizing: border-box;
}

/*
 * Theme reset. hello-elementor + Elementor kits style bare `button`/`a` with
 * selectors that outrank single-class plugin rules, which painted boxes around
 * the tabs and underlined the card CTA. Neutralise those properties here, then
 * re-apply the few the design actually wants further down — also with
 * !important, so the order of the theme's stylesheet cannot flip the result.
 */
.up4dj-listing .up4dj-tab,
.up4dj-listing .up4dj-btn,
.up4dj-detail .up4dj-btn,
.up4dj-overlay .up4dj-btn,
.up4dj-overlay .up4dj-modal__close {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	/* Elementor kits set button radius to 3px; the design wants 8px. */
	border-radius: 8px !important;
	border: 0 none !important;
	background: none !important;
	background-image: none !important;
	box-shadow: none !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: normal;
	font-family: var(--up4dj-font);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.up4dj-listing .up4dj-tab:hover,
.up4dj-listing .up4dj-btn:hover,
.up4dj-detail .up4dj-btn:hover,
.up4dj-overlay .up4dj-btn:hover,
.up4dj-listing .up4dj-btn:focus,
.up4dj-detail .up4dj-btn:focus,
.up4dj-overlay .up4dj-btn:focus {
	text-decoration: none !important;
}

.up4dj-icon {
	display: block;
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
}

.up4dj-rule {
	width: 100%;
	height: 0;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--up4dj-border);
}

/* ---------- Buttons ---------- */
.up4dj-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 8px 24px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	color: var(--up4dj-text);
}

/* Figma draws these buttons with no fill, so hover only recolours text + icon. */
.up4dj-listing .up4dj-btn--ghost:hover,
.up4dj-listing .up4dj-btn--ghost:focus-visible,
.up4dj-detail .up4dj-btn--ghost:hover,
.up4dj-detail .up4dj-btn--ghost:focus-visible {
	color: var(--up4dj-blue);
}

.up4dj-detail .up4dj-btn--outline {
	min-height: 56px;
	padding: 8px 30px 8px 36px;
	border: 1.5px solid var(--up4dj-text) !important;
}

.up4dj-detail .up4dj-btn--outline:hover,
.up4dj-detail .up4dj-btn--outline:focus-visible {
	border-color: var(--up4dj-blue) !important;
	color: var(--up4dj-blue);
}

.up4dj-detail .up4dj-btn--filled,
.up4dj-overlay .up4dj-btn--filled {
	min-height: 56px;
	padding: 8px 24px 8px 36px;
	background: var(--up4dj-blue) !important;
	color: #fff;
	display: flex;
}

.up4dj-detail .up4dj-btn--filled:hover:not(:disabled),
.up4dj-detail .up4dj-btn--filled:focus-visible:not(:disabled),
.up4dj-overlay .up4dj-btn--filled:hover:not(:disabled),
.up4dj-overlay .up4dj-btn--filled:focus-visible:not(:disabled) {
	background: var(--up4dj-blue-hover) !important;
}

.up4dj-overlay .up4dj-btn--filled:disabled {
	background: var(--up4dj-bg-gray) !important;
	color: var(--up4dj-placeholder);
	cursor: not-allowed;
}

/* ---------- Listing ---------- */
.up4dj-listing {
	max-width: var(--up4dj-max);
	margin: 0 auto;
}

/* Without the heading block the section starts at the tabs, so drop their top margin. */
.up4dj-listing--no-head .up4dj-tabs {
	margin-top: 0;
}

.up4dj-listing__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	text-align: center;
}

.up4dj-listing__hero svg {
	display: block;
	width: 105px;
	height: 105px;
}

.up4dj-listing__title {
	margin: 0;
	padding: 0;
	font-size: 44px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--up4dj-blue);
}

.up4dj-listing__title span {
	display: inline-flex;
	align-items: center;
	min-height: 60px;
	padding: 8px 20px;
	border-radius: 10px;
	background: var(--up4dj-blue-soft);
}

.up4dj-listing__intro {
	max-width: 1146px;
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
}

/* Tabs — the 1px rule sits under the tab group only, not the full row. */
.up4dj-tabs {
	display: flex;
	width: fit-content;
	max-width: 100%;
	height: 44px;
	margin: 40px auto;
	border-bottom: 1px solid var(--up4dj-border);
}

.up4dj-listing .up4dj-tab {
	border-radius: 0 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 168px;
	padding: 10px 56px;
	border-bottom: 4px solid transparent !important;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--up4dj-text);
	white-space: nowrap;
}

.up4dj-listing .up4dj-tab:hover {
	color: var(--up4dj-blue);
}

.up4dj-listing .up4dj-tab.is-active {
	font-weight: 700;
	color: var(--up4dj-blue);
	border-bottom: 4px solid var(--up4dj-blue) !important;
}

/* Cards */
.up4dj-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	align-items: stretch;
}

.up4dj-card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 16px;
	border: 1px solid var(--up4dj-border);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 17px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.up4dj-card__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
}

.up4dj-tag {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 4px 12px;
	border-radius: 4px;
	background: var(--up4dj-bg-gray);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--up4dj-blue);
}

.up4dj-card__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.up4dj-card__title {
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--up4dj-text);
}

.up4dj-card__excerpt {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.up4dj-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.up4dj-meta__item {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
}

.up4dj-listing .up4dj-card__cta {
	width: 100%;
	gap: 4px;
	padding: 0 36px;
	min-height: 48px;
}

/* Nudge the chevron onto the cap-height centre of the label. */
.up4dj-listing .up4dj-card__cta .up4dj-icon {
	margin-top: 3px;
}

.up4dj-empty,
.up4dj-no-results {
	margin: 40px 0 0;
	text-align: center;
	font-size: 16px;
}

/* ---------- Detail ---------- */
.up4dj-detail {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	max-width: var(--up4dj-max);
	margin: 0 auto;
	padding: 80px 24px;
}

.up4dj-detail__back {
	align-self: flex-start;
}

.up4dj-detail__title {
	margin: 0;
	padding: 0;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--up4dj-text);
	text-align: center;
}

.up4dj-detail__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 36px;
	width: 100%;
	padding: 0 24px;
}

.up4dj-block {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.up4dj-block__title {
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--up4dj-text);
}

.up4dj-block__text {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
}

.up4dj-list {
	margin: 0;
	padding-left: 24px;
	list-style: disc;
}

.up4dj-list li {
	margin-bottom: 8px;
	font-size: 16px;
	line-height: 1.5;
}

.up4dj-list li:last-child {
	margin-bottom: 0;
}

/* ---------- Apply modal ---------- */
body.up4dj-modal-open {
	overflow: hidden;
}

.up4dj-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 20px;
	background: rgba(0, 0, 0, 0.9);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.up4dj-overlay[hidden] {
	display: none;
}

.up4dj-modal {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	max-width: 1080px;
	padding: 36px;
	border-radius: 8px;
	background: #fff;
}

.up4dj-overlay .up4dj-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--up4dj-text);
}

.up4dj-overlay .up4dj-modal__close:hover,
.up4dj-overlay .up4dj-modal__close:focus-visible {
	color: var(--up4dj-blue);
}

.up4dj-modal__close svg {
	display: block;
	width: 40px;
	height: 40px;
}

.up4dj-modal__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.up4dj-modal__title {
	margin: 0;
	padding: 0 20px;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--up4dj-text);
	text-align: center;
}

/* Success state — Figma "EN - submit successfully" */
.up4dj-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	padding: 40px 24px 20px;
	text-align: center;
}

.up4dj-success[hidden] {
	display: none;
}

.up4dj-success__art {
	width: 100%;
	max-width: 441px;
}

.up4dj-success__art svg,
.up4dj-success__art img {
	display: block;
	width: 100%;
	height: auto;
}

.up4dj-success__title {
	margin: 0;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--up4dj-text);
}

.up4dj-success__text {
	margin: 0;
	max-width: 547px;
	font-size: 16px;
	line-height: 1.5;
	color: var(--up4dj-text);
}

.up4dj-form {
	display: flex;
	flex-direction: column;
	gap: 40px;
	padding: 0 24px;
}

.up4dj-form[hidden] {
	display: none;
}

.up4dj-modal__header[hidden] {
	display: none;
}

.up4dj-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.up4dj-fieldset {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
	padding: 0;
	border: 0;
}

.up4dj-fieldset__title {
	padding: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--up4dj-text);
	margin-bottom: 15px;
}

.up4dj-field-row {
	display: flex;
	gap: 20px;
}

.up4dj-field-row .up4dj-field {
	flex: 1 1 0;
	min-width: 0;
}

.up4dj-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}

.up4dj-field label {
	font-size: 16px;
	line-height: 1.5;
	color: var(--up4dj-text);
}

.up4dj-field abbr,
.up4dj-upload abbr {
	color: var(--up4dj-error);
	text-decoration: none;
	border: 0;
	font-weight: 500;
}

.up4dj-form .up4dj-field input,
.up4dj-form .up4dj-field textarea {
	width: 100%;
	padding: 8px;
	border: 1px solid var(--up4dj-border);
	border-radius: 4px;
	background: #fff;
	font-family: var(--up4dj-font);
	font-size: 14px;
	line-height: 1.5;
	color: var(--up4dj-text);
}

.up4dj-form .up4dj-field input {
	height: 40px;
}

.up4dj-form .up4dj-field textarea {
	min-height: 120px;
	resize: vertical;
}

.up4dj-field input::placeholder,
.up4dj-field textarea::placeholder {
	color: var(--up4dj-placeholder);
}

.up4dj-form .up4dj-field input:focus,
.up4dj-form .up4dj-field textarea:focus {
	outline: 2px solid var(--up4dj-blue);
	outline-offset: -1px;
	border-color: var(--up4dj-blue);
}

.up4dj-form .up4dj-field.has-error input,
.up4dj-form .up4dj-field.has-error textarea,
.up4dj-form .up4dj-upload.has-error {
	border-color: var(--up4dj-error);
}

.up4dj-field__error {
	font-size: 14px;
	line-height: 1.5;
	color: var(--up4dj-error);
}

/* Upload */
.up4dj-upload {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 240px;
	padding: 10px;
	border: 1px dashed var(--up4dj-border);
	border-radius: 4px;
	text-align: center;
	cursor: pointer;
	margin-top: 20px;
}

.up4dj-upload:hover,
.up4dj-upload:focus-within {
	border-color: var(--up4dj-blue);
}

.up4dj-upload__icon {
	color: var(--up4dj-border);
}

.up4dj-upload__icon svg {
	display: block;
	width: 67px;
	height: 56px;
}

.up4dj-upload__title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	color: var(--up4dj-text);
}

.up4dj-upload__hint {
	font-size: 14px;
	line-height: 1.5;
	color: var(--up4dj-text);
}

.up4dj-upload__file:not(:empty) {
	padding: 4px 12px;
	border-radius: 4px;
	background: var(--up4dj-bg-gray);
	font-size: 14px;
	font-weight: 700;
	color: var(--up4dj-blue);
	word-break: break-all;
}

.up4dj-upload input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.up4dj-form__status {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	text-align: center;
}

/* Empty it still consumed a 40px flex gap, pushing the submit button down. */
.up4dj-form__status:empty {
	display: none;
}

.up4dj-form__status.is-error {
	color: var(--up4dj-error);
}

.up4dj-form__status.is-success {
	color: var(--up4dj-blue);
	font-weight: 700;
}

/*
 * Figma puts the submit button 44px below the last section (24px to the button
 * wrapper + 20px inside it). The form's 40px row gap already covers most of
 * that, so only 4px of padding is left to add.
 */
.up4dj-form__actions {
	display: flex;
	justify-content: center;
	padding: 4px 20px 0;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.up4dj-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.up4dj-listing .up4dj-tab {
		width: auto;
		flex: 1 1 auto;
		padding: 10px 32px;
	}
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.up4dj-detail {
		padding: 48px 16px;
	}

	.up4dj-listing__head {
		gap: 16px;
	}

	.up4dj-listing__hero svg {
		width: 72px;
		height: 72px;
	}

	.up4dj-listing__title {
		font-size: 28px;
	}

	.up4dj-listing__title span {
		min-height: 0;
		padding: 6px 12px;
	}

	.up4dj-listing__intro {
		font-size: 15px;
		line-height: 22px;
	}

	.up4dj-tabs {
		width: 100%;
		height: auto;
		margin: 32px 0 24px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.up4dj-tabs::-webkit-scrollbar {
		display: none;
	}

	.up4dj-listing .up4dj-tab {
		flex: 0 0 auto;
		width: auto;
		padding: 10px 20px;
	}

	.up4dj-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.up4dj-card__excerpt {
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}

	.up4dj-detail {
		gap: 24px;
	}

	.up4dj-detail__title {
		font-size: 24px;
	}

	.up4dj-detail__body {
		gap: 24px;
		padding: 0;
	}

	.up4dj-detail__apply,
	.up4dj-detail .up4dj-btn--outline {
		width: 100%;
	}

	/* Modal becomes a full-height sheet */
	.up4dj-overlay {
		padding: 0;
		background: rgba(0, 0, 0, 0.95);
	}

	.up4dj-modal {
		min-height: 100%;
		gap: 20px;
		padding: 56px 16px 24px;
		border-radius: 0;
	}

	.up4dj-overlay .up4dj-modal__close {
		top: 8px;
		right: 8px;
		width: 32px;
		height: 32px;
	}

	.up4dj-modal__close svg {
		width: 32px;
		height: 32px;
	}

	.up4dj-modal__title {
		padding: 0;
		font-size: 22px;
	}

	.up4dj-form {
		gap: 28px;
		padding: 0;
	}

	.up4dj-fieldset {
		gap: 16px;
	}

	.up4dj-fieldset__title {
		font-size: 20px;
	}

	.up4dj-field-row {
		flex-direction: column;
		gap: 16px;
	}

	/* <16px makes iOS zoom on focus. */
	.up4dj-form .up4dj-field input {
		height: 44px;
		font-size: 16px;
	}

	.up4dj-form .up4dj-field textarea {
		min-height: 104px;
		font-size: 16px;
	}

	.up4dj-upload {
		min-height: 180px;
	}

	.up4dj-upload__icon svg {
		width: 48px;
		height: 40px;
	}

	.up4dj-upload__title {
		font-size: 15px;
	}

	.up4dj-form__actions {
		padding: 8px 0 0;
	}

	.up4dj-form__actions .up4dj-btn {
		width: 100%;
	}

	.up4dj-success {
		gap: 16px;
		padding: 16px 0 8px;
	}

	.up4dj-success__title {
		font-size: 22px;
	}

	.up4dj-success__text {
		font-size: 15px;
	}
}

/* ---------- All-jobs marquee ([up4d_jobs_marquee]) ---------- */
.up4dj-marquee {
	--up4dj-marquee-gap: 80px;
	--up4dj-marquee-duration: 30s;
	overflow: hidden;
	padding: 18px 0;
	background: var(--up4dj-blue);
}

.up4dj-marquee__track {
	display: flex;
	gap: var(--up4dj-marquee-gap);
	width: max-content;
	animation: up4dj-marquee-scroll var(--up4dj-marquee-duration) linear infinite;
	will-change: transform;
}

/* Hover — and keyboard focus, so a tabbing user can reach the link — freezes it. */
.up4dj-marquee:hover .up4dj-marquee__track,
.up4dj-marquee:focus-within .up4dj-marquee__track {
	animation-play-state: paused;
}

.up4dj-marquee__group,
.up4dj-marquee__item {
	display: flex;
	align-items: center;
	gap: var(--up4dj-marquee-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
}

.up4dj-marquee .up4dj-marquee__link {
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-decoration: none !important;
}

.up4dj-marquee .up4dj-marquee__link:hover,
.up4dj-marquee .up4dj-marquee__link:focus-visible {
	color: #fff;
	text-decoration: underline !important;
}

.up4dj-marquee__sep {
	font-size: 24px;
	color: rgba(255, 255, 255, 0.6);
}

/*
 * The track holds two identical groups, so one group scrolls exactly into the
 * other's place. -50% is half the track, which is short by half the flex gap
 * that sits between the two groups — hence the extra half-gap.
 */
@keyframes up4dj-marquee-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(calc(-50% - var(--up4dj-marquee-gap) / 2));
	}
}

@media (prefers-reduced-motion: reduce) {
	.up4dj-marquee {
		overflow-x: auto;
	}

	.up4dj-marquee__track {
		animation: none;
	}
}

@media (max-width: 767px) {
	.up4dj-marquee {
		--up4dj-marquee-gap: 40px;
		padding: 12px 0;
	}

	.up4dj-marquee .up4dj-marquee__link,
	.up4dj-marquee__sep {
		font-size: 16px;
	}
}
