/* =========================================================
   topbar.css — верхняя информационная панель.
   ========================================================= */

.topbar {
  background: var(--topbar-bg);
  color: #D1D5DB; /* Мягкий серо-белый для основного текста */
  font-size: var(--fs-sm);

  /* Анимация схлопывания */
  max-height: var(--topbar-h, 60px);
  overflow: hidden;
  transition: max-height 250ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: max-height;
}

.topbar.is-hidden {
  max-height: 0;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2);
}

/* ---------- Режим работы и адрес ---------- */
.topbar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.topbar__nav-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: color var(--transition);
}

.topbar__icon {
  flex: 0 0 auto;
}

/* --- ИСПРАВЛЕНИЕ: Делаем адрес ярко-белым --- */
.topbar__nav-link {
  color: var(--color-text-invert); /* Ярко-белый цвет для текста */
  transition: color var(--transition);
}

/* Принудительно делаем иконку локации белой */
.topbar__nav-link .topbar__icon {
  filter: brightness(0) invert(1);
}

.topbar__nav-link:hover {
  color: var(--color-accent);
}

/* Возвращаем красный цвет иконке при наведении (как у остальных) */
.topbar__nav-link:hover .topbar__icon {
  filter: brightness(0) saturate(100%) invert(33%) sepia(81%) saturate(2587%) hue-rotate(334deg) brightness(93%) contrast(92%);
}

/* --- Разделитель для навигации (между буднями и адресом) --- */
.topbar__nav-separator {
  width: 1px;
  height: 14px;
  background-color: rgba(255, 255, 255, 0.2);
  margin-inline: var(--space-1);
}

/* ---------- Мессенджеры и телефон ---------- */
.topbar__contacts {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.topbar__contact {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: inherit;
  transition: color var(--transition);
}

/* --- Ховер: всё краснеет --- */
.topbar__contact:hover {
  color: var(--color-accent);
}

.topbar__contact:hover .topbar__icon {
  filter: brightness(0) saturate(100%) invert(33%) sepia(81%) saturate(2587%) hue-rotate(334deg) brightness(93%) contrast(92%);
}

/* Стильная полосочка перед телефоном */
.topbar__contact:last-child {
  position: relative;
  margin-left: var(--space-2);
  padding-left: var(--space-4);
}

.topbar__contact:last-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.2);
}

/* Адаптив для мобильных */
/* Адаптив для мобильных */
/* Адаптив для мобильных */
@media (max-width: 768px) {
  /* Делаем блок чуть выше и выравниваем по центру */
  .topbar__inner {
    justify-content: space-between;
    align-items: center;
    padding-block: 12px; /* Чуть больше воздуха сверху и снизу */
  }

  /* Блок с графиком работы */
  .topbar__nav {
    display: flex;
    align-items: center;
    gap: 0;
    margin-right: auto; /* Прижимает контакты максимально вправо */
  }

  /* Скрываем адрес и разделитель */
  .topbar__nav-separator,
  .topbar__nav-link {
    display: none !important;
  }

  /* Делаем текст графика чуть крупнее и читаемее */
  .topbar__nav-item {
    font-size: 13px; /* Увеличили с fs-xs для читаемости */
    color: #e2e8f0; /* Сделали чуть светлее */
    display: flex;
    align-items: center;
    gap: 6px; /* Отступ между иконкой часов и текстом */
    line-height: 1;
  }

  .topbar__nav-item .topbar__icon {
    width: 14px;
    height: 14px;
    opacity: 0.7; /* Делаем иконку часов чуть приглушенной */
  }

  /* Контейнер с иконками */
  .topbar__contacts {
    display: flex;
    align-items: center;
    gap: 12px; /* Единый, аккуратный отступ между иконками */
  }

  /* Выравниваем сами иконки */
  .topbar__contact {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
  }

  /* Унифицируем размер всех иконок */
  .topbar__contact .topbar__icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
  }

  /* Скрываем номер телефона */
  .topbar__contact:last-child span {
    display: none;
  }

  /* Убираем лишние отступы и полоски у телефона */
  .topbar__contact:last-child {
    margin-left: 0;
    padding-left: 0;
    gap: 0; /* Убираем gap, так как текста нет */
  }
  .topbar__contact:last-child::before {
    display: none;
  }
}