.customer-stories-container {
  max-width: 1230px;
  padding: 0 15px;
  margin: 0 auto;

  .pricing-package_title_wrap {
    padding: 0;
    text-align: center;

    .pricing-package_title {
      max-width: 400px;
      margin: 0 auto;

      @media (max-width: 1024px) {
        max-width: 410px;
      }
    }
  }
}

.customer-stories-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;

  @media (max-width: 1024px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media (max-width: 768px) {
    grid-template-columns: 1fr;
  }
}

/* Customer cards rest in black and white with the yellow image tint, like
   the other image cards on the site, and turn to colour on hover. On phones
   the card nearest the middle of the screen gets the same look (.is-active,
   set by the script in pages/customers.html). */
.customer-stories-item {
  display: block;
  border-radius: 5px 5px 0 0;
}

.customer-stories-figure {
  position: relative;
  border-radius: 5px 5px 0 0;
  overflow: hidden;

  img {
    width: 100%;
    filter: grayscale(100%);
    transition:
      filter 0.3s ease,
      transform 0.4s ease;
  }

  &::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--color-overlay-image);
    transition: opacity 0.3s ease;
  }
}

.customer-stories-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 74px;
  padding: 10px;
  border: 1px solid #181818;
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  border-radius: 0 0 5px 5px;

  svg {
    width: 100%;
    max-width: 246px;
  }
}

.customer-stories-item.is-active {
  .customer-stories-figure {
    img {
      filter: grayscale(0%);
    }

    &::after {
      opacity: 0;
    }
  }

  .customer-stories-logo {
    border-color: transparent;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  }
}

@media (hover: hover) {
  .customer-stories-item:hover {
    .customer-stories-figure {
      img {
        filter: grayscale(0%);
      }

      &::after {
        opacity: 0;
      }
    }

    .customer-stories-logo {
      border-color: transparent;
      box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .customer-stories-item.is-active .customer-stories-figure img {
    transform: scale(1.1);
  }

  @media (hover: hover) {
    .customer-stories-item:hover .customer-stories-figure img {
      transform: scale(1.1);
    }
  }
}
