/* ==========================================================================
   НИИЭФА — Подвал сайта (Footer)
   ========================================================================== */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
  padding-bottom: var(--footer-gap, 80px);
}


.site-footer {
  background-color: var(--color-primary, #003274);
  color: #ffffff;
  padding: 64px 0 32px;
  width: 100%;
  position: relative;
  font-family: var(--font, "Rosatom", sans-serif);
}

.site-footer a {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.site-footer a:hover {
  opacity: 0.85;
}

/* Сброс глобальных псевдоэлементов дизайн-системы для списков */
.site-footer ul,
.site-footer ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul li,
.site-footer ol li {
  padding-left: 0 !important;
  margin: 0;
}

.site-footer ul li::before,
.site-footer ol li::before {
  display: none !important;
  content: none !important;
}

/* Обертка: меню на всю ширину, ниже — логотип, копирайт и соцсети в одном ряду */
.site-footer__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "links links links"
    "brand bottom socials";
  row-gap: 56px;
  column-gap: 32px;
  align-items: center;
}

.site-footer__links-group {
  grid-area: links;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.site-footer__nav {
  width: 100%;
}

/* Навигационные пункты на всю ширину футера */
.site-footer__nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px 24px;
}

.site-footer__nav-link {
  font-family: var(--font, "Rosatom", sans-serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  display: inline-block;
  white-space: nowrap;
}

/* Юридические ссылки (под меню, на всю ширину) */
.site-footer__legal-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px 24px;
}

.site-footer__legal-link {
  font-family: var(--font, "Rosatom", sans-serif);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid #ffffff50;
  padding-bottom: 1px;
  display: inline-block;
  transition: opacity 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.site-footer__legal-link:hover {
  border-color: #ffffff;
  opacity: 1;
}

/* Блок соцсетей — справа на десктопе */
.site-footer__socials-block {
  grid-area: socials;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  justify-self: end;
}

.site-footer__brand {
  grid-area: brand;
  margin: 0;
  justify-self: start;
}

.site-footer__socials-title {
  font-family: var(--font, "Rosatom", sans-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 14px;
  white-space: nowrap;
}

.site-footer__socials-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #ffffff;
  overflow: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-footer__social-link img {
  display: block;
}

/* VK иконка уже имеет круг 30x30 с белым фоном и синей иконкой внутри */
.site-footer__social-link--vk {
  background-color: #ffffff;
}

.site-footer__social-link--vk img {
  width: 32px;
  height: 32px;
}

/* TG: белый круг и синяя иконка в SVG (как VK), без CSS-подложки */
.site-footer__social-link--tg {
  background-color: transparent;
}

.site-footer__social-link--tg img {
  width: 32px;
  height: 32px;
}

/* MAX: без подложки, белая иконка как в макете */
.site-footer__social-link--max {
  background-color: transparent;
}

.site-footer__social-link--max img {
  width: 32px;
  height: 32px;
  filter: none;
}

.site-footer__social-link:hover {
  transform: translateY(-3px) scale(1.05);
  opacity: 0.95;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

/* Блок бренда / Логотипа */
.site-footer__logo {
  display: inline-block;
  line-height: 0;
}

.site-footer__logo img {
  height: 48px;
  width: auto;
  display: block;
}

/* Нижняя полоса с копирайтом */
.site-footer__bottom {
  grid-area: bottom;
  min-width: 0;
  text-align: center;
}

.site-footer__copyright {
  font-family: var(--font, "Rosatom", sans-serif);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}
.site-footer__copyright p {
  font-family: var(--font, "Rosatom", sans-serif);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.site-footer__copyright p {
  margin: 0;
}

.site-footer__copyright a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.6);
  opacity: 1;
  transition: opacity 0.25s ease, text-decoration-color 0.25s ease;
}

.site-footer__copyright a:hover {
  color: #ffffff;
  opacity: 0.8;
  text-decoration-color: #ffffff;
}

/* ==========================================================================
   Адаптивность для мобильных устройств (согласно макету)
   ========================================================================== */

@media (max-width: 960px) {
  .site-footer {
    padding: 48px 0 32px;
  }

  /* Порядок элементов на мобильном:
     1. Логотип
     2. Меню (вертикально)
     3. Юридические ссылки (вертикально)
     4. Иконки соцсетей (без заголовка)
     5. Копирайт (выравнивание по левому краю)
  */
  .site-footer__inner {
    display: flex;
    flex-direction: column;
    row-gap: 0;
  }

  .site-footer__brand {
    order: 1;
    margin-bottom: 36px;
    align-self: flex-start;
  }

  .site-footer__logo img {
    height: 52px;
  }

  .site-footer__links-group {
    order: 2;
    margin-bottom: 28px;
    gap: 28px;
  }

  .site-footer__nav-list {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
  }

  .site-footer__nav-link {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.03em;
  }

  .site-footer__legal-list {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
  }

  .site-footer__legal-link {
    font-size: 12px;
    line-height: 1.4;
    border-bottom: 1px solid #ffffff50;
    padding-bottom: 1px;
  }

  /* Соцсети на мобильном */
  .site-footer__socials-block {
    order: 3;
    align-self: flex-start;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 24px;
    padding-top: 0;
  }

  .site-footer__socials-title {
    display: none;
  }

  .site-footer__socials-list {
    justify-content: flex-start;
    align-self: flex-start;
    width: auto;
    gap: 12px;
  }

  .site-footer__social-link {
    width: 32px;
    height: 32px;
  }

  /* Копирайт на мобильном */
  .site-footer__bottom {
    order: 4;
    text-align: left;
    width: 100%;
  }

  .site-footer__copyright {
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
  }
}
