/* ============================================================
   WintWorks — Job board styles
   ============================================================ */
:root {
  --primary: #2563eb;
  --primary-2: #38bdf8;
  --primary-grad: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #38bdf8 100%);
  --bg: #f4f7fb;
  --bg-soft: #eef3fa;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #5b6b83;
  --border: #e3e9f2;
  --green: #059669;
  --green-bg: #ecfdf5;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .06), 0 18px 40px -16px rgba(15, 23, 42, .22);
  --nav-h: 64px;
}
[data-theme="dark"] {
  --bg: #0b1220;
  --bg-soft: #101a2e;
  --card: #131e33;
  --text: #e7eefb;
  --muted: #93a3bb;
  --border: #22314d;
  --green-bg: #0c2b21;
  --amber-bg: #2b200c;
  --red-bg: #2b0c0c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 18px 40px -16px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.hidden { display: none !important; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 20px; height: 100%;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -.02em;
}
.logo:hover { text-decoration: none; }
.logo svg { width: 34px; height: 34px; }
.logo span b { color: var(--primary); }
.main-nav { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.main-nav a {
  color: var(--muted); font-weight: 600; font-size: 14.5px;
  padding: 8px 12px; border-radius: 10px;
}
.main-nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.main-nav a.cta { color: #fff; background: var(--primary-grad); }
.main-nav a.cta:hover { filter: brightness(1.08); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--muted); display: grid; place-items: center;
}
.icon-btn:hover { color: var(--text); border-color: var(--primary-2); }
.icon-btn .badge-dot {
  position: absolute; transform: translate(50%, -50%);
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700;
  display: none; place-items: center; right: 0; top: 0;
}
.nav-toggle-btn { display: none; }
@media (max-width: 860px) {
  .main-nav {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column;
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 12px; display: none; box-shadow: var(--shadow-lg); margin: 0;
  }
  .main-nav.open { display: flex; }
  .nav-toggle-btn { display: grid; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 500px at 80% -10%, #0ea5e9 0%, transparent 60%),
    radial-gradient(900px 420px at 10% 110%, #1e40af 0%, transparent 55%),
    linear-gradient(140deg, #0f2a6b 0%, #14357f 45%, #0b1d4d 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .16; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 10l7 18 16-7-7 16 18 7-18 7 7 16-16-7-7 18-7-18-16 7 7-16-18-7 18-7-7-16 16 7z' fill='none' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E");
  animation: snowdrift 60s linear infinite;
}
@keyframes snowdrift { from { background-position: 0 0; } to { background-position: 0 480px; } }
.hero-inner { position: relative; padding: 64px 0 48px; text-align: center; max-width: 820px; margin: auto; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -.02em; }
.hero h1 .grad { background: linear-gradient(90deg, #7dd3fc, #bae6fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #cfe1fb; font-size: 17px; margin: 0 auto 28px; max-width: 640px; }
.search-wrap {
  display: flex; gap: 0; max-width: 640px; margin: 0 auto;
  background: #fff; border-radius: 16px; padding: 6px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .5);
}
.search-wrap svg { width: 22px; height: 22px; align-self: center; margin-left: 10px; flex: none; color: #64748b; }
.search-wrap input {
  flex: 1; border: 0; outline: none; font-size: 16px; padding: 12px 10px;
  color: #0f172a; background: transparent; min-width: 0;
}
.search-wrap button {
  border: 0; border-radius: 12px; padding: 12px 22px; font-weight: 700; font-size: 15px;
  background: var(--primary-grad); color: #fff; flex: none;
}
.search-wrap button:hover { filter: brightness(1.1); }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.chip {
  border: 1px solid rgba(255, 255, 255, .25); color: #eaf2ff;
  background: rgba(255, 255, 255, .08); padding: 7px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
}
.chip:hover { background: rgba(255, 255, 255, .18); text-decoration: none; color: #fff; }
.hero-stats {
  display: flex; gap: 34px; justify-content: center; margin-top: 36px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat b { display: block; font-size: 26px; }
.hero-stat span { font-size: 13px; color: #b9d2f5; }

/* ---------- sections ---------- */
.section { padding: 36px 0; }
.section-head { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; }
.section-head h2 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
.section-head .sub { color: var(--muted); font-size: 14px; }
.section-head .spacer { flex: 1; }

/* filter bar */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.filter-bar select, .filter-bar input[type="text"] {
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: 10px; padding: 9px 12px; font-size: 14px; outline: none; min-width: 150px;
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--primary-2); }
.remote-toggle {
  display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; user-select: none; margin-left: auto;
}
.remote-toggle input { accent-color: var(--primary); width: 17px; height: 17px; }
.result-count { font-size: 13.5px; color: var(--muted); }
.btn-reset {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 10px; padding: 8px 12px; font-size: 13.5px;
}
.btn-reset:hover { color: var(--text); border-color: var(--muted); }

/* category chips */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cat-chip {
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 7px 15px; font-size: 13.5px; font-weight: 600;
  transition: all .15s ease;
}
.cat-chip:hover { color: var(--primary); border-color: var(--primary-2); }
.cat-chip.active { background: var(--primary-grad); color: #fff; border-color: transparent; }

/* source status pills */
.sync-status { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.src-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  padding: 5px 11px; border-radius: 999px;
}
.src-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.src-pill.ok .dot { background: var(--green); }
.src-pill.err .dot { background: var(--red); }
.src-pill b { color: var(--text); font-weight: 700; }

/* job grid */
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.job-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease;
  animation: fadeUp .35s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.job-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.job-card-top { display: flex; gap: 12px; align-items: flex-start; }
.job-logo {
  width: 46px; height: 46px; border-radius: 12px; flex: none; object-fit: cover;
  background: var(--bg-soft); border: 1px solid var(--border);
}
.job-logo-fallback {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff;
  background: var(--primary-grad);
}
.job-title { font-size: 16.5px; font-weight: 700; line-height: 1.35; margin: 0; }
.job-title a { color: var(--text); }
.job-title a:hover { color: var(--primary); text-decoration: none; }
.job-company { color: var(--muted); font-size: 14px; margin-top: 2px; }
.bookmark-btn {
  margin-left: auto; flex: none; border: 0; background: transparent; color: var(--muted);
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 17px;
}
.bookmark-btn:hover { background: var(--bg-soft); }
.bookmark-btn.saved { color: var(--amber); }
.job-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge.remote { color: var(--green); background: var(--green-bg); border-color: transparent; }
.badge.salary { color: var(--amber); background: var(--amber-bg); border-color: transparent; }
.badge.src { background: transparent; }
.job-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.job-tag {
  font-size: 11.5px; color: var(--muted); background: var(--bg);
  border: 1px dashed var(--border); padding: 2px 8px; border-radius: 6px;
}
.job-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--muted);
}
.job-foot a.apply {
  font-weight: 700; color: var(--primary); font-size: 13.5px;
  display: inline-flex; gap: 5px; align-items: center;
}
.job-foot a.apply:hover { text-decoration: none; color: var(--primary-2); }
/* skeleton */
.skel { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg) 70%, transparent), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skel .l { height: 14px; border-radius: 6px; background: var(--bg-soft); margin-bottom: 12px; }
.skel .l.w60 { width: 60%; } .skel .l.w40 { width: 40%; } .skel .l.w80 { width: 80%; }

.load-more-wrap { text-align: center; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 0; border-radius: 12px; padding: 12px 26px; font-weight: 700; font-size: 15px;
  background: var(--primary-grad); color: #fff; box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.ghost:hover { border-color: var(--primary-2); }

/* empty state */
.empty {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted);
  background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty h3 { color: var(--text); margin: 0 0 6px; }

/* ---------- ads ---------- */
.ad-slot { text-align: center; margin: 18px 0; overflow: hidden; }
.ad-slot .ad-label { font-size: 10.5px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.ad-placeholder {
  border: 1px dashed var(--border); border-radius: 12px; color: var(--muted);
  font-size: 12.5px; padding: 34px 10px; background: var(--bg-soft);
}

/* ---------- detail ---------- */
.detail-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 940px) { .detail-wrap { grid-template-columns: 1fr; } }
.detail-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.detail-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 6px; }
.detail-header .job-logo, .detail-header .job-logo-fallback { width: 64px; height: 64px; border-radius: 14px; font-size: 24px; }
.detail-title { font-size: clamp(22px, 3vw, 30px); line-height: 1.25; margin: 0 0 6px; letter-spacing: -.01em; }
.detail-company { color: var(--muted); font-size: 16px; font-weight: 600; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.detail-description { margin-top: 20px; font-size: 15.5px; color: color-mix(in srgb, var(--text) 90%, var(--muted)); }
.detail-description h1, .detail-description h2, .detail-description h3 { margin: 18px 0 8px; font-size: 1.25em; }
.detail-description ul, .detail-description ol { padding-left: 22px; }
.detail-description li { margin: 4px 0; }
.detail-description a { text-decoration: underline; }
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--nav-h) + 16px); }
@media (max-width: 940px) { .sidebar { position: static; } }
.apply-box {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.apply-box .btn { width: 100%; }
.apply-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; }
.fact-list { margin: 16px 0 0; display: grid; gap: 10px; }
.fact { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.fact b { font-weight: 600; }
.fact span { color: var(--muted); text-align: right; }
.share-row { display: flex; gap: 8px; }
.btn-share {
  flex: 1; border: 1px solid var(--border); background: var(--card); color: var(--muted);
  border-radius: 10px; padding: 9px 10px; font-size: 13px; font-weight: 600;
}
.btn-share:hover { color: var(--text); border-color: var(--primary-2); }
.related-title { font-size: 16px; margin: 30px 0 12px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.breadcrumb { font-size: 13.5px; color: var(--muted); margin: 18px 0 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 100; box-shadow: var(--shadow-lg);
  display: flex; gap: 10px; align-items: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast button {
  border: 0; background: var(--primary); color: #fff; border-radius: 8px;
  padding: 6px 12px; font-weight: 700; font-size: 13px;
}

/* ---------- static pages ---------- */
.page { padding: 44px 0 60px; }
.page-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow); max-width: 860px; margin-inline: auto; }
.page-card h1 { margin-top: 0; font-size: 30px; letter-spacing: -.01em; }
.page-card h2 { margin-top: 30px; font-size: 20px; }
.page-card p, .page-card li { color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.contact-form { display: grid; gap: 14px; margin-top: 20px; }
.contact-form label { font-size: 14px; font-weight: 600; }
.contact-form input, .contact-form textarea, .contact-form select {
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px;
  font: inherit; background: var(--bg); color: var(--text); width: 100%;
}
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 24px 0; }
.price-card { border: 1px solid var(--border); border-radius: 14px; padding: 22px; background: var(--bg); text-align: center; }
.price-card.hot { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--card)); position: relative; }
.price-card h3 { margin: 0 0 4px; font-size: 17px; }
.price-card .price { font-size: 28px; font-weight: 800; margin: 6px 0; }
.price-card .price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.price-card ul { list-style: none; padding: 0; margin: 12px 0 18px; font-size: 13.5px; color: var(--muted); }
.price-card li { padding: 4px 0; }
.hot-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--primary-grad); color: #fff; font-size: 11px; font-weight: 800;
  padding: 3px 12px; border-radius: 999px; letter-spacing: .04em;
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--card); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding: 44px 0 30px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 300px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--text); font-size: 14.5px; padding: 4px 0; }
.footer-col a:hover { color: var(--primary); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.footer-bottom a { color: var(--muted); }

@media (max-width: 640px) {
  .jobs-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 44px 0 36px; }
  .remote-toggle { margin-left: 0; }
  .search-wrap { flex-direction: column; gap: 8px; background: transparent; box-shadow: none; padding: 0; }
  .search-wrap input { background: #fff; border-radius: 12px; padding: 13px 14px; }
  .search-wrap svg { display: none; }
  .search-wrap button { width: 100%; }
}
