.advantages {
  margin-bottom: 100px;
}

.advantages__h2 {
  text-align: center;
}

.advantages__list {
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  flex-wrap: wrap;
}

.advantages__item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex-grow: 1;
  width: calc(100% / 3);
  padding: 20px;

  text-align: center;
  color: var(--color-white);
  overflow: hidden;

  @media (width < 1024px) {
    width: calc(100% / 2);
  }

  @media (width < 768px) {
    padding: 20px 10px;
  }

  @media (width < 480px) {
    width: 100%;
    min-height: 180px;
    max-height: 200px;
  }

  @media (width < 360px) {
    max-height: 240px;
  }

  &:hover {
    text-decoration: none;
  }
}

.advantages__item--accent {
  background-color: var(--color-accent);
}

.advantages__item--gray {
  background-color: var(--color-grey);
}

.advantages__item--black {
  background-color: var(--color-black-light);
}

.advantages__item-title {
  max-width: 250px;
  padding: 0 20px;
  margin-bottom: 20px;

  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;

  @media (width < 1200px) {
    font-size: 18px;
  }

  @media (width < 768px) {
    padding: 0;
    max-width: 100%;
  }
}

.advantages__item-text {
  max-width: 320px;
  padding: 0 30px;

  font-size: 16px;
  font-weight: 200;

  @media (width < 1200px) {
    font-size: 14px;
  }

  @media (width < 768px) {
    padding: 0;
  }
}

.advantages__item-link {
  margin: 15px 0 -35px;

  color: var(--color-white);
  cursor: pointer;
  font-weight: 200;
  border-bottom: 1px dashed var(--color-white);
  text-decoration: none;
  opacity: 0;

  transition: border .1s ease, opacity .15s ease;

  @media (width < 1200px) {
    margin: 15px 0 5px;

    font-size: 14px;
  }

  @media (width < 1024px) {
    opacity: 1;
  }

  &:hover {
    text-decoration: none;
    border-bottom-color: transparent;
  }
}

.advantages__item:hover .advantages__item-link {
  opacity: 1;
}

.advantages__img {
  width: calc(100% + 40px);
  max-width: calc(100% + 40px);
  height: calc(100% + 40px);
  object-fit: cover;
  margin: -20px;

  transition: transform .2s ease;

  &:hover {
    transform: scale(1.015);
  }
}
