/*
 * JobNavia public stylesheet — premium polish, plain CSS only.
 * Brand colors are also injected as CSS variables by the PHP header
 * (driven by include/job_portal_config.php) and override the defaults
 * defined here.
 */

:root {
	--brand-dark: #0f172a;
	--brand-accent: #0f9f9a;
	--brand-accent-strong: #0c8783;
	--brand-accent-soft: #e6f7f6;
	--surface: #ffffff;
	--bg: #f6f8fb;
	--line: #e2e8f0;
	--line-strong: #cbd5e1;
	--muted: #64748b;
	--text: #0f172a;
	--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
	--shadow-md: 0 6px 18px rgba(15, 23, 42, 0.07);
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	font-family: var(--font-sans);
	color: var(--text);
	background: var(--bg);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--brand-accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--brand-dark); line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.3px; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 12px; }

/* Header */
.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	box-shadow: var(--shadow-sm);
	position: sticky;
	top: 0;
	z-index: 20;
}
.site-wrap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 18px 22px;
}
.site-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	flex-wrap: wrap;
}

/* Brand / logo */
.brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}
.brand-link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	line-height: 0;
}
.brand-link:hover { text-decoration: none; }
.brand-logo { display: block; height: 38px; width: auto; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

/* Nav */
.nav {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	align-items: center;
}
.nav a {
	display: inline-block;
	padding: 8px 14px;
	border-radius: var(--radius-sm);
	color: var(--brand-dark);
	font-weight: 500;
	font-size: 15px;
	transition: background-color .15s ease, color .15s ease;
}
.nav a:hover {
	background: var(--brand-accent-soft);
	color: var(--brand-accent-strong);
	text-decoration: none;
}

/* Page wrapper */
.page {
	max-width: 1120px;
	margin: 0 auto;
	padding: 32px 22px 64px;
}

/* Hero / intro panel */
.hero {
	background: linear-gradient(135deg, #ffffff 0%, var(--brand-accent-soft) 100%);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 44px 36px;
	margin-bottom: 28px;
	box-shadow: var(--shadow-sm);
}
.hero h1 { font-size: 36px; margin-bottom: 8px; letter-spacing: -0.6px; }
.hero p.muted { font-size: 16px; margin-bottom: 22px; max-width: 620px; }

/* Page heading row (for index-style pages) */
.page-heading { margin-bottom: 18px; }
.page-heading h1 { margin-bottom: 6px; }
.page-heading p { color: var(--muted); margin: 0; }

/* Search */
.search-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
input[type=text],
input[type=search] {
	flex: 1;
	min-width: 240px;
	padding: 12px 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	font: inherit;
	color: var(--text);
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
input[type=text]:focus,
input[type=search]:focus {
	outline: none;
	border-color: var(--brand-accent);
	box-shadow: 0 0 0 3px rgba(15, 159, 154, 0.18);
}

/* Buttons */
button, .button {
	display: inline-block;
	border: 0;
	border-radius: var(--radius-sm);
	background: var(--brand-dark);
	color: #fff;
	padding: 12px 20px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: background-color .15s ease, transform .08s ease;
}
button:hover, .button:hover { background: #1e293b; text-decoration: none; color: #fff; }
button:active, .button:active { transform: translateY(1px); }
.button-accent { background: var(--brand-accent); }
.button-accent:hover { background: var(--brand-accent-strong); }

/* Panels / cards */
.panel {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 22px;
	margin-bottom: 16px;
	box-shadow: var(--shadow-sm);
}
.panel h2 { margin-top: 0; }

/* Stat grid */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
	margin-bottom: 24px;
}
.stat {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 18px 20px;
	box-shadow: var(--shadow-sm);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.stat:hover { border-color: var(--brand-accent); box-shadow: var(--shadow-md); }
.stat b {
	display: block;
	font-size: 28px;
	font-weight: 700;
	color: var(--brand-dark);
	margin-bottom: 4px;
	line-height: 1.1;
}
.stat span { color: var(--muted); font-size: 14px; }

/* Lists / job cards */
.list { display: grid; gap: 14px; }
.list .panel {
	transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.list .panel:hover {
	border-color: var(--brand-accent);
	box-shadow: var(--shadow-md);
}
.list .panel h2 { font-size: 18px; margin-bottom: 8px; }
.list .panel h2 a { color: var(--brand-dark); }
.list .panel h2 a:hover { color: var(--brand-accent-strong); text-decoration: none; }

/* Misc helpers */
.muted { color: var(--muted); }
.badge {
	display: inline-block;
	border: 1px solid var(--line-strong);
	background: #f1f5f9;
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 12px;
	color: var(--muted);
	margin-left: 4px;
	vertical-align: middle;
}
.notice {
	border-left: 4px solid var(--brand-accent);
	background: var(--brand-accent-soft);
	padding: 14px 16px;
	border-radius: var(--radius-sm);
	margin: 16px 0;
	color: var(--brand-dark);
}

/* Browse strip on home */
.browse-row { display: flex; gap: 18px; flex-wrap: wrap; }
.browse-row a { font-weight: 600; }

/* Footer */
.site-footer {
	border-top: 1px solid var(--line);
	background: var(--surface);
	color: var(--muted);
	padding: 22px 0;
	margin-top: 32px;
	font-size: 14px;
}
.site-footer p { margin: 4px 0; }
.site-footer b { color: var(--brand-dark); }
.site-footer-nav {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 18px 28px;
	margin-bottom: 18px;
}
.site-footer-nav .footer-col-title {
	font-size: 13px;
	font-weight: 700;
	color: var(--brand-dark);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 8px;
}
.site-footer-nav ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.site-footer-nav a { color: var(--brand-dark); font-weight: 500; font-size: 14px; }
.site-footer-nav a:hover { color: var(--brand-accent-strong); }
.site-footer-meta { border-top: 1px solid var(--line); padding-top: 14px; }
.site-footer-meta p { margin: 4px 0; }

/* Breadcrumbs */
.breadcrumbs {
	margin: 6px 0 22px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--muted);
}
.breadcrumbs-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	row-gap: 6px;
	column-gap: 0;
}
.breadcrumbs-item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
.breadcrumbs-link {
	color: var(--muted);
	text-decoration: none;
	font-weight: 500;
	padding: 2px 0;
	transition: color .15s ease;
}
.breadcrumbs-link:hover {
	color: var(--brand-accent-strong);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.breadcrumbs-current {
	color: var(--brand-dark);
	font-weight: 600;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding: 2px 0;
}
.breadcrumbs-sep {
	color: var(--line-strong);
	user-select: none;
	margin: 0 10px;
	font-size: 12px;
}

/* Subtle badge variant for hub pages */
.badge-subtle {
	background: #f8fafc;
	color: var(--muted);
	border-color: var(--line);
	font-weight: 500;
	text-transform: lowercase;
	letter-spacing: 0;
}

/* Notice variants */
.notice-warn {
	border-left-color: #d97706;
	background: #fff7ed;
	color: #7c2d12;
}

/* Job listing cards */
.job-list { display: grid; gap: 14px; }
.job-card {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 20px 22px;
	box-shadow: var(--shadow-sm);
	transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.job-card:hover {
	border-color: var(--brand-accent);
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
}
.job-card-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	text-indent: -9999px;
	overflow: hidden;
}
.job-card-link:focus-visible {
	outline: 2px solid var(--brand-accent);
	outline-offset: 2px;
}
.job-card-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 4px;
	color: var(--brand-dark);
	line-height: 1.3;
}
.job-card-title a {
	color: inherit;
	position: relative;
	z-index: 2;
}
.job-card-title a:hover { color: var(--brand-accent-strong); text-decoration: none; }
.job-card-company {
	margin: 0 0 10px;
	font-weight: 600;
	color: var(--text);
	font-size: 14px;
}
.job-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	font-size: 13px;
	color: var(--muted);
	position: relative;
	z-index: 2;
	pointer-events: none;
}
.job-card-meta .job-badge { pointer-events: auto; }
.job-meta-item { display: inline-flex; align-items: center; }
.job-meta-item + .job-meta-item::before {
	content: "·";
	margin-right: 12px;
	margin-left: -6px;
	color: var(--line-strong);
}
.job-meta-date { font-variant-numeric: tabular-nums; }
.job-meta-source { font-style: italic; }

/* Remote/Hybrid/Onsite badges */
.job-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	text-transform: capitalize;
	letter-spacing: 0.2px;
	border: 1px solid var(--line);
	background: #f1f5f9;
	color: var(--muted);
	line-height: 1.6;
}
.job-badge-remote { background: var(--brand-accent-soft); border-color: #b8e6e3; color: var(--brand-accent-strong); }
.job-badge-hybrid { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.job-badge-onsite,
.job-badge-on-site { background: #e0e7ff; border-color: #c7d2fe; color: #3730a3; }

/* Hub (categories/locations) heading + cards */
.hub-heading { margin: 0 0 22px; }
.hub-heading h1 { margin-bottom: 8px; }
.hub-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--muted);
	font-size: 14px;
}
.hub-count-pill {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--brand-accent-soft);
	color: var(--brand-accent-strong);
	font-weight: 600;
	font-size: 13px;
}

.hub-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 14px;
}
.hub-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 18px 20px;
	box-shadow: var(--shadow-sm);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.hub-card:hover { border-color: var(--brand-accent); box-shadow: var(--shadow-md); }
.hub-card-title {
	font-size: 17px;
	margin: 0 0 6px;
	font-weight: 700;
}
.hub-card-title a { color: var(--brand-dark); }
.hub-card-title a:hover { color: var(--brand-accent-strong); text-decoration: none; }
.hub-card-meta {
	margin: 0;
	font-size: 13px;
	color: var(--muted);
}
.hub-card-count { color: var(--brand-dark); font-weight: 700; }

/* Job detail layout */
.job-detail { display: block; }
.job-hero {
	background: linear-gradient(135deg, #ffffff 0%, var(--brand-accent-soft) 100%);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 32px 32px 26px;
	box-shadow: var(--shadow-sm);
	margin-bottom: 22px;
}
.job-hero-title {
	font-size: 30px;
	margin: 0 0 6px;
	letter-spacing: -0.4px;
	color: var(--brand-dark);
	line-height: 1.2;
}
.job-hero-company {
	font-size: 17px;
	font-weight: 600;
	color: var(--text);
	margin: 0 0 14px;
}
.job-hero-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	color: var(--muted);
	font-size: 14px;
}

.job-detail-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 22px;
	align-items: start;
}

.job-section {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 26px 28px;
	box-shadow: var(--shadow-sm);
	margin-bottom: 16px;
}
.job-section-title {
	margin: 0 0 14px;
	font-size: 18px;
	color: var(--brand-dark);
}
.job-description {
	color: var(--text);
	line-height: 1.7;
	font-size: 15.5px;
	max-width: 70ch;
	word-wrap: break-word;
}
.job-description p { margin: 0 0 14px; }
.job-description a { color: var(--brand-accent-strong); }

.job-detail-aside { position: sticky; top: 96px; }
.job-cta-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 22px;
	box-shadow: var(--shadow-md);
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.job-cta-button {
	display: block;
	width: 100%;
	font-size: 15px;
	padding: 13px 18px;
}
.job-cta-disabled {
	background: #94a3b8;
	cursor: not-allowed;
	color: #fff;
}
.job-cta-disabled:hover { background: #94a3b8; }
.job-cta-note {
	margin: 0;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

.job-source {
	border-top: 1px solid var(--line);
	padding-top: 14px;
}
.job-source-label {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.7px;
}
.job-source-name {
	margin: 0 0 4px;
	font-weight: 600;
	color: var(--brand-dark);
	font-size: 14px;
}
.job-source-attr {
	margin: 0 0 6px;
	color: var(--muted);
	font-size: 12px;
}
.job-source-link { margin: 0; font-size: 13px; }

/* Related jobs */
.related-section { margin-top: 28px; }
.related-title {
	font-size: 18px;
	margin: 0 0 14px;
	color: var(--brand-dark);
}
.related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}
.related-card {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 16px 18px;
	box-shadow: var(--shadow-sm);
	transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.related-card:hover {
	border-color: var(--brand-accent);
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
}
.related-card-title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}
.related-card-title a { color: var(--brand-dark); position: relative; z-index: 2; }
.related-card-title a:hover { color: var(--brand-accent-strong); text-decoration: none; }
.related-card-company {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
}
.related-card-meta {
	margin: 0;
	font-size: 12.5px;
	color: var(--muted);
}

/* Pagination spacing (forward-compatible) */
.pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 28px 0 8px;
	justify-content: center;
}
.pagination a, .pagination span {
	display: inline-block;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--brand-dark);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}
.pagination a:hover {
	border-color: var(--brand-accent);
	color: var(--brand-accent-strong);
	text-decoration: none;
}
.pagination .pagination-current {
	background: var(--brand-accent);
	border-color: var(--brand-accent);
	color: #fff;
}

/* Hero (homepage) */
.hero-home .hero-content { max-width: 720px; }
.hero-home .hero-sub { font-size: 17px; }
.hero-trust { font-size: 13px; margin-top: 12px; }

/* Sections */
.section { margin: 32px 0; }
.section-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--line);
	padding-bottom: 8px;
}
.section-header h2 { margin: 0; }
.section-link { font-weight: 600; font-size: 14px; white-space: nowrap; }

/* Job cards */
.job-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 14px;
}
.job-card { padding: 18px 20px; }
.job-card .job-title { font-size: 17px; margin: 0 0 6px; line-height: 1.3; }
.job-card .job-title a { color: var(--brand-dark); }
.job-card .job-title a:hover { color: var(--brand-accent-strong); text-decoration: none; }
.job-card .job-company { font-weight: 600; margin: 0 0 8px; }
.job-card .job-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	font-size: 13px;
	color: var(--muted);
	align-items: center;
}
.job-card .job-meta .job-source { font-size: 12px; }
.job-card-compact { padding: 14px 16px; }
.job-card-compact .job-title { font-size: 15px; }
.job-card-compact .job-meta { font-size: 12px; }

/* Badges (work mode) */
.badge-remote {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #065f46;
}
.badge-hybrid {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1e3a8a;
}

/* Hub grid (popular categories/locations) */
.hub-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
}
.hub-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 14px 16px;
	color: var(--brand-dark);
	box-shadow: var(--shadow-sm);
	transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.hub-card:hover {
	border-color: var(--brand-accent);
	box-shadow: var(--shadow-md);
	text-decoration: none;
	transform: translateY(-1px);
}
.hub-card .hub-name { font-weight: 600; }
.hub-card .hub-count { font-size: 13px; color: var(--muted); }

/* Search/filter bar */
.job-filters {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 18px;
	padding: 14px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
}
.job-filters input[type=search] { flex: 2 1 240px; min-width: 200px; padding: 10px 12px; }
.job-filters select {
	padding: 10px 12px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	font: inherit;
	background: #fff;
	color: var(--text);
	min-width: 150px;
}
.job-filters button { padding: 10px 18px; }
.filter-reset {
	align-self: center;
	font-size: 14px;
	color: var(--muted);
}
.result-count { margin: 0 0 12px 2px; font-size: 14px; }

/* Pagination */
.pagination {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: center;
	margin: 28px 0 8px;
	flex-wrap: wrap;
}
.page-link {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	color: var(--brand-dark);
	background: var(--surface);
	font-weight: 500;
}
.page-link:hover { border-color: var(--brand-accent); color: var(--brand-accent-strong); text-decoration: none; }
.page-link.disabled { color: var(--muted); background: #f1f5f9; pointer-events: none; }
.page-info { color: var(--muted); font-size: 14px; }

/* Empty state */
.empty-state { text-align: center; padding: 36px 22px; }
.empty-state h2 { margin-bottom: 8px; }

/* Trust panel */
.trust-panel { margin-top: 32px; }

/* Responsive */
@media (max-width: 960px) {
	.job-detail-grid { grid-template-columns: minmax(0, 1fr); }
	.job-detail-aside { position: static; }
}

@media (max-width: 720px) {
	.site-wrap { padding: 14px 16px; }
	.page { padding: 22px 16px 48px; }
	.hero { padding: 28px 22px; }
	.hero h1 { font-size: 28px; }
	.brand-logo { height: 32px; }
	.tagline { font-size: 12px; }
	.nav { gap: 2px; }
	.nav a { padding: 6px 10px; font-size: 14px; }
	h1 { font-size: 24px; }

	.breadcrumbs { font-size: 12px; margin: 4px 0 16px; }
	.breadcrumbs-current { max-width: 220px; }
	.breadcrumbs-sep { margin: 0 8px; }

	.job-card { padding: 16px 18px; }
	.job-card-title { font-size: 16px; }

	.job-hero { padding: 24px 22px 20px; border-radius: var(--radius-md); }
	.job-hero-title { font-size: 24px; }
	.job-hero-company { font-size: 15px; }

	.job-section { padding: 20px 20px; }
	.job-description { font-size: 15px; }

	.hub-list { grid-template-columns: 1fr; }
	.related-grid { grid-template-columns: 1fr; }

	.section-header { flex-direction: column; align-items: flex-start; }
	.job-filters { flex-direction: column; }
	.job-filters input[type=search], .job-filters select, .job-filters button { width: 100%; }
}
