/* ==========================================================================
   EduNav — page styles for vakansiyalar.html only.
   Every class here is prefixed .vak- and is loaded after style.css.
   Nothing in this file may be reused by another page.

   The listing renders the same vacancy card the homepage uses: a bordered
   card with a coloured spine down the left edge, the role icon + contract
   chip in the head, the title/organisation/location block in the body and a
   salary + CTA foot pinned to the bottom of the card. The card itself stays
   a [data-item] for the Catalogue module — no filter attribute is touched.
   ========================================================================== */

/* --- results grid: 3-up desktop, 2-up ≤1024, 1-up ≤560 -------------------- */
.vak-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

/* --- the card ------------------------------------------------------------- */
.vak-card {
  --vak-accent: var(--brand);
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  height: 100%;
  padding: 18px 18px 16px 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.vak-card--info { --vak-accent: var(--info); }
.vak-card--ok   { --vak-accent: var(--ok); }
.vak-card--kg   { --vak-accent: var(--kg-text); }

.vak-card:hover,
.vak-card:focus-within {
  border-color: var(--line-5);
  box-shadow: var(--sh-2);
  transform: translateY(-4px);
}

/* the coloured spine — echoes the role colour of .vac-icon */
.vak-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--vak-accent);
  transition: width .2s var(--ease);
}
.vak-card:hover .vak-spine,
.vak-card:focus-within .vak-spine { width: 6px; }

/* --- head: role icon · contract chip · publish date ----------------------- */
.vak-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.vak-head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 0;
  text-align: right;
}

.vak-date {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

/* --- body: title · organisation · location ------------------------------- */
.vak-body { min-width: 0; }

.vak-card .vac-title { margin: 0; }

.vak-link {
  color: inherit;
  text-decoration: none;
}
/* whole-card hit area: the only link in the card */
.vak-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-md);
}
.vak-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r-xxs);
}

.vak-card .vac-org {
  margin-top: 6px;
  overflow-wrap: anywhere;
}

/* the row layout hides .vac-loc below 560px; inside a card it is a full line */
.vak-card .vac-loc {
  display: flex;
  align-items: center;
  flex: none;
  gap: 7px;
  margin-top: 10px;
  color: var(--text-2);
}
.vak-card .vac-loc svg {
  flex: none;
  color: var(--muted-2);
}

/* --- foot: salary · CTA --------------------------------------------------- */
.vak-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--surface-3);
}

.vak-pay {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.vak-card .vac-salary { white-space: normal; }

.vak-per {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* visual button — the card link above supplies the actual navigation */
.vak-cta {
  flex: none;
  pointer-events: none;
}
.vak-cta svg { transition: transform .18s var(--ease); }

.vak-card:hover .vak-cta,
.vak-card:focus-within .vak-cta {
  border-color: var(--ink);
  color: var(--ink);
}
.vak-card:hover .vak-cta svg,
.vak-card:focus-within .vak-cta svg { transform: translateX(3px); }

/* --- empty state ---------------------------------------------------------- */
.vak-empty { margin-top: 24px; }

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
  .vak-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .vak-grid { grid-template-columns: minmax(0, 1fr); }

  .vak-card { padding: 16px 16px 14px 20px; }
  .vak-head-meta { gap: 5px; }
  .vak-foot { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .vak-card,
  .vak-spine,
  .vak-cta svg { transition: none; }

  .vak-card:hover,
  .vak-card:focus-within { transform: none; }
}


/* ==========================================================================
   FILTER BAR
   --------------------------------------------------------------------------
   One line at the head of the list: a field, a district picker, a submit, then
   the employment chips. No card and no labels — at this size the placeholder
   and the chip text say everything a label would, and the panel it replaced
   cost 269px of height before the first result.
   ========================================================================== */

.vak-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-4);
}

.vak-bar-q { flex: 1 1 260px; min-width: 0; height: 40px; }
.vak-bar-dd { flex: 0 0 auto; min-width: 168px; }
.vak-bar-dd .dd-trigger { height: 40px; }
.vak-bar-go { flex: none; height: 40px; padding: 0 18px; }

/* Splits the two halves of the row — what you type from what you click. */
.vak-bar-sep {
  flex: none;
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--line-3);
}

.vak-bar-clear {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.vak-bar-clear:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 720px) {
  .vak-bar-q { flex: 1 1 100%; }
  .vak-bar-dd { flex: 1 1 auto; }
  /* The divider has nothing to divide once the row wraps. */
  .vak-bar-sep { display: none; }
  .vak-bar-clear { margin-left: 0; }
}
