.three-images {
  --swiper-scrollbar-size: 0.125rem;
  --_padding-subtitle: 1.25rem 1rem;
  --_padding-text: 1rem;
  --_template: "upperside"
               "textside";
  --_upperside-area: upperside;
  --_textside-area: textside;

  /** hide scrollbar */
  &::-webkit-scrollbar,
  &::-webkit-scrollbar-thumb,
  &::-webkit-scrollbar-track {
    display: none;
  }

  .three-images__item {
    display: grid;
    grid-template: var(--_template);
    position: relative;

    .three-images__item--heading,
    .three-images__item--image {
      grid-area: var(--_upperside-area);
    }
    .three-images__item--text {
      grid-area: textside;
      grid-area: var(--_textside-area);
      align-self: end;
      justify-self: start;
      position: relative;
      z-index: 1;
    }

    .three-images__item--heading {
      padding: var(--_padding-subtitle);
    }

    .three-images__item--text {
      padding: var(--_padding-text);
    }

    .three-images__item--image {
      position: relative;
      z-index: -1;

      picture,
      img {
        aspect-ratio: 9 / 16;
        width: 100%;
        object-fit: cover;
      }
    }

    .three-images__item--label {
      margin-bottom: 0.5rem;
    }
  }

  &.full-height-images {
    --_template: "container";
    --_upperside-area: container;
    --_textside-area: container;
    --_padding-text: 1.25rem 1rem;
  }

  .three-images__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;

    .swiper-scrollbar {
      max-width: 40vw;
      background: var(--theme-color-grey-3, #0000001a);
      &.swiper-scrollbar-horizontal,
      .swiper-horizontal > & {
        position: relative;
        inset: unset;
        width: 100%;
        cursor: pointer;
      }
      .swiper-scrollbar-drag {
        background: var(--theme-color-black);
      }
    }

    .swiper-button-prev,
    .swiper-button-next {
      position: relative;
      width: 2rem;
      height: 2rem;
      color: var(--theme-color-black);
      margin: 0;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;

      &::after {
        content: none;
      }

      svg {
        width: 1.5rem;
        height: 1.5rem;
        fill: var(--theme-color-black);
      }
    }
  }
}

@media (min-width: 700px) {
  .three-images {
    --_padding-subtitle: 2rem 1.75rem;
    --_padding-text: 1.5rem 1rem;

    .swiper-wrapper {
      display: flex;
    }

    .three-images__item {
      flex: 1;
    }

    .three-images__controls {
      display: none;
    }

    &.full-height-images {
      --_padding-text: 2rem 1.75rem;
    }
  }
}
