/* Хаб «Карьера»: ритм секций и отличие от «списка блоков» */

.career-landing {
  position: relative;
  overflow-x: clip;
}

.career-landing .home-landing__grid-bg {
  mask-image: linear-gradient(to bottom, black 0%, black 78%, transparent 100%);
}

/* --- Hero: максимум воздуха, один столбец (верхний отступ от подменю — career_section.css, nav + .home-section) --- */
.career-hub-hero {
  padding-bottom: clamp(2rem, 5.5vw, 3.75rem);
}

.career-hub-hero__container {
  max-width: min(46rem, 92vw);
  margin: 0 auto;
  text-align: center;
}

.career-hub-hero__h1 {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.career-hub-hero__lead {
  max-width: min(42rem, 90vw);
  margin-left: auto;
  margin-right: auto;
}

.career-hub-hero__actions {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.career-hub-hero__trust {
  display: block;
  max-width: 22rem;
  margin: 1.25rem auto 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.career-hub-hero__actions .home-btn-primary,
.career-hub-hero__actions .home-btn-primary:hover,
.career-hub-hero__actions .home-btn-primary:focus,
.career-hub-hero__actions .home-btn-primary:focus-visible,
.career-hub-hero__actions .home-btn-ghost,
.career-hub-hero__actions .home-btn-ghost:hover,
.career-hub-hero__actions .home-btn-ghost:focus,
.career-hub-hero__actions .home-btn-ghost:focus-visible {
  text-decoration: none;
}

@media (max-width: 576px) {
  .career-hub-hero__actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
  }

  .career-hub-hero__actions .home-btn-primary,
  .career-hub-hero__actions .home-btn-ghost {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* --- Выгоды: средняя плотность --- */
.career-hub-benefits {
  /* Ближе к hero, без огромного разрыва после trust-line */
  padding-top: clamp(1rem, 2.5vw, 1.75rem);
  padding-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.career-hub-benefits .home-section-title.career-hub-section-title {
  margin-bottom: clamp(1.35rem, 3.2vw, 2rem);
}

.career-hub-section-title {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.career-hub-section-sub {
  max-width: 36rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.25rem);
}

.career-hub-benefits__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.15rem, 3vw, 1.5rem);
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .career-hub-benefits__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.career-hub-benefit-card {
  position: relative;
  border-radius: 1rem;
  padding: 1.35rem 1.25rem 1.35rem 1.35rem;
  background: var(--home-surface);
  border: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
}

.career-hub-benefit-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  background: rgba(91, 155, 213, 0.12);
  color: var(--primary-color, #5b9bd5);
}

.career-hub-benefit-card__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--home-muted);
  max-width: 42ch;
}

/* --- Карточки ИИ-инструментов для гостя: явная подсказка про вход --- */
.career-tool-card--gated {
  border-color: rgba(148, 163, 184, 0.18);
}

/* --- Инструменты: единая сетка, одинаковая высота --- */
.career-hub-tools {
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  scroll-margin-top: 5.5rem;
}

.career-hub-tools__grid {
  align-items: stretch;
}

/* На планшете три колонки дают ~230px — мало для заголовка + иконки */
@media (min-width: 768px) and (max-width: 991px) {
  .career-hub-tools__grid.home-cards-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .career-hub-tools__grid.home-cards-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.career-hub-tools .career-tool-card.home-card {
  padding: 1.45rem 1.3rem 1.4rem;
  overflow: visible;
}

.career-tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: left;
}

.career-tool-card__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1rem;
  align-items: start;
  margin-bottom: 0.65rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.career-tool-card__icon {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  margin-top: 0.12rem;
}

.career-tool-card__head {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.career-tool-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.career-tool-card__title-row h3,
.career-tool-card__head > h3 {
  font-size: 1.0625rem;
  margin: 0;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--home-text);
}

.career-tool-card__title-row h3 {
  flex: 1 1 auto;
  min-width: 0;
}

.career-tool-card__ai-hint {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  outline: none;
  /* Невидимая зона над бейджем — курсор не «рвёт» hover по пути к тултипу */
  padding-top: 0.65rem;
  margin-top: -0.65rem;
}

.career-tool-card__ai-hint:focus-visible .career-tool-card__ai-badge {
  box-shadow:
    0 0 0 2px var(--home-bg),
    0 0 0 4px rgba(91, 155, 213, 0.55);
}

.career-tool-card__ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--primary-color, #5b9bd5);
  text-transform: uppercase;
  border: 1px solid rgba(91, 155, 213, 0.4);
  border-radius: 0.35rem;
  background: linear-gradient(180deg, rgba(91, 155, 213, 0.12), rgba(91, 155, 213, 0.04));
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35) inset;
}

.career-tool-card__ai-tooltip {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: calc(100% + 0.5rem);
  width: max-content;
  max-width: min(17.5rem, calc(100vw - 2.5rem));
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.45;
  text-align: center;
  text-transform: none;
  color: var(--home-text);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.98), rgba(17, 24, 39, 0.98));
  border: 1px solid rgba(91, 155, 213, 0.28);
  border-radius: 0.65rem;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 0.35rem, 0);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.18s ease;
}

.career-tool-card__ai-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -7px;
  width: 0;
  height: 0;
  border: 7px solid transparent;
  border-top-color: rgba(17, 24, 39, 0.98);
}

.career-tool-card__ai-hint:hover .career-tool-card__ai-tooltip,
.career-tool-card__ai-hint:focus-within .career-tool-card__ai-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .career-tool-card__ai-tooltip {
    transition: none;
    transform: none;
  }

  .career-tool-card__ai-hint:hover .career-tool-card__ai-tooltip,
  .career-tool-card__ai-hint:focus-within .career-tool-card__ai-tooltip {
    transform: none;
  }
}

.career-tool-card__purpose {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--home-muted);
  max-width: none;
}

/* Единая палитра иконок (токены home), без mint/sky */
.career-tool-card__icon,
.career-tool-card__icon--mint,
.career-tool-card__icon--sky {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--primary-color, #5b9bd5);
  background: rgba(91, 155, 213, 0.09);
  border: 1px solid rgba(91, 155, 213, 0.22);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25) inset;
}

.career-tool-card__bullets {
  margin: 0.65rem 0 1.15rem;
  padding-left: 1.15rem;
  color: var(--home-muted);
  font-size: 0.875rem;
  line-height: 1.55;
  flex-grow: 1;
}

.career-tool-card__bullets li {
  margin-bottom: 0.3rem;
}

.career-tool-card__cta {
  align-self: center;
  margin-top: auto;
}

.career-tool-card .home-btn-primary {
  font-size: 0.875rem;
  padding: 0.52rem 1.15rem;
}

/* Карточки инструментов: без «подпрыгивания» и без underline на CTA */
.career-hub-tools .career-tool-card.home-card:hover {
  transform: none;
}

.career-hub-tools .career-tool-card .home-btn-primary.career-tool-card__cta,
.career-hub-tools .career-tool-card .home-btn-primary.career-tool-card__cta:hover,
.career-hub-tools .career-tool-card .home-btn-primary.career-tool-card__cta:focus,
.career-hub-tools .career-tool-card .home-btn-primary.career-tool-card__cta:focus-visible {
  text-decoration: none;
}

@media (max-width: 767px) {
  .career-hub-tools .career-tool-card.home-card {
    padding: 1.35rem 1.15rem 1.45rem;
  }

  .career-tool-card__top {
    column-gap: 0.85rem;
    padding-bottom: 0.75rem;
  }

  .career-tool-card__bullets {
    margin-top: 0.15rem;
  }
}

/* --- Сценарий: другая поверхность, компактнее --- */
.career-hub-flow {
  padding-top: clamp(2rem, 5vw, 2.75rem);
  padding-bottom: clamp(2rem, 5vw, 2.75rem);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(10, 14, 20, 0.2) 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.career-hub-flow__container {
  max-width: 960px;
}

.career-hub-flow__intro {
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.career-hub-flow__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1.15rem, 3vw, 1.5rem);
}

.career-hub-flow__step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0;
}

.career-hub-flow__num {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--home-surface-2);
  border: 2px solid rgba(91, 155, 213, 0.35);
  color: var(--primary-color, #5b9bd5);
}

.career-hub-flow__body {
  min-width: 0;
}

.career-hub-flow__body h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: var(--home-text);
}

.career-hub-flow__body p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--home-muted);
  line-height: 1.55;
  max-width: 52ch;
}

@media (min-width: 768px) {
  .career-hub-flow__steps {
    flex-direction: row;
    gap: 0;
    align-items: stretch;
  }

  .career-hub-flow__step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 1rem 0;
  }

  .career-hub-flow__step:not(:last-child) {
    border-right: 1px solid rgba(148, 163, 184, 0.12);
  }

  .career-hub-flow__num {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.65rem;
  }

  .career-hub-flow__body p {
    margin-left: auto;
    margin-right: auto;
  }
}

/* --- Финальный CTA: компактнее --- */
.career-hub-cta {
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.career-hub-cta__strip {
  padding: clamp(1.75rem, 4vw, 2.5rem) 1.25rem;
  max-width: 640px;
}

.career-hub-cta__strip h2 {
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
}

.career-hub-cta__strip p {
  margin-bottom: 1.15rem;
  font-size: 0.9375rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.career-hub-cta__actions {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.career-hub-cta__actions .home-btn-primary,
.career-hub-cta__actions .home-btn-primary:hover,
.career-hub-cta__actions .home-btn-primary:focus,
.career-hub-cta__actions .home-btn-primary:focus-visible,
.career-hub-cta__actions .home-btn-ghost,
.career-hub-cta__actions .home-btn-ghost:hover,
.career-hub-cta__actions .home-btn-ghost:focus,
.career-hub-cta__actions .home-btn-ghost:focus-visible {
  text-decoration: none;
}

@media (max-width: 576px) {
  .career-hub-cta__actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
  }

  .career-hub-cta__actions .home-btn-primary,
  .career-hub-cta__actions .home-btn-ghost {
    width: 100%;
    justify-content: center;
  }
}
