/* WorkHub — vacancies list page */

body.page-vacancies {
  background: var(--bg-muted);
}

.page-vacancies .header {
  background: rgba(255, 255, 255, 0.96);
}

/* —— Page top —— */
.vac-page {
  padding: 28px 0 64px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--text-3);
}

.breadcrumbs a {
  color: var(--text-3);
  transition: color 0.15s;
}

.breadcrumbs a:hover {
  color: var(--blue);
}

.breadcrumbs__sep {
  opacity: 0.6;
}

.vac-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.vac-page__title {
  margin: 0 0 4px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.vac-page__count {
  margin: 0;
  font-size: 14px;
  color: var(--text-3);
  font-weight: 500;
}

.subscribe-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 650;
  padding: 8px 0;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.subscribe-search:hover {
  opacity: 0.8;
}

.subscribe-search i {
  font-size: 18px;
}

/* —— Search strip —— */
.vac-search {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  overflow: visible;
  position: relative;
  z-index: 20;
}

.vac-search__row {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  z-index: 5;
}

.vac-search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  color: var(--text-3);
}

.vac-search__field--loc {
  flex: 0 0 190px;
  border-left: 1px solid var(--line);
  position: relative;
  z-index: 3;
}

.vac-search__field--loc:has(.dd.is-open) {
  z-index: 40;
}

.vac-search__field input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  height: 44px;
}

.vac-search__field input::placeholder {
  color: var(--text-3);
}

.vac-search__btn {
  flex-shrink: 0;
  height: 48px;
  padding: 0 28px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s;
}

.vac-search__btn:hover {
  background: var(--blue-hover);
}

.vac-search__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 0 4px 2px;
  position: relative;
  z-index: 1;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip.is-active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 650;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-2);
  font-weight: 550;
  position: relative;
  z-index: 1;
}

.sort:has(.dd.is-open) {
  z-index: 40;
}

/* —— Layout —— */
.vac-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

/* —— Filters sidebar —— */
.filters {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 18px 18px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-h) + 16px);
  overflow: visible;
  z-index: 10;
}

.filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.filters__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.filters__reset {
  font-size: 13px;
  font-weight: 650;
  color: var(--blue);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.filters__reset:hover {
  text-decoration: underline;
}

.filter-group {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.filter-group:last-of-type {
  border-bottom: 0;
  margin-bottom: 12px;
  padding-bottom: 0;
}

.filter-group__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 750;
  color: var(--text);
}

.filter-input,
.filter-select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}

.filter-input:focus,
.filter-select:focus {
  border-color: #b4c5ff;
}

.filter-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b93a7' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.filter-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-search {
  position: relative;
  margin-bottom: 10px;
}

.filter-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 14px;
  pointer-events: none;
}

.filter-search input {
  padding-left: 34px;
}

.salary-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.salary-inputs label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 550;
}

.salary-slider {
  position: relative;
  height: 28px;
  margin: 4px 0 6px;
}

.salary-slider__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 4px;
  background: #e2e7f0;
  border-radius: 4px;
}

.salary-slider__range {
  position: absolute;
  top: 12px;
  height: 4px;
  background: var(--blue);
  border-radius: 4px;
}

.salary-slider input[type="range"] {
  position: absolute;
  left: 0;
  width: 100%;
  top: 4px;
  height: 20px;
  margin: 0;
  background: none;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

.salary-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.15);
  cursor: pointer;
}

.salary-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.15);
  cursor: pointer;
}

.salary-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-3);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  line-height: 1.35;
}

.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check__box {
  width: 18px;
  height: 18px;
  border: 1.5px solid #c5cad6;
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
  display: grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}

.check__box i {
  font-size: 12px;
  color: #fff;
  opacity: 0;
}

.check input:checked + .check__box {
  background: var(--blue);
  border-color: var(--blue);
}

.check input:checked + .check__box i {
  opacity: 1;
}

.check__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.check__count {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 550;
}

.filters__apply {
  width: 100%;
  margin-top: 8px;
}

.filters__apply:disabled,
.filters__apply.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

/* —— Map view (Yandex) —— */
.vacancies-map {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 12px;
  min-height: 560px;
  margin-bottom: 18px;
}

.vacancies-map[hidden] {
  display: none !important;
}

.vacancies-map__canvas {
  min-height: 560px;
  height: 70vh;
  max-height: 720px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8eef8;
}

.vacancies-map__hint {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  max-width: min(420px, calc(100% - 340px));
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(10, 27, 61, 0.08);
  font-size: 14px;
  color: var(--text-2);
}

.vacancies-map__hint[hidden] {
  display: none !important;
}

.vacancies-map__hint p {
  margin: 0 0 8px;
}

.vacancies-map__hint p:last-child {
  margin-bottom: 0;
}

.vacancies-map__panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  min-height: 180px;
}

.vacancies-map__panel-empty {
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
}

.vacancies-map__card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.vacancies-map__card-meta,
.vacancies-map__card-salary {
  margin: 0 0 8px;
  color: var(--text-2);
  font-size: 14px;
}

.vacancies-map__card .btn {
  margin-top: 10px;
  width: 100%;
}

@media (max-width: 960px) {
  .vacancies-map {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .vacancies-map__canvas {
    height: 55vh;
    min-height: 360px;
  }

  .vacancies-map__hint {
    max-width: calc(100% - 32px);
  }
}

.filters-toggle {
  display: none;
  width: 100%;
  margin-bottom: 14px;
}

/* —— Results —— */
.results__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.results__found {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-2);
}

.view-toggle {
  display: inline-flex;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
}

.view-toggle button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text-3);
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
}

.view-toggle button.is-active,
.view-toggle button:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-list.is-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.job-list.is-grid .job-card {
  flex-direction: column;
  align-items: stretch;
}

.job-list.is-grid .job-card__side {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.job-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}

.job-card:hover {
  border-color: #c9d6ff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.job-card__logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8f9fc;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.job-card__body {
  flex: 1;
  min-width: 0;
}

.job-card__title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.job-card__title a:hover {
  color: var(--blue);
}

.job-card__meta {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-3);
}

.job-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.job-card__desc {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card__time {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
}

.job-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.job-card__salary {
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
  text-align: right;
}

/* —— Pagination —— */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 24px 0 28px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pagination a:hover {
  border-color: #c9d6ff;
  color: var(--blue);
}

.pagination .is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.pagination__ellipsis {
  border: 0;
  background: transparent;
  color: var(--text-3);
}

/* —— Bottom CTAs —— */
.vac-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

.vac-cta {
  background: linear-gradient(135deg, #eef3ff 0%, #f5f7fb 100%);
  border: 1px solid #dce6ff;
  border-radius: 18px;
  padding: 28px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.vac-cta__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.vac-cta__text {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-2);
  max-width: 32ch;
  line-height: 1.45;
}

.vac-cta__illus {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  color: var(--blue);
  flex-shrink: 0;
}

.vac-cta__form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vac-cta__form input {
  flex: 1;
  min-width: 160px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  outline: none;
  font-size: 14px;
}

.vac-cta__form input:focus {
  border-color: #b4c5ff;
}

/* —— Responsive —— */
@media (max-width: 1000px) {
  .vac-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
    display: none;
  }

  .filters.is-open {
    display: block;
  }

  .filters-toggle {
    display: inline-flex;
  }

  .job-list.is-grid {
    grid-template-columns: 1fr;
  }

  .vac-ctas {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .vac-page__head {
    flex-direction: column;
  }

  .vac-search__row {
    flex-direction: column;
    gap: 8px;
  }

  .vac-search__field--loc {
    flex: none;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }

  .vac-search__btn {
    width: 100%;
  }

  .job-card {
    flex-wrap: wrap;
  }

  .job-card__side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .vac-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.job-list > .promo-banner {
  grid-column: 1 / -1;
  width: 100%;
}

.job-list.is-grid > .promo-banner {
  grid-column: 1 / -1;
}

.job-list > .map-teaser {
  grid-column: 1 / -1;
  width: 100%;
}

.map-teaser {
  position: relative;
  display: block;
  height: 88px;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #d9e4f5;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.map-teaser:hover .map-teaser__btn {
  background: var(--blue-hover);
}

.map-teaser__canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-teaser__canvas .ymaps-2-1-79-map,
.map-teaser__canvas ymaps {
  filter: saturate(0.92);
}

.map-teaser__btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(10, 27, 61, 0.22);
  pointer-events: none;
}

.map-teaser__btn i {
  font-size: 18px;
}

@media (max-width: 560px) {
  .map-teaser {
    height: 96px;
  }

  .map-teaser__btn {
    padding: 10px 14px;
    font-size: 13px;
  }
}
