/*
 * Футер десктопной витрины: контакты филиала и соцсети, колонки ссылок на
 * информационные страницы (Настройки → Страницы / Документы) и тёмная плашка
 * с копирайтом, подписью платформы и логотипами платёжных систем.
 *
 * Каждая часть необязательна: филиал может не иметь ни графика, ни соцсетей,
 * а компания — ни одной опубликованной страницы. Пустые блоки не выводятся
 * вьюхой (views/desktop/menu.php), поэтому здесь нет правил «если пусто».
 */
/*
 * restar-desktop.css скрывает голый тег footer (display:none !important) —
 * это чистка неиспользуемых блоков старого купленного шаблона, у которого
 * был свой <footer>. Наш футер — другой элемент с тем же тегом, поэтому
 * явно возвращаем видимость через более специфичный селектор по классу
 * (класс всегда весомее тега, порядок подключения файлов тут не важен).
 */
.restar-footer {
  display: block !important;
  border-top: 1px solid var(--restar-line);
  background: #fafafa;
  margin-top: 32px;
}

/* ── Верхняя плашка: лого, адрес, режим работы, телефон, соцсети ───────── */
/*
 * Лого и соцсети занимают свою ширину, всё между ними — растягивающийся блок
 * с фактами. Раньше факты были прямыми флекс-элементами и «уезжали» вправо,
 * когда один из них не заполнен (нет графика — адрес и телефон разлетались
 * по краям). Теперь их делит сетка внутри .restar-footer-facts.
 */
.restar-footer-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 36px;
  padding: 30px 0 26px;
}

.restar-footer-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 260px;
  min-width: 0;
}

/*
 * auto-fit + 1fr: два заполненных блока делят место пополам, три — на три
 * равные части. Сколько их — решают данные филиала, а не вёрстка.
 */
.restar-footer-facts {
  flex: 1 1 420px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  align-items: center;
  gap: 20px 30px;
}

.restar-footer-brand img {
  display: block;
  max-height: 64px;
  max-width: 230px;
  width: auto;
  object-fit: contain;
}

.restar-footer-brand-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #1f1f1f;
  /* Картинка лого выше строки текста, поэтому без неё название опускаем
     к середине блока фактов — иначе оно висит заметно выше адреса */
  padding-top: 6px;
}

.restar-footer-fact {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.restar-footer-fact-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.restar-footer-fact-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 19px;
}

.restar-footer-fact-icon--place { background: #fdecef; color: #e8384f; }
.restar-footer-fact-icon--time  { background: #fdecef; color: #e8384f; }
.restar-footer-fact-icon--phone { background: #e6f6ed; color: #1ba85a; }

.restar-footer-fact-title {
  color: #1f1f1f;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.restar-footer-fact-sub {
  color: #8a8a8a;
  font-size: 13px;
  line-height: 1.5;
  /* Подписи выравниваем по тексту заголовка, а не по иконке: 38px + gap */
  padding-left: 48px;
}

.restar-footer-phone {
  color: #1f1f1f;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  /* Номер не переносим: разорванный посередине телефон не читается */
  white-space: nowrap;
}

.restar-footer-maplink {
  color: #e8384f;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding-left: 48px;
}

.restar-footer-maplink:hover { color: #c22036; }
.restar-footer-maplink i { font-size: 14px; vertical-align: -1px; }

.restar-footer-socials {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 18px;
  border-left: 1px solid var(--restar-line);
  padding-left: 32px;
}

.restar-footer-socials a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 62px;
  text-decoration: none;
}

.restar-footer-socials img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: contain;
  transition: transform .15s ease;
}

.restar-footer-socials a:hover img { transform: translateY(-2px); }

.restar-footer-socials span {
  color: #6b6b6b;
  font-size: 12px;
  line-height: 1;
}

/* ── Колонки ссылок ───────────────────────────────────────────────────── */
.restar-footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 64px;
  border-top: 1px solid var(--restar-line);
  padding: 26px 0 30px;
}

.restar-footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 190px;
}

.restar-footer-col h3 {
  margin: 0 0 4px;
  color: #1f1f1f;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.restar-footer-col a {
  color: var(--restar-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition: color .15s ease;
}

.restar-footer-col a:hover { color: var(--restar-orange); }

/* ── Блок «Скачайте наше приложение» ──────────────────────────────────── */
/* Живёт в том же ряду, что и колонки ссылок, но забирает остаток ширины —
   так он встаёт справа, а колонки не растягиваются вслед за ним. */
.restar-footer-app {
  flex: 1 1 320px;
  min-width: 260px;
}

.restar-footer-app h3 {
  margin: 0 0 6px;
  color: #1f1f1f;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.restar-footer-app p {
  margin: 0 0 16px;
  color: var(--restar-muted);
  font-size: 14px;
  line-height: 1.45;
}

.restar-footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Пока это не ссылки, а картинки: курсор и наведение не обещают перехода */
.restar-footer-badge {
  display: inline-flex;
  cursor: default;
}

.restar-footer-badge img {
  display: block;
  height: 54px;
  width: auto;
}

/* ── Тёмная плашка ────────────────────────────────────────────────────── */
.restar-footer-bottom {
  background: #17181b;
  padding: 18px 0;
}

.restar-footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 32px;
}

.restar-footer-copy,
.restar-footer-platform {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.restar-footer-platform { text-align: center; }

.restar-footer-bottom span { color: #e8e8e8; font-size: 13px; line-height: 1.4; }
.restar-footer-bottom .restar-footer-dim { color: #83858c; font-size: 12px; }
.restar-footer-platform a { color: var(--restar-orange, #fd7e14); font-weight: 600; text-decoration: none; }

.restar-footer-pay {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Подложки нет: логотипы ложатся прямо на тёмный фон плашки */
.restar-footer-pay .pay-logos-item {
  height: 26px;
}

@media (max-width: 1199px) {
  .restar-footer-socials { border-left: 0; padding-left: 0; }
  .restar-footer-facts { flex-basis: 100%; }
}

@media (max-width: 767px) {
  .restar-footer-top { gap: 22px 28px; padding: 24px 0 20px; }
  .restar-footer-brand { margin-right: 0; }
  .restar-footer-cols { gap: 22px 36px; }
  .restar-footer-bottom-inner { justify-content: flex-start; }
  .restar-footer-platform { text-align: left; }
}
