/* Мобильная главная страница (jblank, только ≤760px).
   Десктопная версия главной не трогается — этот блок скрыт на ≥761px,
   а существующий десктопный контент (.col50_n/.main_full) остаётся
   как есть и уже скрыт на мобильном отдельными правилами.
   Классы намеренно с префиксом home-, чтобы не пересекаться с
   общесайтовыми .section/.footer/.hero и т.п. */

.home-mobile { display: none; }

/* Старый десктопный текст статьи-главной (echo $row в jblank/index.php) —
   на мобильном его заменяет .home-mobile выше. */
@media (max-width: 760px) {
  .home-legacy-content { display: none !important; }
  .home-legacy-footer { display: none !important; }
  /* .main_full/.col50_n держат min-height:400px/152px (десктопная
     раскладка в две колонки) даже когда их содержимое скрыто —
     без этого внизу страницы остаётся пустой блок. */
  .main_full, .col50_n { min-height: 0 !important; }
  /* Старый нижний .footer.home-legacy-main (список офисов уже скрыт
     выше, но сам враппер .footer_resize держит padding:10px 0 40px 0,
     а .footer-contacts с иконками оплаты — не часть home-legacy-footer
     и остаётся видимым) — на мобильном его полностью заменяет
     собственный <footer class="home-footer"> внутри .home-mobile. */
  .footer.home-legacy-main { display: none !important; }
}

@media (max-width: 760px) {
.home-mobile {
  display: block;
  --home-blue: #2f66b3;
  --home-blue-dark: #113b72;
  --home-blue-text: #173a75;
  --home-blue-soft: #eff5fc;
  --home-line: #e6edf5;
  --home-muted: #71819b;
  --home-shadow: 0 4px 14px rgba(44,85,137,.06);
  background: #f7fbff;
  color: var(--home-blue-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.home-mobile *, .home-mobile *:before, .home-mobile *:after { box-sizing: border-box; }
.home-mobile a { color: inherit; text-decoration: none; }
.home-mobile button { font: inherit; }
.home-mobile svg { display: block; }
/* Легаси h2/h3/p сайта задают чужие padding/шрифт/курсив — сбрасываем один раз. */
.home-mobile h1, .home-mobile h2, .home-mobile h3 { padding: 0; font-style: normal; font-family: inherit; }
.home-mobile p { padding: 0 !important; }

/* HERO */
.home-hero {
  position: relative;
  overflow: hidden;
  margin: 12px 14px 0;
  min-height: 480px;
  border-radius: 19px;
  background:
    radial-gradient(circle at 88% 36%, rgba(255,255,255,.92), rgba(255,255,255,0) 30%),
    linear-gradient(180deg,#edf6ff 0%,#f7fbff 58%,#fff 100%);
  box-shadow: var(--home-shadow);
}
.home-hero-copy { position: relative; z-index: 4; padding: 22px 20px 0; }
.home-hero h1 {
  max-width: 315px;
  margin: 0 !important;
  color: #133779;
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: -.8px;
  font-weight: 800;
}
.home-hero-sub {
  max-width: 300px;
  margin: 12px 0 0 !important;
  color: #173a75 !important;
  font-size: 17px !important;
  line-height: 1.25 !important;
}
.home-hero-benefits { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 305px; }
.home-hero-benefit { min-width: 0; display: flex; align-items: center; gap: 8px; color: #173a75; font-size: 13px; line-height: 1.1; font-weight: 650; }
.home-hero-benefit svg { width: 26px; height: 24px; color: #1773dd; flex: 0 0 auto; }
.home-hero-cta {
  width: 100%; max-width: 310px; min-height: 54px; margin-top: 16px;
  border-radius: 13px; display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #fff !important; background: linear-gradient(180deg,#F0AB49 0%,#EF9B45 48%,#ED7D37 100%);
  font-size: 17px; font-weight: 700; box-shadow: 0 7px 16px rgba(237,125,55,.22);
}
.home-hero-note { margin-top: 8px !important; color: var(--home-muted) !important; font-size: 12px !important; }
.home-hero-photo {
  position: absolute; z-index: 2; left: -4px; right: -5px; bottom: -1px;
  width: calc(100% + 9px); height: auto; object-fit: contain; object-position: center bottom;
}
.home-hero-photo-fade {
  position: absolute; z-index: 3; left: 0; right: 0; top: 245px; height: 58px;
  background: linear-gradient(180deg,rgba(247,251,255,.95),rgba(247,251,255,0));
  pointer-events: none;
}

/* COMMON SECTION */
.home-section { padding: 18px 14px 0; }
.home-section-head { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-section h2, .home-section-head h2 {
  margin: 0 !important; color: #11366f; font-size: 22px; line-height: 1.1; letter-spacing: -.4px; font-weight: 800;
}
.home-section-link { color: #1770d6; font-size: 13px; font-weight: 600; white-space: nowrap; }
.home-chev { width: 17px; height: 17px; color: #31577f; flex: none; }

/* POPULAR SERVICES */
.home-service-list { display: grid; gap: 10px; }
.home-service-card {
  min-height: 128px; display: grid; grid-template-columns: 62px 1fr 20px; align-items: center; gap: 13px;
  padding: 14px; border: 1px solid #edf2f7; border-radius: 20px; background: #fff; box-shadow: var(--home-shadow);
}
.home-service-icon { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: #eef7ff; color: #1674df; flex: none; }
.home-service-icon svg { width: 28px; height: 28px; }
.home-service-title { display: block; margin: 0; font-size: 18px; line-height: 1.08; color: #11366f; font-weight: 800; }
.home-service-price { display: block; margin-top: 3px; color: #1470d8; font-size: 18px; line-height: 1.05; font-weight: 800; }
.home-service-term, .home-service-desc { display: block; color: #596e8b; font-size: 13.5px; line-height: 1.2; }
.home-service-term { margin-top: 4px; }
.home-service-desc { margin-top: 4px; }
.home-service-card:active { transform: translateY(1px); }

/* OTHER WORKS */
.home-other-list { overflow: hidden; border: 1px solid #edf2f7; border-radius: 17px; background: #fff; box-shadow: var(--home-shadow); }
.home-other-row {
  min-height: 50px; display: grid; grid-template-columns: 32px 1fr 18px; gap: 9px; align-items: center;
  padding: 0 12px; border-bottom: 1px solid var(--home-line); color: #274979; font-size: 14px;
}
.home-other-row:last-child { border-bottom: 0; }
.home-other-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #1674df; background: #eef7ff; flex: none; }
.home-other-icon svg { width: 17px; height: 17px; }

/* WHY */
.home-why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.home-why-card > span { min-width: 0; }
.home-why-card {
  min-height: 96px; padding: 12px 10px; display: grid; grid-template-columns: 36px 1fr; gap: 9px; align-items: start;
  border: 1px solid #edf2f7; border-radius: 16px; background: #fff; box-shadow: var(--home-shadow);
}
.home-why-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #1674df; background: #eef7ff; }
.home-why-icon svg { width: 20px; height: 20px; }
.home-why-card strong { display: block; margin-top: 1px; color: #173a75; font-size: 13px; line-height: 1.1; font-weight: 800; overflow-wrap: break-word; min-width: 0; }
.home-why-card p { margin: 4px 0 0 !important; color: #6b7d97 !important; font-size: 11.5px !important; line-height: 1.2 !important; }

/* REVIEWS */
.home-review-heading { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.home-yandex-meta { display: flex; align-items: center; gap: 7px; }
.home-yandex-mark { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #ef4036; font-size: 17px; font-weight: 800; }
.home-yandex-meta strong { display: block; color: #3d5579; font-size: 11.5px; line-height: 1.1; }
.home-yandex-meta small { display: block; margin-top: 2px; color: #7a8aa0; font-size: 10px; }
.home-review-actions { display: flex; align-items: center; gap: 9px; }
.home-review-actions .home-section-link { font-size: 12px; }
.home-review-viewport { width: 100%; overflow: hidden; }
.home-review-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; width: 100%; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.home-review-card { min-width: 0; }
.home-review-track::-webkit-scrollbar { display: none; }
.home-review-card {
  scroll-snap-align: start; display: block; position: relative; padding: 12px 38px 12px 13px;
  border: 1px solid #edf2f7; border-radius: 17px; background: #fff; box-shadow: var(--home-shadow);
}
.home-review-card .home-stars { color: #ffa11a; font-size: 16px; letter-spacing: 1px; }
.home-review-text { margin: 5px 0 9px !important; color: #526886 !important; font-size: 13px !important; line-height: 1.3 !important; }
.home-review-author { display: flex; align-items: center; gap: 8px; }
.home-avatar { width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg,#f7d7cb,#e9eef6); color: #7c4d44; font-size: 14px; font-weight: 800; flex: none; }
.home-review-author b { display: block; color: #173a75; font-size: 12.5px; }
.home-review-author small { display: block; margin-top: 2px; color: #8490a4; font-size: 10.5px; }
.home-review-arrow { position: absolute; top: 50%; right: 12px; width: 18px; height: 18px; transform: translateY(-50%); color: #31577f; }
.home-dots { margin-top: 8px; display: flex; justify-content: center; gap: 5px; }
.home-dot { width: 7px; height: 7px; border-radius: 50%; background: #d9e5f2; }
.home-dot.is-active { background: #1b75da; }

/* OFFICE */
.home-office-card {
  padding: 14px; display: grid; grid-template-columns: 36px minmax(0,1fr) 112px; grid-template-rows: auto 1fr;
  gap: 9px 10px; align-items: center; border: 1px solid #e8f0f7; border-radius: 17px;
  background: linear-gradient(120deg,#eef8ff 0%,#fff 82%); box-shadow: var(--home-shadow);
}
.home-office-card h3 { grid-column: 1/3; margin: 0 0 1px !important; color: #11366f; font-size: 19px; line-height: 1.1; }
.home-office-photo { grid-column: 3; grid-row: 1/3; width: 112px; height: 80px; border-radius: 12px; object-fit: cover; object-position: 50% 62%; display: block; }
.home-office-pin { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #1674df; }
.home-office-pin svg { width: 19px; height: 19px; }
.home-office-card b { display: block; margin-top: 1px; color: #173a75; font-size: 13.5px; }
.home-office-card p { margin: 4px 0 0 !important; color: #74839a !important; font-size: 11.5px !important; line-height: 1.2 !important; }

/* FOOTER */
.home-footer { margin-top: 18px; padding: 16px 14px 24px; border-top: 1px solid var(--home-line); }
.home-footer-top { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.home-footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; color: #526886; font-size: 12.5px; }
.home-footer-socials { display: flex; align-items: center; gap: 10px; }
.home-footer-social { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #eef6ff; color: #1674df; }
.home-footer-social svg { width: 21px; height: 21px; display: block; }
.home-footer-copy { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--home-line); color: #8290a5; font-size: 11px; }

@media (max-width: 389px) {
  .home-hero { min-height: 460px; margin-left: 11px; margin-right: 11px; }
  .home-hero-copy { padding: 19px 16px 0; }
  .home-hero h1 { font-size: 26px; max-width: 275px; }
  .home-hero-sub { font-size: 16px !important; max-width: 260px; }
  .home-hero-cta { font-size: 16px; }
}
}
