/* 90-pages.css
   --------------------------------
   - HOME専用（NEWSセクション / WORKSセクション）
   - NEWS アーカイブ
   - WORKS アーカイブ
   - パンくず非表示
-------------------------------- */

/* =========================
   HOME：NEWS セクション
   （グループに .news_section を付与）
========================= */

.news_section .wp-block-query-pagination-numbers a,
.news_section .wp-block-query-pagination-numbers span {
  display: inline-block;
  padding: .2rem .55rem;
  margin: 0 .15rem;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 999px;
  font-size: .9rem;
  text-decoration: none;
}
.news_section .wp-block-query-pagination-numbers .current {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* HOME：最新投稿（ブロック）をカード格子で並べる場合 */
.wp-block-latest-posts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 1.5em;
}
/* HOME：日付と抜粋を少し右に寄せる（使用していれば） */
.wp-block-post-date,
.wp-block-post-excerpt {
  margin-left: 3em;
}

/* =========================
   HOME：制作実績（.works_section）
========================= */

.works_section {
  margin: 3.5rem auto;
  max-width: 1200px;
  width: 100%;
}
.works_section h2,
.works_section .wp-block-heading {
  text-align: center;
  font-weight: 600;
  letter-spacing: .06em;
  margin-bottom: 1.2rem;
  position: relative;
}
.works_section h2::after,
.works_section .wp-block-heading::after {
  content: "";
  display: block;
  width: 160px;
  height: 1px;
  margin: .75rem auto 0;
  background: currentColor;
  opacity: .35;
}

/* ULをグリッド化（3カラム固定） */
.works_section .wp-block-post-template {
  --wp--style--block-gap: 0;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3,1fr);
}

/* カード本体（高さ揃え＋装飾） */
.works_section .wp-block-post {
  margin: 0 !important;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: transform .22s ease, box-shadow .22s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}
.works_section .wp-block-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.10);
}

/* アイキャッチ */
.works_section .wp-block-post-featured-image {
  margin: 0 0 .8rem;
  width: 100%;
  max-width: 100%;
}
.works_section .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
}

/* タイトル */
.works_section .wp-block-post-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: .25rem 0 .35rem;
  line-height: 1.45;
}
.works_section .wp-block-post:hover .wp-block-post-title a {
  text-decoration: underline;
}
.works_section .wp-block-post-title,
.works_section .wp-block-post-title a {
  border: 0;
  text-decoration: none;
}
.works_section .wp-block-post-title::before,
.works_section .wp-block-post-title::after {
  content: none !important;
}

/* 抜粋（高さ稼ぎ役） */
.works_section .wp-block-post-excerpt {
  margin: 0;
  font-size: .95rem;
  color: #333;
  line-height: 1.7;
  flex-grow: 1;
}

/* 区切り線（使う場合） */
.works_section .wp-block-post hr.wp-block-separator {
  margin: .6rem 0 .4rem;
  opacity: .28;
}
.works_section .wp-block-post > .wp-block-separator:first-child {
  display: none;
}

/* 日付：カード下端に集約 */
.works_section .wp-block-post-date {
  font-size: .85rem;
  color: #777;
  text-align: right;
  margin-top: auto;
}

/* 先頭/末尾の余白を均一化 */
.works_section .wp-block-post > *:first-child { margin-top: 0; }
.works_section .wp-block-post > *:last-child  { margin-bottom: 0; }

/* レスポンシブ */
@media (max-width: 900px) {
  .works_section .wp-block-post-template {
    grid-template-columns: repeat(2,1fr);
  }
}
@media (max-width: 600px) {
  .works_section .wp-block-post-template {
    grid-template-columns: 1fr;
  }
}

/* =========================
   NEWS アーカイブ
========================= */

body.category-news .page-header .container {
  max-width: var(--wp--style--global--content-size,1080px);
  margin: 0 auto;
  padding: 0 16px;
}
body.category-news .page-header h1.page-title {
  font-size: 1.8rem;
  letter-spacing: .05em;
}

/* NEWS：本文側（一覧） */
.category-news .news-archive {
  max-width: 1080px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}
.category-news .news-item {
  border-top: 1px solid rgba(0,0,0,.08);
  padding: 14px 0;
}
.category-news .news-item:first-child {
  border-top: none;
}
.category-news .news-date {
  display: block;
  font-size: .85rem;
  color: #777;
  margin-bottom: .35rem;
}
.category-news .news-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 .4rem;
}
.category-news .news-title a {
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,.25);
  padding-bottom: 1px;
}
.category-news .news-excerpt {
  color: #444;
  font-size: .95rem;
  line-height: 1.7;
}

/* NEWS リスト（テーマ側のループ用） */
.category-news .content-area .news-list-item {
  border-top: 1px solid rgba(0,0,0,.12);
  padding: 18px 0;
}
.category-news .content-area .news-list-item:first-child {
  border-top: none;
}

/* NEWS ページネーション */
.category-news .pagination {
  margin: 2rem 0;
}

/* NEWS サイドバーのセレクト */
.category-news .sidebar select {
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  text-align: left;
  text-align-last: left;
}

/* NEWS / WORKS タイトルの字間 */
body.category-news .page-title,
body.tax-work-category .page-title {
  letter-spacing: .08em;
  font-weight: 600;
}

/* =========================
   WORKS アーカイブ（taxonomy: work-category）
========================= */

/* WORKS 黒帯（テンプレの page-header を装飾）
   ※ 幅・余白自体は 20-layout.css 側で指定済み */
body.tax-work-category .page-header .page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
body.tax-work-category .page-header .page-title {
  text-align: center;
  letter-spacing: .06em;
}

/* WORKS 一覧の線（最初は上線なし／最後は下線あり） */
body.tax-work-category .content-area .works-list-item {
  border-top: 1px solid rgba(0,0,0,.12);
  padding: 18px 0;
}
body.tax-work-category .content-area .works-list-item:first-child {
  border-top: none;
}
body.tax-work-category .content-area .works-list-item:last-child {
  border-bottom: 1px solid rgba(0,0,0,.12);
}

/* with-sidebar 版（WORKS 一覧の線） */
.with-sidebar .content-area .works-list-item {
  border-top: 1px solid rgba(0,0,0,.12);
  padding: 18px 0;
}
.with-sidebar .content-area .works-list-item:first-child {
  border-top: none;
}
.with-sidebar .content-area .works-list-item:last-child {
  border-bottom: 1px solid rgba(0,0,0,.12);
}

/* NEWS / WORKS 一覧の罫線統一（両方とも最後に下線あり） */
.content-area .news-list-item,
.content-area .works-list-item {
  border-top: 1px solid rgba(0,0,0,.12);
  padding: 18px 0;
}
.content-area .news-list-item:first-child,
.content-area .works-list-item:first-child {
  border-top: none;
}
.content-area .news-list-item:last-child,
.content-area .works-list-item:last-child {
  border-bottom: 1px solid rgba(0,0,0,.12);
}

/* NEWS / WORKS ページネーションは左寄せ＋余白 */
body.category-news .pagination,
body.tax-work-category .pagination {
  text-align: left !important;
  margin: 2rem 0;
}

/* WORKS / NEWS 共通：サイドバーのセレクト左寄せ */
.with-sidebar .sidebar select {
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  text-align: left;
  text-align-last: left;
}

/* =========================
   パンくず非表示（WORKS関連）
========================= */

body.single-case .breadcrumb,
body.tax-work-category .breadcrumb,
body.post-type-archive-case .breadcrumb {
  display: none !important;
}

/* reCAPTCHA バッジ位置調整：To Top ボタンと重ならないように少し上へ */
.grecaptcha-badge {
  bottom: 120px !important;  /* ここで「下から100px」に調整 */
  right: 24px !important;    /* 必要なら横位置も調整（任意） */
  z-index: 9999 !important;  /* 念のため手前に表示 */
}

/* WORKS：ページネーションの上下余白（NEWS と同じに） */
body.tax-case_cat .pagination,
body.taxonomy-work-category .pagination {
  margin: 2rem 0 !important;
  text-align: left !important; /* NEWS と揃えたい場合 */
}

/* お問い合わせページだけ 2カラムレイアウトを安定させる（PC） */
body.page-contact .container.column {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px; /* 本文 + サイドバー */
  gap: 32px;
}

/* 念のため、テーマ側のfloatやwidth指定を打ち消しておく */
body.page-contact .container.column .entry,
body.page-contact .container.column .sidebar,
body.page-contact .container.column .sidebar-area,
body.page-contact .container.column .widget-area {
  float: none;
  width: auto;
}

/* スマホは1カラムに戻す */
@media (max-width: 900px) {
  body.page-contact .container.column {
    display: block;
  }
}
