/* assets/css/footer.css
   Мобильный футер-аккордеон под твой макет.
   Важно: .container и --page-gutter должны быть в style.css (глобально).
*/

:root{
  --footer-bg: #fff;
  --footer-line: #dedede;

  --footer-title: #111;
  --footer-title-active: #ff6a00; /* оранжевый у открытого раздела */

  --footer-link: #111;            /* ссылки ВСЕГДА одного цвета (НЕ меняем по разделам) */

  --footer-muted: #444;
  --footer-phone: #2e8b57;        /* зелёный телефон */

  --footer-bottom-bg: #47645c;    /* нижняя плашка */
  --footer-bottom-text: rgba(255,255,255,.88);

  --footer-row-h: 46px;
}

/* Страховка от горизонтального скролла */
.site-footer{
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-line);
  overflow-x: clip; /* не даёт "уезжать" вправо/влево */
}

/* Аккордеон */
.footer-acc{ width: 100%; }

.footer-acc__section{
  border-top: 1px solid var(--footer-line);
}

.footer-acc__section:first-child{
  border-top: 0;
}

/* Кнопка заголовка */
.footer-acc__btn{
  width: 100%;
  min-height: var(--footer-row-h);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 12px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;

  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.footer-acc__btn:focus-visible{
  outline: 2px solid rgba(255,106,0,.35);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Заголовок */
.footer-acc__title{
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--footer-title);
}

/* Открытый раздел: заголовок оранжевый */
.footer-acc__section.is-open .footer-acc__title{
  color: var(--footer-title-active);
}

/* Иконка-стрелка */
.footer-acc__icon{
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #111;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-acc__icon svg{
  width: 20px;
  height: 20px;
  display: block;
  transition: transform 160ms ease;
}

/* Закрыто: стрелка вниз (как в разметке).
   Открыто: поворачиваем на 180° => стрелка вверх. */
.footer-acc__section.is-open .footer-acc__icon svg{
  transform: rotate(180deg);
}

/* Панель */
.footer-acc__panel{
  padding: 0 0 14px 0;
}

/* Текст */
.footer-text{
  margin: 0 0 10px 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--footer-muted);
}

.footer-links,
.footer-contacts{
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li{
  padding: 6px 0;
}

/* Ссылки (цвет не меняем при открытии секции) */
.footer-link{
  color: var(--footer-link);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.25;
}

.footer-link:active{
  opacity: .85;
}

.footer-link--phone{
  color: var(--footer-phone);
  font-weight: 600;
}

/* Контакты */
.footer-contacts__item{
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 6px 0;
}

.footer-contacts__icon{
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  opacity: .85;
}

.footer-muted{
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--footer-muted);
}

/* Нижняя плашка */
.footer-bottom{
  margin-top: 6px;
  background: var(--footer-bottom-bg);
}

.footer-bottom__text{
  padding: 14px 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--footer-bottom-text);
}
