/* Промо карьерного теста — home / course / profession / blog */

.home-section--career-test-promo {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.home-career-test-promo {
  position: relative;
  /* Own typography baseline so parent article styles cannot inflate rem/line-height */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--home-text, #f8fafc);
  border-radius: 1rem;
  border: 1px solid rgba(45, 212, 191, 0.28);
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.home-career-test-promo--embedded {
  margin: 1.75rem 0 0;
}

body.landing-blog .post-content .home-career-test-promo--embedded {
  margin: 1.75rem 0;
}

/*
 * Blog .post-content leaks h2 margins, img margins, link colors, ul list-style.
 * Match homepage promo metrics (same selectors win by specificity).
 */
body.landing-blog .blog-post-landing .post-content .home-career-test-promo h2.home-career-test-promo__title,
body.landing-blog .blog-post-landing .post-content .home-career-test-promo .home-career-test-promo__title {
  margin: 0;
  font-size: var(--home-type-h2, clamp(2rem, 4vw, 3rem));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--home-text, #f8fafc);
}

body.landing-blog .blog-post-landing .post-content .home-career-test-promo,
body.landing-blog .blog-post-landing .post-content .home-career-test-promo * {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.landing-blog .blog-post-landing .post-content .home-career-test-promo p {
  margin: 0;
}

body.landing-blog .blog-post-landing .post-content .home-career-test-promo .home-career-test-promo__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--home-cta, #2dd4bf);
}

body.landing-blog .blog-post-landing .post-content .home-career-test-promo .home-career-test-promo__text {
  font-size: var(--home-type-body, 1.0625rem);
  line-height: 1.55;
  color: var(--home-muted, rgba(226, 232, 240, 0.78));
}

body.landing-blog .blog-post-landing .post-content .home-career-test-promo ul.home-career-test-promo__perks,
body.landing-blog .blog-post-landing .post-content .home-career-test-promo .home-career-test-promo__perks {
  list-style: none;
  list-style-position: outside;
  margin: 0;
  padding: 0;
  padding-inline-start: 0;
  margin-inline-start: 0;
}

body.landing-blog .blog-post-landing .post-content .home-career-test-promo .home-career-test-promo__perks li {
  margin: 0;
  line-height: 1.6;
}

body.landing-blog .blog-post-landing .post-content .home-career-test-promo .home-career-test-promo__avatar img {
  margin: 0;
  border-radius: 0;
  max-width: none;
  width: 1.55rem;
  height: 1.55rem;
}

body.landing-blog .blog-post-landing .post-content .home-career-test-promo a.home-career-test-promo__btn,
body.landing-blog .blog-post-landing .post-content .home-career-test-promo a.home-career-test-promo__btn:hover,
body.landing-blog .blog-post-landing .post-content .home-career-test-promo a.home-career-test-promo__btn:focus,
body.landing-blog .blog-post-landing .post-content .home-career-test-promo a.home-career-test-promo__btn:focus-visible,
body.landing-blog .blog-post-landing .post-content .home-career-test-promo a.home-career-test-promo__btn:visited {
  color: var(--home-cta-text, #0f172a) !important;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.6;
}

.home-career-test-promo__glow {
  position: absolute;
  left: 6%;
  top: 8%;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.3), transparent 70%);
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  animation: home-blob-drift-a 18s ease-in-out infinite;
}

.home-career-test-promo::after {
  content: "";
  position: absolute;
  width: 14rem;
  height: 14rem;
  right: 4%;
  bottom: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.24), transparent 70%);
  filter: blur(34px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  animation: home-blob-drift-b 22s ease-in-out infinite;
  animation-delay: -6s;
}

@media (prefers-reduced-motion: reduce) {
  .home-career-test-promo__glow,
  .home-career-test-promo::after {
    animation: none !important;
  }
}

.home-career-test-promo__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "header header"
    "title title"
    "content action";
  column-gap: 1.75rem;
  row-gap: 1rem;
  align-items: start;
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3.2vw, 1.85rem);
}

.home-career-test-promo__header {
  grid-area: header;
  display: flex;
  align-items: center;
}

.home-career-test-promo__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.home-career-test-promo__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(45, 212, 191, 0.34);
  background: #000;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.08);
  overflow: hidden;
}

.home-career-test-promo__avatar img {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  margin: 0;
  border-radius: 0;
  max-width: none;
  object-fit: contain;
}

.home-career-test-promo__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--home-cta, #2dd4bf);
}

.home-career-test-promo__title {
  grid-area: title;
  margin: 0;
  width: 100%;
  font-size: var(--home-type-h2, clamp(2rem, 4vw, 3rem));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--home-text, #f8fafc);
  text-wrap: balance;
}

.home-career-test-promo__content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.home-career-test-promo__text {
  margin: 0;
  font-size: var(--home-type-body, 1.0625rem);
  line-height: 1.55;
  color: var(--home-muted, rgba(226, 232, 240, 0.78));
  text-align: justify;
  text-wrap: pretty;
}

.home-career-test-promo__perks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-career-test-promo__perks li {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: var(--home-type-body, 1.0625rem);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--home-cta, #2dd4bf);
  border: 1px solid rgba(45, 212, 191, 0.38);
  background: rgba(45, 212, 191, 0.08);
}

.home-career-test-promo__action {
  grid-area: action;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-height: 100%;
}

.home-career-test-promo__btn,
.home-career-test-promo__btn:hover,
.home-career-test-promo__btn:focus,
.home-career-test-promo__btn:focus-visible {
  font-size: 1rem;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
}

/* Narrow desktop: CTA under copy (side-by-side squeezes ~1100–1280). */
@media (max-width: 1199.98px) {
  .home-career-test-promo__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "title"
      "content"
      "action";
    column-gap: 0;
  }

  .home-career-test-promo__action {
    justify-content: flex-start;
    align-self: stretch;
    min-height: 0;
  }
}

@media (max-width: 860px) {
  .home-career-test-promo__action {
    justify-content: center;
  }

  .home-career-test-promo__perks {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
  }

  .home-career-test-promo__perks li {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0.22rem 0.45rem;
    font-size: clamp(0.68rem, 2.6vw, 0.8125rem);
    line-height: 1.35;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }
}

@media (max-width: 767.98px) {
  .home-career-test-promo__title,
  body.landing-blog .blog-post-landing .post-content .home-career-test-promo h2.home-career-test-promo__title,
  body.landing-blog .blog-post-landing .post-content .home-career-test-promo .home-career-test-promo__title {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    line-height: 1.22;
  }

  .home-career-test-promo__text,
  body.landing-blog .blog-post-landing .post-content .home-career-test-promo .home-career-test-promo__text {
    font-size: 0.9375rem;
    line-height: 1.5;
  }
}

@media (max-width: 575px) {
  .home-career-test-promo__inner {
    row-gap: 0.9rem;
    padding: 1.15rem 1.1rem;
  }

  .home-career-test-promo__brand {
    width: 100%;
  }

  .home-career-test-promo__title,
  body.landing-blog .blog-post-landing .post-content .home-career-test-promo h2.home-career-test-promo__title,
  body.landing-blog .blog-post-landing .post-content .home-career-test-promo .home-career-test-promo__title {
    font-size: clamp(1.15rem, 5.2vw, 1.35rem);
  }

  .home-career-test-promo__action {
    width: 100%;
  }

  .home-career-test-promo__btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .home-career-test-promo__perks {
    gap: 0.25rem;
  }

  .home-career-test-promo__perks li {
    padding: 0.2rem 0.38rem;
    font-size: clamp(0.62rem, 2.9vw, 0.75rem);
  }
}
