/* ============================================================
   «ФОРМАТ» — шапка: тёмная утилити-полоса, светлый мастхэд,
   основная навигация унесена в левую панель. Мобильное меню — шторка.
   ============================================================ */

.fmt-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--fmt-paper);
  border-bottom: 1px solid var(--fmt-line-2);
  box-shadow: 0 1px 0 rgba(11, 18, 32, .04);
}
.fmt-header.is-scrolled { box-shadow: 0 10px 30px -22px rgba(11, 18, 32, .45); }

/* ---------- утилити-полоса ---------- */
.fmt-topline {
  background: var(--fmt-dark);
  color: rgba(255, 255, 255, .66);
}
.fmt-topline__inner {
  max-width: 1720px;
  margin: 0 auto;
  padding: 7px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.fmt-topline p { margin: 0; color: inherit; }
.fmt-topline__brand { display: inline-flex; align-items: center; gap: 9px; color: rgba(255,255,255,.8); white-space: nowrap; }
.fmt-topline__brand span { color: rgba(255,255,255,.45); }
.fmt-topline__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fmt-accent); }
.fmt-topline__facts { display: flex; align-items: center; gap: 18px; }
.fmt-topline__facts span { position: relative; padding-left: 12px; }
.fmt-topline__facts span::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.32); transform: translateY(-50%); }
.fmt-topline__contacts { display: inline-flex; align-items: center; gap: 16px; }
.fmt-topline__contacts a { color: rgba(255,255,255,.82); text-decoration: none; white-space: nowrap; }
.fmt-topline__contacts a:hover { color: var(--fmt-accent); }

/* ---------- мастхэд ---------- */
.fmt-bar {
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
.fmt-bar__inner {
  max-width: 1720px;
  margin: 0 auto;
  padding: 13px 24px;
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
}

/* логотип */
.fmt-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  min-width: 0;
}
.fmt-brand__mark {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--fmt-ink);
  color: #fff;
  font-family: var(--fmt-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.02em;
  flex: 0 0 auto;
  transition: background .18s ease;
}
.fmt-brand__mark::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--fmt-accent);
}
.fmt-brand:hover .fmt-brand__mark { background: var(--fmt-brand); }
.fmt-brand__text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.fmt-brand__name {
  font-family: var(--fmt-display) !important;
  font-size: 19px !important;
  font-weight: 500 !important;
  letter-spacing: -.03em !important;
  color: var(--fmt-ink);
  white-space: nowrap;
}
.fmt-brand__tag {
  margin-top: 5px;
  font-family: var(--fmt-sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fmt-muted);
  white-space: nowrap;
}

/* горизонтальные быстрые ссылки (только широкие экраны) */
.fmt-quick-nav { display: none; align-items: center; gap: 24px; }
.fmt-quick-nav__link {
  position: relative;
  padding: 6px 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--fmt-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s ease;
}
.fmt-quick-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--fmt-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.fmt-quick-nav__link:hover { color: var(--fmt-ink); }
.fmt-quick-nav__link.is-active { color: var(--fmt-ink); }
.fmt-quick-nav__link.is-active::after, .fmt-quick-nav__link:hover::after { transform: scaleX(1); }

.fmt-bar__actions { display: flex; align-items: center; gap: 18px; justify-content: flex-end; }
/* «Перезвоните мне» — заполняет второй ряд шапки на десктопе */
.fmt-callme {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px;
  border: 1px solid rgba(20, 40, 80, .16); border-radius: 999px;
  background: #fff; color: var(--fmt-ink); font-size: 12.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: border-color .2s, color .2s, background .2s;
}
.fmt-callme svg { color: var(--fmt-brand-2, #c9a227); }
.fmt-callme:hover { border-color: var(--fmt-brand-2, #c9a227); color: #8a6d1c; }
@media (max-width: 767px) { .fmt-callme { display: none; } }


/* город */
.fmt-city { position: relative; }
.fmt-city__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  border: 1px solid var(--fmt-line);
  border-radius: 999px;
  background: var(--fmt-paper-2);
  cursor: pointer;
  font-family: var(--fmt-sans);
  transition: border-color .16s ease, background .16s ease;
}
.fmt-city__btn:hover { border-color: var(--fmt-ink); background: #fff; }
.fmt-city__cap { font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fmt-muted); }
.fmt-city__name { font-size: 12.5px; font-weight: 700; color: var(--fmt-ink); }
.fmt-city__chev { font-size: 10px; color: var(--fmt-accent-2); line-height: 1; }
.fmt-city__pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 90;
  width: 306px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--fmt-line-2);
  border-radius: var(--fmt-radius);
  box-shadow: 0 26px 60px -28px rgba(11, 18, 32, .5);
  display: none;
}
.fmt-city__pop.open { display: block; }
.fmt-city__pop-title { margin: 0 0 10px !important; font-size: 10px !important; font-weight: 700 !important; letter-spacing: .14em; text-transform: uppercase; color: var(--fmt-muted) !important; }
.fmt-city__search {
  width: 100%;
  height: 40px;
  margin: 0 0 10px;
  padding: 0 12px;
  border: 1px solid var(--fmt-line-2);
  border-radius: 7px;
  background: #fff;
  font-family: var(--fmt-sans);
  font-size: 13px;
  color: var(--fmt-ink);
}
.fmt-city__list { max-height: 268px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.fmt-city__list .hs-cp-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-family: var(--fmt-sans);
  font-size: 13px;
  color: var(--fmt-ink-2);
  cursor: pointer;
}
.fmt-city__list .hs-cp-item:hover { background: var(--fmt-brand-soft); color: var(--fmt-brand-2); }
.fmt-city__list .hs-cp-item.active { background: var(--fmt-brand); color: #fff; }
.fmt-city__list .hs-cp-empty { padding: 10px; font-size: 12.5px; color: var(--fmt-muted); }

/* телефон */
.fmt-phone { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.fmt-phone__ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(29, 78, 216, .08); color: var(--fmt-brand, #1d4ed8); }
.fmt-phone__text { display: flex; flex-direction: column; gap: 1px; }
.fmt-phone:hover .fmt-phone__ico { background: rgba(29, 78, 216, .14); }
.fmt-phone__cap { font-size: 9.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--fmt-muted); }
.fmt-phone__num { font-size: 14.5px; font-weight: 700; letter-spacing: .005em; color: var(--fmt-ink); }
.fmt-phone:hover .fmt-phone__num { color: var(--fmt-brand); }

.fmt-bar__cta { min-height: 44px; padding: 0 20px; flex: 0 0 auto; }

/* бургер */
.fmt-burger {
  display: none;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--fmt-line-2);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-family: var(--fmt-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fmt-ink);
}
.fmt-burger__lines { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.fmt-burger__lines i { display: block; height: 2px; background: var(--fmt-ink); border-radius: 2px; transition: transform .18s ease, opacity .18s ease; }
#v2Burger[aria-expanded="true"] .fmt-burger__lines i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#v2Burger[aria-expanded="true"] .fmt-burger__lines i:nth-child(2) { opacity: 0; }
#v2Burger[aria-expanded="true"] .fmt-burger__lines i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- мобильная шторка ---------- */
.fmt-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(8, 13, 24, .55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity .22s ease, visibility .22s ease;
}
.fmt-drawer.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.fmt-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  max-height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 30px;
  background: var(--fmt-dark);
  color: #e7ecf5;
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.22, .61, .36, 1);
}
.fmt-drawer.is-open .fmt-drawer__panel { transform: none; }
.fmt-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.fmt-drawer__title { font-family: var(--fmt-display); font-size: 15px; font-weight: 500; letter-spacing: -.02em; color: #fff; }
.fmt-drawer__close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.fmt-drawer__close:hover { background: rgba(255, 255, 255, .1); }
.fmt-drawer__nav { display: flex; flex-direction: column; }
.fmt-drawer__link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  padding: 13px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  text-decoration: none;
  color: #cfd8e6;
}
.fmt-drawer__num { font-size: 10px; font-weight: 600; letter-spacing: .08em; color: rgba(255, 255, 255, .38); }
.fmt-drawer__label { font-size: 15px; font-weight: 500; }
.fmt-drawer__arrow { color: var(--fmt-accent); opacity: 0; transform: translateX(-4px); transition: opacity .16s ease, transform .16s ease; }
.fmt-drawer__link:hover, .fmt-drawer__link.is-active { color: #fff; }
.fmt-drawer__link:hover .fmt-drawer__arrow, .fmt-drawer__link.is-active .fmt-drawer__arrow { opacity: 1; transform: none; }
.fmt-drawer__link.is-active .fmt-drawer__label { color: var(--fmt-accent); }
.fmt-drawer__contacts { margin: 22px 0 18px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.fmt-drawer__phone { display: block; font-family: var(--fmt-display); font-size: 20px; font-weight: 500; color: #fff; text-decoration: none; letter-spacing: -.02em; }
.fmt-drawer__contacts p { margin: 8px 0 0; font-size: 12px; color: rgba(255, 255, 255, .6); }
.fmt-drawer__contacts a { color: rgba(255, 255, 255, .82); }
.fmt-drawer__cta { width: 100%; min-height: 50px; }

/* ---------- адаптив шапки ---------- */
@media (min-width: 1340px) {
  .fmt-quick-nav { display: flex; gap: 15px; min-width: 0; }
  .fmt-quick-nav__link { white-space: nowrap; font-size: 11.5px; letter-spacing: .06em; }
}
@media (min-width: 1800px) {
  .fmt-quick-nav { gap: 24px; }
}
@media (max-width: 1339px) {
  .fmt-bar__inner { grid-template-columns: auto minmax(0, 1fr); }
  .fmt-quick-nav { display: none; }
}
@media (max-width: 1339px) {
  .fmt-burger { display: inline-flex; }
}
@media (max-width: 1180px) {
  .fmt-burger { display: inline-flex; }
  .fmt-topline__facts { display: none; }
}
@media (max-width: 1024px) {
  .fmt-phone { display: none; }
}
@media (max-width: 860px) {
  .fmt-topline__brand span { display: none; }
  .fmt-topline__inner, .fmt-bar__inner { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 640px) {
  .fmt-topline { display: none; }
  .fmt-bar__inner { padding: 10px 16px; gap: 12px; }
  .fmt-brand__mark { width: 40px; height: 40px; font-size: 18px; border-radius: 8px; }
  .fmt-brand__name { font-size: 16px !important; }
  .fmt-brand__tag { font-size: 8.5px; letter-spacing: .1em; }
  .fmt-bar__cta { min-height: 40px; padding: 0 14px; font-size: 12.5px; }
  .fmt-bar__actions { gap: 8px; }
  .fmt-burger { height: 40px; padding: 0 10px; }
  .fmt-burger__text { display: none; }
}
@media (max-width: 420px) {
  .fmt-bar__cta { display: none; }
}

/* высота и ширина главной кнопки второго ряда */
@media (min-width: 768px) {
  .fmt-bar__cta { min-width: 200px; min-height: 46px; }
}
/* ---------- третий ряд шапки: город, поиск вузов/ссузов, соцсети ---------- */
.fmt-subbar {
  border-top: 1px solid var(--fmt-line);
  background: rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.fmt-subbar__inner {
  max-width: 1720px;
  margin: 0 auto;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fmt-subbar__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.fmt-subbar__social {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--fmt-line);
}
.fmt-city__ico { display: inline-flex; color: var(--fmt-accent-2); margin-right: 1px; }

.fmt-sbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(20, 40, 80, .16);
  border-radius: 999px;
  background: #fff;
  color: var(--fmt-ink);
  font-family: var(--fmt-sans);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}
.fmt-sbtn__ico { display: inline-flex; color: var(--fmt-brand-2, #c9a227); }
.fmt-sbtn:hover { border-color: var(--fmt-accent); color: #8a6d1c; background: #fffdf6; transform: translateY(-1px); }

.fmt-soc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(20, 40, 80, .14);
  border-radius: 50%;
  background: #fff;
  color: var(--fmt-ink);
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.fmt-soc:hover { background: var(--fmt-ink); border-color: var(--fmt-ink); color: #fff; transform: translateY(-1px); }

@media (max-width: 1023px) {
  .fmt-subbar__inner { flex-wrap: wrap; row-gap: 8px; }
  .fmt-subbar__tools { margin-left: 0; }
  .fmt-subbar__social { margin-left: auto; }
}
@media (max-width: 767px) {
  .fmt-subbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fmt-sbtn:hover, .fmt-soc:hover { transform: none; }
}


