/* Разделы «Работа» и «Ищу работу».

   Отдельный файл по той же причине, что base.css, blog.css, events.css
   и home.css: style.css собирается из LESS-проекта
   (d:\my_projects\helpingersLESS), и правки в нём затрутся при сборке.

   Оформление повторяет карточки событий: та же рамка, тот же радиус,
   тот же акцент #3ebce6. */

.jobs__wrapper {
  max-width: 1124px;
  margin: 0 auto;
  padding: 0 50px 60px;
}

/* Колонка слева: фильтр «Вакансии | Резюме» и сферы деятельности.
   На большом экране - список сфер в колонке, на телефоне колонка уходит
   наверх, а сферы - выпадающим списком (<details>). */

.jobs__layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.jobs__aside {
  position: sticky;
  top: 20px;
}

/* фильтр «Вакансии | Резюме» - две половинки одной кнопки */
.jobs__kinds {
  display: flex;
  margin: 0 0 22px;
  padding: 3px;
  border-radius: 10px;
  background-color: #eef3f6;
}

.jobs__kinds-link {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #5b6168;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.jobs__kinds-link:hover {
  color: #2d2e30;
}

.jobs__kinds-link--active {
  background-color: #ffffff;
  color: #2d2e30;
  box-shadow: 0 1px 4px rgba(45, 46, 48, 0.12);
}

.jobs__kinds-count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background-color: #dbe5eb;
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  color: #5b6168;
}

.jobs__kinds-link--active .jobs__kinds-count {
  background-color: #3ebce6;
  color: #ffffff;
}

/* сферы - список в колонке */
.jobs__fields-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa3ab;
}

.jobs__fields-list,
.jobs__fields-select-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.jobs__fields-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 21px;
  color: #2d2e30;
  text-decoration: none;
}

.jobs__fields-link:hover {
  background-color: #f0f9fd;
  color: #1a9cc7;
}

.jobs__fields-link--active {
  background-color: #e6f6fc;
  color: #1a9cc7;
  font-weight: 600;
}

.jobs__fields-count {
  color: #9aa3ab;
  font-size: 13px;
  font-weight: 400;
}

/* сферы - выпадающий список (только на телефоне) */
.jobs__fields-select {
  display: none;
  position: relative;
}

.jobs__fields-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  border: 1px solid #d4dbe1;
  border-radius: 8px;
  background-color: #ffffff;
  font-size: 15px;
  color: #2d2e30;
  cursor: pointer;
  list-style: none;
}

.jobs__fields-toggle::-webkit-details-marker {
  display: none;
}

.jobs__fields-toggle::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #3ebce6;
  border-bottom: 2px solid #3ebce6;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s;
}

.jobs__fields-select[open] .jobs__fields-toggle {
  border-color: #3ebce6;
}

.jobs__fields-select[open] .jobs__fields-toggle::after {
  transform: translateY(2px) rotate(-135deg);
}

.jobs__fields-toggle-label {
  color: #9aa3ab;
}

.jobs__fields-select-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  padding: 6px;
  background-color: #ffffff;
  border: 1px solid #e3e8ec;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(45, 46, 48, 0.12);
}

/* Фильтры списка (включаются в админке). На большом экране - под сферами
   в колонке, на телефоне - свёрнуты под кнопку «Фильтры» (чекбокс-переключатель). */
.jobs__filters {
  margin-top: 24px;
}

/* с фильтрами колонка выше экрана - прилипшей её низ было бы не достать */
.jobs__aside:has(.jobs__filters) {
  position: static;
}

.jobs__filters-switch,
.jobs__filters-toggle {
  display: none;
}

.jobs__filters-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jobs__filters-group {
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jobs__filters-label {
  margin-top: 6px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #5b6168;
}

.jobs__filters-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 21px;
  color: #2d2e30;
  cursor: pointer;
}

.jobs__filters-check input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #3ebce6;
}

.jobs__filters-search,
.jobs__filters-select {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #d4dbe1;
  border-radius: 8px;
  background-color: #ffffff;
  font: inherit;
  font-size: 15px;
  color: #2d2e30;
}

.jobs__filters-search:focus,
.jobs__filters-select:focus {
  outline: none;
  border-color: #3ebce6;
}

.jobs__filters-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.jobs__filters-apply {
  padding: 9px 18px;
  border: 0;
  border-radius: 8px;
  background-color: #3ebce6;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
}

.jobs__filters-apply:hover {
  background-color: #1a9cc7;
}

.jobs__filters-reset,
.jobs__empty a {
  font-size: 14px;
  color: #1a9cc7;
}

.jobs__filters-badge {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background-color: #3ebce6;
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
}

@media (max-width: 900px) {
  .jobs__layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .jobs__aside {
    position: relative;
    top: 0;
    margin-bottom: 22px;
  }

  .jobs__kinds {
    margin-bottom: 12px;
  }

  .jobs__fields {
    display: none;
  }

  .jobs__fields-select {
    display: block;
  }

  .jobs__filters {
    margin-top: 10px;
  }

  .jobs__filters-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border: 1px solid #d4dbe1;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 15px;
    color: #2d2e30;
    cursor: pointer;
  }

  .jobs__filters-toggle::after {
    content: "";
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid #3ebce6;
    border-bottom: 2px solid #3ebce6;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.15s;
  }

  .jobs__filters-switch:checked + .jobs__filters-toggle::after {
    transform: translateY(2px) rotate(-135deg);
  }

  .jobs__filters-body {
    display: none;
    margin-top: 10px;
    padding: 14px;
    border: 1px solid #e3e8ec;
    border-radius: 8px;
  }

  .jobs__filters-switch:checked ~ .jobs__filters-body {
    display: flex;
  }

  .jobs__filters-title {
    display: none;
  }
}

.jobs__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jobs__item {
  position: relative;
  padding: 20px 24px;
  border: 1px solid rgba(174, 174, 174, 0.3);
  border-radius: 5px;
  background-color: #ffffff;
}

.jobs__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 10px;
}

.jobs__badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  background-color: #eaf7fc;
  color: #227a99;
  font-size: 13px;
  line-height: 20px;
  text-decoration: none;
}

.jobs__badge--remote {
  background-color: #eef1f4;
  color: #5d5f61;
}

.jobs__date {
  margin-left: auto;
  font-size: 13px;
  line-height: 20px;
  color: #8a8d90;
}

.jobs__title {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 28px;
}

.jobs__title-link {
  color: #1c1c1c;
  text-decoration: none;
}

.jobs__title-link:hover {
  color: #3ebce6;
}

.jobs__facts {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 24px;
  color: #2d2e30;
}

.jobs__desc {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 24px;
  color: #5d5f61;
  overflow-wrap: anywhere;
}

.jobs__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 24px;
  color: #2d2e30;
}

.jobs__salary {
  font-weight: 700;
  color: #1c8c4a;
}

.jobs__more {
  font-size: 15px;
  line-height: 24px;
  font-weight: 700;
  color: #3ebce6;
  text-decoration: none;
}

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

.jobs__empty {
  padding: 30px 0;
  font-size: 17px;
  line-height: 26px;
  color: #5d5f61;
}

.jobs__other-title {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 30px;
}

/* ---------------------------- страница объявления ---------------------------- */

.job__wrapper {
  max-width: 1124px;
  margin: 0 auto;
  padding: 0 50px 40px;
}

.job__expired {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 4px solid #e0a800;
  background-color: #fff8e6;
  font-size: 15px;
  line-height: 24px;
  color: #2d2e30;
}

.job__expired-link {
  color: #3ebce6;
}

.job__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 10px;
}

.job__title {
  margin: 0 0 20px;
  font-size: 26px;
  line-height: 34px;
}

/* факты списком «подпись - значение»: оплату и занятость смотрят раньше текста */
.job__facts {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(174, 174, 174, 0.3);
}

.job__fact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(174, 174, 174, 0.3);
  font-size: 16px;
  line-height: 24px;
}

.job__fact-label {
  flex: 0 0 180px;
  color: #8a8d90;
}

.job__fact-value {
  flex: 1 1 260px;
  color: #2d2e30;
  overflow-wrap: anywhere;
}

.job__fact-value--accent {
  font-weight: 700;
  color: #1c8c4a;
}

.job__text {
  margin-bottom: 28px;
}

.job__contacts {
  padding: 20px 24px;
  border: 1px solid rgba(174, 174, 174, 0.3);
  border-radius: 5px;
  background-color: #fbfbfc;
}

.job__contacts-title {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 28px;
}

.job__contacts-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 17px;
  line-height: 28px;
}

.job__contact-link {
  color: #3ebce6;
  text-decoration: none;
}

.job__contact-link:hover {
  text-decoration: underline;
}

.job__contacts-hidden {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 24px;
  color: #5d5f61;
}

.job__contacts-actions {
  margin: 0;
}

.job__login {
  display: inline-block;
}

.job__back {
  margin: 24px 0 0;
  font-size: 15px;
  line-height: 24px;
}

@media (max-width: 767px) {
  .jobs__wrapper,
  .job__wrapper {
    padding-left: 10px;
    padding-right: 10px;
  }

  .jobs__item {
    padding: 16px 16px;
  }

  .jobs__date {
    margin-left: 0;
  }

  .job__title {
    font-size: 22px;
    line-height: 30px;
  }

  /* на телефоне подпись над значением, иначе на них не остаётся места */
  .job__fact {
    flex-direction: column;
    gap: 2px;
  }

  .job__fact-label {
    flex: none;
    font-size: 14px;
  }
}

/* ---------------------------- форма добавления ----------------------------
   Сама форма свёрстана классами формы добавления сервиса (input-page /
   input-form), чтобы выглядеть как остальной сайт. Здесь остались только
   галочки: таких полей в форме сервиса нет, оформлять их нечем. */

.job-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 20px;
}

.job-checks__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 24px;
  color: #2d2e30;
  cursor: pointer;
}

/* сообщение на странице регистрации, когда пришли из формы объявления */
.signup-notice {
  max-width: 760px;
  margin: 0 auto 20px;
  padding: 14px 18px;
  border-left: 4px solid #3ebce6;
  background-color: #eaf7fc;
  font-size: 15px;
  line-height: 23px;
  color: #2d2e30;
}

/* ---------------------------- мои объявления в кабинете ---------------------------- */

.my-jobs__message {
  max-width: 760px;
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 4px solid #1c8c4a;
  background-color: #eefaf2;
  font-size: 15px;
  line-height: 23px;
  color: #2d2e30;
}

.my-jobs__message--warn {
  border-left-color: #e0a800;
  background-color: #fff8e6;
}

.my-jobs__counter {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 23px;
  color: #5d5f61;
}

.my-jobs__status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 13px;
  line-height: 20px;
}

.my-jobs__status--on {
  background-color: #e6f6ec;
  color: #1c8c4a;
}

.my-jobs__status--wait {
  background-color: #fff3d6;
  color: #8a6200;
}

.my-jobs__status--off {
  background-color: #eef1f4;
  color: #5d5f61;
}

/* действия - отдельные формы, поэтому выстраиваем их в ряд руками */
.my-jobs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
}

.my-jobs__form {
  margin: 0;
}

.my-jobs__button {
  padding: 6px 16px;
  border: 1px solid rgba(174, 174, 174, 0.6);
  border-radius: 20px;
  background-color: #ffffff;
  font-size: 14px;
  line-height: 22px;
  color: #2d2e30;
  cursor: pointer;
}

.my-jobs__button:hover {
  border-color: #3ebce6;
  color: #3ebce6;
}

.my-jobs__button--danger:hover {
  border-color: #d14343;
  color: #d14343;
}

/* «Мои объявления»: плитки «Разместить» (стили плиток - home.css,
   .sections-block__*), счётчик лимита, пустой список */
.my-jobs__heading {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  color: #1c1c1c;
}

/* две плитки в ряд на широком экране, на телефоне - друг под другом */
.my-jobs__tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.my-jobs__meter {
  max-width: 520px;
  margin: 0 0 34px;
}

.my-jobs__meter-text {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 23px;
  color: #5d5f61;
}

.my-jobs__meter-text b {
  color: #1c1c1c;
}

.my-jobs__meter-hint {
  display: block;
  font-size: 13px;
  line-height: 20px;
}

.my-jobs__meter-bar {
  display: block;
  height: 6px;
  border-radius: 3px;
  background-color: #eef1f4;
  overflow: hidden;
}

.my-jobs__meter-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background-color: #3ebce6;
}

.my-jobs__meter--full .my-jobs__meter-fill {
  background-color: #e0a800;
}

.my-jobs__empty {
  padding: 28px 24px;
  border: 1px dashed rgba(174, 174, 174, 0.6);
  border-radius: 5px;
  text-align: center;
}

.my-jobs__empty-title {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 25px;
  font-weight: 700;
  color: #1c1c1c;
}

.my-jobs__empty-text {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: #5d5f61;
}

@media (max-width: 767px) {
  .my-jobs__tiles {
    grid-template-columns: 1fr;
  }
}
