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

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

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

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  justify-content: flex-start;
}

.category-filter a {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border: 1px solid #666;
  border-radius: 0.5rem;
  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: 1rem;
  font-size: 1.4rem;
  color: #666;
  gap: 0.8rem;
}

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

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

.item-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.category-badge {
  display: inline-block;
  color: #666;
  font-size: 1.4rem;
  padding: 0 0.5rem;
  border-bottom: 0.3rem 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: 15rem;
  overflow: hidden;
  padding: 3rem;
}

.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: 3rem;
  height: 6rem;
  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: 2rem;
    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: 1rem;
  }
}

/* ==========================================================
  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: 3rem;
  height: auto;
  margin-bottom: 1rem;
  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: 3rem;
}

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

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

.list-type-horizontal__item .item-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 11rem;
  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: 15rem;
  width: 15rem;
  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: 1.2rem;
}

.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: 0.3rem;
  width: 0.8rem;
  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: 2rem;
  }

  .list-type-horizontal__item a>div {
    gap: 1.5rem;
  }

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

  .list-type-horizontal__item .item-title {
    font-size: 1.8rem;
    height: auto;
    max-height: 3.9rem;
    margin: 0.5rem 0;
    line-height: 1.95rem;
    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: 13rem;
    width: 13rem;
  }
}

/* ==========================================================
  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: 0.5rem 1rem;
}

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

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

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