.site-footer {
  color: var(--color-text-inverse);
  background: var(--blue-500);
}

.site-footer__companies {
  position: relative;
  height: 64px;
  background: var(--color-brand-primary);
}

.site-footer__companies::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: max(0px, calc((100% - 1200px) / 2));
  background: var(--color-footer-accent);
  content: "";
}

.site-footer__companies-inner {
  position: relative;
  display: flex;
  width: min(100%, 1200px);
  height: 64px;
  margin-inline: auto;
}

.site-footer__companies-title {
  display: flex;
  align-items: center;
  flex: 0 0 153px;
  padding-left: var(--space-24);
  color: inherit;
  background: url("../../images/common/footer-member-tab.svg") center / 153px 64px no-repeat;
  border: 0;
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-24);
  text-align: left;
}

.site-footer__companies-icon {
  display: none;
}

.site-footer__companies-disclosure {
  flex: 1 1 auto;
  min-width: 0;
}

.site-footer__company-list {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: var(--space-8) var(--space-24) var(--space-8) 0;
}

.site-footer__company-list li {
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-24);
  white-space: nowrap;
}

.site-footer__company-list a {
  display: block;
  padding: var(--space-12) var(--space-8);
  transition: opacity var(--duration-fast) var(--ease-standard);
}

@media (min-width: 1024px) and (hover: hover) {
  .site-footer__company-list a:hover {
    opacity: 0.76;
  }
}

.site-footer__information {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  width: min(calc(100% - 48px), 1200px);
  margin-inline: auto;
  padding-block: var(--space-16);
  font-size: var(--font-size-13);
  line-height: 1.5;
  text-align: center;
}

.site-footer__contact-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-40);
  width: 100%;
}

.site-footer__policy {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-weight: var(--font-weight-medium);
}

@media (min-width: 1024px) and (hover: hover) {
  .site-footer__policy a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

@media (max-width: 1023px) {
  .site-footer__companies {
    height: auto;
    overflow: visible;
    background: var(--color-footer-accent);
  }

  .site-footer__companies::before {
    display: none;
  }

  .site-footer__companies-inner {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    height: auto;
  }

  .site-footer__companies-title {
    flex: 0 0 56px;
    justify-content: center;
    gap: var(--space-4);
    width: 100%;
    padding: var(--space-16) var(--space-24);
    background: none;
    cursor: pointer;
  }

  .site-footer__companies-icon {
    position: relative;
    display: block;
    width: 16px;
    height: 16px;
  }

  .site-footer__companies-icon::before,
  .site-footer__companies-icon::after {
    position: absolute;
    top: 7.5px;
    left: 3px;
    width: 10px;
    height: 1px;
    background: currentcolor;
    content: "";
    transition:
      opacity 320ms var(--ease-standard),
      transform 420ms cubic-bezier(.22, 1, .36, 1);
  }

  .site-footer__companies-icon::after {
    transform: rotate(90deg);
  }

  .site-footer__companies.is-open .site-footer__companies-icon::after {
    opacity: 0;
    transform: rotate(90deg) scaleX(0);
  }

  .site-footer__companies-disclosure {
    display: grid;
    flex: none;
    grid-template-rows: 0fr;
    width: 100%;
    min-width: 0;
    visibility: hidden;
    transition:
      grid-template-rows 480ms cubic-bezier(.22, 1, .36, 1),
      visibility 0s linear 480ms;
  }

  .site-footer__companies.is-open .site-footer__companies-disclosure {
    grid-template-rows: 1fr;
    visibility: visible;
    transition:
      grid-template-rows 480ms cubic-bezier(.22, 1, .36, 1),
      visibility 0s;
  }

  .site-footer__company-list {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  .site-footer__company-list li {
    width: 100%;
  }

  .site-footer__company-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: var(--space-16) var(--space-24);
    text-align: center;
    background: var(--color-footer-list);
  }

  .site-footer__contact-row {
    flex-wrap: wrap;
    gap: var(--space-8) var(--space-24);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .site-footer__information {
    gap: var(--space-16);
    width: 100%;
    padding-block: var(--space-32);
    font-size: var(--font-size-14);
    line-height: var(--line-height-21);
  }

  .site-footer__contact-row {
    gap: var(--space-16) var(--space-8);
  }

  .site-footer__policy {
    order: -1;
    justify-content: center;
    width: 100%;
    gap: var(--space-16);
    font-size: var(--font-size-15);
    line-height: var(--line-height-22);
  }

  .site-footer__policy span {
    display: none;
  }
}

@media (max-width: 767px) {
  .site-footer__information {
    align-items: center;
    gap: var(--space-24);
    width: 100%;
    padding-block: var(--space-32);
    font-size: var(--font-size-14);
    line-height: var(--line-height-21);
    text-align: center;
  }

  .site-footer__contact-row {
    align-items: center;
    flex-direction: column;
    gap: var(--space-8);
  }

  .site-footer__policy {
    order: -1;
    flex-direction: column;
    gap: var(--space-16);
    width: 100%;
    margin-bottom: var(--space-16);
    font-size: var(--font-size-15);
    line-height: var(--line-height-22);
  }

  .site-footer__policy span {
    display: none;
  }
}
