.page-section .page-heading {
  margin-inline: var(--content-spacing);
  @media (min-width: 768px) {
    margin-inline: 0;
  }
}
.filter-wrapper {
  background-color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e2e2;
  gap: 24px;
  @media (max-width: 767px) {
    padding: 10px;
  }
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 8px;

  @media (min-width: 768px) {
    display: grid;
    grid-template-columns: 70px 1fr;

  }

  .filter-label {
    display: flex;
    align-items: center;
    outline: none;
    border: none;
    justify-content: space-between;
    background-color: transparent;
    cursor: pointer;
    color: var(--text-color);

    @media (min-width: 768px) {
      gap: 16px;
      pointer-events: none;

      > i {
        display: none;
      }
    }

    > p {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 14px;
    }

    > i {
      transition: transform 0.3s ease;
    }

    &.is-open > i {
      transform: rotate(180deg);
    }

    .filter-label-value {
      font-size: 14px;
      font-weight: 700;

      @media (min-width: 768px) {
        display: none;
      }
    }

    &.is-open .filter-label-value {
      display: none;
    }
  }

  .filter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    @media (max-width: 550px){
      grid-template-columns: repeat(1, minmax(120px, 1fr));
    }

    @media (min-width: 768px) {
      display: flex;
      flex-wrap: wrap;
      max-height: none !important;
      opacity: 1 !important;
      overflow: visible;
    }

    &.is-open {
      max-height: 1000px; /* 十分な高さを設定 */
      opacity: 1;
    }

    > a {
      display: inline-block;
      padding: 11px 20px;
      border: 1px solid #ccc;
      background-color: #fff;
      border-radius: 9999px;
      text-decoration: none;
      line-height: 1;
      color: #333;
      font-size: 14px;
      transition: all 0.3s ease;
      grid-column: auto / span 1;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;

      &.active {
        background-color: var(--main-color);
        color: #fff;
        border-color: var(--main-color);
        pointer-events: none;
      }

      &:hover:not(.active) {
        background-color: #f0f0f0;
      }
    }
  }
}

.blog-contents {
}
.blog-count {
  padding-block-end: 16px;
  text-align: left;
  padding-inline: var(--content-spacing);
  @media (min-width: 768px) {
    padding-inline: 0;
  }
  @media (max-width: 767px) {
    padding-block-end: 0px;
  }
  p {
    font-size: 14px;
  }
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #ededee;
  @media (min-width: 768px) {
    gap: 20px;
    background: none;
  }
  @media (min-width: 900px) {
    gap: 30px;
  }
}
.blog-item {
  background-color: #fff;
  border-bottom: 1px solid #e2e2e2;
  border-top: 1px solid #e2e2e2;
  position: relative;
  display: flex;
  flex-direction: column;
  @media (min-width: 768px) {
    border: 1px solid #e2e2e2;
    flex-direction: row;
    flex-flow: row-reverse;
  }
  .item-link {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    &:hover {
      background: rgba(255, 255, 255, 0.3);
    }
  }
  .head {
    margin-block: 20px 10px;
    display: flex;
    align-items: center;
    gap: 5px 0.5em;
    flex-wrap: wrap;
    @media (min-width: 768px) {
      gap: 10px 0.5em;
    }
    .time {
      display: block;
      color: #949494;
      font-size: 16px;
      font-weight: bold;
      @media (min-width: 768px) {
        width: 100%;
      }
    }
    &.new::after {
      content: 'NEW';
      display: flex;
      justify-content: center;
      align-items: center;
      width: 62px;
      font-size: var(--text-xs);
      line-height: var(--line-height-md);
      background-color: #ec6d12;
      color: var(--text-contrast-color);
      font-family: 'Averia Libre', sans-serif;
      font-weight: 700;
    }
    .blog-type {
      font-size: 12px;
      border: 1px solid #999;
      border-radius: 10px;
      font-weight: bold;
      display: inline-block;
      padding-inline: 10px;
      line-height: 18px;
      vertical-align: top;
    }
  }
  .title {
    margin-block: 10px;
    color: var(--main-color);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    word-break: break-all;
    .title-text {
      font-size: 20px;
    }
  }
  .content {
    padding-bottom: 30px;
    flex-grow: 1;
    padding-inline: var(--content-spacing);
    @media (min-width: 768px) {
      padding-inline: 20px;
      width: calc(100% - 240px);
    }
    .description {
      margin-top: 15px;
      p {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        word-break: break-all;
      }
    }
  }
  .images {
    width: 100%;
    height: 240px;
    @media (min-width: 768px) {
      width: 240px;
    }
    .image {
      width: 100%;
      height: 100%;
      object-fit: contain;
      @media (min-width: 768px) {
        object-fit: cover;
      }
    }
  }
}

.blog-list-none {
  padding-block: 60px;
  text-align: center;
  @media (min-width: 768px) {
    padding-block: 80px;
  }
}

.pagination {
  padding-top: 20px;
  padding-inline: var(--content-spacing);
  @media (min-width: 768px) {
    padding-top: 40px;
  }
}
