/* Bootstrap 5 theme overrides based on the provided reference screenshots. */

:root {
  /* Approximated palette from reference */
  --brand-bg: #121716;           /* overall dark background */
  --brand-surface: #1e2422;      /* darker surface/cards */
  --brand-primary: #2ea26b;      /* green accent (CTA, links) */
  --brand-primary-700: #238557;  /* hover */
  --brand-primary-800: #1d6e48;  /* active */
  --brand-text: #e7ecea;         /* primary text on dark */
  --brand-muted: #a2aaa7;        /* muted text */
  --brand-border: #2b3330;       /* borders/dividers */

  /* Map to Bootstrap variables */
  --bs-body-bg: var(--brand-bg);
  --bs-body-color: var(--brand-text);
  --bs-primary: var(--brand-primary);
  --bs-link-color: var(--brand-primary);
  --bs-link-hover-color: var(--brand-primary-700);
  --bs-border-color: var(--brand-border);
  --bs-heading-color: #ffffff;
  --bs-secondary-color: var(--brand-muted);

  /* Rhythm and sizing */
  --rhythm-1: 8px;
  --rhythm-2: 16px;
  --rhythm-3: 24px;
  --rhythm-4: 32px;
  --radius: 12px;

  /* Layered backgrounds for banded sections */
  --layer-0: #121716; /* base */
  --layer-1: #161d1b; /* + ~4% */
  --layer-2: #1a2220; /* + ~8% */
}

/* Global */
body { background: var(--brand-bg); color: var(--brand-text); }
a { text-decoration: none; }
.text-muted { color: var(--brand-muted) !important; }

/* Global headings with fluid sizes */
h1, .h1 { font-size: clamp(28px, 3.2vw, 48px); line-height: 1.2; }
h2, .h2 { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.25; }
h3, .h3 { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.3; }
.lead { font-size: clamp(16px, 1.3vw, 20px); line-height: 1.45; }

/* Navbar (dark) */
.navbar { position: relative; z-index: 1040; }
.navbar-dark { background-color: #0f1412 !important; border-bottom: 1px solid var(--brand-border); }
.navbar-dark .navbar-brand { color: #fff; font-weight: 700; }
.navbar-dark .nav-link { color: #dfe5e3; transition: color .15s ease; }
.navbar-dark .nav-link:hover, .navbar-dark .nav-link:focus { color: #ffffff; }

/* Buttons themed */
.btn-primary {
  --bs-btn-bg: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary-700);
  --bs-btn-hover-border-color: var(--brand-primary-700);
  --bs-btn-active-bg: var(--brand-primary-800);
  --bs-btn-active-border-color: var(--brand-primary-800);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary);
  --bs-btn-hover-border-color: var(--brand-primary);
  --bs-btn-hover-color: #fff;
}

/* Main content stays readable (light surface) */
main.container { color: var(--brand-text); max-width: 1200px; }

/* Cards on dark */
.card {
  background-color: var(--brand-surface);
  border-color: var(--brand-border);
  color: var(--brand-text);
  border-radius: var(--radius);
  transition: background-color .15s ease, transform .05s ease, box-shadow .15s ease;
}
.card .card-title { color: #fff; }
.card .card-subtitle, .card .text-muted { color: var(--brand-muted) !important; }
.card.card-link { cursor: pointer; }
.card.card-link:hover { background-color: #232a27; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.card.card-link:active { transform: scale(.995); }
.card.card-link { transition: background-color .2s ease, transform .05s ease; cursor: pointer; }
.card.card-link:hover { background-color: #232a27; }
.card.card-link:active { transform: scale(.995); }

/* Footer */
footer { background: #101412; color: var(--brand-muted); border-top: 0; }
.footer-cta { background: #0f1412; border-top: 0; border-bottom: 0; }

/* === HERO (единый блок, без дублей) === */
.hero { position: relative; overflow: hidden; z-index: 1; }
.hero .hero-slide {
  height: clamp(360px, 58vh, 700px);
  background-size: cover;
  background-position: center center;
  /* убираем лишнее затемнение */
  filter: none; /* было grayscale(15%) */
}
.hero .hero-overlay {
  position: absolute; inset: 0;
  /* более лёгкий градиент, чтобы фото не «проваливалось» */
  background: linear-gradient(90deg,
               rgba(0,0,0,.28) 0%,
               rgba(0,0,0,.18) 45%,
               rgba(0,0,0,0)   75%);
  z-index: 1;
  pointer-events: none; /* не блокируем клики по кнопкам */
}
.hero .hero-caption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  color: #fff;
  z-index: 2; /* всегда поверх оверлея */
  max-width: 1320px; margin: 0 auto; /* чтобы текст выравнивался как у контейнера */
  padding-left: calc(var(--bs-gutter-x) * .5);
  padding-right: calc(var(--bs-gutter-x) * .5);
}
.hero .hero-content { width: min(50%, 640px); }
@media (max-width: 991.98px) { .hero .hero-content { width: 70%; } }
@media (max-width: 575.98px) { .hero .hero-content { width: 100%; } }

/* Индикаторы/стрелки */
.carousel, .carousel-item { position: relative; }
.carousel-control-prev-icon, .carousel-control-next-icon {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}
.carousel-indicators [data-bs-target] {
  width: 10px; height: 10px; border-radius: 50%;
  background-color: rgba(255,255,255,.6);
}
.carousel-indicators .active { background-color: #fff; }


@media (max-width: 991.98px) { .hero .hero-content { width: 70%; } }
@media (max-width: 575.98px) { .hero .hero-content { width: 100%; } }

/* Forms: consistent size, focus and placeholders */
.form-control, .form-select, .input-group-text {
  background-color: var(--brand-surface);
  color: var(--brand-text);
  border-color: var(--brand-border);
  border-radius: var(--radius);
  min-height: 48px;
}
.form-control.is-invalid { border-color: #dc3545; }
.invalid-feedback { color: #dc3545; }

/* Check-list styles */
.check-list { list-style: none; padding-left: 0; margin: 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.check-list li .ci { color: var(--brand-primary); font-size: 1.1rem; line-height: 1.2; }

/* Contact chips */
.contact-chips { display:flex; gap: 10px; flex-wrap: wrap; }
.contact-chips .chip { padding: 12px 16px; }
.form-control::placeholder { color: var(--brand-muted); opacity: 1; }
.form-control:focus, .form-select:focus {
  color: var(--brand-text);
  background-color: var(--brand-surface);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 .25rem rgba(46,162,107,.25);
}
.form-check-label { color: var(--brand-text); }
.form-check-input:focus { box-shadow: 0 0 0 .25rem rgba(46,162,107,.25); border-color: var(--brand-primary); }
.form-check-input:checked { background-color: var(--brand-primary); border-color: var(--brand-primary); }

/* Accordion / FAQ */
#faq .accordion-item {
  background: var(--layer-1);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  overflow: hidden;
}
#faq .accordion-button {
  background: var(--layer-2);
  color: var(--brand-text);
}
#faq .accordion-button:not(.collapsed) {
  box-shadow: none;
}
#faq .accordion-button:focus {
  box-shadow: 0 0 0 .2rem rgba(46,162,107,.25);
}


/* Focus visible improvements */
*:focus-visible { outline: 2px solid var(--brand-primary-700); outline-offset: 2px; }

/* Sticky CTA on mobile */
.sticky-cta { display:none; position: fixed; left:0; right:0; bottom: 8px; z-index: 1030; }
.sticky-cta .btn { width: calc(100% - 32px); margin: 0 16px; border-radius: 999px; }
@media (max-width: 575.98px) { .sticky-cta { display:block; } }
.btn .subtext { display:block; font-size: 12px; line-height: 1; opacity: .9; }
.btn:disabled, .btn[disabled] { opacity: .65; cursor: not-allowed; }

/* Sticky sub-navigation */
#subnav { position: sticky; top: 0; z-index: 1020; background: #0f1412; border-bottom: 1px solid var(--brand-border); padding: 8px 0; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
#subnav.show { opacity: 1; pointer-events: auto; }
#subnav .chips { gap: 8px; }
#subnav .chip.active { background: #1b211f; border-color: #3a4641; }

/* Banded sections with alternating backgrounds */
.section { background: var(--layer-0); position: relative; }
.section--alt { background: var(--layer-1); }
.section--accent { background: var(--layer-2); }
/* Stretch background to full width while keeping content aligned */
.section--band { /* full-width background via default block behavior; no viewport hacks to avoid horizontal scroll */ }
/* Removed separators to avoid visible striping near footer */
/* .section + .section, .section--band + .section--band { box-shadow: 0 -1px 0 0 rgba(255,255,255,.04) inset; } */

/* Forms: global dark theme overrides */
.form-control,
.form-select,
.input-group-text {
  background-color: var(--brand-surface);
  color: var(--brand-text);
  border-color: var(--brand-border);
}
.form-control::placeholder { color: var(--brand-muted); opacity: 1; }
.form-control:focus,
.form-select:focus {
  color: var(--brand-text);
  background-color: var(--brand-surface);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 .25rem rgba(46, 162, 107, .25);
}
.form-check-label { color: var(--brand-text); }
.form-check-input:focus { box-shadow: 0 0 0 .25rem rgba(46, 162, 107, .25); border-color: var(--brand-primary); }
.form-check-input:checked { background-color: var(--brand-primary); border-color: var(--brand-primary); }

/* Kicker label above headings */
.kicker { display:inline-block; font-size: 12px; letter-spacing:.08em; text-transform: uppercase; color: var(--brand-muted); margin-bottom: .25rem; }

/* Number badge for list cards */
.num-badge { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: #23302c; color:#9fe0bd; display:flex; align-items:center; justify-content:center; font-weight:700; }
.list-card { display:flex; align-items:flex-start; gap: var(--rhythm-2); }

/* Chips */
.chips { display:flex; flex-wrap: wrap; gap: 10px; }
.chip { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border:1px solid var(--brand-border); border-radius: 999px; color: var(--brand-text); background: transparent; transition: background .15s ease, border-color .15s ease; }
.chip:hover { background:#1b211f; border-color:#37413d; }
.chip i { opacity:.9; }

/* Horizontal TOC chips (scrollable on small screens) */
.toc { overflow:auto; white-space: nowrap; padding-bottom: 6px; }
.toc .chip { white-space: nowrap; }

/* Tabs for payments */
.nav-tabs .nav-link { border-color: transparent; color: var(--brand-text); }
.nav-tabs .nav-link.active { background: #23302c; color:#fff; border-color: #23302c; }
.tab-content { padding-top: .75rem; }

/* Stepper */
.stepper { display:grid; grid-template-columns: repeat(5,1fr); gap: var(--rhythm-2); }
.step { background: var(--brand-surface); border:1px solid var(--brand-border); border-radius: var(--radius); padding: 14px; display:flex; gap:12px; align-items:flex-start; }
.step .step-no { width:28px; height:28px; border-radius:50%; background: var(--brand-primary); color:#0f1412; font-weight:700; display:flex; align-items:center; justify-content:center; }

@media (max-width: 991.98px) { .stepper { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 575.98px) { .stepper { grid-template-columns: repeat(1,1fr); } }

/* Accent titles and exhale gradient */
.accent-title { position: relative; padding-left: 12px; border-left: 3px solid var(--brand-primary); }
.exhale { position: relative; }
.exhale::after { content:""; position:absolute; left:0; right:0; bottom:-12px; height:12px; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0)); pointer-events:none; }

/* Micro dividers inside cards */
.micro-line { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.06); }
/* Auto micro-line between list items in cards */
.card ul li + li { border-top: 1px solid rgba(255,255,255,.06); margin-top: 8px; padding-top: 8px; }

/* Icon utilities */
.icon-lg { font-size: 24px; line-height: 1; color: var(--brand-primary); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .35s ease, transform .35s ease; }
.reveal.show { opacity: 1; transform: none; }

/* Back-to-top button */
.btn-to-top { position: fixed; right: 18px; bottom: 18px; z-index: 1040; display:none; }
.btn-to-top.show { display: inline-flex; }


/* Сетка из двух колонок для плиток вакансий */
#vacancies .vacancy-grid {
  display: grid;
  gap: var(--rhythm-2);
  grid-template-columns: 1fr; /* мобилка: одна колонка */
}

/* от планшета — две колонки */
@media (min-width: 768px) {
  #vacancies .vacancy-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Плитка-чип: крупнее, на всю ширину колонки */
#vacancies .chip--tile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--brand-border);
  background: var(--layer-2);
  border-radius: calc(var(--radius) * 1.25);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  font-size: 1.05rem;
  line-height: 1.3;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

/* Иконки — крупнее и ровнее по вертикали */
#vacancies .chip--tile i {
  font-size: 1.6rem;
  opacity: .9;
}

/* Ховер/фокус — чуть «поднимаем» плитку */
#vacancies .chip--tile:hover,
#vacancies .chip--tile:focus {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* Если где-то чип — это ссылка, пусть занимает всю плитку */
#vacancies .chip--tile[href] {
  text-decoration: none;
  color: inherit;
}

/* Блог */

.chip--tight { padding: 6px 10px; font-size: .85rem; }

/* Blog cards: компактные превью */
.blog-card .thumb-wrap {
  overflow: hidden;
  border-bottom: 1px solid var(--brand-border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--layer-2);
}

/* Рамка обложки (общая) */
.post-hero{
  border-radius: var(--radius);
  background: var(--layer-2);
  border: 1px solid var(--brand-border);
  overflow: hidden;
}

/* Режим баннера для горизонтальных фото */
.post-hero--banner{
  height: clamp(180px, 28vw, 380px);
}
.post-hero--banner img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%; /* фокус чуть выше центра — лица/шлемы попадают лучше */
  display: block;
}

/* Режим без обрезки для вертикальных/квадратных */
.post-hero--contain{ height: auto; padding: 8px; text-align: center; }
.post-hero--contain img{ max-width: 100%; height: auto; display: inline-block; }


/* Любая картинка внутри ratio заполняет контейнер */
.ratio > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Текст поста: нормальные картинки внутри контента */
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}


/* Страница довольствия */

/* ---- Allowances / pay tables ---- */
.pay-tabs .nav-link { border-radius: 999px; }
.pay-card { background: var(--brand-surface); border:1px solid var(--brand-border); border-radius: var(--radius); }
.pay-table { display:grid; grid-template-columns: 160px 1fr; gap: 0; border-top:1px solid var(--brand-border); }
.pay-row { display: contents; }
.pay-cell { padding: 12px 16px; border-bottom:1px solid var(--brand-border); }
.pay-sum { font-weight: 700; white-space: nowrap; }
.pay-badge { display:inline-block; padding:2px 8px; border:1px solid var(--brand-border); border-radius:999px; font-size:.8rem; color:var(--brand-muted); }
@media (max-width: 575.98px){
  .pay-table { grid-template-columns: 1fr; }
  .pay-sum { margin-bottom: 4px; }
  .pay-row .pay-cell:first-child { border-bottom: 0; }
}

/* ---- Allowances / Pay (polished) ---- */
.pay { display:grid; gap:16px; }
.pay-card{background:var(--brand-surface);border:1px solid var(--brand-border);
  border-radius:var(--radius); box-shadow:0 2px 8px rgba(0,0,0,.18)}
.pay-card + .pay-card{margin-top:12px}

.pay-title{padding:14px 16px;border-bottom:1px solid var(--brand-border);
  font-weight:700}
.pay-note{padding:10px 16px;color:var(--brand-muted)}

.pay-table{display:grid}
.pay-table--3{grid-template-columns:220px 180px 1fr}
.pay-row{display:contents}
.pay-cell{padding:12px 16px;border-bottom:1px solid var(--brand-border)}
.pay-head .pay-cell{background:var(--layer-2);color:var(--brand-muted);
  font-size:.85rem;text-transform:uppercase;letter-spacing:.04em}
.pay-sum{font-weight:800; letter-spacing:.02em}
.pay-sum b{color:#fff}

.pay-badges{display:flex;flex-wrap:wrap;gap:6px}
.pay-badge{display:inline-flex;align-items:center;gap:6px;
  padding:4px 10px;border:1px solid var(--brand-border);border-radius:999px;
  font-size:.8rem;color:var(--brand-muted);background:#1b211f}
.pay-badge.is-good{background:#23302c;color:#9fe0bd;border-color:#3a4641}
.pay-badge.is-info{background:#1b2230;color:#b7d1ff;border-color:#2a3a4e}



/* Таблица с выплатами */

/* --- Compact two-column pay list --- */
.pay-list{
  display:grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 992px){            /* с lg делаем 2 колонки */
  .pay-list{ grid-template-columns: 1fr 1fr; }
}
.pay-item{
  display:grid;
  grid-template-columns: 1fr auto;    /* слева город, справа сумма */
  align-items:center;
  padding:12px 16px;
  background: var(--brand-surface);
  border:1px solid var(--brand-border);
  border-radius: var(--radius);
}
.pay-item .city{ color: var(--brand-muted); }
.pay-item .amt{ font-weight:700; white-space:nowrap; }


/* nav tabs inside allowances (чипы) */
.pay-tabs .nav-link{border-radius:999px;border:1px solid var(--brand-border);
  color:var(--brand-text)}
.pay-tabs .nav-link.active{background:#23302c;border-color:#23302c;color:#fff}

/* mobile */
@media (max-width: 767.98px){
  .pay-table--3{grid-template-columns:1fr}
  .pay-row{display:block}
  .pay-cell{border-bottom:0;padding:10px 14px}
  .pay-row + .pay-row .pay-cell:first-child{border-top:1px solid var(--brand-border)}
  .pay-cell:nth-child(1){font-weight:700}
  .pay-cell:nth-child(2){margin-top:-6px}
  .pay-cell:nth-child(3){color:var(--brand-muted)}
}

/* Соц сети */

/* Floating IM bar */
.im-fab {
  position: fixed;
  right: 18px;
  bottom: 110px; /* выше кнопки "наверх" */
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.im-fab a {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--brand-surface);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: transform .1s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
  text-decoration: none;
}

.im-max {
  font-weight: 800; font-size: 12px; letter-spacing: .5px;
}

.im-fab a:hover {
  background: #1b211f; border-color: #37413d; color: #fff;
  transform: translateY(-2px);
}
.im-fab a .bi { font-size: 1.25rem; line-height: 1; }

@media (max-width: 575.98px){
  .im-fab { right: 12px; bottom: 90px; gap: 8px; }
  .im-fab a { width: 44px; height: 44px; }
}


/* VACANCIES */
.vacancy-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px){
  .vacancy-grid{ grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1200px){
  .vacancy-grid{ grid-template-columns: 1fr 1fr 1fr; }
}

.vacancy-tile{
  display:flex; align-items:center; gap:12px;
  padding:16px 18px;
  border:1px solid var(--brand-border);
  background: var(--layer-2);
  color: var(--brand-text);
  border-radius: calc(var(--radius) * 1.2);
  text-decoration:none;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.vacancy-tile i{
  font-size:1.2rem;
  color: var(--brand-primary);
  opacity:.9;
}
.vacancy-tile:hover,
.vacancy-tile:focus{
  transform: translateY(-1px);
  border-color: var(--brand-primary);
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
  background: #1b211f;
}

.vacancy-tile--ghost{
  border-style: dashed;
  background: transparent;
}
.vacancy-tile--ghost:hover,
.vacancy-tile--ghost:focus{
  background: rgba(13,110,253,.06);
}



/* липкая шапка поиска */
#cityModal .search-box{
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--brand-surface);
  border-bottom: 1px solid var(--brand-border);
  box-shadow: 0 6px 12px rgba(0,0,0,.18);
}
/* в шапке нам не нужен ещё один <hr> */
#cityModal .search-box hr{ display:none; }

/* прокрутка */
#cityModal .modal-body{ max-height: 70vh; overflow-y: auto; }


/* Телефон в блоке обратной связи */
.phone-link{
  color: var(--brand-primary) !important;   /* тот же цвет, что у заголовка */
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;                      /* номер всегда в одну строку */
  border-bottom: 1px dotted transparent;
  transition: color .15s ease, border-color .15s ease;
}
.phone-link:hover,
.phone-link:focus{
  /* если нет brand-primary-700 — оставит просто основной цвет */
  color: var(--brand-primary-700, var(--brand-primary));
  border-bottom-color: var(--brand-primary-700, var(--brand-primary));
}
.phone-link .bi{ opacity:.9; font-size: 1rem; line-height: 1; }