/* =========================================================
   JobCenterKSA — Base layer: reset, typography, primitives
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--jck-font-body);
	font-weight: var(--jck-body-weight, 400);
	font-size: var(--jck-font-size-base, 16px);
	line-height: var(--jck-line-height, 1.65);
	letter-spacing: var(--jck-letter-spacing, 0);
	color: var(--jck-color-ink-900);
	background: var(--jck-color-bg);
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

input, textarea, select, button { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--jck-font-display);
	font-weight: var(--jck-heading-weight, 700);
	line-height: 1.25;
	margin: 0 0 .5em;
	color: var(--jck-color-navy-900);
}

h1 { font-size: var(--jck-font-size-h1, clamp(2rem, 1.6rem + 1.6vw, 3.25rem)); }
h2 { font-size: var(--jck-font-size-h2, clamp(1.5rem, 1.3rem + 1vw, 2.25rem)); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.5rem); }

p { margin: 0 0 1em; font-size: var(--jck-font-size-p, 1em); }

.container {
	width: 100%;
	max-width: var(--jck-container);
	margin-inline: auto;
	padding-inline: 20px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
	border: 0; padding: 0; margin: -1px;
}

.skip-link {
	position: fixed;
	top: -60px;
	inset-inline-start: 12px;
	background: var(--jck-color-navy-900);
	color: #fff;
	padding: 12px 20px;
	border-radius: var(--jck-radius-sm);
	z-index: 10000;
	transition: top .2s ease;
}
.skip-link:focus {
	top: 12px;
	width: auto; height: auto;
	clip: auto;
	position: fixed;
}

:focus-visible {
	outline: 3px solid var(--jck-color-teal-600);
	outline-offset: 2px;
}

/* ---- Buttons ---- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: var(--jck-btn-padding-y, 12px) var(--jck-btn-padding-x, 22px);
	border-radius: var(--jck-btn-radius, var(--jck-radius-sm));
	font-weight: 700;
	font-size: .95rem;
	border: 2px solid transparent;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
	white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
	background: var(--jck-color-teal-600);
	color: #fff;
	box-shadow: var(--jck-shadow-sm);
}
.btn--primary:hover { background: var(--jck-color-teal-500); box-shadow: var(--jck-shadow-md); color: #fff; }

.btn--ghost {
	background: transparent;
	border-color: rgba(255,255,255,.55);
	color: #fff;
}
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

.btn--gold {
	background: var(--jck-color-gold-500);
	color: var(--jck-color-navy-900);
}
.btn--gold:hover { background: var(--jck-color-gold-600); }

.btn--lg { padding: 15px 28px; font-size: 1rem; }

/* Button style variants controlled via Customizer body class */
body.jck-btn-outline .btn--primary {
	background: transparent;
	color: var(--jck-color-teal-600);
	border-color: var(--jck-color-teal-600);
}
body.jck-btn-pill .btn { border-radius: 999px; }

/* ---- Layout shell ---- */
.content-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 48px;
	padding-block: 40px 64px;
}
.content-layout__sidebar { min-width: 0; }

.section-header, .job-section__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
}
.section-header__title, .job-section__title { margin-bottom: 6px; }
.section-header__subtitle, .job-section__subtitle { color: var(--jck-color-ink-500); margin: 0; }
.job-section__viewall {
	white-space: nowrap;
	font-weight: 700;
	color: var(--jck-color-teal-600);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.job-section__viewall:hover { color: var(--jck-color-navy-900); }

.job-section, .categories-section, .companies-section, .articles-section, .testimonials-section {
	padding-block: var(--jck-section-spacing, 48px);
}

/* ---- Empty / 404 states ---- */
.empty-state, .error-404 {
	text-align: center;
	padding: 80px 20px;
	max-width: 560px;
	margin-inline: auto;
}
.error-404__code {
	font-family: var(--jck-font-display);
	font-size: 5rem;
	font-weight: 800;
	color: var(--jck-color-teal-600);
	margin: 0;
	line-height: 1;
}
.error-404 .btn { margin-block: 20px 40px; }

/* ---- Widgets ---- */
.widget { margin-bottom: var(--jck-widget-spacing, 28px); }
.widget-title {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-bottom: 16px;
}

/* ---- Table of contents responsive wrapper ---- */
.jck-table-wrap { overflow-x: auto; margin: 1.5em 0; border-radius: var(--jck-radius-sm); }
.jck-table-wrap table { width: 100%; border-collapse: collapse; }

/* ---- Pagination ---- */
.jck-pagination { margin-top: 40px; display: flex; justify-content: center; }
.jck-pagination ul { display: flex; gap: 8px; flex-wrap: wrap; }
.jck-pagination a, .jck-pagination span {
	display: inline-flex;
	min-width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	border-radius: var(--jck-radius-sm);
	background: var(--jck-color-surface);
	border: var(--jck-border-width, 1px) solid var(--jck-color-line);
	font-weight: 600;
}
.jck-pagination .current { background: var(--jck-color-navy-900); color: #fff; border-color: var(--jck-color-navy-900); }
.jck-pagination a:hover { border-color: var(--jck-color-teal-600); color: var(--jck-color-teal-600); }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
}
