/* ==========================================================================
   home.css — главная страница.
   ⛔ Геометрия, отступы и поведение блоков взяты из утверждённого макета
   Александра (variant_1, 20.09.2026). Мобильная версия описана в конце
   одним медиазапросом 760px, как в макете.
   ========================================================================== */

/* ==========================================================================
   ПЕРВЫЙ ЭКРАН
   ========================================================================== */
.hero { background: #fff; border-bottom: 1px solid var(--line); padding: 55px 0 35px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 68px; align-items: center; }

.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 1.35px; text-transform: uppercase;
  color: var(--muted); margin: 0 0 16px;
}
.eyebrow svg { width: 17px; height: 17px; color: var(--red); }

.hero h1 { margin: 0 0 20px; max-width: 630px; }
.hero h1 span { color: var(--red); }
.hero__intro { margin: 0 0 25px; color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 510px; }

.search-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 9px; }
.search-box {
  display: flex; align-items: center; gap: 10px; padding: 6px;
  border: 1px solid #cbd0d8; background: #fff; border-radius: 13px;
  box-shadow: var(--shadow-sm);
}
.search-box:focus-within { border-color: var(--red); box-shadow: var(--ring); }
.search-icon { margin-left: 9px; color: #838b96; }
.search-box input {
  min-width: 0; flex: 1; width: 100%; border: 0; background: none;
  color: var(--ink); padding: 10px 0; font-size: 16px;
}
.search-box input::placeholder { color: #8a919b; }
.search-box input:focus { outline: none; }

.search-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.example {
  padding: 3px 6px; background: var(--bg); border-radius: 5px;
  color: #535c69; font-size: 12px; letter-spacing: .3px; font-family: var(--mono);
}
.example:hover { background: var(--red-soft); color: var(--red); }

.hero__stats { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 21px; display: flex; gap: 40px; }
.hero__stats span { font-size: 13px; color: var(--muted); }
.hero__stats strong { color: var(--ink); font-size: 17px; font-weight: 650; margin-right: 5px; font-variant-numeric: tabular-nums; }

/* Пример строки выписки — объясняет, что копировать в поиск */
.statement {
  background: var(--bg); border: 1px solid var(--line); border-radius: 22px;
  padding: 25px 27px; transform: rotate(1deg); position: relative;
}
.statement__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; color: var(--muted); font-size: 13px; }
.statement__top svg { color: #929aa4; }
.statement__amount { font-size: 36px; font-weight: 650; letter-spacing: -1px; line-height: 1.2; margin-bottom: 8px; }
.statement__desc { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.statement__code {
  display: flex; gap: 8px; align-items: center; padding: 14px;
  background: #fff; border: 1px dashed #e78295; border-radius: 9px;
  color: var(--red); font-family: var(--mono); font-size: 15px; letter-spacing: .5px;
}
.statement__code svg { width: 18px; height: 18px; margin-left: auto; }
.statement__bottom { font-size: 13px; color: #626b77; line-height: 1.55; margin: 15px 0 0; }
.statement__bottom strong { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   «ЧАСТО ИЩУТ» — компактные карточки сервисов
   ========================================================================== */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.service {
  background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 18px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; align-items: center;
  transition: border-color .15s, transform .15s;
}
.service:hover { border-color: #c3c8d0; transform: translateY(-2px); }
.service__logo {
  width: 44px; height: 44px; border-radius: 12px; background: var(--bg);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.service__logo img { max-width: 34px; max-height: 32px; width: auto; height: auto; object-fit: contain; }
.service__stub { font-weight: 800; font-size: 17px; color: var(--muted); text-transform: uppercase; }
.service__title { font-size: 16px; font-weight: 650; line-height: 1.3; margin: 0; }
.service__code {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  display: block; margin-top: 4px; overflow-wrap: anywhere; letter-spacing: .1px;
}
.service__bottom {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); gap: 10px;
}
.service__category { font-size: 12px; color: var(--muted); }
.service__action { font-size: 13px; font-weight: 600; color: var(--red); display: flex; align-items: center; gap: 4px; min-height: 28px; }
.service__action svg { width: 16px; height: 16px; }
.service-more { display: none; }

/* ==========================================================================
   РАЗДЕЛЫ КАТАЛОГА — единый блок-список с иконками
   ========================================================================== */
.category-shell { background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 7px 20px; column-gap: 27px; }
.category { display: flex; gap: 13px; align-items: center; padding: 17px 0; border-bottom: 1px solid #edf0f3; min-height: 82px; }
.category__icon {
  height: 41px; width: 41px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--red-soft); color: var(--red);
}
.category__icon svg { width: 21px; height: 21px; }
.category__copy { flex: 1; min-width: 0; }
.category__name { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }
.category__count { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.category > .chevron { color: #9098a2; width: 15px; height: 15px; }
.category:hover .category__name { color: var(--red); }
.category:hover .category__icon { background: #ffe2e9; }
.category-more { display: none; }
@media (min-width: 761px) { .category:nth-last-child(-n+3) { border-bottom: 0; } }

/* ==========================================================================
   ЧТО ДЕЛАТЬ СО СПИСАНИЕМ + панель «не узнаёте платёж»
   ========================================================================== */
.guide-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 26px; }
.steps { display: grid; gap: 0; margin: 19px 0 0; padding: 0; list-style: none; }
.step { display: flex; gap: 16px; padding: 16px 0; position: relative; }
.step__number {
  width: 33px; height: 33px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--ink); border-radius: 50%; color: #fff; font-size: 13px; font-weight: 600;
}
.step:not(:last-child)::after { content: ''; width: 1px; background: #dce1e7; position: absolute; top: 54px; bottom: -10px; left: 16px; }
.step h3 { font-size: 16px; margin: 2px 0 6px; line-height: 1.35; }
.step p { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0; max-width: 440px; }

.help-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; align-self: start; }
.help-panel > svg { color: var(--red); width: 25px; height: 25px; margin-bottom: 16px; }
.help-panel h3 { font-size: 18px; line-height: 1.3; margin: 0 0 15px; letter-spacing: -.3px; }
.help-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.help-panel li { display: flex; gap: 10px; font-size: 14px; color: var(--muted); line-height: 1.55; }
.help-panel li svg { width: 17px; height: 17px; color: #939ba5; margin-top: 3px; }
.help-panel .text-link { border-top: 1px solid var(--line); width: 100%; margin-top: 19px; padding-top: 13px; }

/* ==========================================================================
   СТАТЬИ НА ГЛАВНОЙ
   ========================================================================== */
.article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.article { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 25px; display: flex; gap: 24px; align-items: flex-start; }
.article:hover { border-color: #c6cbd3; }
.article__mark {
  font-family: var(--mono); font-size: 23px; font-weight: 600; color: var(--red);
  background: var(--red-soft); border-radius: 12px; min-width: 66px; height: 66px;
  display: flex; align-items: center; justify-content: center;
}
.article__mark svg { width: 30px; height: 30px; }
.article small { color: var(--muted); font-size: 12px; display: block; margin-bottom: 7px; }
.article h3 { font-size: 18px; line-height: 1.4; letter-spacing: -.25px; margin: 0 0 10px; }
.article p { font-size: 14px; color: var(--muted); margin: 0 0 13px; line-height: 1.6; }
.article__read { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; color: var(--red); }
.article__read svg { width: 16px; height: 16px; }

.empty { padding: 40px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--border-2); border-radius: var(--radius); margin-top: 20px; }

/* ==========================================================================
   ПЛАНШЕТ
   ========================================================================== */
@media (max-width: 980px) and (min-width: 761px) {
  .hero__grid { gap: 30px; grid-template-columns: 1.3fr 1fr; }
  .statement { padding: 20px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article { gap: 15px; padding: 20px; }
  .article__mark { min-width: 50px; height: 50px; }
}

/* ==========================================================================
   ТЕЛЕФОН — основной сценарий, 98 % трафика
   ========================================================================== */
@media (max-width: 760px) {
  .hero { padding: 29px 0 23px; }
  .hero__grid { display: block; }
  .eyebrow { font-size: 10px; letter-spacing: 1.15px; margin-bottom: 13px; }
  .eyebrow svg { width: 15px; height: 15px; }
  .hero h1 { max-width: 430px; margin-bottom: 15px; }
  .hero__intro { font-size: 15px; line-height: 1.55; margin-bottom: 23px; max-width: 410px; }
  .search-label { font-size: 13px; }
  .search-box { padding: 5px; gap: 7px; border-radius: 12px; }
  .search-box .primary { padding: 11px 15px; font-size: 14px; min-height: 45px; }
  .search-icon { width: 18px; height: 18px; margin-left: 7px; }
  .search-box input { font-size: 16px; }
  .search-hint { margin-top: 10px; font-size: 12px; gap: 5px; }
  .example { font-size: 11px; padding: 4px 5px; }

  /* На телефоне пример выписки скрыт: первый экран отдан поиску */
  .statement { display: none; }
  .hero__stats { margin-top: 23px; padding-top: 17px; gap: 0; justify-content: space-between; }
  .hero__stats span { font-size: 11px; line-height: 1.35; display: block; }
  .hero__stats strong { display: block; font-size: 18px; margin: 0 0 3px; letter-spacing: -.3px; }

  /* Сервисы превращаются в компактный список внутри одной карточки */
  .service-grid {
    grid-template-columns: 1fr; gap: 0; background: #fff;
    border: 1px solid var(--line); border-radius: 16px; overflow: hidden; padding: 0 15px;
  }
  .service {
    padding: 15px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    grid-template-columns: 39px minmax(0, 1fr) auto; column-gap: 11px; background: transparent;
  }
  .service:hover { transform: none; }
  .service__logo { height: 39px; width: 39px; border-radius: 10px; }
  .service__logo img { max-width: 30px; max-height: 29px; }
  .service__title { font-size: 15px; }
  .service__code { font-size: 12px; letter-spacing: 0; margin-top: 5px; }
  .service__bottom { display: contents; }
  .service__category { display: none; }
  .service__action { font-size: 12px; min-height: 44px; gap: 3px; }
  .service__action svg { width: 13px; height: 13px; }
  .service:nth-child(3) { border-bottom: 0; }
  .service:nth-child(n+4) { display: none; }
  .service-grid.is-expanded .service:nth-child(n+4) { display: grid; }
  .service-grid.is-expanded .service:nth-child(3) { border-bottom: 1px solid var(--line); }
  .service-grid.is-expanded .service:last-child { border-bottom: 0; }
  .service-more { display: flex; width: 100%; margin-top: 9px; border: 0; background: transparent; color: #5f6875; min-height: 42px; padding: 8px; font-weight: 500; font-size: 13px; }

  .category-grid { grid-template-columns: 1fr; column-gap: 0; padding: 1px 15px; }
  .category-shell { border-radius: 16px; }
  .category { min-height: 76px; padding: 14px 0; gap: 13px; }
  .category__icon { height: 39px; width: 39px; border-radius: 11px; }
  .category__icon svg { width: 20px; height: 20px; }
  .category__name { font-size: 15px; }
  .category:nth-child(n+7) { display: none; }
  .category:nth-child(6) { border-bottom: 0; }
  .category-grid.is-expanded .category:nth-child(n+7) { display: flex; }
  .category-grid.is-expanded .category:nth-child(6) { border-bottom: 1px solid #edf0f3; }
  .category-more { display: flex; width: calc(100% - 30px); margin: 0 15px 13px; border: 0; background: var(--bg); font-size: 13px; min-height: 45px; }

  .guide-layout { display: flex; flex-direction: column; gap: 23px; }
  .steps { margin-top: 14px; }
  .step { padding: 13px 0; gap: 13px; }
  .step h3 { font-size: 15px; margin-top: 4px; }
  .help-panel { width: 100%; padding: 20px; }
  .help-panel > svg { display: none; }
  .help-panel h3 { font-size: 17px; }

  .article-grid { grid-template-columns: 1fr; gap: 11px; }
  .article { padding: 20px; gap: 15px; }
  .article__mark { min-width: 46px; height: 46px; font-size: 17px; border-radius: 10px; }
  .article__mark svg { width: 24px; height: 24px; }
  .article h3 { font-size: 16px; line-height: 1.4; margin-bottom: 9px; }
  .article p { display: none; }
  .article small { font-size: 11px; margin-bottom: 6px; }
  .article__read { font-size: 12px; }
}

@media (max-width: 355px) {
  .hero h1 { font-size: 32px; }
  .service-grid { padding: 0 11px; }
  .service { column-gap: 8px; }
  .service__title { font-size: 14px; }
  .service__action { font-size: 11px; }
  .service__action svg { display: none; }
  .hero__stats span { font-size: 10px; }
  .search-icon { display: none; }
  .search-box input { padding-left: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
