/* Страницы-разделы (хабы) и ссылки-заголовки разделов в меню, подвале и на главной. Токены — из main.css. */

/* ---------- Раздел: подзаголовки, услуги, таблица «Какую работу выбрать» ---------- */
.bg-hub__sub { max-width: 70ch; margin: calc(var(--space-lg) * -1) 0 var(--space-xl); }
.bg-hub-svc { padding-top: calc(var(--sec) * .75); }
.bg-hub-choose { background: var(--surface); border-block: 1px solid var(--line); }
.bg-hub-choose + .bg-sb { padding-top: calc(var(--sec) * .75); }
.bg-hub-choose .bg-tbl { background: var(--bg); }
.bg-tbl--hub tbody th a { overflow-wrap: anywhere; }
@media (min-width: 641px) {
  .bg-tbl--hub table { min-width: 760px; }
}
.bg-tbl--hub thead th:first-child { width: 22%; }
.bg-tbl--hub thead th:nth-child(2) { width: 38%; }
.bg-tbl--hub thead th:nth-child(3) { width: 26%; }
.bg-tbl--hub thead th:last-child { width: 14%; }
.bg-tbl--hub tbody th a { color: inherit; text-decoration: none; background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease), color .2s; }
.bg-tbl--hub tbody th a:hover { color: var(--orange-ink); background-size: 100% 2px; }
.bg-tbl--hub tbody td:last-child { font: 700 16px/1.3 var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--orange-ink); }

/* ---------- Соседние разделы ---------- */
.bg-hub-sib__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }
.bg-hub-sib__card { display: grid; align-content: start; text-decoration: none; color: inherit; }
.bg-hub-sib__card p { margin-bottom: var(--space-md); }
.bg-hub-sib__p { align-self: end; font: 700 15px/1.2 var(--f-display); color: var(--orange-ink); font-variant-numeric: tabular-nums; }
.bg-hub-sib__card:hover .bg-card__h { color: var(--orange-ink); }

/* ---------- Заголовки разделов — ссылки: мега-меню, подвал, главная, мобильное меню ---------- */
.bg-mega__cap a, .bg-foot__h a, .bg-core__h a, .bg-sitemap h2 a { color: inherit; text-decoration: none; }
.bg-mega__cap a:hover, .bg-foot__h a:hover, .bg-core__h a:hover { color: var(--orange-ink); text-decoration: underline; text-underline-offset: 4px; }
.bg-foot__h a:hover { color: var(--orange); }
.bg-layer__all { font-weight: 700; color: var(--orange-ink); }

@media (max-width: 960px) {
  .bg-hub-sib__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .bg-hub__sub { margin-top: calc(var(--space-md) * -1); }
  .bg-hub-sib__grid { grid-template-columns: 1fr; }
  .bg-tbl--hub tbody td:last-child { white-space: normal; }
  .bg-tbl--hub tbody td:not(:last-child) { grid-template-columns: 1fr; gap: 2px; }
}
