/**
 * DeiraJobs Featured Job — Dedicated stylesheet
 *
 * Specificity intentionally kept low (.class = 0,1,0) so that Elementor
 * controls ({{WRAPPER}} .class = 0,2,0) always override it. Colors below are
 * fallbacks only: every one of them is exposed in the widget's Style tab.
 */

/* ──────────────────────────────────────────
   WRAPPER & TOKENS
────────────────────────────────────────── */
.deira-featured-job {
	--dfj-logo-size: 64px;
	position: relative;
	box-sizing: border-box;
}

.deira-featured-job *,
.deira-featured-job *::before,
.deira-featured-job *::after {
	box-sizing: border-box;
}

.deira-featured-job .djb-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.deira-featured-job .djb-ico {
	flex-shrink: 0;
	width: 1.1em;
	height: 1.1em;
}

.deira-featured-job :is(a, button):focus-visible {
	outline: 2px solid #e9c46a;
	outline-offset: 3px;
}

/* ──────────────────────────────────────────
   SECTION HEADER
────────────────────────────────────────── */
.dfj-header { margin-bottom: 28px; }
.dfj-header__title { margin: 0 0 8px; color: #0f172a; }
.dfj-header__subtitle { margin: 0; color: #6b7280; }

/* ──────────────────────────────────────────
   GRID (spotlight & grid layouts)
────────────────────────────────────────── */
.dfj-grid {
	--dfj-columns: 2;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

.dfj-layout-grid .dfj-grid {
	grid-template-columns: repeat(var(--dfj-columns), minmax(0, 1fr));
}

/* ──────────────────────────────────────────
   CARD
────────────────────────────────────────── */
.dfj-card {
	--dfj-lift: -4px;
	--dfj-glow: rgba(173, 136, 30, .28);
	--dfj-glow-size: 420px;
	--dfj-x: 85%;
	--dfj-y: 0%;
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	color: #ffffff;
	/* Plain color only: a background-image here would hide the color picked in
	   the "Classic" background mode (the gradient comes from the control) */
	background-color: #0f172a;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 20px;
	isolation: isolate;
	transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.dfj-card:hover,
.dfj-card:focus-within {
	transform: translateY(var(--dfj-lift));
}

/* Pointer glow (position driven by JS, static highlight otherwise) */
.dfj-glow {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: radial-gradient(var(--dfj-glow-size) circle at var(--dfj-x) var(--dfj-y), var(--dfj-glow), transparent 65%);
	opacity: .75;
	transition: opacity .3s ease;
}

.dfj-card:hover .dfj-glow { opacity: 1; }

.dfj-main,
.dfj-side {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.dfj-main {
	flex: 1 1 auto;
	padding: 32px;
}

.dfj-side {
	--dfj-divider-w: 1px;
	justify-content: center;
	padding: 28px 32px;
	background-color: rgba(255, 255, 255, .04);
	border: 0 solid rgba(255, 255, 255, .08);
	border-top-width: var(--dfj-divider-w);
}

/* Spotlight: side panel on the right (desktop & tablet) */
@media (min-width: 768px) {
	.dfj-layout-spotlight .dfj-card {
		flex-direction: row;
	}

	.dfj-layout-spotlight .dfj-side {
		flex: 0 0 clamp(240px, 32%, 340px);
		border-top-width: 0;
		border-left-width: var(--dfj-divider-w);
	}

	.dfj-layout-spotlight .dfj-actions { flex-direction: column; }
	.dfj-layout-spotlight .dfj-btn { width: 100%; }
}

/* Overline */
.dfj-overline {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	line-height: 1.2;
	color: #e9c46a;
	background-color: rgba(173, 136, 30, .16);
	border: 1px solid rgba(173, 136, 30, .35);
	border-radius: 999px;
}

.dfj-overline .djb-ico { width: 1.05em; height: 1.05em; }

/* Identity: logo + company / title */
.dfj-identity {
	display: flex;
	align-items: center;
	gap: 18px;
	min-width: 0;
}

.dfj-logo {
	position: relative;
	flex: 0 0 var(--dfj-logo-size);
	width: var(--dfj-logo-size);
	height: var(--dfj-logo-size);
	overflow: hidden;
	background: #ffffff;
	border-radius: 16px;
}

.dfj-logo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 8px;
	object-fit: contain;
	background: #ffffff;
}

.dfj-logo__initial {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: calc(var(--dfj-logo-size) * .42);
	font-weight: 700;
	color: #0f172a;
	background: #ad881e;
}

.dfj-identity__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.dfj-company { color: #cbd5e1; }

.dfj-title {
	margin: 4px 0 0;
	color: #ffffff;
	overflow-wrap: anywhere;
}

.dfj-title a {
	color: inherit;
	text-decoration: none;
	transition: color .2s ease;
}

/* Meta */
.dfj-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: #cbd5e1;
}

.dfj-meta li {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
}

.dfj-meta .djb-ico { color: #e9c46a; }

.dfj-excerpt {
	margin: 0;
	color: #94a3b8;
}

.dfj-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dfj-tag {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	font-size: 13px;
	line-height: 1.2;
	color: #ffffff;
	background-color: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 999px;
}

/* Salary */
.dfj-salary {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.dfj-salary__label { color: #94a3b8; }
.dfj-salary__value { color: #ffffff; line-height: 1.25; }

/* Buttons */
.dfj-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.dfj-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 24px;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	border: 2px solid transparent;
	border-radius: 12px;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.dfj-btn--apply {
	flex: 1 1 auto;
	color: #0f172a;
	background-color: #e9c46a;
	border-color: #e9c46a;
}

.dfj-btn--details {
	color: #ffffff;
	background-color: transparent;
	border: 1px solid rgba(255, 255, 255, .28);
}

.dfj-btn .djb-ico { transition: transform .2s ease; }
.dfj-btn:hover .djb-ico,
.dfj-btn:focus-visible .djb-ico { transform: translateX(3px); }

/* ──────────────────────────────────────────
   CARD STYLES (fallbacks = control defaults)
────────────────────────────────────────── */
.dfj-style-dark .dfj-card { background-image: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }

/* Light: white card, gold accent bar on top */
.dfj-style-light .dfj-card {
	--dfj-accent: #ad881e;
	--dfj-bar: 4px;
	color: #1f2937;
	background-color: #ffffff;
	border-color: #e5e7eb;
}

.dfj-style-light .dfj-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 2;
	height: var(--dfj-bar);
	background-color: var(--dfj-accent);
}

.dfj-style-light .dfj-overline { color: #7a5c0f; background-color: #fdf6e3; }
.dfj-style-light .dfj-company { color: #6b7280; }
.dfj-style-light .dfj-title { color: #0f172a; }
.dfj-style-light .dfj-meta { color: #4b5563; }
.dfj-style-light .dfj-meta .djb-ico { color: #ad881e; }
.dfj-style-light .dfj-excerpt { color: #6b7280; }
.dfj-style-light .dfj-tag { color: #374151; background-color: #f3f4f6; border-color: #e5e7eb; }
.dfj-style-light .dfj-side { background-color: #f9fafb; border-color: #e5e7eb; }
.dfj-style-light .dfj-salary__label { color: #6b7280; }
.dfj-style-light .dfj-salary__value { color: #0f172a; }
.dfj-style-light .dfj-btn--apply { color: #ffffff; background-color: #0f172a; border-color: #0f172a; }
.dfj-style-light .dfj-btn--details { color: #0f172a; border-color: #cbd5e1; }
.dfj-style-light :is(a, button):focus-visible { outline-color: #ad881e; }

/* Gold: light gold gradient, navy text */
.dfj-style-gold .dfj-card {
	color: #0f172a;
	background-color: #f7e3a8;
	background-image: linear-gradient(135deg, #f7e3a8 0%, #e9c46a 100%);
	border-color: rgba(255, 255, 255, .45);
}

.dfj-style-gold .dfj-overline { color: #0f172a; background-color: rgba(255, 255, 255, .45); border-color: rgba(15, 23, 42, .15); }
.dfj-style-gold .dfj-company { color: #5c4510; }
.dfj-style-gold .dfj-title { color: #0f172a; }
.dfj-style-gold .dfj-meta { color: #1f2937; }
.dfj-style-gold .dfj-meta .djb-ico { color: #0f172a; }
.dfj-style-gold .dfj-excerpt { color: #374151; }
.dfj-style-gold .dfj-tag { color: #0f172a; background-color: rgba(255, 255, 255, .5); border-color: rgba(15, 23, 42, .12); }
.dfj-style-gold .dfj-side { background-color: rgba(255, 255, 255, .3); border-color: rgba(15, 23, 42, .12); }
.dfj-style-gold .dfj-salary__label { color: #5c4510; }
.dfj-style-gold .dfj-salary__value { color: #0f172a; }
.dfj-style-gold .dfj-btn--apply { color: #ffffff; background-color: #0f172a; border-color: #0f172a; }
.dfj-style-gold .dfj-btn--details { color: #0f172a; border-color: rgba(15, 23, 42, .35); }
.dfj-style-gold :is(a, button):focus-visible { outline-color: #0f172a; }

/* ──────────────────────────────────────────
   CAROUSEL
────────────────────────────────────────── */
.dfj-swiper {
	/* Room for the hover lift and the shadow inside the clipped viewport */
	padding: 8px 4px 40px;
	margin: -8px -4px -40px;
}

.dfj-swiper .swiper-slide {
	height: auto;
	transition: opacity .4s ease, transform .4s ease;
}

.dfj-centered .swiper-slide:not(.swiper-slide-active) {
	opacity: .55;
	transform: scale(.94);
}

/* Single job in "carousel" mode: plain card */
.dfj-layout-carousel .dfj-grid { grid-template-columns: minmax(0, 1fr); }

.dfj-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 28px;
}

.dfj-pagination {
	--dfj-bullet: 10px;
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 12px;
	color: #cbd5e1;
}

.dfj-pagination .swiper-pagination-bullet {
	width: var(--dfj-bullet);
	height: var(--dfj-bullet);
	margin: 0 !important;
	opacity: 1;
	background-color: #cbd5e1;
	border-radius: 999px;
	transition: width .3s ease, background-color .3s ease;
}

.dfj-pagination .swiper-pagination-bullet-active {
	width: calc(var(--dfj-bullet) * 2.8);
	background-color: #ad881e;
}

.dfj-pagination.swiper-pagination-progressbar {
	position: relative !important;
	flex: 1 1 auto;
	max-width: 320px;
	height: 4px;
	min-height: 0;
	background-color: #cbd5e1;
	border-radius: 999px;
	overflow: hidden;
}

.dfj-pagination .swiper-pagination-progressbar-fill { background-color: #ad881e; }

.dfj-pagination.swiper-pagination-fraction {
	width: auto;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: #6b7280;
}

.dfj-pagination .swiper-pagination-current { color: #ad881e; }

.dfj-arrows {
	display: flex;
	gap: 10px;
	margin-left: auto;
}

.dfj-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	color: #0f172a;
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}

.dfj-arrow .djb-ico { width: 20px; height: 20px; }

.dfj-arrow:disabled,
.dfj-arrow.swiper-button-disabled {
	opacity: .4;
	cursor: default;
}

/* ──────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────── */
@media (max-width: 767px) {
	.dfj-identity { align-items: flex-start; }
	.dfj-actions { flex-direction: column; }
	.dfj-btn { width: 100%; }
}

/* ──────────────────────────────────────────
   REDUCED MOTION
────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.deira-featured-job *,
	.deira-featured-job *::before,
	.deira-featured-job *::after {
		transition: none !important;
	}

	.dfj-card:hover,
	.dfj-card:focus-within,
	.dfj-centered .swiper-slide:not(.swiper-slide-active),
	.dfj-btn:hover .djb-ico {
		transform: none !important;
	}
}
