/* =========================================================================
   JobNest — base styles (Phase 1)
   Author: WP Expert Solution
   Tokens mirror theme.json so the front end and block editor stay in sync.
   ========================================================================= */

:root {
	--jn-primary: #1f3a5f;
	--jn-primary-bright: #2f6df0;
	--jn-accent: #16b083;
	--jn-ink: #16202e;
	--jn-muted: #5b6675;
	--jn-line: #e6e9ef;
	--jn-surface: #f6f8fb;
	--jn-base: #ffffff;
	--jn-radius: 12px;
	--jn-shadow: 0 1px 2px rgba(22, 32, 46, .06), 0 8px 24px rgba(22, 32, 46, .06);
	--jn-container: 1180px;
	--jn-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--jn-font-heading: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--jn-font-size: 16px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	color: var(--jn-ink);
	background: var(--jn-base);
	font-family: var(--jn-font-body);
	font-size: var(--jn-font-size);
	line-height: 1.6;
}

a { color: var(--jn-primary-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--jn-font-heading); line-height: 1.2; color: var(--jn-ink); }

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

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100;
	clip: auto; width: auto; height: auto;
	background: var(--jn-base); padding: 10px 16px; border-radius: 8px;
}

/* ---- Header ---- */
.jobnest-site-header {
	border-bottom: 1px solid var(--jn-line);
	background: var(--jn-base);
	z-index: 20;
}
.jobnest-sticky-header .jobnest-site-header { position: sticky; top: 0; }
.jobnest-site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; min-height: 72px;
}
.jobnest-logo { font-family: var(--jn-font-heading); font-weight: 800; font-size: 1.35rem; color: var(--jn-ink); }
.jobnest-logo:hover { text-decoration: none; }
.jobnest-nav__list { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.jobnest-nav__list a { color: var(--jn-ink); font-weight: 600; }

/* ---- Layout ---- */
.jobnest-main { padding-block: 40px 64px; }
.jobnest-layout--with-sidebar {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 32px;
	align-items: start;
}
@media (max-width: 900px) {
	.jobnest-layout--with-sidebar { grid-template-columns: 1fr; }
	.jobnest-layout__aside { order: -1; }
}

/* ---- Archive header ---- */
.jobnest-archive-header { padding-block: 8px 24px; }
.jobnest-archive-header__title { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); margin: 0 0 4px; }
.jobnest-archive-header__count { color: var(--jn-muted); margin: 0; }

/* ---- Job cards ---- */
.jobnest-job-list { display: flex; flex-direction: column; gap: 16px; }
.jobnest-job-card {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 18px;
	align-items: center;
	background: var(--jn-base);
	border: 1px solid var(--jn-line);
	border-radius: var(--jn-radius);
	padding: 18px 20px;
	transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.jobnest-job-card:hover { box-shadow: var(--jn-shadow); transform: translateY(-2px); border-color: transparent; }
.jobnest-job-card.is-featured { border-color: var(--jn-accent); background: linear-gradient(0deg, var(--jn-base), var(--jn-base)) padding-box, var(--jn-surface); }
.jobnest-job-card__logo img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; display: block; }
.jobnest-job-card__title { font-size: 1.15rem; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jobnest-job-card__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--jn-muted); font-size: .9rem; }
.jobnest-job-card__cats { margin-top: 8px; font-size: .85rem; }
.jobnest-job-card__cats a { color: var(--jn-primary); }
@media (max-width: 560px) {
	.jobnest-job-card { grid-template-columns: 1fr; }
	.jobnest-job-card__action { justify-self: start; }
}

.jobnest-badge {
	font-family: var(--jn-font-heading);
	font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
	color: #0c7a5a; background: rgba(22, 176, 131, .12);
	padding: 3px 8px; border-radius: 999px;
}

/* ---- Buttons ---- */
.jobnest-btn {
	display: inline-block;
	background: var(--jn-primary-bright); color: #fff;
	font-weight: 600; padding: 10px 18px; border-radius: 10px;
	transition: background .15s ease;
}
.jobnest-btn:hover { background: var(--jn-primary); text-decoration: none; }
.jobnest-btn--lg { padding: 14px 28px; font-size: 1.05rem; }

/* ---- Single job ---- */
.jobnest-single-job { background: var(--jn-base); border: 1px solid var(--jn-line); border-radius: var(--jn-radius); padding: 28px; }
.jobnest-single-job__header { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.jobnest-single-job__logo img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.jobnest-single-job__title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); margin: 0; }
.jobnest-single-job__company { color: var(--jn-muted); margin: 4px 0 0; font-weight: 600; }
.jobnest-single-job__facts { list-style: none; margin: 0 0 24px; padding: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; background: var(--jn-surface); border-radius: var(--jn-radius); }
.jobnest-single-job__facts li { font-size: .95rem; }
.jobnest-single-job__content { margin-bottom: 24px; }
.jobnest-single-job__tags { color: var(--jn-muted); font-size: .9rem; }
.jobnest-apply { margin-top: 24px; }

/* ---- Sidebar filters ---- */
.jobnest-sidebar { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 20px; }
.jobnest-filter, .jobnest-widget {
	background: var(--jn-base);
	border: 1px solid var(--jn-line);
	border-radius: var(--jn-radius);
	padding: 18px 20px;
}
.jobnest-filter__title, .jobnest-widget__title {
	font-size: .8rem; text-transform: uppercase; letter-spacing: .06em;
	color: var(--jn-muted); margin: 0 0 12px;
}
.jobnest-filter__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.jobnest-filter__item a {
	display: flex; align-items: center; justify-content: space-between;
	padding: 7px 10px; margin: 0 -10px; border-radius: 8px;
	color: var(--jn-ink); font-size: .92rem;
}
.jobnest-filter__item a:hover { background: var(--jn-surface); text-decoration: none; }
.jobnest-filter__item.is-active a { background: rgba(47, 109, 240, .1); color: var(--jn-primary-bright); font-weight: 600; }
.jobnest-filter__count {
	font-size: .75rem; color: var(--jn-muted);
	background: var(--jn-surface); border-radius: 999px; padding: 1px 8px; min-width: 24px; text-align: center;
}
.jobnest-filter__item.is-active .jobnest-filter__count { background: rgba(47, 109, 240, .15); color: var(--jn-primary-bright); }

/* ---- Misc ---- */
.jobnest-empty { background: var(--jn-surface); border-radius: var(--jn-radius); padding: 32px; color: var(--jn-muted); }
.jobnest-site-footer { border-top: 1px solid var(--jn-line); padding-block: 28px; color: var(--jn-muted); }
.jobnest-colophon { margin: 0; font-size: .9rem; }

.jobnest-card { background: var(--jn-base); border: 1px solid var(--jn-line); border-radius: var(--jn-radius); padding: 20px; margin-bottom: 16px; }

@media (prefers-reduced-motion: reduce) {
	.jobnest-job-card, .jobnest-btn { transition: none; }
}

/* =========================================================================
   Phase 2–4 components
   ========================================================================= */

.jobnest-narrow { max-width: 760px; }

/* ---- Filters head / clear ---- */
.jobnest-filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.jobnest-filters__label { font-family: var(--jn-font-heading); font-weight: 700; }
.jobnest-filters__clear { background: none; border: 0; color: var(--jn-primary-bright); cursor: pointer; font-size: .85rem; padding: 4px; }
.jobnest-filters__clear:hover { text-decoration: underline; }

/* ---- Search bar ---- */
.jobnest-searchbar { display: flex; gap: 10px; flex-wrap: wrap; background: var(--jn-base); padding: 12px; border: 1px solid var(--jn-line); border-radius: var(--jn-radius); box-shadow: var(--jn-shadow); }
.jobnest-searchbar .jobnest-input { flex: 1 1 200px; }
.jobnest-searchbar select { flex: 0 1 200px; }

/* ---- Inline filter bar (Job Listings widget) ---- */
.jobnest-inline-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.jobnest-inline-filters .jobnest-input { flex: 1 1 160px; }

/* ---- Inputs / forms ---- */
.jobnest-input {
	width: 100%; padding: 11px 13px; font: inherit; color: var(--jn-ink);
	background: var(--jn-base); border: 1px solid var(--jn-line); border-radius: 10px;
}
.jobnest-input:focus { outline: 2px solid var(--jn-primary-bright); outline-offset: 1px; border-color: var(--jn-primary-bright); }
.jobnest-form { display: flex; flex-direction: column; gap: 16px; background: var(--jn-base); border: 1px solid var(--jn-line); border-radius: var(--jn-radius); padding: 24px; }
.jobnest-field { display: flex; flex-direction: column; gap: 6px; }
.jobnest-field__label { font-weight: 600; font-size: .9rem; }
.jobnest-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .jobnest-field-row { grid-template-columns: 1fr; } }

/* ---- Notices / feedback ---- */
.jobnest-notice { padding: 14px 16px; border-radius: 10px; background: var(--jn-surface); border: 1px solid var(--jn-line); margin-bottom: 18px; }
.jobnest-notice.is-error { background: #fff1f0; border-color: #ffccc7; color: #a8071a; }
.jobnest-notice.is-success { background: #f0fbf6; border-color: #b7ebd6; color: #0c7a5a; }
.jobnest-form__feedback { margin: 0; font-size: .92rem; }
.jobnest-form__feedback.is-error { color: #a8071a; }
.jobnest-form__feedback.is-success { color: #0c7a5a; }

/* ---- Apply block ---- */
.jobnest-apply { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--jn-line); }
.jobnest-apply__title { font-size: 1.25rem; margin: 0 0 16px; }

/* ---- Results loading ---- */
.jobnest-results__list { transition: opacity .15s ease; }

/* ---- Category grid ---- */
.jobnest-cat-grid, .jobnest-company-grid { display: grid; gap: 16px; }
.jobnest-cols-2 { grid-template-columns: repeat(2, 1fr); }
.jobnest-cols-3 { grid-template-columns: repeat(3, 1fr); }
.jobnest-cols-4 { grid-template-columns: repeat(4, 1fr); }
.jobnest-cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 780px) { .jobnest-cat-grid, .jobnest-company-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .jobnest-cat-grid, .jobnest-company-grid { grid-template-columns: 1fr; } }

.jobnest-cat-card {
	display: flex; flex-direction: column; gap: 4px;
	background: var(--jn-base); border: 1px solid var(--jn-line); border-radius: var(--jn-radius);
	padding: 18px 20px; color: var(--jn-ink); transition: box-shadow .18s ease, transform .18s ease;
}
.jobnest-cat-card:hover { box-shadow: var(--jn-shadow); transform: translateY(-2px); text-decoration: none; }
.jobnest-cat-card__name { font-family: var(--jn-font-heading); font-weight: 700; }
.jobnest-cat-card__count { color: var(--jn-muted); font-size: .85rem; }

.jobnest-company-card {
	display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
	background: var(--jn-base); border: 1px solid var(--jn-line); border-radius: var(--jn-radius); padding: 20px; color: var(--jn-ink);
}
.jobnest-company-card:hover { box-shadow: var(--jn-shadow); text-decoration: none; }
.jobnest-company-card__logo img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; }
.jobnest-company-card__name { font-weight: 600; font-size: .9rem; }

/* ---- Dashboard ---- */
.jobnest-dashboard__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.jobnest-table { width: 100%; border-collapse: collapse; background: var(--jn-base); border: 1px solid var(--jn-line); border-radius: var(--jn-radius); overflow: hidden; }
.jobnest-table th, .jobnest-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--jn-line); }
.jobnest-table th { background: var(--jn-surface); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--jn-muted); }
.jobnest-table tr:last-child td { border-bottom: 0; }
.jobnest-status { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--jn-surface); font-size: .8rem; }
.jobnest-table__actions { display: flex; gap: 14px; }
.jobnest-link-danger { color: #a8071a; }

/* ---- AJAX pagination ---- */
.jobnest-pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 24px; }
.jobnest-page { min-width: 38px; height: 38px; border: 1px solid var(--jn-line); background: var(--jn-base); border-radius: 9px; cursor: pointer; font: inherit; color: var(--jn-ink); }
.jobnest-page:hover { border-color: var(--jn-primary-bright); }
.jobnest-page.is-current { background: var(--jn-primary-bright); border-color: var(--jn-primary-bright); color: #fff; }

/* =========================================================================
   Homepage + company/resume pages
   ========================================================================= */

/* ---- Hero ---- */
.jobnest-hero {
	background: linear-gradient(160deg, #1f3a5f 0%, #14283f 100%);
	color: #fff; padding: 72px 0 84px; text-align: center;
}
.jobnest-hero__title { color: #fff; font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); margin: 0 0 12px; }
.jobnest-hero__subtitle { color: rgba(255,255,255,.78); font-size: 1.15rem; margin: 0 0 32px; }
.jobnest-hero__search {
	display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
	max-width: 760px; margin: 0 auto;
	background: #fff; padding: 12px; border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.18);
}
.jobnest-hero__search .jobnest-input { flex: 1 1 240px; }
.jobnest-hero__search select { flex: 0 1 200px; }
.jobnest-hero__popular { margin: 22px 0 0; font-size: .92rem; color: rgba(255,255,255,.7); }
.jobnest-hero__popular span { margin-right: 6px; }
.jobnest-hero__popular a { color: #fff; opacity: .9; margin: 0 6px; border-bottom: 1px solid rgba(255,255,255,.35); }
.jobnest-hero__popular a:hover { opacity: 1; text-decoration: none; }

/* ---- Sections ---- */
.jobnest-section { padding: 56px 0; }
.jobnest-section--alt { background: var(--jn-surface); }
.jobnest-section__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 0 0 28px; }
.jobnest-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.jobnest-section__head .jobnest-section__title { margin: 0; }
.jobnest-section__more { font-weight: 600; white-space: nowrap; }

/* ---- CTA ---- */
.jobnest-cta { background: var(--jn-accent); color: #fff; padding: 48px 0; }
.jobnest-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.jobnest-cta__title { color: #fff; margin: 0 0 4px; font-size: 1.6rem; }
.jobnest-cta__text { margin: 0; color: rgba(255,255,255,.9); }
.jobnest-btn--invert { background: #fff; color: #0c7a5a; }
.jobnest-btn--invert:hover { background: #f0fbf6; color: #0c7a5a; }

/* ---- Company card meta ---- */
.jobnest-company-card__meta { color: var(--jn-muted); font-size: .8rem; }

/* ---- Single company ---- */
.jobnest-single-company { background: var(--jn-base); border: 1px solid var(--jn-line); border-radius: var(--jn-radius); padding: 28px; }
.jobnest-single-company__header { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.jobnest-single-company__logo img { width: 84px; height: 84px; object-fit: contain; border-radius: 12px; border: 1px solid var(--jn-line); }
.jobnest-single-company__title { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); }
.jobnest-single-company__tagline { color: var(--jn-muted); margin: 4px 0 0; }
.jobnest-single-company__meta { display: flex; gap: 16px; margin: 8px 0 0; color: var(--jn-muted); font-size: .92rem; }
.jobnest-single-company__content { margin: 16px 0 28px; }

/* ---- Resume list ---- */
.jobnest-resume-list { display: flex; flex-direction: column; gap: 16px; }
.jobnest-resume-card {
	display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
	background: var(--jn-base); border: 1px solid var(--jn-line); border-radius: var(--jn-radius); padding: 18px 20px;
}
.jobnest-resume-card:hover { box-shadow: var(--jn-shadow); }
.jobnest-resume-card__photo img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; }
.jobnest-resume-card__title { margin: 0 0 4px; font-size: 1.1rem; }
.jobnest-resume-card__headline { margin: 0; color: var(--jn-muted); font-size: .92rem; }
@media (max-width: 560px) { .jobnest-resume-card { grid-template-columns: 1fr; } }

/* =========================================================================
   Customizer-driven layout helpers
   ========================================================================= */

/* Header button + nav alignment */
.jobnest-nav { margin-left: auto; }
.jobnest-header__btn { padding: 9px 16px; white-space: nowrap; }
@media (max-width: 720px) {
	.jobnest-header__btn { display: none; }
}

/* Full-width layout (no sidebar) */
.jobnest-layout--full { display: block; }

/* Left sidebar option (archive + left-sidebar template) */
.jobnest-layout--sidebar-left { grid-template-columns: 320px 1fr; }
.jobnest-archive-sidebar-left .jobnest-layout--with-sidebar { grid-template-columns: 320px 1fr; }
.jobnest-archive-sidebar-left .jobnest-layout__aside { order: -1; }
@media (max-width: 900px) {
	.jobnest-layout--sidebar-left { grid-template-columns: 1fr; }
	.jobnest-archive-sidebar-left .jobnest-layout--with-sidebar { grid-template-columns: 1fr; }
}

/* Footer widgets */
.jobnest-footer-widgets {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
	padding-block: 40px 8px;
}
.jobnest-footer-widgets .jobnest-widget { background: none; border: 0; padding: 0; }
.jobnest-footer-widgets .jobnest-widget__title { color: var(--jn-ink); }
@media (max-width: 720px) { .jobnest-footer-widgets { grid-template-columns: 1fr; gap: 24px; } }

/* Search-focused homepage: bigger hero, tighter */
.jobnest-hero--search { padding: 96px 0 110px; }
.jobnest-hero--minimal { padding: 96px 0 110px; }
