/* Карьерный хаб /career + деталка вакансии — фон и ритм как у блога Serenity */

html:has(.sa-career-root):not(:has(.blog-article-page-top)) {
  min-height: 100%;
  position: relative;
  z-index: 0;
  background-color: #121212;
}

html:has(.sa-career-root):not(:has(.blog-article-page-top))::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(
      ellipse 44vw min(105vh, 920px) at 100% 100%,
      rgba(140, 95, 210, 0.48) 0%,
      rgba(78, 52, 118, 0.32) 34%,
      rgba(28, 24, 36, 0.14) 58%,
      transparent 72%
    ),
    linear-gradient(
      to left,
      rgba(72, 48, 108, 0.34) 0%,
      rgba(22, 20, 30, 0.06) 26%,
      rgba(18, 18, 22, 0) min(38vw, 40%)
    );
  background-repeat: no-repeat;
}

@media screen and (max-width: 1100px) {
  html:has(.sa-career-root):not(:has(.blog-article-page-top))::before {
    background-image:
      radial-gradient(
        ellipse 52vw min(100vh, 880px) at 100% 100%,
        rgba(130, 90, 200, 0.42) 0%,
        rgba(72, 48, 110, 0.28) 36%,
        rgba(28, 24, 36, 0.12) 56%,
        transparent 74%
      ),
      linear-gradient(
        to left,
        rgba(68, 46, 102, 0.3) 0%,
        rgba(22, 20, 30, 0.05) 24%,
        rgba(18, 18, 22, 0) min(44vw, 46%)
      );
  }
}

@media screen and (max-width: 600px) {
  html:has(.sa-career-root):not(:has(.blog-article-page-top))::before {
    background-image:
      radial-gradient(
        ellipse 58vw min(96vh, 820px) at 100% 100%,
        rgba(120, 82, 185, 0.38) 0%,
        rgba(65, 44, 98, 0.26) 38%,
        transparent 76%
      ),
      linear-gradient(
        to left,
        rgba(62, 42, 95, 0.28) 0%,
        rgba(18, 18, 22, 0) min(48vw, 52%)
      );
  }
}

.sa-career-page {
  background: transparent !important;
  color: #fff;
  min-height: 100svh;
  position: relative;
  z-index: 1;
}

.sa-career-page .sa-career-root,
.sa-career-page .case-all-root,
.sa-career-page footer.footer-modern {
  background: transparent !important;
}

/* Вакансии: отклик только в Telegram — без лид-CTA «Оставить / Отправить заявку». */
.sa-career-page #body.body-application,
.sa-career-page header button.navigation-new__button {
  display: none !important;
}

/*
 * Без нижней кнопки заявки правый слот футера пустой.
 * На десктопе (≥1201) соцблок «Следите за нами» — к правой кромке
 * `.footer-modern__container` (та же линия сетки, что у contacts слева).
 */
@media screen and (min-width: 1201px) {
  .sa-career-page .footer-modern .footer-modern__social {
    left: auto;
    right: 0;
    transform: none;
    justify-content: flex-end !important;
    align-items: flex-end !important;
  }

  .sa-career-page .footer-modern .footer-modern__social .social__header {
    text-align: right !important;
  }

  .sa-career-page .footer-modern .footer-modern__social-icons {
    justify-content: flex-end;
  }
}

.sa-career-root {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.sa-career-main {
  flex: 1 1 auto;
  padding: clamp(146px, calc(12vh + 50px), 190px) var(--page-gutter-x, 78px) 80px;
  box-sizing: border-box;
}

.sa-career-hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  /* Больший отступ от H1 до списка карточек */
  margin-bottom: clamp(64px, 8vh, 96px);
}

[data-career-empty-slot][hidden] {
  display: none !important;
}

.sa-career-hero__title {
  margin: 0;
  font-family: HeroNewMedium, "Hero New", Arial, sans-serif;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 500;
  line-height: 1.26;
  color: #fff;
}

.sa-career-empty {
  margin: 0 0 16px;
  font-family: HeroNewRegular, "Hero New", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #777;
}

.sa-career-empty a {
  color: #9cc9ff;
  text-decoration: none;
}

.sa-career-empty a:hover {
  color: #9cc9ff;
  text-decoration: none;
}

.sa-career-social {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.sa-career-social a {
  color: #bcbcbc;
  font-size: 15px;
  text-decoration: none;
}

.sa-career-social a:hover {
  color: #9cc9ff;
}

.sa-career-loading,
.sa-career-error {
  margin: 0;
  color: #777;
  font-size: 16px;
}

.sa-career-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sa-career-card {
  background: rgba(28, 28, 31, 0.72);
  border-radius: 24px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 24px;
  align-items: center;
  backdrop-filter: blur(8px);
}

@media screen and (max-width: 1100px) {
  .sa-career-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .sa-career-card__cta {
    justify-self: start;
  }
}

.sa-career-card__title {
  margin: 0 0 8px;
  font-family: HeroNewMedium, "Hero New", Arial, sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  color: #fff;
}

.sa-career-card__meta {
  margin: 0 0 12px;
  color: #bcbcbc;
  font-size: 15px;
  line-height: 1.4;
}

.sa-career-card__desc {
  margin: 0;
  color: #d0d0d2;
  font-size: 16px;
  line-height: 1.5;
  max-width: 52rem;
}

.sa-career-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 51px;
  padding: 14px 25px;
  border: 1px solid #fff;
  border-radius: 30px;
  background-color: #fff;
  box-shadow: 0 0 0 1px #fff;
  color: #151516;
  text-decoration: none;
  font-family: MuseoSansCyrl, "Museo Sans", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  align-self: center;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  transition: transform 0.35s ease, box-shadow 0.5s ease;
}

.sa-career-card__cta:visited,
.sa-career-card__cta:hover,
.sa-career-card__cta:focus-visible {
  background-color: #fff;
  color: #151516;
  text-decoration: none;
}

@media screen and (min-width: 1201px) and (hover: hover) {
  .sa-career-card__cta:hover {
    transform: scale(1.04);
    box-shadow: 0 0 0 1px #fff, 0 10px 56px rgba(97, 0, 255, 0.58);
  }
}

.sa-career-card__body {
  text-decoration: none;
  color: inherit;
  display: block;
  outline: none;
  border-radius: 8px;
}

.sa-career-card__body:hover .sa-career-card__title {
  color: #9cc9ff;
}

.sa-career-card__body:focus-visible {
  box-shadow: 0 0 0 2px #9cc9ff;
}

/* ——— Деталка: без оверрайдов сетки/ритма — как у статьи блога (blog-article-figma.css) ——— */
.sa-career-vacancy-page .blog-article-page-top .background-gradient img {
  display: none !important;
}

.sa-career-vacancy-page .sa-career-material {
  background: transparent !important;
}

/*
 * H1 чуть уже справа — как у статей блога (исторически max-width: calc(100vw − 20vw);
 * на широком экране при колонке ~1128px 80vw уже не жмёт, поэтому режем от ширины колонки).
 */
@media screen and (min-width: 1025px) {
  .sa-career-vacancy-page
    .blog-article-page-top
    .blog-article-page-top__heading.case-all-heading-line
    .cases-block__header-title.case-all-heading-title {
    max-width: min(100%, calc(100% - 8vw));
  }
}

.sa-career-detail__hh {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  color: #9cc9ff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: MuseoSansCyrl, "Museo Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.3;
}

.sa-career-detail__hh:hover,
.sa-career-detail__hh:focus-visible {
  color: #b8dbff;
}

.sa-career-detail__footer {
  margin: 40px 0 24px;
  padding: 0;
  width: 100%;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  justify-content: flex-start;
}

.sa-career-detail__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 18px 32px;
  border: 1px solid #fff;
  border-radius: 39px;
  background-color: #fff;
  box-shadow: 0 0 0 1px #fff;
  color: #151516 !important;
  text-decoration: none !important;
  font-family: MuseoSansCyrl, "Museo Sans", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  transition: transform 0.35s ease, box-shadow 0.5s ease;
}

/* Блог-оболочка красит `.article-section a` в голубой + underline — перебиваем. */
.sa-career-vacancy-page .blog-article-page-top ~ section.lighttheme.article_section_l
  .article-section
  a.sa-career-detail__cta,
.sa-career-vacancy-page .blog-article-page-top ~ section.lighttheme.article_section_l
  .article-section
  a.sa-career-detail__cta:visited,
.sa-career-vacancy-page .blog-article-page-top ~ section.lighttheme.article_section_l
  .article-section
  a.sa-career-detail__cta:hover,
.sa-career-vacancy-page .blog-article-page-top ~ section.lighttheme.article_section_l
  .article-section
  a.sa-career-detail__cta:focus-visible {
  color: #151516 !important;
  text-decoration: none !important;
  background-color: #fff;
  border-color: #fff;
  font-weight: 400;
}

@media screen and (min-width: 1201px) and (hover: hover) {
  .sa-career-detail__cta:hover,
  .sa-career-vacancy-page .blog-article-page-top ~ section.lighttheme.article_section_l
    .article-section
    a.sa-career-detail__cta:hover {
    transform: scale(1.04);
    box-shadow: 0 0 0 1px #fff, 0 10px 56px rgba(97, 0, 255, 0.58);
  }
}

@media screen and (max-width: 900px) {
  .sa-career-hero__row {
    grid-template-columns: 1fr;
  }

  .sa-career-card {
    grid-template-columns: 1fr;
  }

  .sa-career-card__cta {
    justify-self: start;
  }

  .sa-career-main {
    padding-left: var(--page-gutter-x, 36px);
    padding-right: var(--page-gutter-x, 36px);
  }

  .sa-career-detail__cta {
    width: auto;
    max-width: 100%;
  }
}
