@use '../../abstract';

.image-thumbnail-section {
  &__content {
    display: none;
  }

  &__panel {
    display: inline-block;
    width: 100%;
    height: 100%;
    aspect-ratio: 343 / 257;

    &:nth-child(n + 2) {
      margin-top: 20px;
    }
  }

  &__more {
    display: none;
    margin-top: 24px;
    width: 100%;
  }

  // slide
  // ================================================
  .swiper-container {
    overflow: auto;
  }

  .swiper-slide {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 16px;

    .image-thumbnail-section__panel {
      aspect-ratio: auto;
      margin-top: 0;
    }

    .cds-quote-img-panel {
      width: auto;
      height: auto;
    }

    .cds-quote-img-panel__img {
      position: static;
    }

    .cds-quote-img-panel__cover {
      position: absolute;
      width: 100%;
      z-index: -1;
    }

    .cds-quote-img-panel:hover .cds-quote-img-panel__cover {
      z-index: 1;
    }
  }

  &__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-block-start: 24px;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--gray-100);
    color: var(--gray-500);
    font-size: 14px;
  }

  @include abstract.media-bp-up('md') {
    text-align: center;

    &__content {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      grid-template-rows: auto;
      gap: 32px;
    }

    &__panel:nth-child(n + 2) {
      margin-top: 0;
    }

    &__more {
      display: inline-block;
      margin-top: 64px;
      width: auto;
    }

    //  slider
    .swiper {
      display: none;
    }

    &__nav {
      display: none;
    }
  }
}
