footer {
  background-color: var(--primary);
  padding-block: 5rem 4rem;
  color: white;

  ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    margin: 0;
    max-width: 100%;
    list-style: none;

    li {
      margin: 0;

      &:first-child {
        flex: 1 1 100%;
      }
    }

    a {
      text-decoration: none;
      &:hover,
      &:focus {
        text-decoration: underline;
      }
    }

    .search {
      background: transparent url("../media/icon_search_white.svg") center right no-repeat;
      background-size: 1.6rem 1.6rem;
      padding: 0 2.4rem 0 0;
    }
  }

  div {
    justify-self: right;

    img {
      height: 110px;
    }
  }
}

/* Responsiveness */
@media (max-width: 860px) {
  footer {
    ul li:first-child {
      flex: unset;
    }
  }
}

@media (max-width: 600px) {
  footer {
    .grid-12 {
      grid-template-columns: 100%;
      justify-content: center;
      align-items: center;
      gap: 48px;
    }

    ul li:first-child {
      flex: unset;
    }

    .span-3,
    .span-9 {
      grid-column: unset;
      justify-self: center;
    }
  }
}

@media (max-width: 400px) {
  footer ul {
    display: block;
    text-align: center;
  }
}
