/* =========================================================================
  ⚠️ 【注意】このファイルはテンプレートのコアファイルです ⚠️
  新しいサイトを作成する際、原則としてこのファイルは編集しないでください。
  ここを編集するとベースとなる共通のリストレイアウト構造が崩れる恐れがあります。

  デザインの変更（枠線、余白、色などの微調整）は、
  style.css や各投稿タイプの個別CSS (staff.css / news.css など) でオーバーライドしてください。
========================================================================= */

/* ==========================================================
  Generic Archive List
========================================================== */
.archive-list__title {
  text-align: center;
  margin-bottom: 30px;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  justify-content: flex-start;
}

.category-filter a {
  display: inline-block;
  padding: 5px 15px;
  border: 1px solid #666;
  border-radius: 5px;
  font-size: 1.4rem;
  color: #666;
  transition: all 0.3s ease;
}

.category-filter a:hover,
.category-filter a.is-active {
  background-color: #666;
  color: #fff;
}

.item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 1.4rem;
  color: #666;
  gap: 8px;
}

.item-meta-separator {
  color: #999;
}

.item-meta .item-categories {
  margin-bottom: 0;
}

.item-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.category-badge {
  display: inline-block;
  color: #666;
  font-size: 1.4rem;
  padding: 0 5px;
  border-bottom: 3px dotted #ccc;
}

/* ==========================================================
  Pattern 1: list-type-text (Text Main)
========================================================== */
.list-type-text__item {
  width: 100%;
  height: auto;
  background-color: #F6F6F6;
}

.list-type-text__item a {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 150px;
  overflow: hidden;
  padding: 30px;
}

.list-type-text__item:not(:last-child) a {
  border-bottom: 1px solid #999;
}

.list-type-text__item a>div {
  height: 100%;
  flex-grow: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.list-type-text__item .item-title {
  font-size: 30px;
  height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-type-text__item .item-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media screen and (max-width: 768px) {
  .list-type-text__item {
    width: 100%;
    justify-content: center;
    height: auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .list-type-text__item a {
    height: auto;
    min-height: auto;
    padding: 20px;
    margin: 0;
  }

  .list-type-text__item a>div {
    height: auto;
    font-size: 1.3rem;
  }

  .list-type-text__item .item-title {
    font-size: 1.8rem;
    height: auto;
    line-height: 1.4;
    margin-bottom: 10px;
  }
}

/* ==========================================================
  Pattern 2: list-type-horizontal (Horizontal Card)
========================================================== */
.list-type-horizontal__item {
  width: 100%;
  height: auto;
  background-color: #f6f6f6;
}

.list-type-horizontal__item:not(:last-child) a {
  border-bottom: 1px solid #999;
}

.list-type-horizontal__item .item-title {
  font-size: 30px;
  height: auto;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  flex-shrink: 0;
}

.list-type-horizontal__item a {
  display: block;
  height: auto;
  padding: 30px;
}

.list-type-horizontal__item a>div {
  display: flex;
  flex-flow: row;
  gap: 30px;
}

.list-type-horizontal__item .item-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 150px;
}

.list-type-horizontal__item .item-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 110px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  width: 100%;
}

.list-type-horizontal__item img {
  aspect-ratio: 1.1;
  height: 150px;
  width: 150px;
  object-fit: cover;
}

.readmore {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.readmore-text {
  position: relative;
  margin-top: auto;
  align-self: flex-end;
  color: #999;
  font-size: 1.4rem;
  padding-right: 12px;
}

.readmore-text::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 100%;
  height: 1px;
  background: #999;
}

.readmore-text::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  width: 8px;
  border-top: 1px solid #999;
  transform: rotate(30deg);
  transform-origin: center;
}

@media screen and (max-width: 768px) {
  .list-type-horizontal__item .item-desc {
    width: 100%;
  }

  .list-type-horizontal__item a {
    height: auto;
    padding: 20px;
  }

  .list-type-horizontal__item a>div {
    gap: 15px;
  }

  .list-type-horizontal__item .item-text {
    font-size: 1.3rem;
    height: 130px;
  }

  .list-type-horizontal__item .item-title {
    font-size: 18px;
    height: auto;
    max-height: 39px;
    margin: 5px 0;
    line-height: 19.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .list-type-horizontal__item img {
    height: 130px;
    width: 130px;
  }
}

/* ==========================================================
  Pattern 3: list-type-grid (Grid Vertical Card)
========================================================== */
.list-type-grid__items {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 3rem 2rem;
}

.list-type-grid__item {
  width: calc((100% - 4rem) / 3);
  text-align: center;
}

.list-type-grid__item a {
  display: block;
}

.list-type-grid__item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  display: block;
}

.list-type-grid__item .item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 5px 10px;
}

.list-type-grid__item .item-meta {
  justify-content: center;
  margin: 0;
  padding-top: 5px;
}

@media screen and (max-width: 768px) {
  .list-type-grid__items {
    gap: 2rem;
  }

  .list-type-grid__item {
    width: 100%;
  }
}
