/**
 * Portal24 — единый floating glass header на всех городах.
 * Лежит поверх hero, одинаковый дизайн; ссылки/пункты — из branding города.
 */
:root {
  --p24-header-pad: 12px;
  --p24-header-h: 56px;
  --p24-header-radius: 999px;
  --p24-header-glass: rgba(255, 255, 255, 0.78);
  --p24-header-border: rgba(255, 255, 255, 0.7);
  --p24-header-shadow: 0 10px 36px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --p24-header-text: #1e293b;
  --p24-header-muted: #64748b;
  --p24-header-accent: #2563eb;
  --p24-header-accent-soft: rgba(37, 99, 235, 0.1);
}

html body .site-header.p24-glass {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: var(--p24-header-pad) 16px 0 !important;
  transform: none;
  transition: transform 0.35s ease, padding 0.25s ease;
}

html body .site-header.p24-glass.header-hidden {
  transform: translateY(calc(-100% - 8px)) !important;
}

html body .site-header.p24-glass .header-inner {
  max-width: 1280px !important;
  width: 100% !important;
  margin: 0 auto !important;
  height: var(--p24-header-h) !important;
  min-height: var(--p24-header-h) !important;
  padding: 0 10px 0 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  border-radius: var(--p24-header-radius) !important;
  background: var(--p24-header-glass) !important;
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid var(--p24-header-border) !important;
  box-shadow: var(--p24-header-shadow) !important;
  overflow: visible !important;
}

html body .site-header.p24-glass.is-scrolled .header-inner {
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* Logo */
html body .site-header.p24-glass .site-branding {
  flex-shrink: 0;
}
html body .site-header.p24-glass .header-logo,
html body .site-header.p24-glass .site-branding img {
  max-height: 30px !important;
  width: auto !important;
  display: block;
}

/* Nav — текстовые ссылки */
html body .site-header.p24-glass .p24-nav {
  flex-shrink: 0;
  display: none;
}
@media (min-width: 1100px) {
  html body .site-header.p24-glass .p24-nav {
    display: flex !important;
    align-items: center;
  }
}

html body .site-header.p24-glass .main-navigation ul.menu-pills {
  display: flex !important;
  align-items: center;
  gap: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  background: transparent !important;
}

html body .site-header.p24-glass .main-navigation ul.menu-pills li a {
  display: inline-flex !important;
  align-items: center;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--p24-header-muted) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  white-space: nowrap;
  border: none !important;
  box-shadow: none !important;
  transition: color 0.15s, background 0.15s;
}

html body .site-header.p24-glass .main-navigation ul.menu-pills li a:hover {
  color: var(--p24-header-text) !important;
  background: rgba(15, 23, 42, 0.05) !important;
}

html body .site-header.p24-glass .main-navigation ul.menu-pills li.current-menu-item a {
  color: var(--p24-header-accent) !important;
  background: var(--p24-header-accent-soft) !important;
  font-weight: 600 !important;
}

html body .site-header.p24-glass .main-navigation ul.menu-pills--service {
  gap: 0 !important;
  flex-wrap: nowrap !important;
}
html body .site-header.p24-glass .main-navigation ul.menu-pills--service li a {
  padding: 7px 10px !important;
  font-size: 13px !important;
}

/* Search */
html body .site-header.p24-glass .header-center {
  flex: 1 1 auto !important;
  min-width: 140px !important;
  max-width: 380px !important;
  display: none !important;
  align-items: center;
  gap: 8px !important;
  margin-left: auto;
}
@media (min-width: 901px) {
  html body .site-header.p24-glass .header-center {
    display: flex !important;
  }
}
@media (min-width: 1280px) {
  html body .site-header.p24-glass .header-center {
    max-width: 460px !important;
  }
}

html body .site-header.p24-glass .header-search {
  flex: 1;
  min-width: 0;
}

html body .site-header.p24-glass .header-search-input {
  height: 40px !important;
  border-radius: 999px !important;
  background: rgba(241, 245, 249, 0.95) !important;
  border: 1px solid transparent !important;
  padding: 0 42px 0 16px !important;
  font-size: 13.5px !important;
  box-shadow: none !important;
}
html body .site-header.p24-glass .header-search-input:focus {
  background: #fff !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

html body .site-header.p24-glass .header-city {
  color: var(--p24-header-accent) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--p24-header-accent-soft);
  flex-shrink: 0;
}
html body .site-header.p24-glass .header-city:hover {
  color: #1d4ed8 !important;
}

body.service-page .site-header.p24-glass .header-center--compact {
  max-width: 240px !important;
  flex: 0 1 240px !important;
}
@media (min-width: 1200px) {
  body.service-page .site-header.p24-glass .header-center--compact {
    max-width: 300px !important;
    flex: 0 1 300px !important;
  }
}

/* Tools: sitemap + login + burger */
html body .site-header.p24-glass .header-tools {
  display: flex !important;
  align-items: center;
  gap: 6px;
  flex-shrink: 0 !important;
  margin-left: 4px;
}

html body .site-header.p24-glass .header-icon-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  background: rgba(255, 255, 255, 0.7) !important;
  color: var(--p24-header-muted) !important;
  flex-shrink: 0;
}
html body .site-header.p24-glass .header-icon-btn:hover,
html body .site-header.p24-glass .header-icon-btn.is-active {
  color: var(--p24-header-accent) !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
  background: #fff !important;
}

/* Единая кнопка входа */
html body .site-header.p24-glass .g24-auth-header-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px !important;
  min-width: 40px;
  padding: 0 14px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  background: #fff !important;
  color: var(--p24-header-text) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
html body .site-header.p24-glass .g24-auth-header-btn:hover {
  border-color: rgba(37, 99, 235, 0.4) !important;
  color: var(--p24-header-accent) !important;
  background: #fff !important;
}
html body .site-header.p24-glass .g24-auth-header-btn--primary {
  background: var(--p24-header-accent) !important;
  border-color: var(--p24-header-accent) !important;
  color: #fff !important;
}
html body .site-header.p24-glass .g24-auth-header-btn--primary:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
}
html body .site-header.p24-glass .g24-auth-header-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Burger */
html body .site-header.p24-glass .menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  background: #fff !important;
  color: #1e293b !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: none;
}
html body .site-header.p24-glass .menu-toggle .bar {
  display: none !important;
}
html body .site-header.p24-glass .menu-toggle__icon {
  display: block;
  width: 20px;
  height: 20px;
  color: inherit;
  pointer-events: none;
}
html body .site-header.p24-glass .menu-toggle__icon--close[hidden],
html body .site-header.p24-glass .menu-toggle:not(.active) .menu-toggle__icon--close {
  display: none !important;
}
html body .site-header.p24-glass .menu-toggle.active .menu-toggle__icon--open {
  display: none !important;
}
html body .site-header.p24-glass .menu-toggle.active .menu-toggle__icon--close {
  display: block !important;
}

/* Mobile panel */
html body .site-header.p24-glass .header-mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 8px auto 0;
  padding: 14px !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14) !important;
}
html body .site-header.p24-glass .header-mobile-panel.is-open {
  display: block !important;
}

html body .site-header.p24-glass .header-mobile-link,
html body .site-header.p24-glass .g24-mobile-auth-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(241, 245, 249, 0.92);
  color: var(--p24-header-text);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
html body .site-header.p24-glass .header-mobile-link__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
  opacity: 0.9;
}
html body .site-header.p24-glass .header-mobile-link--accent {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}
html body .site-header.p24-glass .header-mobile-link--accent:hover {
  filter: brightness(1.04);
  color: #fff !important;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}
html body .site-header.p24-glass .header-mobile-link:hover,
html body .site-header.p24-glass .g24-mobile-auth-btn:hover {
  background: var(--p24-header-accent-soft);
  color: var(--p24-header-accent);
  border-color: rgba(37, 99, 235, 0.18);
}

html body .site-header.p24-glass .header-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

html body .site-header.p24-glass .header-mobile-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
html body .site-header.p24-glass .header-mobile-footer__label {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
html body .site-header.p24-glass .header-mobile-socials {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-top: none !important;
}
html body .site-header.p24-glass .header-mobile-social {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s, box-shadow 0.15s;
}
html body .site-header.p24-glass .header-mobile-social:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}
html body .site-header.p24-glass .header-mobile-social img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
html body .site-header.p24-glass .header-mobile-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}
html body .site-header.p24-glass .header-mobile-phone:hover {
  background: #1e293b;
  color: #fff !important;
}

/* Mobile search drawer under pill */
html body .site-header.p24-glass .header-mobile-search-panel {
  display: none;
  max-width: 1280px;
  margin: 8px auto 0;
  padding: 12px !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14) !important;
}
html body .site-header.p24-glass .header-mobile-search-panel:not([hidden]) {
  display: block !important;
}
html body .site-header.p24-glass .header-search-toggle {
  display: none;
}

@media (max-width: 900px) {
  html body .site-header.p24-glass {
    padding: 8px 10px 0 !important;
  }
  html body .site-header.p24-glass .header-inner {
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 8px 0 12px !important;
    gap: 8px !important;
  }
  html body .site-header.p24-glass .header-logo,
  html body .site-header.p24-glass .site-branding img {
    max-height: 26px !important;
  }
  html body .site-header.p24-glass .header-center {
    display: none !important;
  }
  html body .site-header.p24-glass .p24-nav {
    display: none !important;
  }
  html body .site-header.p24-glass .header-icon-btn--desktop,
  html body .site-header.p24-glass .header-auth-desktop {
    display: none !important;
  }
  html body .site-header.p24-glass .header-search-toggle {
    display: inline-flex !important;
  }
  html body .site-header.p24-glass .menu-toggle {
    display: inline-flex !important;
  }
  html body .site-header.p24-glass .header-tools {
    margin-left: auto;
    gap: 8px;
  }
  html body .site-header.p24-glass .header-mobile-panel {
    padding: 16px !important;
  }
}

@media (min-width: 901px) {
  html body .site-header.p24-glass .menu-toggle,
  html body .site-header.p24-glass .header-search-toggle {
    display: none !important;
  }
  html body .site-header.p24-glass .header-mobile-panel,
  html body .site-header.p24-glass .header-mobile-search-panel {
    display: none !important;
  }
}

html body:has(.site-header.p24-glass) .header-spacer {
  height: 0 !important;
  display: none !important;
}

@media (max-width: 1200px) {
  html body .site-header.p24-glass .header-city {
    display: none !important;
  }
}

/* ===== Footer auth CTA (все города) ===== */
.p24-footer-auth {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
}
.footer-nav-list .p24-footer-auth,
.footer-nav-compact .p24-footer-auth,
.brn-footer-nav .p24-footer-auth,
.slc-footer__nav .p24-footer-auth {
  margin: 10px 0 0;
  width: 100%;
}
.p24-footer-auth__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.p24-footer-auth__btn svg {
  flex-shrink: 0;
}
.p24-footer-auth__btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}
.p24-footer-auth__btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff !important;
  transform: translateY(-1px);
}
.p24-footer-auth__btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.45);
  color: inherit;
}
.footer-bottom-dark .p24-footer-auth__btn--ghost,
.site-footer-service .p24-footer-auth__btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #e2e8f0 !important;
}
.footer-bottom-light .p24-footer-auth__btn--ghost,
.site-footer-portal .p24-footer-auth__btn--ghost,
.brn-footer .p24-footer-auth__btn--ghost,
.slc-footer .p24-footer-auth__btn--ghost {
  background: #fff;
  border-color: #e2e8f0;
  color: #334155 !important;
}
.p24-footer-auth__btn--ghost:hover {
  border-color: #2563eb;
  color: #2563eb !important;
}
.p24-footer-auth__hint {
  font-size: 12px;
  font-weight: 500;
  color: inherit;
  opacity: 0.7;
  text-decoration: none !important;
}
.p24-footer-auth__hint:hover {
  opacity: 1;
  color: #2563eb !important;
}

/* Полоска внизу подвала */
.p24-footer-auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  flex: 1 0 100%;
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.14);
}
.footer-bottom-dark .p24-footer-auth-bar,
.site-footer-service .p24-footer-auth-bar {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.p24-footer-auth-bar__text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.p24-footer-auth-bar__text span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.72;
}
.p24-footer-auth-bar .p24-footer-auth {
  margin: 0;
}
@media (max-width: 640px) {
  .p24-footer-auth-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .p24-footer-auth-bar .p24-footer-auth {
    width: 100%;
  }
  .p24-footer-auth-bar .p24-footer-auth__btn {
    flex: 1;
  }
}
