/* =========================
   FOOTER CSS
   Верхний этаж: .container-bottom-a
   Нижний этаж: .container-footer
   ========================= */


/* ==================================================
   ВЕРХНИЙ ЭТАЖ ПОДВАЛА
   ================================================== */

.container-bottom-a {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 0.82fr;
    gap: 36px;
    align-items: start;
    width: auto;
    max-width: none;
    padding: 48px 40px 56px;
    background: transparent;
    overflow: visible;
    z-index: 0;
}

/* фон на всю ширину окна */
.container-bottom-a::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: rgb(236 236 236);
    z-index: -1;
}

/* модули */
.container-bottom-a > .bottom-a {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    min-width: 0;
}

/* убираем линию из user.css */
.container-bottom-a .card-header::before {
    display: none !important;
    content: none !important;
}

/* заголовки */
.container-bottom-a .card-header,
.container-bottom-a h3.card-header {
    background: transparent;
    border: 0;
    padding: 0 0 18px;
    margin: 0 0 18px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    color: #222;
}

/* первый заголовок растягиваем на две колонки */
.container-bottom-a > .bottom-a:nth-child(1) .card-header {
    width: calc(200% + 36px);
    max-width: none;
}

/* у второго модуля заголовок скрыт, поэтому компенсируем верхний отступ 
.container-bottom-a > .bottom-a:nth-child(2) {
    padding-top: 65px;
}

.container-bottom-a .card-body {
    padding: 0;
    min-width: 0;
}

/* базовые списки */
.container-bottom-a .mod-menu,
.container-bottom-a .documents {
    margin: 0;
    padding: 0;
    list-style: none;
}

.container-bottom-a .mod-menu > li,
.container-bottom-a .documents > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.container-bottom-a .mod-menu > li > a,
.container-bottom-a .documents a {
    display: block;
    padding: 8px 0;
    color: #5a5a5a;
    text-decoration: none;
    line-height: 1.35;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.container-bottom-a .mod-menu > li > a:hover,
.container-bottom-a .documents a:hover {
    color: #222;
    text-decoration: none;
}

/* документация: иконка и текст на одной линии */
.container-bottom-a .documents a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.container-bottom-a .documents .fa {
    flex: 0 0 18px;
    width: 18px;
    margin-right: 0;
    color: #6a6a6a;
    text-align: center;
    line-height: 1.35;
    position: relative;
    top: 1px;
}

/* языки */
.container-bottom-a > .bottom-a:nth-child(4) .mod-menu > li > a {
    letter-spacing: 0.08em;
}

/* адаптив */
@media (max-width: 1199.98px) {
    .container-bottom-a {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 30px;
        padding: 40px 24px 48px;
    }

    .container-bottom-a > .bottom-a:nth-child(1) .card-header {
        width: calc(200% + 30px);
    }

    .container-bottom-a > .bottom-a:nth-child(2) {
        padding-top: 65px;
    }

    .container-bottom-a > .bottom-a:nth-child(4) {
        grid-column: 1 / -1;
        max-width: 280px;
    }
}

@media (max-width: 767.98px) {
    .container-bottom-a {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 20px 40px;
    }

    .container-bottom-a > .bottom-a:nth-child(1) .card-header {
        width: auto;
    }

    .container-bottom-a > .bottom-a:nth-child(2) {
        padding-top: 0;
    }

    .container-bottom-a > .bottom-a:nth-child(4) {
        grid-column: auto;
        max-width: none;
    }

    .container-bottom-a .card-header,
    .container-bottom-a h3.card-header {
        font-size: 22px;
    }
}


/* ==================================================
   НИЖНИЙ ЭТАЖ ПОДВАЛА
   ================================================== */

.container-footer.footer.full-width {
    background: #2f2f2f;
    padding: 26px 0;
}

.container-footer.footer.full-width .grid-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px minmax(266px, auto);
    align-items: center;
    gap: 32px;
}

/* левый блок — меню */
.container-footer.footer.full-width > .grid-child > ul.mod-menu.mod-list.nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 16px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.container-footer.footer.full-width > .grid-child > ul.mod-menu.mod-list.nav > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.container-footer.footer.full-width > .grid-child > ul.mod-menu.mod-list.nav > li + li {
    margin-top: 0;
}

.container-footer .mod-menu.nav > li > a {
    color: rgba(255, 255, 255, 0.62);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 14px;
    line-height: 1.2;
}

.container-footer .mod-menu.nav > li > a:hover {
    color: #fff;
}

/* центр — счетчик */
.container-footer #mod-custom318 {
    justify-self: center;
    margin: 0;
}

.container-footer #mod-custom318 a,
.container-footer #mod-custom318 img {
    display: block;
}

.container-footer #mod-custom318 img {
    width: 88px;
    height: auto;
    opacity: 0.82;
}

/* правый блок — соцсети */
.container-footer #mod-custom192 {
    justify-self: end;
    min-width: 0;
}

.container-footer .footer-socials {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.container-footer .footer-social {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #686767;
    color: #414142;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.container-footer .footer-social svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    display: block;
}

.container-footer .footer-social:hover {
    background: transparent;
    color: #c6921d;
    transform: translateY(-1px);
}

/* адаптив */
@media (max-width: 991.98px) {
    .container-footer.footer.full-width .grid-child {
        grid-template-columns: 1fr;
        gap: 20px;
        justify-items: center;
    }

    .container-footer.footer.full-width > .grid-child > ul.mod-menu.mod-list.nav {
        justify-content: center;
        white-space: normal;
    }

    .container-footer #mod-custom318,
    .container-footer #mod-custom192 {
        justify-self: center;
    }

    .container-footer .footer-socials {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .container-footer.footer.full-width > .grid-child > ul.mod-menu.mod-list.nav {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
}

/* ==================================================
   END НИЖНИЙ ЭТАЖ ПОДВАЛА
   ================================================== */

/* =========================================================
   BOTTOM-A: ТРИ МОДУЛЯ
   ========================================================= */

.container-bottom-a {
  display: grid !important;
  grid-template-columns:
    minmax(0, 1.15fr)
    minmax(220px, 0.8fr)
    minmax(320px, 1fr) !important;
  gap: 28px !important;
  align-items: start;
}

.container-bottom-a > .bottom-a {
  grid-column: auto !important;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

.container-bottom-a .card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.container-bottom-a .card-header {
  padding: 0 0 18px;
  background: transparent;
  border: 0;
}

.container-bottom-a .card-body {
  padding: 0;
}

/* Планшет: две колонки, форма на всю ширину */
@media (max-width: 1199.98px) and (min-width: 768px) {
  .container-bottom-a {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  .container-bottom-a > .bottom-a:last-child {
    grid-column: 1 / -1 !important;
  }
}

/* Телефон: всё друг под другом */
@media (max-width: 767.98px) {
  .container-bottom-a {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }

  .container-bottom-a > .bottom-a,
  .container-bottom-a > .bottom-a:last-child {
    grid-column: auto !important;
  }
}

/* =========================================================
   СОЦИАЛЬНЫЕ ССЫЛКИ В ПОДВАЛЕ
   ========================================================= */

.footer .jm-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.footer .jm-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  padding: 0;

  color: #f2f2f2;
  background: transparent !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;

  font-size: 20px;
  line-height: 1;
  text-indent: 0 !important;
  text-decoration: none !important;

  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.footer .jm-icons a:hover,
.footer .jm-icons a:focus-visible {
  color: #e29702;
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-color: #e29702;
  outline: none;
}

.footer .jm-icons [class^="icon-"],
.footer .jm-icons [class*=" icon-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
}

@media (max-width: 767.98px) {
  .footer .jm-icons {
    justify-content: flex-start;
  }
}

/* Сброс старой схемы bottom-a */
.container-bottom-a > .bottom-a:nth-child(1) .card-header {
  width: 100% !important;
  max-width: 100% !important;
}

.container-bottom-a > .bottom-a {
  align-self: start;
}

.container-bottom-a > .bottom-a .card-header {
  width: 100%;
  margin: 0 !important;
  padding: 0 0 18px !important;
}

/* Контент всех трёх модулей начинается на одной высоте */
@media (min-width: 1200px) {
  .container-bottom-a > .bottom-a .card-header {
    min-height: 64px;
  }
}

/* Скрываем пустые span старого набора иконок */
.footer .jm-icons > a > span {
  display: none !important;
}

/* Рисуем обозначения без зависимости от иконочного шрифта */
.footer .jm-icons > a::before {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: currentColor;
}

.footer .jm-icons > .jm-facebook::before {
  content: "f";
  font-size: 23px;
}

.footer .jm-icons > .jm-whatsapp::before {
  content: "✆";
  font-size: 22px;
}

.footer .jm-icons > .jm-instagram::before {
  content: "◎";
  font-size: 25px;
}

.footer .jm-icons > .jm-youtube::before {
  content: "▶";
  font-size: 18px;
}

/* Социальные кнопки — строго в одну строку */
.footer .grid-child .jm-icons {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;

  width: max-content;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
}

.footer .grid-child .jm-icons > a {
  display: inline-flex !important;
  flex: 0 0 40px !important;
  width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
}