/* ── Reset & base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --gold: #f5a623;
  --blue: #003087;
  --blue-light: #0047b3;
  --text: #1a1a2e;
  --text-muted: #5a6070;
  --bg: #f4f6fa;
  --card-bg: #ffffff;
  --border: #dde3ec;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,.14);
}
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; }
a { color: var(--blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font: inherit; }

/* ── Ad-block banner ─────────────────────────────────────────────────────── */
#adblock-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 9999; align-items: center; justify-content: center;
}
#adblock-overlay.visible { display: flex; }
#adblock-modal {
  background: #fff; border-radius: 12px; max-width: 460px; width: 90%;
  padding: 32px; text-align: center; box-shadow: 0 8px 40px rgba(0,0,0,.25);
}
#adblock-modal h2 { color: var(--blue); margin-bottom: 12px; font-size: 1.2rem; }
#adblock-modal p { color: var(--text-muted); margin-bottom: 20px; font-size: .95rem; }
#adblock-dismiss {
  background: var(--blue); color: #fff; border: none; padding: 10px 28px;
  border-radius: 6px; font-size: .95rem; opacity: .4; pointer-events: none;
  transition: opacity .3s;
}
#adblock-dismiss.ready { opacity: 1; pointer-events: auto; }
#adblock-dismiss:hover { background: var(--blue-light); }
#adblock-countdown { font-size: .85rem; color: var(--text-muted); margin-top: 8px; min-height: 1.2em; }

/* ── Header ──────────────────────────────────────────────────────────────── */
header {
  background: var(--blue);
  color: #fff;
  padding: 0 24px;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0;
}
.logo { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.logo-icon {
  width: 44px; height: 44px; background: var(--gold);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-weight: 900; font-size: 1.1rem; color: var(--blue); flex-shrink: 0;
}
.logo-text h1 { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.logo-text span { font-size: .8rem; opacity: .8; }
.header-search {
  margin-left: auto; display: flex; gap: 8px; flex: 0 1 420px;
}
.header-search input {
  flex: 1; padding: 10px 14px; border-radius: 6px; border: none;
  font-size: .95rem; outline: none;
}
.header-search input:focus { box-shadow: 0 0 0 3px rgba(245,166,35,.5); }
.header-search button {
  background: var(--gold); border: none; border-radius: 6px;
  padding: 10px 18px; font-weight: 600; color: var(--blue);
}

/* ── Ad leaderboard ──────────────────────────────────────────────────────── */
.ad-leaderboard {
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; justify-content: center; align-items: center;
  padding: 8px 0; min-height: 60px;
}
.ad-placeholder {
  width: 728px; max-width: 100%; height: 90px;
  background: #f0f0f0; border: 1px dashed #ccc;
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: .8rem; border-radius: 4px;
}
/* Empty ad slot reserved for AdSense — hidden so it doesn't show as a blank
   box. !important overrides .ad-sidebar's later display:flex. Remove the
   .ad-slot class on a container once it holds a real unit. */
.ad-slot { display: none !important; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.page { max-width: 1200px; margin: 0 auto; padding: 24px 16px; display: flex; gap: 24px; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
aside {
  width: 240px; flex-shrink: 0;
}
.filter-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.filter-card h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 12px; }
.filter-group { margin-bottom: 8px; }
.filter-group label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .9rem; padding: 4px 0; }
.filter-group label:hover { color: var(--blue-light); }
.filter-group input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); }
select.filter-select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: .9rem; background: #fff;
  color: var(--text); margin-top: 4px;
}
.salary-range { display: flex; flex-direction: column; gap: 6px; }
.salary-range input[type=range] { width: 100%; accent-color: var(--blue); }
.salary-label { font-size: .82rem; color: var(--text-muted); display: flex; justify-content: space-between; }

/* Sidebar ad */
.ad-sidebar {
  position: sticky; top: 16px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px;
  display: flex; justify-content: center; min-height: 250px; align-items: center;
}

/* ── Main content ────────────────────────────────────────────────────────── */
main { flex: 1; min-width: 0; }
.results-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.results-count { font-size: .9rem; color: var(--text-muted); }
.results-count strong { color: var(--text); font-size: 1rem; }
.sort-select {
  padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: .88rem; background: #fff;
}

/* ── Job cards ────────────────────────────────────────────────────────────── */
.job-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  margin-bottom: 12px; box-shadow: var(--shadow);
  transition: box-shadow .18s, border-color .18s;
  display: block;
}
.job-card:hover { box-shadow: var(--shadow-hover); border-color: var(--blue-light); text-decoration: none; }
.job-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.job-title { font-size: 1.05rem; font-weight: 600; color: var(--blue-light); line-height: 1.3; }
.job-badge {
  flex-shrink: 0; padding: 3px 10px; border-radius: 20px; font-size: .75rem;
  font-weight: 600; white-space: nowrap;
}
.badge-state    { background: #e8f0fe; color: #1a56db; }
.badge-city     { background: #e0f5e9; color: #1b7e3a; }
.badge-county   { background: #fff3e0; color: #c75b00; }
.badge-school   { background: #fce4ec; color: #c2185b; }
.badge-university { background: #ede7f6; color: #5e35b1; }
.badge-college  { background: #e0f7fa; color: #00696f; }
.badge-other    { background: #f5f5f5; color: #555; }

.job-meta {
  margin-top: 8px; display: flex; flex-wrap: wrap; gap: 12px;
  font-size: .85rem; color: var(--text-muted);
}
.job-meta span { display: flex; align-items: center; gap: 4px; }
.job-footer {
  margin-top: 12px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 8px;
}
.job-salary { font-size: .9rem; color: var(--text); font-weight: 500; }
.apply-btn {
  background: var(--blue); color: #fff; border: none;
  padding: 7px 18px; border-radius: 6px; font-size: .85rem; font-weight: 600;
  text-decoration: none; display: inline-block;
  margin-left: auto; /* stays right-aligned even when salary/close date are absent */
}
.apply-btn:hover { background: var(--blue-light); text-decoration: none; }
.close-date { font-size: .8rem; color: #c0392b; font-weight: 500; }
.close-date.urgent { animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }

/* In-feed ad */
.ad-infeed {
  background: #fafafa; border: 1px dashed #dde;
  border-radius: var(--radius); padding: 14px;
  text-align: center; color: #aaa; font-size: .8rem;
  margin-bottom: 12px; min-height: 100px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
  display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap;
}
.page-btn {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; font-size: .88rem; color: var(--text);
  transition: background .15s;
}
.page-btn:hover { background: var(--bg); }
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-btn:disabled { opacity: .4; pointer-events: none; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 1rem; }

/* ── Loading ──────────────────────────────────────────────────────────────── */
.loading-bar {
  height: 3px; background: linear-gradient(90deg, var(--blue) 0%, var(--gold) 100%);
  position: fixed; top: 0; left: 0; width: 0; transition: width .4s; z-index: 9998;
}

/* ── Suggest a source ────────────────────────────────────────────────────── */
.faq-section { padding: 8px 16px 0; }
.faq-card {
  max-width: 760px; margin: 24px auto 0;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow);
}
.faq-card h2 { color: var(--blue); font-size: 1.15rem; margin-bottom: 14px; }
.faq-card h3 { color: var(--blue-light); font-size: .98rem; margin: 18px 0 4px; }
.faq-card p { color: var(--text); font-size: .92rem; line-height: 1.5; margin: 0; }

.suggest-section { padding: 8px 16px 0; }
.suggest-card {
  max-width: 760px; margin: 24px auto 0;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}
.suggest-card h2 { color: var(--blue); font-size: 1.15rem; margin-bottom: 6px; }
.suggest-card > p { color: var(--text-muted); font-size: .92rem; margin-bottom: 16px; }
.suggest-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.suggest-row input { flex: 1 1 240px; }
#suggest-form input[type=text],
#suggest-form input[type=url],
#suggest-form input[type=email],
#suggest-form textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
  font: inherit; font-size: .92rem; width: 100%;
}
#suggest-form textarea { resize: vertical; margin-bottom: 10px; }
#suggest-form input:focus, #suggest-form textarea:focus {
  outline: none; border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(0,71,179,.15);
}
.hp-field { position: absolute !important; left: -9999px !important; height: 1px; width: 1px; }
.suggest-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
#suggest-submit {
  background: var(--blue); color: #fff; border: none;
  padding: 10px 24px; border-radius: 6px; font-weight: 600; font-size: .92rem;
}
#suggest-submit:hover { background: var(--blue-light); }
#suggest-submit:disabled { opacity: .5; pointer-events: none; }
#suggest-status { font-size: .88rem; }
#suggest-status.ok { color: #1b7e3a; font-weight: 600; }
#suggest-status.err { color: #c0392b; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  background: var(--blue); color: rgba(255,255,255,.85);
  padding: 32px 24px; margin-top: 40px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-about { font-size: .9rem; line-height: 1.7; max-width: 700px; margin-bottom: 20px; }
.footer-about strong { color: var(--gold); }
.footer-links { font-size: .85rem; opacity: .7; }
.footer-links a { color: #fff; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page { flex-direction: column; }
  aside { width: 100%; }
  .ad-sidebar { display: none; }
  .header-inner { flex-wrap: wrap; }
  .header-search { flex: 0 1 100%; }
  .ad-leaderboard .ad-placeholder { width: 100%; height: 50px; }
}
