/* ==========================================================================
   JobWork.eu — стили
   Мобайл-фёрст, аккуратный современный лук. Все цвета — через переменные.
   ========================================================================== */

:root {
  --red:        #e11d2a;
  --red-dark:   #b3121d;
  --red-soft:   #fde7e9;
  --ink:        #14181f;
  --ink-2:      #3a4250;
  --muted:      #6b7382;
  --line:       #e8eaef;
  --bg:         #f4f6f9;
  --card:       #ffffff;
  --green:      #0f7a40;
  --green-soft: #e6f6ee;
  --blue:       #1d4ed8;
  --blue-soft:  #e7efff;
  --violet:     #6d28d9;
  --violet-soft:#f0e9ff;
  --amber:      #8a5a10;
  --amber-soft: #fdf3df;
  --shadow:     0 2px 8px rgba(20, 24, 31, .06), 0 1px 2px rgba(20, 24, 31, .04);
  --shadow-lg:  0 12px 40px rgba(20, 24, 31, .14);
  --radius:     16px;
  --radius-sm:  10px;
  --maxw:       1180px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 74px; -webkit-text-size-adjust: 100%; }
/* видимый фокус для клавиатурной навигации */
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 8px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; gap: 12px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand .dot { color: var(--red); }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--red), #ff5a4d);
  display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 900;
  box-shadow: 0 4px 12px rgba(225,29,42,.35);
}
.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.btn-employers {
  background: var(--red); color: #fff; border: 0;
  padding: 11px 18px; min-height: 42px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: background .15s ease, transform .1s ease;
}
.btn-employers:hover { background: var(--red-dark); }
.btn-employers:active { transform: scale(.97); }
.burger {
  width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; gap: 4px;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.burger span + span { margin-top: 4px; }

/* mobile nav drawer */
.nav-links { display: none; }
.mobile-nav {
  position: fixed; inset: 0; z-index: 60; visibility: hidden; opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}
.mobile-nav.open { visibility: visible; opacity: 1; }
.mobile-nav .scrim { position: absolute; inset: 0; background: rgba(10,12,16,.45); }
.mobile-nav .panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(82%, 320px);
  background: #fff; box-shadow: var(--shadow-lg); padding: 18px;
  transform: translateX(100%); transition: transform .25s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; gap: 6px;
}
.mobile-nav.open .panel { transform: translateX(0); }
.mobile-nav .panel a {
  padding: 13px 12px; border-radius: 10px; font-weight: 500; color: var(--ink-2);
}
.mobile-nav .panel a:hover { background: var(--bg); color: var(--ink); }
.mobile-nav .panel .close {
  align-self: flex-end; border: 0; background: var(--bg); width: 44px; height: 44px;
  border-radius: 10px; font-size: 20px; color: var(--ink-2);
}

/* ----------------------------- Hero ----------------------------- */
.hero {
  background:
    radial-gradient(1200px 380px at 80% -10%, rgba(225,29,42,.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
  border-bottom: 1px solid var(--line);
  padding: 34px 0 26px;
}
.hero h1 {
  margin: 0 0 10px; font-size: 28px; line-height: 1.18; letter-spacing: -.025em;
  font-weight: 800;
}
.hero h1 .accent { color: var(--red); }
.hero p { margin: 0 0 18px; color: var(--ink-2); font-size: 15.5px; max-width: 640px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hero-badges .chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow);
}
.hero-badges .chip .ok { color: var(--green); font-weight: 800; }

/* search + filters */
.controls { display: flex; flex-direction: column; gap: 12px; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; box-shadow: var(--shadow);
}
.search-box svg { flex: none; color: var(--muted); }
.search-box input {
  border: 0; outline: 0; width: 100%; font-size: 15.5px; color: var(--ink); background: transparent;
}
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { height: 0; }
.filter-chip {
  flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 11px 16px; min-height: 42px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: all .15s ease; white-space: nowrap;
}
.filter-chip .count { color: var(--muted); font-weight: 600; margin-left: 5px; font-size: 12.5px; }
.filter-chip:hover { border-color: #cfd4dd; }
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter-chip.active .count { color: rgba(255,255,255,.65); }

/* ----------------------------- Listing ----------------------------- */
.listing { padding: 24px 0 56px; }
.listing-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.listing-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.listing-head .total { color: var(--muted); font-size: 14px; }

.grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}

/* ----------------------------- Card ----------------------------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #dfe3ea; }
.card .urgent-ribbon {
  background: linear-gradient(90deg, var(--red), #ff5a4d); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  padding: 6px 16px; display: flex; align-items: center; gap: 6px;
}
.card-body { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.card-loc svg { flex: none; color: var(--red); }
.card-loc .country { color: var(--ink-2); font-weight: 600; }
.card h3 {
  margin: 0; font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.card h3 a:hover { color: var(--red); }

.price {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  background: var(--red-soft); border: 1px solid #f7ccd0;
  border-radius: 12px; padding: 11px 14px;
}
.price .amount { font-size: 23px; font-weight: 800; color: var(--red-dark); letter-spacing: -.02em; }
.price .period { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.price .note { width: 100%; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px;
  border: 1px solid transparent; display: inline-flex; align-items: center; gap: 4px;
}
.tag.ok    { background: var(--green-soft);  color: var(--green);  border-color: #c9ecd8; }
.tag.info  { background: var(--blue-soft);   color: var(--blue);   border-color: #d3e2ff; }
.tag.visa  { background: var(--violet-soft); color: var(--violet); border-color: #e3d6ff; }
.tag.free  { background: var(--amber-soft);  color: var(--amber);  border-color: #f3e3bd; }

.card-intro { color: var(--ink-2); font-size: 14px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-foot { display: flex; align-items: center; gap: 10px; padding: 0 16px 16px; }
.btn-apply {
  flex: 1; background: var(--red); color: #fff; border: 0; border-radius: 11px;
  padding: 12px 16px; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s ease, transform .1s ease;
}
.btn-apply:hover { background: var(--red-dark); }
.btn-apply:active { transform: scale(.98); }
.btn-detail {
  flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 11px; padding: 12px 16px; font-weight: 600; font-size: 14px;
}
.btn-detail:hover { border-color: #cfd4dd; color: var(--ink); }

.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
  border: 2px dashed var(--line); border-radius: var(--radius); background: #fff;
}
.empty strong { display: block; color: var(--ink-2); font-size: 17px; margin-bottom: 6px; }

/* ----------------------------- Footer ----------------------------- */
.site-footer {
  background: var(--ink); color: #c9cfda; padding: 36px 0 28px; margin-top: auto;
}
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.site-footer .brand { color: #fff; }
.site-footer .brand .logo { box-shadow: none; }
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.footer-col a, .footer-col p { display: block; color: #aab2c0; font-size: 14px; margin: 0 0 9px; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-about { color: #9aa3b2; font-size: 13.5px; line-height: 1.6; max-width: 320px; margin: 12px 0 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 26px; padding-top: 18px;
  font-size: 12.5px; color: #828b9b; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between;
}

/* ----------------------------- Modal (apply form) ----------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  padding: 16px; visibility: hidden; opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}
.modal.open { visibility: visible; opacity: 1; }
.modal .scrim { position: absolute; inset: 0; background: rgba(10,12,16,.55); }
.modal .dialog {
  position: relative; width: 100%; max-width: 400px; background: #fff;
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 24px 22px 22px;
  transform: translateY(12px) scale(.98); transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.modal.open .dialog { transform: translateY(0) scale(1); }
.modal .dialog .x {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
  border: 0; background: var(--bg); border-radius: 10px; color: var(--ink-2); font-size: 18px;
}
.modal h3 { margin: 0 0 4px; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.modal .for-vacancy { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.modal .for-vacancy strong { color: var(--ink-2); }

.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field input[type="tel"] {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 14px; font-size: 17px; letter-spacing: .02em; color: var(--ink); outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input[type="tel"]:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,29,42,.12); }
.field input[type="tel"].invalid { border-color: #f0b4b9; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field .hint.error { color: var(--red); }

/* выбор мессенджера */
.field-channels { margin-top: 15px; }
.ch-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.ch-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.ch {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.ch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ch svg { flex: none; }
.ch:hover { border-color: #cfd4dd; }
.ch-tg svg { color: #229ED9; } .ch-wa svg { color: #25D366; } .ch-vb svg { color: #7360F2; }
.ch-tg:has(input:checked) { border-color: #229ED9; background: #e9f6fc; color: #1a7fb0; }
.ch-wa:has(input:checked) { border-color: #25D366; background: #e8f9ef; color: #1a9c4d; }
.ch-vb:has(input:checked) { border-color: #7360F2; background: #efedfe; color: #5a48d6; }
.ch:focus-within { box-shadow: 0 0 0 3px rgba(225,29,42,.12); }

.agreements { margin: 16px 0 6px; display: flex; flex-direction: column; gap: 11px; }
.checkrow { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.checkrow input { margin: 1px 0 0; width: 17px; height: 17px; accent-color: var(--red); flex: none; }
.checkrow a { color: var(--blue); font-weight: 600; }
.checkrow a:hover { text-decoration: underline; }

.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .cancel {
  flex: 1; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 13px; border-radius: 12px; font-weight: 600; font-size: 15px;
}
.modal-actions .cancel:hover { background: var(--bg); }
.modal-actions .submit {
  flex: 1.4; border: 0; background: var(--red); color: #fff;
  padding: 13px; border-radius: 12px; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s ease, opacity .15s ease;
}
.modal-actions .submit:disabled { background: #f1b5ba; cursor: not-allowed; }
.modal-actions .submit:not(:disabled):hover { background: var(--red-dark); }

.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* success state */
.modal-success { text-align: center; padding: 8px 4px 4px; }
.modal-success .check {
  width: 64px; height: 64px; margin: 4px auto 16px; border-radius: 50%;
  background: var(--green-soft); display: grid; place-items: center; color: var(--green);
  animation: pop .3s cubic-bezier(.4,0,.2,1);
}
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.modal-success h3 { margin-bottom: 8px; }
.modal-success p { color: var(--ink-2); font-size: 14.5px; margin: 0 0 20px; }
.modal-success .done {
  border: 0; background: var(--ink); color: #fff; padding: 13px 28px; border-radius: 12px; font-weight: 600;
}

/* ----------------------------- Vacancy detail page ----------------------------- */
.detail { padding: 22px 0 60px; }
.breadcrumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs .sep { color: #cfd4dd; }
.detail-layout { display: grid; gap: 20px; grid-template-columns: 1fr; }
.detail-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 20px; }
.detail-main .urgent-ribbon { display: inline-flex; border-radius: 8px; margin-bottom: 14px; }
.detail-main h1 { margin: 0 0 12px; font-size: 25px; line-height: 1.22; letter-spacing: -.02em; font-weight: 800; }
.detail-loc { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 15px; font-weight: 500; margin-bottom: 16px; }
.detail-loc svg { color: var(--red); flex: none; }
.detail-loc .note { color: var(--muted); font-weight: 400; }
.detail-intro { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; margin: 0 0 20px; }
.detail .tags { margin-bottom: 20px; }

.section { margin-bottom: 22px; }
.section:last-child { margin-bottom: 0; }
.section h2 {
  font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink); margin: 0 0 12px; display: flex; align-items: center; gap: 9px;
}
.section h2::before { content: ""; width: 4px; height: 16px; background: var(--red); border-radius: 3px; }
.section ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.section li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.section li::before {
  content: ""; position: absolute; left: 4px; top: 8px; width: 7px; height: 7px;
  background: var(--red); border-radius: 50%;
}

/* sticky apply aside */
.detail-aside { position: relative; }
.apply-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; position: sticky; top: 78px;
}
.apply-card .price { margin-bottom: 16px; }
.apply-card .perk { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 10px; }
.apply-card .perk svg { color: var(--green); flex: none; }
.apply-card .btn-apply { width: 100%; margin-top: 6px; padding: 14px; font-size: 16px; }
.apply-card .reassure { text-align: center; font-size: 12px; color: var(--muted); margin: 12px 0 0; }

/* mobile sticky apply bar */
.apply-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; box-shadow: 0 -6px 24px rgba(20,24,31,.08);
}
.apply-bar .ab-price { display: flex; flex-direction: column; line-height: 1.1; }
.apply-bar .ab-price .amount { font-size: 18px; font-weight: 800; color: var(--red-dark); }
.apply-bar .ab-price .period { font-size: 11.5px; color: var(--muted); }
.apply-bar .btn-apply { flex: 1; padding: 13px; }

/* legal / static pages */
.legal { padding: 28px 0 60px; }
.legal-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 22px; max-width: 760px; margin: 0 auto; }
.legal-card h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.02em; }
.legal-card .updated { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.legal-card h2 { font-size: 17px; margin: 24px 0 10px; }
.legal-card p, .legal-card li { color: var(--ink-2); font-size: 14.5px; line-height: 1.65; }
.legal-card ul { padding-left: 20px; }
.legal-card a { color: var(--blue); }

/* ----------------------------- Responsive ----------------------------- */
@media (min-width: 600px) {
  .hero { padding: 46px 0 30px; }
  .hero h1 { font-size: 36px; }
  .controls { flex-direction: row; align-items: center; }
  .search-box { flex: 1; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 760px) {
  .nav-links { display: flex; gap: 4px; }
  .nav-links a { padding: 8px 13px; border-radius: 9px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
  .nav-links a:hover { background: var(--bg); color: var(--ink); }
  .burger { display: none; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .detail-layout { grid-template-columns: 1fr 320px; align-items: start; }
  .apply-bar { display: none; }
  .detail { padding-bottom: 60px; }
}
@media (min-width: 1000px) {
  .hero h1 { font-size: 42px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 759px) {
  /* extra bottom space on detail page so sticky bar doesn't cover content */
  .detail { padding-bottom: 88px; }
  .detail-aside { display: none; }
}
