/* ==========================================================================
   NEWS 詳細(投稿)
   記事レイアウトは wandy.co.jp の記事ページを参考に、配色・書体は common.css のトークンに準拠
   テンプレート: single.php
   ========================================================================== */

:root {
  --news-col: 720px; /* 本文カラム幅 */
}

/* 詳細は白地(ヘッダーのダーク面 → 白 → フッターのドット地) */
body.single-post {
  background-color: #fff;
  background-image: var(--bg-dots);
  background-size: var(--bg-dots-size);
  background-attachment: fixed;
}

.news-single {
  padding: 96px 0 150px;
  /* 記事の下端に緑のグラデーション線(TOP の見出し下線と同じ配色)。
     border-color にグラデーションは指定できないため border-image を使う。
     上下左右のうち border-bottom-width だけを持たせて、下辺のみ描画させている */
  border-bottom: 2px solid var(--green-deep);
  border-image: linear-gradient(90deg, #1e7d2c 0%, #53db4e 55%, #0c1d10 100%) 1;
}

.news-single__inner,
.news-single__head {
  max-width: calc(1200px + 2 * var(--gut-r));
  margin-inline: auto;
  padding-inline: var(--gut-r);
}

/* 左サイド | 本文カラム | 右サイド の 3 カラム(本文は中央揃え) */
.news-single__head {
  display: grid;
  grid-template-columns: 1fr minmax(0, var(--news-col)) 1fr;
  gap: 24px 40px;
  align-items: start;
}

/* 「NEWS」ラベル(一覧へのリンク) */
.news-single__label {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--text);
  border-radius: 2px;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.news-single__label:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: #fff;
}

.news-single__title {
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--text);
}

.news-single__meta {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.news-single__date {
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

/* カテゴリラベル: TOP の NEWS 帯と同じ深緑アウトライン */
.news-single__cat {
  display: inline-block;
  min-width: 108px;
  padding: 6px 10px;
  border: 1px solid var(--green-deep);
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1;
  text-align: center;
  color: var(--green-deep);
  transition: background 0.2s, color 0.2s;
}

.news-single__cat:hover {
  background: var(--green-deep);
  color: #fff;
}

/* 全幅の罫線 */
.news-single__rule {
  border: 0;
  height: 1px;
  background: var(--hair-light);
  margin: 40px 0 0;
}

/* ---------- 詳細: 本文(クラシックエディタの出力) ---------- */
.news-single__body {
  max-width: var(--news-col);
  margin: 64px auto 0;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.03em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.news-single__body > * + * {
  margin-top: 1.8em;
}

.news-single__body h2,
.news-single__body h3,
.news-single__body h4 {
  font-feature-settings: "palt";
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--text);
}

.news-single__body > * + h2,
.news-single__body > * + h3,
.news-single__body > * + h4 {
  margin-top: 2.6em;
}

/* h2: 下罫線 + 左端に短い緑グラデーションバー(TOP 事業カードの下線と同じ) */
.news-single__body h2 {
  position: relative;
  font-size: 22px;
  font-weight: 700;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair-light);
}

.news-single__body h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, #1e7d2c 0%, #53db4e 55%, #0c1d10 100%);
}

/* h3: 深緑の左ボーダー */
.news-single__body h3 {
  font-size: 19px;
  font-weight: 700;
  padding-left: 14px;
  border-left: 3px solid var(--green-deep);
}

.news-single__body h4 {
  font-size: 17px;
  font-weight: 700;
}

.news-single__body a {
  color: var(--green-deep);
  text-decoration: underline;
  text-decoration-color: rgba(28, 107, 22, 0.4);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s;
}

.news-single__body a:hover {
  text-decoration-color: currentColor;
}

.news-single__body strong,
.news-single__body b {
  font-weight: 700;
}

.news-single__body ul,
.news-single__body ol {
  padding-left: 1.6em;
}

.news-single__body li + li {
  margin-top: 0.5em;
}

.news-single__body ul li::marker {
  color: var(--green-deep);
}

.news-single__body ol li::marker {
  font-family: var(--font-en);
  color: var(--green-deep);
}

.news-single__body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

.news-single__body figure,
.news-single__body .wp-caption {
  max-width: 100%;
}

.news-single__body figcaption,
.news-single__body .wp-caption-text {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
  text-align: center;
}

.news-single__body .aligncenter {
  margin-inline: auto;
}

.news-single__body .alignleft {
  margin-right: auto;
}

.news-single__body .alignright {
  margin-left: auto;
}

.news-single__body blockquote {
  padding: 24px 28px;
  border-left: 3px solid var(--green-deep);
  background: var(--paper);
  color: var(--text);
}

.news-single__body blockquote > * + * {
  margin-top: 1em;
}

.news-single__body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.8;
}

.news-single__body th,
.news-single__body td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--hair-light);
  text-align: left;
  vertical-align: top;
}

.news-single__body th {
  background: var(--paper-2);
  font-weight: 500;
  white-space: nowrap;
}

.news-single__body hr {
  border: 0;
  height: 1px;
  background: var(--hair-light);
  margin-block: 3em;
}

.news-single__body iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

/* ---------- 詳細: フッター(前後記事 / 一覧へ) ---------- */
.news-single__foot {
  max-width: var(--news-col);
  margin: 80px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.news-single__pager {
  display: flex;
  gap: 10px;
}

/* 丸アイコン(TOP の view more ○→ と同じ) */
.news-single__pager-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--green-deep);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 15px;
  color: var(--green-deep);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.news-single__pager-btn:hover {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: #fff;
}

.news-single__pager-btn.is-disabled {
  border-color: var(--hair-light);
  color: var(--hair-light);
  pointer-events: none;
}

/* 一覧へ戻る(TOP の緑アウトラインボタンと同じ) */
.news-single__back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 30px;
  border: 1px solid var(--green-deep);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--green-deep);
  transition: background 0.25s, color 0.25s;
}

.news-single__back:hover {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: #fff;
}

.news-single__back .arw {
  font-family: var(--font-en);
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
  /* 下はフッターの Contact の上余白と重なるので控えめに(2026-09-28: 96 → 64px。記事下の緑の線までの余白) */
  .news-single {
    padding: 56px 0 64px;
  }

  .news-single__inner,
  .news-single__head {
    padding-inline: 24px;
  }

  .news-single__head {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .news-single__title {
    font-size: 24px;
  }

  .news-single__meta {
    margin-top: 22px;
  }

  .news-single__rule {
    margin-top: 28px;
  }

  .news-single__body {
    margin-top: 40px;
  }

  .news-single__body h2 {
    font-size: 20px;
  }

  .news-single__body h3 {
    font-size: 18px;
  }

  .news-single__foot {
    margin-top: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-single__label,
  .news-single__cat,
  .news-single__pager-btn,
  .news-single__back {
    transition: none;
  }
}
