/* iColleges — header search */
.hdr-search-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line, #e4e8e6);
  background: var(--white, #fff); color: var(--ink, #0a1b1e);
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
  margin-right: 6px; padding: 0;
}
.hdr-search-btn:hover {
  background: var(--teal-light, #e6f5f0);
  color: var(--teal, #1d9e75);
  border-color: var(--teal, #1d9e75);
}

.hdr-search-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(10, 27, 30, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 80px 16px 16px;
  display: flex; flex-direction: column; align-items: center;
  animation: hdr-search-fade 0.15s ease;
}
@keyframes hdr-search-fade { from { opacity: 0; } to { opacity: 1; } }
.hdr-search-overlay[hidden] { display: none; }

.hdr-search-box {
  width: 100%; max-width: 720px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 12px 36px rgba(10, 27, 30, 0.28);
}
.hdr-search-ico { flex-shrink: 0; color: var(--ink-muted, #5c6370); }
.hdr-search-box input {
  flex: 1; font-family: inherit; font-size: 16px;
  border: 0; background: transparent;
  color: var(--ink, #0a1b1e); outline: 0;
  padding: 8px 0; min-width: 0;
}
.hdr-search-box input::placeholder { color: var(--ink-muted, #5c6370); }
.hdr-search-close {
  flex-shrink: 0; width: 32px; height: 32px;
  border-radius: 50%; border: 0;
  background: #f4f7f5; color: var(--ink, #0a1b1e);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.15s;
}
.hdr-search-close:hover { background: #e4e8e6; transform: rotate(90deg); }

.hdr-search-results {
  width: 100%; max-width: 720px;
  background: #fff; border-radius: 14px;
  margin-top: 10px; padding: 10px 0;
  box-shadow: 0 12px 36px rgba(10, 27, 30, 0.2);
  max-height: 70vh; overflow-y: auto;
}
.hdr-search-results[hidden] { display: none; }

.hdr-search-group { padding: 8px 0; }
.hdr-search-group + .hdr-search-group { border-top: 1px solid var(--line, #e4e8e6); }
.hdr-search-group-label {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted, #5c6370);
  padding: 4px 20px 8px;
}
.hdr-search-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 20px;
  color: var(--ink, #0a1b1e); text-decoration: none;
  transition: background 0.1s;
  border-left: 3px solid transparent;
}
.hdr-search-item:hover {
  background: #f4f7f5;
  border-left-color: var(--teal, #1d9e75);
}
.hdr-search-item-t {
  font-family: var(--font-display, inherit);
  font-weight: 600; font-size: 15px;
  color: var(--ink, #0a1b1e);
}
.hdr-search-item-t mark {
  background: rgba(29, 158, 117, 0.22);
  color: var(--ink, #0a1b1e);
  font-weight: 700; padding: 0 1px; border-radius: 2px;
}
.hdr-search-item-s {
  font-size: 12px; color: var(--ink-muted, #5c6370);
}
.hdr-search-empty {
  padding: 18px 22px; font-size: 14px;
  color: var(--ink-muted, #5c6370); line-height: 1.5;
}

body.hdr-search-open { overflow: hidden; }

@media (max-width: 700px) {
  .hdr-search-overlay { padding: 70px 12px 12px; }
  .hdr-search-box { padding: 10px 12px; }
  .hdr-search-box input { font-size: 16px; /* prevent iOS zoom */ }
  .hdr-search-results { max-height: calc(100vh - 100px); }
}

/* ═══════════════════════════════════════════════════════════════
   Mobile header — гамбургер, drawer, адаптив
   ═══════════════════════════════════════════════════════════════ */
.site-burger {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 8px; border: 1px solid var(--line, #e4e8e6);
  background: var(--white, #fff); color: var(--ink, #0a1b1e);
  cursor: pointer; padding: 0;
}
.site-burger:hover { background: var(--teal-light, #e6f5f0); }

.site-mobile-drawer {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--line, #e4e8e6);
  box-shadow: 0 12px 24px rgba(10, 27, 30, 0.08);
  max-height: 0; overflow: hidden;
  transition: max-height 0.25s ease;
}
.site-mobile-drawer.is-open { max-height: 80vh; overflow-y: auto; }

.site-mobile-nav {
  display: flex; flex-direction: column;
  padding: 12px 16px 20px;
}
.site-mobile-link {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 12px; border-radius: 10px;
  font-size: 16px; font-weight: 500;
  color: var(--ink, #0a1b1e); text-decoration: none;
}
.site-mobile-link:active { background: var(--teal-light, #e6f5f0); }
.site-mobile-badge {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px;
  font-size: 12px; font-weight: 700; color: #fff;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.site-mobile-cta {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 12px; padding: 12px 0 0;
  border-top: 1px solid var(--line, #e4e8e6);
}
.site-mobile-cta > * { width: 100%; }
.site-mobile-cta button { width: 100%; justify-content: center; }

/* Точка перелома 1: 1100px — прячем «Подобрать колледж» */
@media (max-width: 1100px) {
  .site-cta-btn { display: none !important; }
}
/* Точка перелома 2: 960px — сворачиваем nav в гамбургер */
@media (max-width: 960px) {
  .site-header { position: relative; }
  .site-nav { display: none !important; }
  .site-city-btn { display: none !important; }
  .site-burger { display: inline-flex; }
  .site-mobile-drawer { display: block; }
  .site-header-row { padding: 12px 16px !important; gap: 8px !important; }
  .hdr-search-btn { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
  .site-header-row { padding: 10px 14px !important; }
}

/* Когда меню открыто — не даём контенту скроллиться */
body.nav-mobile-open { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════
   Global mobile safety — чтобы не было горизонтального скролла
   и автозума на любых страницах сайта
   ═══════════════════════════════════════════════════════════════ */
html, body { max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
img, video, iframe, svg { max-width: 100%; }
* { min-width: 0; }
table { max-width: 100%; }

@media (max-width: 720px) {
  /* контейнеры */
  .page { padding: 0 14px !important; }

  /* типографика hero/h1/h2 */
  .head { padding: 18px 0 4px !important; }
  .head h1 { font-size: 28px !important; line-height: 1.1 !important; }
  h1 { font-size: 28px !important; line-height: 1.15 !important; }
  h2 { font-size: 22px !important; }
  h3 { font-size: 18px !important; }
  .promo h3 { font-size: 22px !important; }

  /* поля форм 16px против iOS-зума */
  input, select, textarea { font-size: 16px !important; }

  /* промо-блоки в одну колонку */
  .promos { grid-template-columns: 1fr !important; gap: 14px !important; }
  .promo { padding: 22px !important; }

  /* тулбар — wrap корректнее */
  .toolbar { padding: 10px !important; gap: 8px !important; }
  .toolbar .left, .toolbar .right { width: 100%; }

  /* футер */
  footer > div:first-child {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important; padding: 32px 16px !important;
  }
}
@media (max-width: 480px) {
  .head h1, h1 { font-size: 26px !important; }
  footer > div:first-child { grid-template-columns: 1fr !important; }
}
