/* Until carousel.js moves these into .items they match no layout rules and would
   stack full-width. With scripting off they are never restructured, so leave them be. */
@media (scripting: enabled) {
  .feature-carousel-panel > .item {
    display: none;
  }
}

.feature-carousel-panel {
  width: 100%;
  overflow: auto;

  .items {
    grid-template-columns: repeat(30, calc(20% - (9 * var(--space-large)) / 10));

    .item {
      background: #fff1;
      padding: 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 20px;
      border-radius: var(--radius);

      i {
        font-size: 3rem;
        line-height: 1;
      }

      .text {
        flex: 1;
      }

      &:nth-child(4n+1) {
        i {
          background: linear-gradient(var(--yellow), var(--orange));
          color: transparent;
          background-clip: text;
        }
      }

      &:nth-child(4n+2) {
        i {
          background: linear-gradient(var(--orange), var(--turquoise));
          color: transparent;
          background-clip: text;
        }
      }

      &:nth-child(4n+3) {
        i {
          background: linear-gradient(var(--green), var(--purple));
          color: transparent;
          background-clip: text;
        }
      }

      &:nth-child(4n+4) {
        i {
          background: linear-gradient(var(--purple), var(--yellow));
          color: transparent;
          background-clip: text;
        }
      }
    }
  }

  @media (max-width: 800px) {
    .items {
      grid-template-columns: repeat(30, calc(50% - (9 * var(--space-large)) / 10));
    }
  }

  @media (max-width: 400px) {
    .items {
      grid-template-columns: repeat(30, calc(100% - (9 * var(--space-large)) / 10));
    }
  }
}