/* =========================================================
  cases ページ専用CSS（固定ページ＋[cases_list] 用）
  横長で薄いカード版
  Theme Accent: #9f8530
  Spacing: 4px grid
========================================================= */

:root {
  --case-accent: #9f8530;
  --case-accent-dark: #7f6a26;
  --case-accent-light: #b89a3a;

  --case-text: #1f2937;
  --case-muted: #6b7280;

  --case-bg: #ffffff;
  --case-panel: #f6f4ef;
  --case-panel-2: #fbfaf7;
  --case-border: rgba(0, 0, 0, 0.08);

  --radius: 12px;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 14px 28px rgba(0, 0, 0, 0.11);

  /* 4px grid */
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-20: 20px;
  --s-24: 24px;
  --s-28: 28px;
  --s-32: 32px;
  --s-40: 40px;
  --s-48: 48px;
  --s-56: 56px;
  --s-64: 64px;
  --s-80: 80px;
  --s-96: 96px;
}

/* 背景 */
body {
  background-color: var(--case-bg) !important;
}

/* casesページ内だけ想定 */
.container {
  width: 80%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 !important;
  position: relative;
  overflow: visible;
}

/* 見出し */
.h1title {
  margin: 0 0 var(--s-40);
}

.page-title {
  margin: 0 0 var(--s-32);
}

/* ========================
   h1タイトル装飾Line
   ======================== */
.h1-line {
  position: relative;
  padding-bottom: 20px;
  margin-bottom: 40px;
}

.h1-line::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9f8530 0%, #d1b24d 100%);
  position: absolute;
  left: 0;
  bottom: 0;
}

/* =========================================================
  ▼ 導入事例（ショートコード出力部）
========================================================= */

.cases-shortcode {
  max-width: 1100px;
  margin: 0 auto;
}

.cases-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-24);
  align-items: stretch;
}

/* 2列カード */
.case-card {
  width: calc((100% - var(--s-24)) / 2);
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--case-border);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* 白い薄いhoverオーバーレイ */
.case-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  pointer-events: none;
  transition: background 0.25s ease;
  z-index: 2;
}

.case-card:hover::after {
  background: rgba(255, 255, 255, 0.1);
}

.case-card__link {
  width: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
}

/* =========================================================
  ▼ 上帯
========================================================= */

.case-card__bar {
  position: relative;
  padding: var(--s-12) var(--s-16);
  background: linear-gradient(90deg, var(--case-accent-dark), var(--case-accent));
  color: #fff;
  transition: background 0.25s ease;
}

.case-card:hover .case-card__bar {
  background: linear-gradient(90deg, var(--case-accent), var(--case-accent-light));
}

.case-card__bar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--case-accent-light), #f2d37a);
}

.case-card__bar-title {
  margin: 0;
  padding-left: var(--s-8);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 700;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================================
  ▼ 中段：左メタ / 右画像
========================================================= */

.case-card__middle {
  display: flex;
  align-items: stretch;
  min-height: 148px;
  height: 148px;
}

.case-card__meta {
  width: 48%;
  padding: var(--s-16);
  background: var(--case-panel);
  border-right: 1px solid var(--case-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-12);
  min-height: 0;
  overflow: hidden;
}

.case-card__industry {
  margin: 0;
  color: var(--case-accent-dark);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-card__tags {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  max-height: 64px;
  overflow: hidden;
}

.case-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(159, 133, 48, 0.24);
  color: var(--case-accent-dark);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
  white-space: nowrap;
}

.case-card__image-wrap {
  width: 52%;
  background: #fff;
  display: flex;
  height: 100%;
}

.case-card__image {
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
  background: #f7f7f7;
}

.case-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.case-card:hover .case-card__image img {
  transform: scale(1.03);
}

.case-card__image--empty {
  width: 100%;
  height: 148px;
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: var(--case-muted);
  font-size: 13px;
}

.case-card__image--empty p {
  margin: 0;
}

/* =========================================================
  ▼ 下段：概要 + 導線
========================================================= */

.case-card__bottom {
  padding: var(--s-16);
  background: var(--case-panel-2);
  border-top: 1px solid var(--case-border);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-16);
}

.case-card__overview-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.case-card__overview-title {
  display: inline-block;
  width: fit-content;
  margin: 0 0 var(--s-8);
  padding-bottom: 4px;
  border-bottom: 2px solid var(--case-accent);
  color: var(--case-accent-dark);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
}

.case-card__overview {
  margin: 0;
  color: var(--case-text);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-card__more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--case-accent-dark);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  padding-bottom: 2px;
}

.case-card__more-arrow {
  font-size: 15px;
  transition: none;
}

.case-card:hover .case-card__more-arrow {
  transform: none;
}

/* 空表示 */
.cases-empty {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--case-text);
}

/* =========================================================
  ▼ ページネーション
========================================================= */

.cases-shortcode .cases-pagination {
  margin-top: var(--s-32);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s-8);
}

.cases-shortcode .cases-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--s-12);
  border: 1px solid rgba(159, 133, 48, 0.35);
  border-radius: 10px;
  text-decoration: none;
  color: var(--case-accent-dark);
  background: #fff;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cases-shortcode .cases-pagination .page-numbers.current {
  background: var(--case-accent);
  color: #fff;
  border-color: var(--case-accent);
}

.cases-shortcode .cases-pagination .page-numbers:hover {
  background: rgba(159, 133, 48, 0.08);
}

/* =========================================================
  ▼ 相談・お問い合わせ（既存）
========================================================= */

.content-block {
  position: relative;
  display: block;
  padding-right: var(--s-96);
  text-decoration: none;
  color: inherit;
}

.company-details-text {
  display: flex;
  flex-direction: column;
}

.consultationmargin {
  font-weight: 700;
  font-size: 36px;
  margin: var(--s-96) 0 var(--s-8) 0;
  color: var(--case-text);
}

.company-details-p {
  margin: 0 0 var(--s-20);
  color: var(--case-text);
  font-size: 15px;
  line-height: 1.8;
}

.arrow::after {
  content: "\2192";
  position: absolute;
  right: 0;
  top: 72%;
  transform: translateY(-50%);
  font-size: 80px;
  color: var(--case-text);
  z-index: 10;
  font-weight: 400;
}

.thick-hrconsultationmargin {
  background-color: var(--case-text);
  margin: 0 0 var(--s-80) 0;
}

/* =========================================================
  ▼ レスポンシブ
========================================================= */

@media (max-width: 1100px) {
  .container {
    width: 92%;
  }

  .case-card {
    width: calc((100% - var(--s-20)) / 2);
  }

  .cases-list {
    gap: var(--s-20);
  }

  .case-card__bar-title {
    font-size: 17px;
  }

  .case-card__industry {
    font-size: 17px;
  }

  .case-card__middle {
    min-height: 140px;
    height: 140px;
  }

  .case-card__image--empty {
    height: 140px;
    min-height: 140px;
  }
}

@media (max-width: 900px) {
  .case-card {
    width: 100%;
  }

  .cases-list {
    gap: var(--s-20);
  }

  .case-card__meta {
    width: 42%;
  }

  .case-card__image-wrap {
    width: 58%;
  }

  .case-card__middle {
    min-height: 160px;
    height: 160px;
  }

  .case-card__image--empty {
    height: 160px;
    min-height: 160px;
  }
}

@media (max-width: 768px) {
  #main-content,
  .container {
    width: 95%;
    padding: 0 var(--s-12);
  }

  .h1title {
    margin: var(--s-48) 0 var(--s-32);
  }

  .cases-list {
    gap: var(--s-16);
  }

  .case-card__bar {
    padding: var(--s-12);
  }

  .case-card__bar-title {
    font-size: 16px;
    padding-left: 6px;
  }

  .case-card__middle {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .case-card__meta,
  .case-card__image-wrap {
    width: 100%;
    height: auto;
  }

  .case-card__meta {
    padding: var(--s-12);
    border-right: none;
    border-bottom: 1px solid var(--case-border);
    gap: var(--s-12);
    overflow: visible;
  }

  .case-card__industry {
    font-size: 16px;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
  }

  .case-card__tags {
    gap: 6px;
    max-height: none;
    overflow: visible;
  }

  .case-card__tag {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 10px;
    white-space: normal;
    word-break: break-word;
  }

  .case-card__image {
    height: 180px;
    min-height: 180px;
  }

  .case-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .case-card__image--empty {
    height: 180px;
    min-height: 180px;
  }

  .case-card__bottom {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-12);
    padding: var(--s-12);
  }

  .case-card__overview-title {
    font-size: 14px;
  }

  .case-card__overview {
    font-size: 12px;
    line-height: 1.7;
    -webkit-line-clamp: 4;
  }

  .case-card__more {
    width: 100%;
    justify-content: flex-end;
    text-align: right;
    font-size: 12px;
  }

  .content-block {
    padding-right: 0;
  }

  .consultationmargin {
    font-size: 28px;
    margin: var(--s-32) 0 var(--s-12) 0;
  }

  .company-details-p {
    max-width: 88%;
    margin-bottom: var(--s-16);
  }

  .arrow::after {
    font-size: 48px;
    top: 56%;
  }

  .thick-hrconsultationmargin {
    margin: 0 0 var(--s-64) 0;
  }
}

@media (max-width: 480px) {
  .case-card__bar-title {
    font-size: 15px;
  }

  .case-card__industry {
    font-size: 15px;
  }

  .case-card__image {
    height: 170px;
    min-height: 170px;
  }

  .case-card__image--empty {
    height: 170px;
    min-height: 170px;
  }

  .cases-shortcode .cases-pagination .page-numbers {
    min-width: 36px;
    height: 36px;
    font-size: 12px;
  }
}
