/* ===============================
   Civil Materials Page (メガ版)
   専用スタイル
   =============================== */

.civil .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 見出し */
.civil-sec-h2 {
  font-size: clamp(1.25rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 800;
  letter-spacing: .02em;
  margin: 28px 0 18px;
  position: relative;
  padding-left: 14px;
}
.civil-sec-h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .25em;
  width: 6px;
  height: 1.1em;
  background: #0b5da8;
  border-radius: 2px;
}

/* ======================================
   Hero（背景 + 黒オーバーレイ）
   ====================================== */
.civil-hero{
  position: relative;
  background: var(--civil-hero-bg) no-repeat center/cover;
  color:#fff;
}
.civil-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,var(--overlay-opacity,.28));
  pointer-events:none;
  z-index:0;
}
.civil-hero__inner{
  position: relative;
  z-index:1;
  text-align:center;
  padding: 48px 16px 54px;
}
.civil-hero__title{
  font-size: clamp(1.6rem, 1.4rem + 1.6vw, 2.4rem);
  font-weight: 900;
  letter-spacing:.02em;
  margin:0;
}

/* ヒーロー下の説明テキスト */
.civil-hero-lead { background: #fff; }
.civil-hero-lead .container { padding: 16px 16px 24px; }
.civil-hero-lead p {
  margin: 0;
  text-align: center;
  color: #2f3a4a;
  line-height: 1.9;
  font-size: clamp(0.98rem, 0.95rem + 0.2vw, 1.1rem);
}

/* ===============================
   記事一覧（3×3）
   =============================== */
.civil-archive {
  --archive-padding-top: 12px;
  background: #f8fafc;
  padding: var(--archive-padding-top) 0 30px;
}
.civil-archive .civil-sec-h2 { margin-top: 10px; }

.civil-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  transition: transform .25s ease, opacity .25s ease, height .25s ease; /* 短めのモーション */
  will-change: transform, opacity, height;
}
@media (min-width: 680px) { .civil-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .civil-grid { grid-template-columns: repeat(3, 1fr); } }

.civil-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;               /* 高さの見た目を揃えやすく */
  flex-direction: column;
}
.civil-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }

.civil-card__link { display: block; color: inherit; text-decoration: none; }

.civil-card__thumb { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.civil-card__thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }

.civil-card__body {
  padding: 12px 14px 16px;
  text-align: left;
  display: flex;               /* タイトル/抜粋/続きを読む を縦に整列 */
  flex-direction: column;
  flex: 1;                     /* 本文エリアで高さを稼ぐ */
}

.civil-card__title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.5;
  margin: 0 0 6px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.civil-card__excerpt {
  color:#555;
  font-size:.92rem;
  line-height:1.7;
  margin:0 0 8px;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
  /* 高さの余白は「続きを読む」で吸収する */
}
.civil-card__more{
  display:inline-block;
  font-weight:700;
  font-size:.9rem;
  color:#0b5da8;
  margin-top: auto;            /* 常にカード下寄せ */
}
.civil-card__link:hover .civil-card__more{ text-decoration: underline; }

.civil-empty { padding: 12px; background:#fff; border-radius:8px; }

/* ===============================
   ページネーション（中央寄せ + A11y）
   =============================== */
.civil-pagination{
  margin-top: 22px;
  display: flex;
  justify-content: center;
}
.civil-pagination .page-numbers{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.civil-pagination .page-numbers li{ list-style: none; }
.civil-pagination .page-numbers li a,
.civil-pagination .page-numbers li span{
  display:inline-flex;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  align-items:center;
  justify-content:center;
  background:#fff;
  border-radius:8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  text-decoration:none;
  color:#0f172a;
  font-weight:700;
}
.civil-pagination .page-numbers li .current{
  background:#0b5da8;
  color:#fff;
}
.civil-pagination .page-numbers .dots{
  background: transparent;
  box-shadow: none;
  min-width: auto;
  height: auto;
  padding: 0 6px;
}
/* フォーカス視認性 */
.civil-pagination .page-numbers a:focus-visible,
.civil-pagination .page-numbers .current:focus-visible{
  outline: 2px solid #0b5da8;
  outline-offset: 2px;
}

/* 技術紹介 */
.civil-tech { padding: 28px 0 10px; }
.civil-tech__item { border-top: 1px solid #e5e7eb; padding: 18px 0; }
.civil-tech__title { font-weight: 800; margin: 0 0 12px; }
.civil-tech__body { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
.civil-tech__img img { width: 100%; height: auto; display: block; border-radius: 6px; }
.civil-tech__txt p { margin: 0 0 8px; }
.civil-tech__txt ul { margin: 0; padding-left: 1.2em; }

/* 用途セクション */
.civil-uses { padding: 28px 0 50px; }
.civil-use { border-top: 1px solid #e5e7eb; padding: 18px 0; }
.civil-use__title { font-weight: 800; margin: 0 0 12px; }
.civil-use__body { display:grid; gap:16px; grid-template-columns:1fr; align-items:start; }
.civil-use__img img { width:100%; height:auto; border-radius:6px; display:block; }
.civil-use__txt ol { margin:0 0 8px 1.2em; }

/* レスポンシブ */
@media (min-width: 820px) {
  .civil-tech__body,
  .civil-use__body { grid-template-columns: 44% 1fr; gap:22px; }
}

/* 動きを減らす設定を尊重 */
@media (prefers-reduced-motion: reduce){
  .civil-grid{ transition: none; }
  html:focus-within{ scroll-behavior: auto; }
}
