:root {
  --muted: #52635d;
}

html {
  max-width: 100%;
}

body,
button,
input,
select,
textarea {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
.section-heading h2,
.benefits-head h2,
.city-copy h2,
.seo-heading h2,
.lead-copy h2,
.faq-heading h2,
.related-searches-heading h2,
.article-hero h1 {
  letter-spacing: -0.045em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #d8ff57;
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .city-section {
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .city-section > *,
  .city-copy,
  .city-search,
  .city-search > div,
  .city-cloud,
  .all-cities-directory {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .city-count {
    margin-left: 0;
  }
}

/* Обязательное условие регистрации рядом с формой заявки. */
.lead-form .citizenship-confirm {
  padding: 12px 14px;
  border: 1px solid rgba(6, 63, 44, 0.22);
  border-radius: 14px;
  color: #10241d;
  background: #f4f7e8;
  font-weight: 800;
}

/* Прямой звонок под каждой фотографией направления. */
.role-phone-line {
  min-height: 64px;
  padding: 14px 18px;
  border-top: 1px solid rgba(8, 122, 61, 0.3);
  border-right: 1px solid rgba(8, 122, 61, 0.3);
  border-bottom: 1px solid rgba(8, 122, 61, 0.3);
  border-left: 4px solid #087a3d;
  color: #063f2c;
  background: #edf7e8;
  box-shadow: 0 8px 18px rgba(6, 63, 44, 0.08);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: text;
}

.role-phone-line__label {
  color: #36574c;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.role-phone-line__number {
  color: #063f2c;
  background: linear-gradient(to bottom, transparent 43%, #d8ff57 43%);
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
  line-height: 1.1;
  padding: 0 3px 2px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Прямой звонок в первом экране рядом с основной заявкой. */
.hero-phone-display {
  min-height: 58px;
  padding: 12px 18px;
  border: 1px solid rgba(8, 122, 61, 0.34);
  border-left: 4px solid #087a3d;
  border-radius: 14px;
  color: #063f2c;
  background: #edf7e8;
  box-shadow: 0 8px 18px rgba(6, 63, 44, 0.08);
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  font-weight: 900;
  user-select: text;
  white-space: nowrap;
}

.hero-phone-display span {
  color: #36574c;
  font-size: 12px;
  font-weight: 800;
}

.hero-phone-display strong {
  color: #063f2c;
  background: linear-gradient(to bottom, transparent 43%, #d8ff57 43%);
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
  line-height: 1.1;
  padding: 0 3px 2px;
  border-radius: 4px;
}

/* Тот же акцент для существующих кликабельных номеров в шапке и у формы. */
.header-phone {
  color: #087a3d;
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-decoration-color: rgba(8, 122, 61, 0.45);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.contact-number {
  color: #d8ff57;
  font-size: clamp(21px, 2vw, 25px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.015em;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
}

.mobile-bar > a[href^="tel:"] {
  min-height: 48px;
  border-width: 2px;
  font-size: 14px;
  font-weight: 900;
}

/* Настоящий фирменный логотип в подвале — тот же файл и тот же шрифт, что в шапке. */
.footer-brand--logo {
  width: fit-content;
  max-width: 100%;
  min-height: 68px;
  padding: 10px 15px;
  background: #fffdf5;
  border: 1px solid rgba(216, 255, 87, 0.42);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  line-height: 1;
}

.footer-brand--logo .footer-brand-logo {
  display: block;
  width: 245px;
  max-width: min(62vw, 245px);
  height: auto;
  object-fit: contain;
}

.footer-brand--logo:hover {
  background: #ffffff;
  border-color: rgba(216, 255, 87, 0.78);
}

.footer-brand--logo:focus-visible {
  outline: 3px solid #d8ff57;
  outline-offset: 4px;
}

@media (max-width: 560px) {
  .role-phone-line {
    min-height: 64px;
    padding: 13px 17px;
  }

  .role-phone-line__label {
    font-size: 13px;
  }

  .role-phone-line__number {
    font-size: 19px;
  }

  .hero-phone-display {
    width: 100%;
    min-height: 58px;
    justify-content: space-between;
    align-self: stretch;
    padding: 12px 18px;
    font-size: 14px;
  }

  .hero-phone-display strong {
    font-size: 19px;
  }

  .footer-brand--logo {
    min-height: 61px;
    padding: 9px 13px;
    border-radius: 14px;
  }

  .footer-brand--logo .footer-brand-logo {
    width: 218px;
    max-width: 64vw;
  }
}

/* Локальный прототип: мобильная навигация по главным разделам. */
.mobile-site-nav {
  display: none;
}

@media (max-width: 1100px) {
  .mobile-site-nav {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    box-sizing: border-box;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 4px max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left));
    background: #fffdf7;
    border-top: 1px solid rgba(6, 63, 44, 0.08);
    border-bottom: 1px solid rgba(6, 63, 44, 0.16);
    box-shadow: 0 8px 20px rgba(6, 63, 44, 0.06);
  }

  .mobile-site-nav a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    padding: 6px 8px;
    border-radius: 12px;
    color: #11251d;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-site-nav a:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 0;
    bottom: 12px;
    width: 1px;
    background: rgba(6, 63, 44, 0.12);
  }

  .mobile-site-nav a:hover,
  .mobile-site-nav a:focus-visible {
    color: #063f2c;
    background: rgba(216, 255, 87, 0.34);
  }

  .mobile-site-nav a:focus-visible {
    outline: 3px solid #b5dc2f;
    outline-offset: -3px;
  }

  .mobile-site-nav a.is-active {
    color: #063f2c;
    background: rgba(216, 255, 87, 0.52);
    box-shadow: inset 0 -3px 0 #9dc51f;
  }
}

@media (max-width: 360px) {
  .mobile-site-nav {
    padding-right: max(6px, env(safe-area-inset-right));
    padding-left: max(6px, env(safe-area-inset-left));
  }

  .mobile-site-nav a {
    padding-right: 4px;
    padding-left: 4px;
    font-size: 12px;
  }
}

@media print {
  .mobile-site-nav,
  .footer-trust-links {
    display: none !important;
  }
}

/* Прямые ссылки на страницы, которые объясняют сервис и проверку условий. */
.footer-trust-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-trust-links a {
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  text-decoration-color: rgba(216, 255, 87, 0.52);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.footer-trust-links a:hover,
.footer-trust-links a:focus-visible {
  color: #d8ff57;
}

.footer-trust-links a:focus-visible {
  outline: 2px solid #d8ff57;
  outline-offset: 4px;
  border-radius: 3px;
}

@media (max-width: 680px) {
  .footer-trust-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
  }
}

@media (max-width: 380px) {
  .footer-trust-links {
    grid-template-columns: 1fr;
  }
}
