/* ==================================================
 * 施工事例（投稿タイプ works）本文
 * アーカイブ、個別
 * SWELLの style.css または子テーマのCSSへ追加
 * ================================================== */

.single-works .post_content {
  --works-yellow: #f5d521;
  --works-pink: #fdb9cb;
  --works-blue: #076cfd;
  --works-green: #11c67a;
  --works-orange: #f87d1f;
  --works-black: #222;
  --works-white: #fff;
  --works-gray: #f1efe8;
  --works-border: #deded8;
  color: var(--works-black);
  font-size: 16px;
  line-height: 1.9;
}



.single-works .post_content > * + * {
  margin-top: 0;
}

.single-works .post_content p {
  margin-bottom: 0;
}

/* 大見出し */
.single-works .post_content h2 {
  position: relative;
  margin: 01em 0 1.2em;
  padding: 0.85em 1em 0.85em 1.25em;
  border: 0;
  border-radius: 0 10px 10px 0;
  background: var(--works-white);
  color: var(--works-black);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.single-works .post_content h2::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  border-radius: 8px;
  background: var(--works-yellow);
  content: "";
}

/* 小見出し */
.single-works .post_content h3 {
  margin: 2.5em 0 1em;
  padding: 0 0 0.55em;
  border: 0;
  border-bottom: 3px solid var(--works-yellow);
  background: transparent;
  color: var(--works-black);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 800;
  line-height: 1.5;
}

/* 画像 */
.single-works .post_content figure,
.single-works .post_content > p > img {
  margin-top: 1.8em;
  margin-bottom: 1.8em;
}

.single-works .post_content img {
  height: auto;
  border-radius: 12px;
}

.single-works .post_content figcaption {
  margin-top: 0.6em;
  color: #666;
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: center;
}

/* リスト */
.single-works .post_content ul,
.single-works .post_content ol {
  margin: 1em;
  padding: 1.25em 1.25em 1.25em 2.8em;
  border-radius: 10px;
  background: var(--works-gray);
}

.single-works .post_content li + li {
  margin-top: 0.5em;
}

.single-works .post_content li::marker {
  color: var(--works-orange);
  font-weight: 900;
}

/* 車両情報などの表 */
.single-works .post_content .wp-block-table,
.single-works .post_content table {
    width: 90%;
    margin: 0 auto 1.2em;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.single-works .post_content th,
.single-works .post_content td {
  padding: 0.9em 1em;
  border: 1px solid var(--works-border);
  text-align: left;
  vertical-align: top;
}

.single-works .post_content th,
.single-works .post_content tr td:first-child {
  width: 30%;
  background: #fff8cf;
  font-weight: 800;
}

/* コメント・注目文 */
.single-works .post_content blockquote {
  position: relative;
  margin: 2em 0;
  padding: 1.4em 1.5em 1.4em 3.6em;
  border: 0;
  border-radius: 10px;
  background: #fff4f7;
  color: var(--works-black);
}

.single-works .post_content blockquote::before {
  position: absolute;
  top: 0.75em;
  left: 0.65em;
  color: var(--works-pink);
  content: "“";
  font-family: Georgia, serif;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.single-works .post_content blockquote p:last-child {
  margin-bottom: 0;
}



.single-works .post_content a:not(.wp-element-button):hover {
  color: #003581;
  text-decoration: none;
}
/* 施工事例詳細ページのアイキャッチ */
.single-works .p-articleThumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
}

.single-works .p-articleThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 施工事例の個別ページ：タイトル下の小さい日付を非表示 */
.single-works .p-articleMetas {
  display: none;
}

@media (max-width: 599px) {
  .single-works .post_content {
    font-size: 15px;
    line-height: 1.85;
  }

  .single-works .post_content h2 {
    margin-top: 2.8em;
    padding: 0.75em 0.8em 0.75em 1em;
  }

  .single-works .post_content ul,
  .single-works .post_content ol {
    padding: 1em 1em 1em 2.4em;
  }

  .single-works .post_content .wp-block-table {
    overflow-x: auto;
  }

  .single-works .post_content th,
  .single-works .post_content td {
    min-width: 9em;
    padding: 0.75em;
  }

  .single-works .post_content blockquote {
    padding: 1.25em 1em 1.25em 2.8em;
  }
}

/* ========================================
   施工事例：前後リンク・一覧ボタン
======================================== */

.single-works .p-pnLinks {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 16px;
  margin-top: 60px;
  border-top: 0;
}

/* 共通 */
.single-works .p-pnLinks__item {
  width: auto;
}

.single-works .p-pnLinks__link {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 16px 20px;
  color: #111;
  background: #fff;
  border: 2px solid #111;
  border-radius: 12px;
  transition:
    background-color 0.2s,
    transform 0.2s;
}

.single-works .p-pnLinks__link:hover {
  background-color: #f5d521;
  transform: translateY(-2px);
}

.single-works .p-pnLinks__title {
  font-weight: 700;
}

/* 前の記事 */
.single-works .p-pnLinks__item.-prev .p-pnLinks__link {
  justify-content: flex-start;
  text-align: left;
}

/* 次の記事 */
.single-works .p-pnLinks__item.-next .p-pnLinks__link {
  justify-content: flex-end;
  text-align: right;
}

/* 中央の施工事例一覧 */
.single-works .p-pnLinks__item.-archive .p-pnLinks__link {
  justify-content: center;
  min-width: 180px;
  color: #fff;
  font-weight: 700;
  background-color: #111;
}

.single-works .p-pnLinks__item.-archive .p-pnLinks__link:hover {
  color: #111;
  background-color: #f5d521;
}
/* 前後リンクの矢印：SWELL標準アニメーションを解除 */
.single-works .p-pnLinks__item.-prev .p-pnLinks__link::before,
.single-works .p-pnLinks__item.-next .p-pnLinks__link::after {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;

  color: currentColor !important;
  font-family: inherit !important;

  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* 前の記事 */
.single-works .p-pnLinks__item.-prev .p-pnLinks__link::before {
  content: "←" !important;
  margin-right: 12px;
}

/* 次の記事 */
.single-works .p-pnLinks__item.-next .p-pnLinks__link::after {
  content: "→" !important;
  margin-left: 12px;
}

/* ホバー時も矢印単体は動かさない */
.single-works .p-pnLinks__item.-prev .p-pnLinks__link:hover::before,
.single-works .p-pnLinks__item.-next .p-pnLinks__link:hover::after {
  position: static !important;
  color: #111 !important;
  opacity: 1 !important;
  transform: none !important;
}

/* SWELL標準のカード外側にある白い矢印を削除 */
.single-works .p-pnLinks.-style-normal
.p-pnLinks__item.-prev::before,
.single-works .p-pnLinks.-style-normal
.p-pnLinks__item.-prev::after,
.single-works .p-pnLinks.-style-normal
.p-pnLinks__item.-next::before,
.single-works .p-pnLinks.-style-normal
.p-pnLinks__item.-next::after {
  content: none !important;
  display: none !important;
}

/* SWELL標準の外側へ広がる指定もリセット */
.single-works .p-pnLinks__item {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

.single-works .p-pnLinks__link {
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  box-sizing: border-box;
}

/* 左右の枠線を確実に表示 */
.single-works .p-pnLinks__item.-prev .p-pnLinks__link,
.single-works .p-pnLinks__item.-next .p-pnLinks__link {
  border: 2px solid #111 !important;
  border-radius: 12px !important;
}

/* スマホ */
@media (max-width: 599px) {
  .single-works .p-pnLinks {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .single-works .p-pnLinks__item.-archive {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .single-works .p-pnLinks__link {
    min-height: 68px;
    padding: 12px;
    font-size: 13px;
  }

  .single-works .p-pnLinks__item.-archive .p-pnLinks__link {
    min-width: 0;
  }
}

.l-footer a,
.l-footer span {
  color: #fff;
}

/* =====================================
   一覧ページ｜ページネーション
===================================== */
:is(
  .post-type-archive-works,
  .category-news,
  .post-type-archive-custom_movie
) .c-pagination {
  margin-block: 60px;
}

/* 数字・前後ボタン共通 */
:is(
  .post-type-archive-works,
  .category-news,
  .post-type-archive-custom_movie
) .c-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  margin: 0 4px;
  padding: 0 12px;

  color: #222 !important;
  background-color: #fff;
  border: 2px solid #222;
  border-radius: 4px;

  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

/* 現在のページ */
:is(
  .post-type-archive-works,
  .category-news,
  .post-type-archive-custom_movie
) .c-pagination .page-numbers.current {
  color: #fff !important;
  background-color: #222;
  border-color: #222;
}

/* マウスを乗せたとき */
:is(
  .post-type-archive-works,
  .category-news,
  .post-type-archive-custom_movie
) .c-pagination a.page-numbers:hover {
  color: #fff !important;
  background-color: #222;
  border-color: #222;
}

/* 「…」部分 */
:is(
  .post-type-archive-works,
  .category-news,
  .post-type-archive-custom_movie
) .c-pagination .page-numbers.dots {
  color: #222 !important;
  background-color: transparent;
  border-color: transparent;
}

/* スマートフォン */
@media (max-width: 600px) {
  :is(
    .post-type-archive-works,
    .category-news,
    .post-type-archive-custom_movie
  ) .c-pagination {
    margin-top: 40px;
  }

  :is(
    .post-type-archive-works,
    .category-news,
    .post-type-archive-custom_movie
  ) .c-pagination .page-numbers {
    min-width: 38px;
    height: 38px;
    margin: 0 2px;
    padding: 0 8px;
    font-size: 14px;
  }
}

/* 施工事例の個別ページ限定 */
.single-works .l-content {
  padding-top: 0;
  margin-bottom: 100px;
}

/* =====================================
   施工事例：準備中表示
===================================== */
.jl-works-empty {
  width: min(100% - 40px, 720px);
  margin: 60px auto 80px;
  padding: 48px 24px;

  text-align: center;
  background-color: #ffffff;

  border: 2px solid #111111;
  border-radius: 18px;
  box-shadow: 5px 5px 0 #111111;
}

/* COMING SOON */
.jl-works-empty__label {
  display: inline-block;
  margin: 0 0 18px;
  padding: 7px 18px;

  color: #111111;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;

  background-color: #F4D35E;
  border: 2px solid #111111;
  border-radius: 999px;
}

/* メッセージ */
.jl-works-empty__text {
  margin: 0;

  color: #111111;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.7;
}

/* スマホ */
@media (max-width: 767px) {
  .jl-works-empty {
    width: calc(100% - 32px);
    margin: 40px auto 60px;
    padding: 36px 18px;
    border-radius: 14px;
    box-shadow: 4px 4px 0 #111111;
  }
}