
/* ========================================
   CASE ARCHIVE 症例一覧ページ
======================================== */

/* ----------------------------------------
   見出し
---------------------------------------- */

.case-archive-head {
  margin-bottom: 42px;
  text-align: center;
}

.case-archive-head__text {
  margin: 18px 0 0;
  font-size: 13px;
  letter-spacing: 0.08em;
}


/* ========================================
   CASE カテゴリータブ
======================================== */

/* ----------------------------------------
   タブ全体
---------------------------------------- */

.case-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 40px;
}

/* ----------------------------------------
   タブデザイン
---------------------------------------- */

.case-tabs__item {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 10px 12px;

  border: 1px solid rgba(211, 159, 159, 0.55);
  border-radius: 8px;
  background: transparent;

  color: #555;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;

  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

/* ----------------------------------------
   選択中
---------------------------------------- */

.case-tabs__item.is-active {
  border-color: #D39F9F;
  background: #D39F9F;
  color: #fff;
}

/* ----------------------------------------
   ホバー
---------------------------------------- */

@media (hover: hover) {

  .case-tabs__item:not(.is-active):hover {
    border-color: #D39F9F;
    background: rgba(211, 159, 159, 0.08);
    color: #D39F9F;
  }

}


/* ========================================
   CASE ARCHIVE 投稿一覧
   通常一覧・カテゴリー専用ページ共通
======================================== */

/* ----------------------------------------
   サムネイル（4:5）
---------------------------------------- */

.case-archive-content .p-postList__thumb {
  overflow: hidden;
  border-radius: 10px;
}

/* SWELL標準の画像比率を解除 */

.case-archive-content .p-postList__thumb .c-postThumb__figure {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5 !important;
  overflow: hidden;
}

/* SWELL標準の疑似要素を無効化 */

.case-archive-content .p-postList__thumb .c-postThumb__figure::before {
  content: none;
}

/* 画像を枠いっぱいに表示 */

.case-archive-content .p-postList__thumb img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------------------------------
   症例紹介文（ACF）
   PC・スマホ共通：最大2行
---------------------------------------- */

.case-archive-content .case-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  margin: 0;
  overflow: hidden;
  white-space: normal;

  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.08em;
}


/* ========================================
   CASE ARCHIVE PC表示
======================================== */

@media (min-width: 768px) {

  /* ----------------------------------------
     投稿一覧：上下間隔
  ---------------------------------------- */

  .case-archive-content .p-postList {
    row-gap: 0;
  }

  /* ----------------------------------------
     画像と日付の間隔
  ---------------------------------------- */

  .case-archive-content .p-postList__body {
    padding-top: 8px;
  }

  /* ----------------------------------------
     日付
  ---------------------------------------- */

  .case-archive-content .p-postList__meta {
    margin-bottom: 3px;
    letter-spacing: 0.08em;
  }

  .case-archive-content .p-postList__times {
    font-size: 10px;
    line-height: 1.4;
  }

  /* ----------------------------------------
     タイトル
  ---------------------------------------- */

  .case-archive-content .p-postList h2.p-postList__title {
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.08em;
  }

  /* ----------------------------------------
     症例紹介文（ACF）
  ---------------------------------------- */

  .case-archive-content .case-description {
    font-size: 11px;
  }

}


/* ========================================
   CASE ARCHIVE スマホ表示
======================================== */

@media (max-width: 767px) {

  /* ----------------------------------------
     見出し
  ---------------------------------------- */

  .case-archive-head {
    margin-bottom: 30px;
  }

  .case-archive-head__text {
    margin-top: 14px;
    font-size: 12px;
  }

  /* ----------------------------------------
     カテゴリータブ
  ---------------------------------------- */

  .case-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 30px;
  }

  .case-tabs__item {
    min-height: 42px;
    padding: 8px 6px;
    font-size: 12px;
  }

  /* ----------------------------------------
     コンテンツ左右余白
  ---------------------------------------- */

  .case-archive-content {
    padding-left: 5px;
    padding-right: 5px;
  }

  /* ----------------------------------------
     投稿一覧：2列表示
  ---------------------------------------- */

  .case-archive-content .p-postList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 24px;
  }

  .case-archive-content .p-postList__item {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ----------------------------------------
     サムネイル
  ---------------------------------------- */

  .case-archive-content .p-postList__thumb {
    border-radius: 12px;
  }

  /* ----------------------------------------
     画像と日付の間隔
  ---------------------------------------- */

  .case-archive-content .p-postList__body {
    padding-top: 2px;
  }

  /* ----------------------------------------
     日付
  ---------------------------------------- */

  .case-archive-content .p-postList__meta {
    margin-bottom: 2px;
    letter-spacing: 0.08em;
  }

  .case-archive-content .p-postList__times {
    font-size: 10px;
    line-height: 1.4;
  }

  /* ----------------------------------------
     タイトル
  ---------------------------------------- */

  .case-archive-content .p-postList h2.p-postList__title {
    margin-bottom: 4px;
    font-size: 13px !important;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.08em;
  }

  /* ----------------------------------------
     症例紹介文（ACF）
  ---------------------------------------- */

  .case-archive-content .case-description {
    font-size: 10px;
  }

}


/* ========================================
   CASE ARCHIVE ホバーエフェクト調整
======================================== */

@media (hover: hover) {

  /* ----------------------------------------
     青いオーバーレイを無効化
  ---------------------------------------- */

  .case-archive-content .p-postList__thumb::before,
  .case-archive-content .p-postList__thumb::after,
  .case-archive-content .c-postThumb__figure::after {
    background: transparent !important;
    opacity: 0 !important;
    pointer-events: none;
  }

  /* ----------------------------------------
     画像の色・透明度を維持
  ---------------------------------------- */

  .case-archive-content .p-postList__link:hover img {
    opacity: 1 !important;
    filter: none !important;
  }

}
