section.partner {
  display: grid;
  justify-items: center;
  align-items: center;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem 0;
  margin-bottom: 2rem;

  /* match <a> to <img> styles */
  a {
    display: inline-block; /* makes it behave like an <img> */
    text-decoration: none; /* removes underline */
    color: inherit; /* prevents blue link color */
    background-size: cover; /* if using background-image */
    background-position: center;
    background-repeat: no-repeat;
    line-height: 0; /* removes unwanted spacing */
  }

  & > img,
  a {
    width: 50%;
  }

  a > img {
    width: 100%;
  }

  .line {
    position: absolute;
    width: 30vw;
    top: 11%;
  }
  .line.dx {
    left: 0;
  }
  .line.sx {
    right: 0;
  }
  h1 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  section.partner {
    grid-template-columns: repeat(3, auto);
    gap: 2.5rem 0;

    & > img,
    & > a {
      grid-column: 2;
      width: 50vw;
      max-height: 50vh;
      object-fit: contain;
    }
    h1 {
      text-align: center;
    }
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  section.partner {
    grid-template-columns: repeat(2, 1fr);
  }
}
