/* ======================================================
   REFINED FOOTER (clean structure + banner control)
   ====================================================== */

.footer.row{
  margin-top: 28px;
  background: var(--blue-deep);
  color: rgba(255,255,255,.92);
  border-radius: 28px 28px 0 0;
  padding: 26px;
  box-shadow: var(--shadow);
  position: relative;
z-index:100;
}

/* GRID вместо bootstrap-вида */
.footer.row{
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}

/* Баннеры блок */
.footer.row .col-md-6{
  grid-column: 1 / -1; /* баннеры сверху */
}

/* Текстовые блоки */
.footer.row .col-md-2{
  grid-column: 1;
}

.footer.row .col-md-3{
  grid-column: 2;
}

.footer.row .col-md-1{
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

/* ==============================
   БАННЕРЫ: controlled layout
   ============================== */

.footer.row .banners{
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.footer.row .banners li{
  list-style: none;
  flex: 0 0 auto;
}

/* Ограничение размера баннеров */
.footer.row .banners img{
  height: 46px;          /* фиксируем высоту */
  width: auto;
  max-width: 140px;      /* чтобы не разрастались */
  object-fit: contain;
  filter: brightness(.95);
  transition: transform .18s ease;
}

.footer.row .banners a{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
  border-bottom: none;
}

.footer.row .banners a:hover img{
  transform: scale(1.05);
}

/* ==============================
   Текстовые блоки
   ============================== */

.footer.row p{
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,.85);
}

.footer.row a{
  color: rgba(255,255,255,.95);
  text-decoration: none;
  font-weight: 800;
  border-bottom: 1px dashed rgba(255,255,255,.28);
}

.footer.row a:hover{
  border-bottom-color: rgba(255,255,255,.55);
}

/* ==============================
   Кнопка "вверх"
   ============================== */

.footer.row #scroller{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
  color: #fff;
  text-decoration: none;
  border-bottom: none;
  transition: transform .18s ease;
}

.footer.row #scroller:hover{
  transform: translateY(-3px);
}

/* ==============================
   Responsive
   ============================== */

@media (max-width: 980px){
  .footer.row{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .footer.row .col-md-1{
    justify-content: flex-start;
  }
}


/* ==============================
   FOOTER MOBILE FIX
   ============================== */
.footer.row{
  /* убиваем bootstrap-минуса, если они есть */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (max-width: 980px){
  .footer.row{
    display: block !important;
    padding: 16px !important;
    border-radius: 18px !important;
  }

  .footer.row [class*="col-"]{
    width: 100% !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 14px !important;
  }

  /* баннеры — горизонтальный скролл, фикс высоты */
  .footer.row .banners{
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    padding-bottom: 6px !important;
    -webkit-overflow-scrolling: touch;
  }

  .footer.row .banners li{ flex: 0 0 auto !important; }

  .footer.row .banners img{
    height: 40px !important;
    width: auto !important;
    max-width: 150px !important;
    object-fit: contain !important;
  }

  /* кнопка вверх — влево, не отдельной колонкой */
  .footer.row #scroller{
    margin-top: 6px !important;
  }
}

@media (max-width: 520px){
  .footer.row .banners img{
    height: 36px !important;
    max-width: 140px !important;
  }
}