.gallery-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 50px 25px;

  li a {
    span {
      display: block;
      margin-top: 11px;
      color: var(--gray02);
      font-size: 14px;
      font-weight: 600;
      line-height: 1;
    }

    b {
      color: var(--gray03);
      margin-top: 5px;
      display: block;
      font-size: 16px;
      font-weight: 700;
      line-height: 1.62;
      letter-spacing: -0.32px;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      line-clamp: 1;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    p {
      color: var(--gray03);
      font-size: 14px;
      font-weight: 500;
      line-height: 1.42;
      margin-top: 2px;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      line-clamp: 1;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .date {
      color: var(--gray02);
      font-size: 14px;
      font-weight: 500;
      line-height: 1;
      margin-top: 16px;
    }

    &:hover {
      b {
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-underline-offset: 0.3em;
      }
      .img {
        img {
          transform: scale(1.2);
        }
      }
    }
  }

  .img {
    aspect-ratio: 1/0.6312;
    overflow: hidden;

    img {
      width: 100%;
      height: 100%;
      -o-object-fit: cover;
      object-fit: cover;
      -o-object-position: center;
      object-position: center;
      transition: transform 0.5s linear;
    }
  }

  @container grid-container (max-width: 768px) {
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 7.813cqw;

    li a {
      span {
        font-size: 3.409cqw;
        font-weight: 600;
        line-height: 1;
        margin-top: 3.385cqw;
      }

      b {
        font-size: 4.545cqw;
        font-weight: 600;
        line-height: 150%;
        margin-top: 1.137cqw;
      }

      p {
        font-size: 3.636cqw;
        line-height: 156.25%;
      }

      .date {
        font-size: 2.955cqw;
        margin-top: 3.385cqw;
      }

      &:hover {
        .img {
          img {
            transform: scale(1);
          }
        }
      }
    }
  }
}

.board-list {
  margin-top: 120px;
  .board-list__header {
    display: flex;
    height: 57px;
    align-items: center;
    border-top: 2px solid var(--gray03);
    border-bottom: 1px solid var(--gray03);

    .board-list__number,
    .board-list__title,
    .board-list__date {
      text-align: center;
      color: var(--gray03);
      font-size: 20px;
      font-weight: 600;
      letter-spacing: -0.4px;
    }
  }
  .board-list__body {
    a {
      display: flex;
      padding-block: 17px;
      align-items: center;
      border-bottom: 1px solid rgba(40, 40, 40, 0.5);
      &:hover {
        &:not(:has(.board-list__title-info)) {
          .board-list__title {
            text-decoration-line: underline;
            text-underline-offset: 0.3em;
          }
        }
      }
    }
  }
  .board-list__number {
    flex-basis: 140px;
    text-align: center;
    color: var(--gray02);
    font-size: 16px;
  }
  .board-list__title {
    flex: 1;
    color: var(--Gray03, #282828);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.4px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;

    svg {
      display: inline-block;
      margin-left: 12px;
    }

    .board-list__title-info {
      margin-top: 5px;
      opacity: 0.8;
      span {
        color: var(--gray03);
        font-size: 16px;
        font-weight: 600;
        line-height: 1;
        &:not(:first-child)::before {
          content: '|';
          margin-right: 8px;
          margin-left: 4px;
          opacity: 0.8;
        }
      }
    }
  }
  .board-list__date {
    flex-basis: 185px;
    text-align: center;
    color: var(--Gray03, #282828);
    font-size: 16px;

    p {
      width: 81px;
      display: flex;
      justify-content: space-between;
      margin-inline: auto;
    }
  }

  @container grid-container (max-width: 768px) {
    margin-top: 15.885cqw;
    .board-list__header {
      height: 12.5cqw;
      border-top: 2px solid var(--gray03);
      border-bottom: 1px solid var(--gray03);

      .board-list__number,
      .board-list__title,
      .board-list__date {
        font-size: 3.636cqw;
        letter-spacing: -0.145cqw;
      }
    }
    .board-list__body {
      a {
        padding-block: 4.948cqw;
      }
    }
    .board-list__number {
      flex-basis: 13.021cqw;
      font-size: 2.955cqw;
    }
    .board-list__title {
      font-size: 3.636cqw;
      letter-spacing: -0.145cqw;

      svg {
        width: 2.899cqw;
        height: 3.14cqw;
        margin-left: 1.449cqw;
      }

      .clip {
        padding-top: 0.9cqw !important;
        img {
          width: 3.636cqw;
          height: 3.636cqw;
        }
      }

      .board-list__title-info {
        margin-top: 0.5cqw;
        span {
          font-size: 3.125cqw;
          &:not(:first-child)::before {
            margin-right: 1.042cqw;
            margin-left: 1.042cqw;
          }
        }
      }
    }
    .board-list__date {
      flex-basis: 22.135cqw;
      font-size: 2.955cqw;
      p {
        width: 16.364cqw;
      }
    }
  }
}

.board-paging {
  display: flex;
  gap: 26px;
  margin-top: 50px;
  justify-content: center;
  a {
    display: inline-block;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray02);
    font-weight: 500;
    transition: all ease 0.3s;

    &.active,
    &:hover {
      color: var(--gray03);
    }

    &:nth-last-of-type(1),
    &:nth-last-of-type(2),
    &:nth-of-type(1),
    &:nth-of-type(2) {
      opacity: 0.3;
      &:hover {
        opacity: 1;
      }
    }
  }

  @container grid-container (max-width: 768px) {
    gap: 6.771cqw;
    margin-top: 11.328cqw;
    justify-content: center;
    a {
      font-size: 3.636cqw;

      &:first-child {
        margin-right: -3.125cqw;
      }
      &:last-child {
        margin-left: -3.125cqw;
      }

      svg {
        width: 1.825cqw;
        height: 3.125cqw;
      }
    }
  }
}

.board-empty {
  color: var(--gray03);
  font-size: 18px;
  letter-spacing: -0.36px;
  padding-block: 150px;
  text-align: center;

  @container grid-container (max-width: 768px) {
    font-size: 3.636cqw;
    letter-spacing: -0.145cqw;
    padding-block: 25.885cqw;
  }
}

.board-view {
  margin-top: 120px;

  img {
    display: inline-block;
    object-fit: cover;
  }

  .board-view__header {
    border-top: 3px solid var(--gray03);
    border-bottom: 1px solid var(--gray03);
    padding-block: 25px;
    display: flex;
    align-items: center;
    padding-inline: 50px;
  }
  .board-view__title {
    font-size: 30px;
    font-weight: 700;
    line-height: 153.333%;
    flex: 1;
  }
  .board-view__date {
    color: var(--gray02);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    margin-top: 10px;
  }
  .board-view__body {
    padding-block: 50px;
    padding-inline: 50px;
  }
  .board-view__content {
    * {
      word-break: break-all;
      word-wrap: break-word;
    }
  }
  .board-view__footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 57px;
    border-top: 1px solid var(--gray03);
    padding-top: 30px;

    > a {
      opacity: 0.4;
      transition: all ease 0.3s;
      &:hover {
        opacity: 1;
      }
    }

    button {
      position: absolute;
      right: 0;
      display: flex;
      align-items: center;
      gap: 10px;
      opacity: 0.4;
      transition: all ease 0.3s;
      color: var(--gray03);
      font-size: 0;
      text-indent: -9999px;
      font-weight: 500;
      font-family: var(--inter);
      transform: rotate(180deg);

      &:hover {
        opacity: 1;
      }
    }
  }

  @container grid-container (max-width: 768px) {
    margin-top: 15.885cqw;

    .board-view__header {
      border-top: 2px solid var(--gray03);
      padding-block: 5.599cqw;
      padding-inline: 0;
      flex-direction: column;
      align-items: flex-start;
    }
    .board-view__title {
      font-size: 5cqw;
      line-height: 136.364%;
    }
    .board-view__date {
      font-size: 2.955cqw;
      line-height: 1;
      margin-top: 2.214cqw;
    }
    .board-view__body {
      padding-block: 7.813cqw;
      padding-inline: 0;
    }
    .board-view__footer {
      gap: 11.328cqw;
      padding-top: 6.641cqw;

      button {
        gap: 0;
        font-size: 3cqw;
        text-indent: 0;
        width: 4.545cqw;
        height: 4.545cqw;

        svg {
          height: 100%;
        }
      }
    }
    .board-view__prev,
    .board-view__next {
      width: 6.25cqw;
      height: 3.125cqw;
      svg {
        width: 100%;
        height: 100%;
      }
    }
    .board-view__list {
      width: 3.125cqw;
      height: 3.125cqw;
      svg {
        width: 100%;
        height: 100%;
      }
    }
  }
}

.board-view__file {
  padding-block: 20px;
  padding-inline: 50px;
  border-top: 1px solid #d6d8db;
  display: flex;
  flex-direction: column;
  gap: 4px;

  a {
    display: flex;
    gap: 9px;
    p {
      color: #000;
      font-family: Pretendard;
      opacity: 0.5;
      transition: all ease 0.3s;
      max-width: 90%;
      word-break: break-all;
      &:hover {
        opacity: 1;
      }
    }

    svg {
      display: inline-block;
      margin-top: 3px;
      width: 12px;
      height: 13px;
    }
  }
  @container grid-container (max-width: 768px) {
    padding-block: 4.545cqw;
    padding-inline: 0;
    gap: 0.909cqw;

    a {
      gap: 1.845cqw;
      p {
        font-size: 3.636cqw;
      }
      svg {
        width: 2.727cqw;
        height: 2.955cqw;
        margin-top: 1.136cqw;
      }
    }
  }
}
