/* ===== パンクズ ===== */
.breadcrumbs {
  font-size: 16px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 8px 0 16px;
  max-width: 1160px;
  margin: 35px auto 0;
  width: 100%;
}

.breadcrumbs .sep {
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--brand, #12638E);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .current {
  color: #334155;
  font-weight: 600;
}

@media (max-width: 1160px) {
  .breadcrumbs {
    padding: 0 20px;
  }

  #primary .breadcrumbs {
    padding: 0;
  }
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5em;
    margin-top: 3em;
}

/* ===== カスタム投稿タイプ ===== */

.single-case {
  padding-top: 64px;
}

.case-hero {
  margin-top: 0;
  padding: 40px 0;
  background: #f7fbfe;
}

.case-hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.case-image img {
  width: 100%;
  height: auto;
}

.case-content h1 {
  font-size: 32px;
  color: var(--brand);
  margin-bottom: 16px;
}

.case-excerpt {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.case-body {
  padding: 60px 0;
}

.case-body .content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
}

/* ===== ページネーション ===== */
.case-navigation {
  padding: 40px 0;
  background: #f7fbfe;
  border-top: 1px solid var(--line);
}

.nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.nav-previous,
.nav-next {
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* .nav-previous a, .nav-next a {
    display: block;
    text-decoration: none;
} */

.nav-label {
  font-size: 14px;
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}

.nav-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
}

.back-to-archive {
  text-align: center;
}

@media (max-width: 768px) {
  .case-hero .container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .case-content h1 {
    font-size: 24px;
  }

  .nav-links {
    grid-template-columns: 1fr;
  }
}

/* 9/25追記部分　ここから
==== 追加　前後ナビをサムネイル付きに ==== */
.nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.nav-card .nav-label {
  margin-bottom: 4px;
}

.nav-thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 8px;
  overflow: hidden;
}

.nav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-meta {
  display: block;
  min-width: 0;
  /* 省略記号が効くように */
}

.nav-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-arrow {
  font-size: 20px;
  color: var(--muted);
}

/* 並び順（← 画像 テキスト） */
.nav-card--prev .nav-arrow {
  order: 1;
}

.nav-card--prev .nav-thumb {
  order: 2;
}

.nav-card--prev .nav-meta {
  order: 3;
}

/* 並び順（テキスト 画像 →） */
.nav-card--next .nav-meta {
  order: 1;
}

.nav-card--next .nav-thumb {
  order: 2;
}

.nav-card--next .nav-arrow {
  order: 3;
  margin-left: auto;
}

/* カード外枠は既存の .nav-previous / .nav-next を利用 */
.nav-previous,
.nav-next {
  padding: 0;
  /* 既存の余白があれば打ち消し */
  background: transparent;
  border: none;
}

/* SP時は1カラムで既存指定を活かす */
@media (max-width: 768px) {
  .nav-card {
    padding: 14px;
  }

  .nav-thumb {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }
}

/* === 前後ナビ：小さめ正方形サムネ版 === */
.nav-links {
  gap: 16px;
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}

.nav-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

.nav-thumb {
  width: 96px;
  /* ← functions.php と揃える */
  height: 96px;
  flex: 0 0 96px;
  border-radius: 10px;
  overflow: hidden;
}

.nav-thumb img {
  width: 100% !important;
  /* 既存の width: auto/100% を上書き */
  height: 100% !important;
  object-fit: cover;
  display: block;
}

.nav-meta {
  min-width: 0;
}

.nav-label {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--muted);
}

.nav-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-arrow {
  font-size: 18px;
  color: var(--muted);
}

/* 並び順 */
/* === 前後ナビ：左右対称レイアウト（grid） === */
.nav-card {
  display: grid;
  align-items: center;
  column-gap: 16px;
  /* 画像とテキストの間隔を統一 */
  padding: 16px 20px;
  /* 左右の内側余白を統一 */
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}

.nav-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

/* 前： [←][thumb][meta] */
.nav-card--prev {
  grid-template-columns: auto auto 1fr;
}

/* 次： [meta][thumb][→]  */
.nav-card--next {
  grid-template-columns: 1fr auto auto;
}

/* 既存の order 指定を無効化＆矢印位置を左右端に固定 */
.nav-card--prev .nav-arrow,
.nav-card--prev .nav-thumb,
.nav-card--prev .nav-meta,
.nav-card--next .nav-arrow,
.nav-card--next .nav-thumb,
.nav-card--next .nav-meta {
  order: initial;
}

.nav-card .nav-arrow {
  justify-self: start;
}

.nav-card--next .nav-arrow {
  justify-self: end;
  margin-left: 0;
}

/* auto 伸長の解除 */

/* サムネは正方形のまま。flex指定を無効化してgridに合わせる */
.nav-thumb {
  width: 96px;
  height: 96px;
  flex: initial;
  border-radius: 10px;
  overflow: hidden;
}

.nav-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

/* テキストは左右とも左揃え＆省略エリプシス有効 */
.nav-meta {
  min-width: 0;
  text-align: left;
}

/* 外枠カードの余白は左右同値（既存と同じ） */
.nav-previous,
.nav-next {
  padding: 0;
  background: transparent;
  border: none;
}


/* ===== カスタム投稿タイプ アーカイブ ===== */
.archive-hero {
  width: 100%;
  height: 300px;
  margin-top: 0;
  padding: 60px 0;
  background: var(--brand-dark);
  color: #fff;
  text-align: center;
  display: table;
}

.archive-hero.kv01 {
  background-image:url(../images/catalog.jpg);
  background-size: cover;
  background-position: center;
}

.archive-hero .container,
.entry-title {
  display: table-cell;
  vertical-align: middle;
}

.archive-hero h1 {
  font-size: 39px;
  color: #fff;
  margin: 0;
}

.archive-hero p {
  font-size: 18px;
  opacity: 0.9;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
  padding: 0;
}

.case-card-archive {
  background: #fff;
  border: 4px solid var(--brand);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card-archive:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.case-card-archive a {
  display: block;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: 20px;
}

.case-image {
  height: 200px;
  overflow: hidden;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.case-card-archive:hover .case-image img {
  transform: scale(1.05);
}

.case-card-archive h3, .case-card-archive p, .case-card-archive .cta-row {
  padding: 0 20px;
} 

.case-card-archive h3 {
  font-size: 20px;
  color: var(--brand);
  margin-bottom: 10px;
  line-height: 1.4;
}

.case-card-archive p {
  color: var(--muted);
  margin-bottom: 15px;
  line-height: 1.6;
}

.case-card-archive .cta-row {
  font-size: 14px;
  margin-top: auto;
}

.pagination-wrapper {
  text-align: center;
}

.pagination {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.pagination a,
.pagination span {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 5px;
  text-decoration: none;
  color: var(--brand);
}

.pagination a:hover {
  background: var(--brand);
  color: #fff;
}

.pagination .current {
  background: var(--brand);
  color: #fff;
}

.no-posts {
  text-align: center;
  padding: 60px 20px;
}

.no-posts p {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .archive-hero {
    height: 200px;
  }
  .archive-hero h1 {
    font-size: 28px;
  }

  .cases-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .archive-content {
    padding: 40px 0;
  }
}

/* ========== 会社情報 ========== */
.entry-content {
  margin-top: 130px;
}

@media (max-width: 960px) {
  .entry-content {
    margin-top: 100px;
  }
}

/*表組*/
/* ========== 会社情報テーブル ========== */
/* ラッパーを付けられるなら .company-table を figure に付与してください */
.wp-block-table.company-table table.has-fixed-layout,
.wp-block-table table.has-fixed-layout {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #cfd6dc;
  /* 外枠 */
  background: #fff;
  table-layout: fixed;
  /* 2列をきれいに */
}

/* 全セル共通 */
.wp-block-table.company-table td,
.wp-block-table td {
  padding: 20px 24px;
  border: 1px solid #cfd6dc;
  /* 罫線 */
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.8;
  vertical-align: middle;
}

/* 左列（見出し） */
.wp-block-table.company-table td:first-child,
.wp-block-table td:first-child {
  width: 32%;
  min-width: 180px;
  background: #eceff1;
  /* 左側のグレー帯 */
  color: var(--brand);
  /* 指定のブランド色 */
  font-weight: 700;
  text-align: center;
  /* 画像の通り中央寄せ */
  white-space: nowrap;
  /* 折返しを抑えて見出しを短く */
}

/* 右列（値） */
.wp-block-table.company-table td:nth-child(2),
.wp-block-table td:nth-child(2) {
  text-align: left;
}

/* ------- レスポンシブ（スマホ：1行を上下2段に） ------- */
@media (max-width: 720px) {

  .wp-block-table.company-table table.has-fixed-layout,
  .wp-block-table table.has-fixed-layout {
    border: 0;
    /* 外枠を消して行ごとに枠 */
  }

  .wp-block-table.company-table tbody tr,
  .wp-block-table tbody tr {
    display: block;
    border: 1px solid #cfd6dc;
    /* 行ごとにカード風 */
    margin-bottom: 12px;
  }

  .wp-block-table.company-table td,
  .wp-block-table td {
    display: block;
    border: 0;
    padding: 14px 16px;
  }

  .wp-block-table.company-table td:first-child,
  .wp-block-table td:first-child {
    width: auto;
    min-width: 0;
    background: #eceff1;
    /* ラベル行だけグレーを維持 */
    color: var(--brand);
    font-weight: 700;
    text-align: left;
    /* スマホでは左寄せの方が読みやすい */
    border-bottom: 1px solid #cfd6dc;
    /* ラベルと本文の仕切り線 */
  }
}

/* メインビジュアルスライダー */
.mv-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.mv-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.mv-slide.active {
  opacity: 1;
}

.mv-slide .mv-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== form ========== */
.form {
  max-width: 700px;
  margin: auto;
  width: 90%;
  background-color: #FFFFFF;
  border-radius: 20px;
  margin-bottom: 50px;
}
.form p {
  text-align: center;
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
}
.form dl {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  gap: 4rem;
}
.form dl dt {
  width: 30%;
  font-weight: bold;
}
.form dd {
  margin: 0;
}
.form dl dt p,
.form dd p {
  text-align: left;
}
.form dd p {
  display: block;
}
.form .required {
  color: #fff;
  font-size: 12px;
  background-color: var(--accent);
  padding: 3px 7px;
}
.form dd input,
.form dd textarea {
  width: 430px;
  border-radius: 5px;
  border: 3px solid #555555;
  padding: 10px 30px;
}
.form dd textarea {
  border-radius: 15px;
}
.form dd input[type="checkbox"] {
  width: auto;
}
form .text-center p {
  text-align: center;
}
[type="submit"] {
  font-size: 1.0em;
  color: var(--brand);
  font-weight: bold;
  background-color: #fff;
  padding: 14px 72px;
  border-radius: 100vw;
  border: 3px solid var(--brand);
}
[type="submit"]:hover {
  transition: all 0.3s ease 0s;
  cursor: pointer;
  opacity: 0.6;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border: 2px solid var(--brand);
  outline: 0;
}
.privacy_policy {
  height: 300px;
  overflow: scroll;
  background-color: #FFFFFF;
  border-radius: 15px;
}
.privacy_policy .privacy_policy_inner {
  font-size: 14px;
  padding: 60px;
}
.wpcf7-not-valid-tip {
  font-size: 14px !important;
  text-align: left;
  padding-left: 30px;
}
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output, .wpcf7 form.payment-required .wpcf7-response-output {
  color: var(--accent);
  font-weight: bold;
  text-align: center;
  margin-top: 70px;
  padding: 10px;
  border-color: var(--accent) !important;
}
.wpcf7 form.sent .wpcf7-response-output {
	border-color: var(--accent) !important;
}
span.wpcf7-spinner {
  display: none;
}
.wpcf7-list-item:first-child {
  margin-left: 0;
}
input[type="radio"] {
  width: fit-content !important
}
select.wpcf7-form-control.wpcf7-select {
  padding: 5px 14px 5px 5px;
}
@media screen and (max-width:960px) {
  .form dl {
    display: block;
    padding-bottom: 0;
  }
  .form dl dt {
    width: 100%;
    margin: 0 0 10px 0;
  }
  .form dd {
    width: 100%;
  }
  .form dd input, .form dd textarea {
    width: 100%;
    padding: 10px;
  }
  .form p {
    justify-content: left;
    gap: 1rem;
  }
  .wpcf7-not-valid-tip {
    font-size: 12px !important;
    padding-left: 0;
  }
  .wpcf7-list-item {
    display: block !important;
    margin: 0 !important;
  }
  #contact_form .section__contents__inner .text_center p {
    text-align: center;
  }
}