.main-footer{
  width: 100%;
  height: fit-content;
  display: flex;
  justify-content: center;
  background-color: var(--alt-white);
  padding: 64px 72px;
}

.footer-logo {
  width: 148px;
  height: 43px;
}

.footer-layout {
  max-width: 1440px;
}

.footer-logo-container {
  grid-column: span 4;
}

.footer-menu-container {
  grid-column: span 8;
}

.footer-menu {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 24px;
  margin-bottom: 89px;
}

.footer-menu-tight {
  grid-column: span 2;
  margin-bottom: 11px;
}

.footer-menu-wide {
  grid-column: span 4;
  margin-bottom: 11px;
}

.footer-menu-link {
  position: relative;
  width: fit-content;
  font-size: 16px;
  font-weight: 500;
  line-height: 140%;
  letter-spacing: -0.01em;
  color: var(--primary-black);
}

.footer-menu-link::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background-color: var(--primary-black);
  bottom: 0;
  left: 0;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.3s ease-in-out;
}

.footer-menu-link:hover::before {
  transform-origin: left;
  transform: scaleX(1);
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: -0.01em;
  color: var(--primary-black);
  gap: 5px;
}

.footer-links-size {
  font-size: 14px;
}

@media (max-width: 1279px) {
  .main-footer{
    padding: 64px 30px 20px 30px;
  }

  .footer-layout {
    row-gap: 64px;
  }

  .footer-logo-container {
    grid-column: span 6;
  }

  .footer-menu-container {
    grid-column: span 6;
  }

  .footer-menu {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    row-gap: 36px;
    margin-bottom: 204px;
  }

  .footer-menu-tight {
    grid-column: span 2;
    margin-bottom: 0;
  }

  .footer-menu-wide {
    grid-column: span 2;
    margin-bottom: 0;
  }

  .footer-menu-link {
    font-size: 24px;
  }

  .footer-links {
    font-size: 16px;
  }

  .footer-links-size {
    font-size: 16px;
  }
}

@media (max-width: 767px) {
  .main-footer{
    padding: 64px 16px 20px 16px;
  }

  .footer-layout {
    row-gap: 40px;
  }

  .footer-logo-container {
    grid-column: span 4;
  }

  .footer-logo {
    width: 76px;
    height: auto;
  }

  .footer-menu-link {
    font-size: 16px;
  }

  .footer-menu-container {
    grid-column: span 4;
  }

  .footer-menu {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    row-gap: 24px;
    grid-auto-flow: dense;
  }

  .footer-menu-tight {
    grid-column: auto;
    order: 0;
  }

  .footer-menu-wide {
    grid-column: 1 / -1;
    grid-row: auto;
    order: 1;
  }

  .footer-menu > div:nth-child(3) {
    margin-top: 36px;
  }

  
}

@media (max-width: 639px) {
  .main-footer{
    padding-top: 98px;
  }

  .footer-layout {
    row-gap: 36px;
  }

  .footer-menu {
    margin-bottom: 64px;
  }

  .footer-links {
    font-size: 14px;
  }

  .footer-links-size {
    font-size: 14px;
  }
}
