@charset "utf-8";
/*
Theme Name: 遠藤建設株式会社
Author: 遠藤建設株式会社
Description: ORIGINAL THEME（現場ホームページ用／水色ベース・レスポンシブ）
Version: 1.1.0
*/

/* ============================================================
   カラーパレット（基本カラー：水色）
   --sky      : メインの水色
   --sky-deep : 濃い青（見出し・ボタン・フッター）
   --sky-pale : 薄い水色（背景・強調ボックス）
   ============================================================ */
:root {
  --sky:       #3fb6e8;
  --sky-mid:   #1d8fc2;
  --sky-deep:  #0b5c8c;
  --sky-darkest:#073f61;
  --sky-pale:  #e8f6fd;
  --sky-faint: #f4fafd;
  --ink:       #2b3b47;
  --ink-soft:  #5a6b77;
  --line:      #cfe3ef;
  --accent:    #ff9f1c; /* 注意喚起・規制情報用 */
  --danger:    #e04f3f;
  --ok:        #2f9e63;
  --radius:    10px;
  --shadow:    0 2px 10px rgba(11, 92, 140, .10);
}

/* ============================================================
   base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans JP",
    "Helvetica Neue", Arial,
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; }

a {
  color: var(--sky-deep);
  text-decoration: none;
}
a:hover {
  color: var(--sky-mid);
  text-decoration: underline;
}

img { max-width: 100%; height: auto; }

/* 記事内キャプション */
.wp-block-image figcaption {
  margin-top: .4em;
  margin-bottom: 0;
  text-align: center;
  font-size: .85em;
  color: var(--ink-soft);
}

/* ギャラリー：狭い画面では列指定に関係なく1列へ崩す
　（WP本体の仕様では列数を固定のまま画像だけ縮むため、小さい端末では見づらくなる） */
@media (max-width: 519.98px) {
  .wp-block-gallery.has-nested-images.columns-2 .wp-block-image,
  .wp-block-gallery.has-nested-images.columns-3 .wp-block-image,
  .wp-block-gallery.has-nested-images.columns-4 .wp-block-image,
  .wp-block-gallery.has-nested-images.columns-5 .wp-block-image,
  .wp-block-gallery.has-nested-images.columns-6 .wp-block-image,
  .wp-block-gallery.has-nested-images.columns-7 .wp-block-image,
  .wp-block-gallery.has-nested-images.columns-8 .wp-block-image,
  .wp-block-gallery.has-nested-images.columns-9 .wp-block-image {
    flex-basis: 100%;
    max-width: 100%;
  }
}
.blocks-gallery-caption {
  text-align: center;
  margin: auto;
  font-size: .85em;
  padding-bottom: 20px;
  color: var(--ink-soft);
}
.blocks-gallery-grid .blocks-gallery-image figcaption,
.blocks-gallery-grid .blocks-gallery-item figcaption,
.wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption {
  left: 0;
  width: auto !important;
  right: 0;
  background: #00000066 !important;
  color: #fff;
  padding: 4px !important;
  font-size: .85em !important;
}

/* wp-blockボタン */
a.wp-block-button__link {
  color: #fff;
  text-decoration: none;
  background: var(--sky-mid);
  border-radius: 999px;
}
a.wp-block-button__link:hover {
  color: #fff;
  background: var(--sky-deep);
  box-shadow: 0 3px 10px rgba(11, 92, 140, .35);
}

/* ============================================================
   layout
   ============================================================ */
.header-inner, .container, .footer-inner { max-width: 1200px; margin-right: auto; margin-left: auto; }

main { padding: 24px 20px 40px; }

.container { padding: 0 12px; }

/* PC: サイドバーなし（本文を全幅で使う） */
@media (min-width: 960px) {
  .container {
    padding: 30px 20px 60px;
  }
}

/* ヘッダー下の水色ライン */
.site-frame {
  height: 6px;
  background: linear-gradient(90deg, var(--sky-deep), var(--sky) 55%, #8fd8f5);
}

/* ============================================================
   header
   ============================================================ */
header {
  display: block;
  background: #fff;
  border-top: 5px solid var(--sky-darkest);
  box-shadow: 0 2px 14px rgba(7, 63, 97, .12);
}

.header-inner {
  position: relative;
  max-width: unset;
  padding: 12px 16px;
}
.header-inner a { color: var(--ink); }
.header-inner a:hover { text-decoration: none; }

.site-title { text-align: left; padding: 8px 0; }
.site-title h1 { font-size: 1.5em; line-height: 1.3; margin: 0; letter-spacing: .04em; }
.site-logo img { height: 34px; width: auto; display: block; }

/* ハブ（現場HPポータル）への控えめなリンク。現場サイトでのみヘッダーに出す */
.site-title .hub-link {
  display: inline-block;
  margin-top: 6px;
  font-size: .78em;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: .03em;
}
.site-title .hub-link:hover { color: var(--sky-mid); text-decoration: underline; }
.site-title .hub-link i { margin-left: 5px; font-size: .85em; }

@media (min-width: 768px) {
  .header-inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: center;
    padding: 14px 30px;
  }
  .site-title { padding: 10px 0; }
  .site-title h1 { line-height: 1.2; font-size: 1.8em; }
  .site-logo img { height: 44px; }
}

/* スマホ用メニューボタン */
#navbutton {
  position: relative;
  text-align: right;
  margin: 0;
  padding: 10px 16px;
  cursor: pointer;
  z-index: 5;
  background: var(--sky-deep);
}
#navbutton:focus { outline: none; }
#navbutton i { font-size: 2em; color: #fff; }
#navbutton i img { width: 40px; height: 40px; }

/* ヘッダーナビ */
#header-nav { display: none; max-width: none; }

.header-nav { padding-left: 10px; }
.header-nav ul { margin: 0; padding: 0; list-style: none; }
.header-nav li a {
  display: block;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 1em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.header-nav li a:hover { color: var(--sky-mid); background: var(--sky-pale); }

@media (min-width: 768px) {
  #header-nav { display: block !important; }
  .header-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
  }
  .header-nav ul:after { display: block; clear: both; content: ''; }
  .header-nav li {
    display: inline-block;
    width: auto;
    border-bottom: 4px solid transparent;
    transition-duration: .3s;
    margin: 8px 4px;
  }
  .header-nav li:hover { border-color: var(--sky-deep); }
  .header-nav li a {
    font-size: 1.05em;
    padding: 8px 16px;
    border-bottom: none;
  }
  .header-nav li a:hover { background: transparent; }
  .header-nav .current-menu-item,
  .header-nav .current-page-ancestor { border-color: var(--sky); }
  #navbutton { display: none; }
}

/* ============================================================
   footer
   ============================================================ */
footer {
  margin-top: 40px;
  padding-top: 30px;
  background: linear-gradient(135deg, var(--sky-darkest), var(--sky-deep) 60%, #1478ad);
}

.footer-nav { margin-bottom: 20px; }
.footer-nav ul { margin: 0; padding: 0; list-style: none; }
.footer-nav ul:after { display: block; clear: both; content: ''; }
.footer-nav li { float: left; width: 50%; text-align: center; }
.footer-nav li a {
  font-size: .9em;
  display: block;
  padding: 12px 5px;
  text-decoration: none;
  color: #fff;
}
.footer-nav li a:hover { opacity: .7; color: #fff; }

.footer-site-info {
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 0 16px;
}
.footer-site-info p { line-height: 1.6; margin: 0; }
.footer-site-info div {
  padding: 16px 20px;
  background: #fff;
  border-radius: var(--radius);
}
.footer-site-info div:nth-child(1) { text-align: center; }
.footer-site-info div:nth-child(2) { text-align: left; }
.footer-site-info .site-owner { font-size: .9em; }
.footer-site-info .site-owner img { width: 300px; max-width: 100%; height: auto; padding: 6px; }
.footer-site-info .site-owner .text { text-align: left; padding: 5px 20px; color: var(--ink); }

/* コピーライト */
.copyright p {
  font-size: .85em;
  margin: 20px 0 0;
  padding: 14px 1em;
  text-align: center;
  color: #fff;
  background: rgba(4, 34, 54, .45);
}

@media (min-width: 768px) {
  .footer-site-info {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 0 30px;
  }
  .footer-nav li { width: auto; text-align: left; }
  .footer-nav li a { font-size: 1em; padding: 10px 20px; }
}

/* ============================================================
   widgets（サイドバー）
   ※functions.php の出力に合わせて .sidebar-wrapper / .sidebar-title に適用
   ============================================================ */
#sidebar { margin-top: 30px; }
@media (min-width: 960px) { #sidebar { margin-top: 0; position: sticky; top: 20px; } }

.sidebar-wrapper, #sidebar .widget {
  background: var(--sky-faint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.sidebar-title, #sidebar .widget-title, #sidebar .widget h2 {
  font-size: 1.05em;
  margin: 0 0 .8em;
  padding: 0 0 .4em 10px;
  border-left: 4px solid var(--sky);
  border-bottom: 1px solid var(--line);
  color: var(--sky-darkest);
}

/* ウィジェット未設定（自動プレースホルダ）は表示しない */
#sidebar .widget:has(.aside-inner) { display: none; }

.widget_recent_entries ul, .widget_meta ul, .widget_recent_comments ul,
.widget_pages ul, .widget_categories ul, .widget_archive ul, .widget_nav_menu ul {
  padding: 0;
  list-style: none;
}
.widget_recent_entries li, .widget_meta li, .widget_recent_comments li,
.widget_pages li, .widget_categories li, .widget_archive li, .widget_nav_menu li {
  position: relative;
}
.widget_recent_entries li, .widget_nav_menu li { margin-bottom: 12px; }
.widget_recent_entries li a, .widget_nav_menu li a {
  padding: 8px 5px 8px 18px;
  transition-duration: .2s;
}

/* ウィジェット未設定（自動プレースホルダ）は表示しない */
#sidebar .widget:has(.aside-inner) { display: none; }

/* 月別アーカイブ（過去の情報） */
.widget_archive li {
  padding: 7px 2px;
  border-bottom: 1px dashed var(--line);
}
.widget_archive li:last-child { border-bottom: none; }
.widget_archive li a {
  padding-left: 18px;
  position: relative;
  font-weight: 700;
  color: var(--ink);
}
.widget_archive li a:before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: .35em;
  content: '\f073'; /* calendar-days */
  color: var(--sky-mid);
  font-size: .85em;
}

/* カテゴリウィジェット（工事別） */
.widget_categories li {
  display: inline-block;
  margin: 2px;
  padding: 4px 12px;
  white-space: nowrap;
  border-radius: 999px;
  background-color: var(--sky-mid);
}

.widget_recent_entries a, .widget_meta a, .widget_recent_comments a,
.widget_pages a, .widget_categories a, .widget_archive a, .widget_nav_menu a {
  text-decoration: none;
  color: var(--ink);
  display: block;
  font-weight: 700;
}
.widget_recent_entries a:hover, .widget_meta a:hover, .widget_recent_comments a:hover,
.widget_pages a:hover, .widget_categories a:hover, .widget_archive a:hover,
.widget_nav_menu a:hover { color: var(--sky-mid); text-decoration: none; }

/* カテゴリウィジェット（工事別） */
.widget_categories li {
  display: inline-block;
  margin: 2px;
  padding: 4px 12px;
  white-space: nowrap;
  border-radius: 999px;
  background-color: var(--sky-mid);
}
.widget_categories li:before {
  font-family: 'Font Awesome 6 Free';
  font-size: .8em;
  font-weight: bold;
  padding-right: 4px;
  content: '\f02b';
  color: #fff;
}
.widget_categories li a { font-size: .8em; color: #fff; }
.widget_categories li a:hover { color: #fff; opacity: .85; }

/* タグウィジェット */
.tagcloud a {
  font-size: .9em !important;
  line-height: 2.4em;
  margin: 2px;
  padding: 2px 12px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--sky-deep);
  border: 1px solid var(--sky-mid);
  border-radius: 999px;
  background: #fff;
}
.tagcloud a:hover { background: var(--sky-pale); }

/* 新着ウィジェット */
.widget_recent_entries li:before {
  font-family: 'Font Awesome 6 Free';
  font-weight: bold;
  position: absolute;
  left: 2px;
  content: '\f303';
  color: var(--sky-mid);
}

/* メニューウィジェット下位階層 */
.widget_nav_menu li ul { box-shadow: none; }
.widget_nav_menu li ul li { box-shadow: none; margin: auto; }
.widget_nav_menu li ul li a {
  margin-left: 20px;
  padding: 5px 5px 5px 15px;
  font-size: .9em;
  border-bottom: 1px solid var(--line);
}

/* カレンダー */
#wp-calendar { width: 100%; font-size: .9em; }
#wp-calendar caption { font-weight: 700; padding: 6px 0; color: var(--sky-darkest); }
#wp-calendar thead th { background: var(--sky-pale); padding: 5px 0; }
#wp-calendar tbody { text-align: center; }
#wp-calendar td { padding: 5px 0; border-bottom: 1px solid var(--line); }

/* テキストウィジェット */
.textwidget { font-size: .9em; }

/* 検索フォーム */
input.search-field {
  width: 70%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
input.search-submit {
  padding: 8px 14px;
  background: var(--sky-mid);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
input.search-submit:hover { background: var(--sky-deep); }

/* ============================================================
   news list（新着一覧）
   ============================================================ */
.news-list .list {
  display: grid;
  grid-template-columns: 9em 8em 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.news-list .list:hover { background: var(--sky-faint); }
.news-list .list time { text-align: left; font-weight: 700; color: var(--ink-soft); font-size: .95em; }
.news-list .list .cat {
  background: var(--sky-mid);
  text-align: center;
  color: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: .85em;
  line-height: 1.4;
}
.news-list .list .title { font-weight: 700; }
.news-list .list .title a { color: var(--ink); }
.news-list .list .title a:hover { color: var(--sky-mid); }

@media (max-width: 599px) {
  .news-list .list {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    padding: 12px 8px;
  }
  .news-list .list time { background: transparent; font-size: .85em; }
  .news-list .list .cat { margin: 0; justify-self: end; }
  .news-list .list .title { grid-column: 1 / 3; }
}

/* カテゴリ・アーカイブ共通（category.php / index.php） */
.archive-description { margin: 12px 0 20px; color: var(--ink-soft); }
.archive-count { margin: 0 0 12px; font-size: .9em; color: var(--ink-soft); }
.archive-count strong { font-weight: 700; color: var(--sky-darkest); }
.archive-empty {
  margin: 24px 0 40px;
  padding: 26px 16px;
  text-align: center;
  background: var(--sky-faint);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
}
/* カテゴリ未所属の行でも3列グリッドがズれないようにする（中身は空のまま枠だけ出す） */
.news-list .list .cat.is-empty { background: transparent; }

/* ============================================================
   pagination
   ============================================================ */
.pagination { margin: 40px 0 20px; text-align: center; }
.pagination ul { margin: 0; padding: 0; list-style: none; }
.pagination li { display: inline-block; width: auto; }

.pagination a, .pagination span {
  display: inline-block;
  font-size: .95em;
  border-radius: 6px;
  padding: 8px 16px;
  margin: 2px;
  text-decoration: none;
  line-height: 1.4;
  color: var(--sky-deep);
  background: var(--sky-pale);
}
.pagination span.current {
  color: #fff;
  background: var(--sky-deep);
}
.pagination a:hover { color: #fff; background: var(--sky-mid); }
.pagination .dots {
  width: 15px;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
}

/* ============================================================
   article（記事）
   ============================================================ */
.kiji { max-width: 860px; margin: 0 auto 50px; }

.kiji time {
  display: block;
  text-align: right;
  margin: 10px 0 24px;
  color: var(--ink-soft);
  font-size: .9em;
}

/* 進捗レポート（category-report.php）: 本文を続けて並べる形 */
.report-entry + .report-entry { border-top: 1px solid var(--line); padding-top: 34px; }
.report-entry-title { margin: 0 0 6px; font-size: 1.5em; line-height: 1.5; }
.report-entry-title a { color: var(--ink); }
.report-entry-title a:hover { color: var(--sky-mid); }
.report-entry-more { margin: 26px 0 0; text-align: right; }
.report-entry-more a { color: var(--sky-deep); font-weight: 700; text-decoration: none; }
.report-entry-more a:hover { color: var(--sky-mid); }

.kiji-info .cat-data a { text-decoration: none; color: #fff; }
.kiji-info .cat-data a:hover { opacity: .85; }

.cat-data {
  font-size: .8em;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  border-radius: 6px;
  margin-bottom: 10px;
  text-align: left;
}
.cat-data a {
  display: inline-block;
  margin: 2px;
  background: var(--sky-mid);
  padding: 5px 12px;
  border-radius: 6px;
  line-height: 1.6;
  color: #fff;
}
.cat-data a:hover { opacity: .85; color: #fff; }

.kiji-img { max-width: 640px; margin: 30px auto; text-align: center; }

/* 3Dモデル・動画 */
.kiji iframe { border: none; width: 100%; height: 480px; }
@media (max-width: 599px) { .kiji iframe { height: 260px; } }

/* 記事内テーブル */
.kiji table { width: 100%; margin: 0 auto 30px; border-spacing: 0 1px; }
.kiji table th, .kiji table td { border: none; }
.kiji table td { padding: 18px 20px; vertical-align: top; }
.kiji table tr { border-top: 1px solid var(--line); }
.kiji table tr:last-child { border-bottom: 1px solid var(--line); }
.kiji table td:nth-child(1) {
  background: var(--sky-pale);
  color: var(--sky-darkest);
  font-weight: 700;
  min-width: 7em;
  width: 22%;
}
.kiji table td:nth-child(2) { background: #fff; width: auto; }

@media (max-width: 599px) {
  .kiji table tr { display: grid; grid-template-columns: 1fr; }
  .kiji table td { padding: 12px 14px; }
  .kiji table td:nth-child(1) { width: 100%; }
}

/* ============================================================
   contents（記事本文のスタイル）
   ============================================================ */
.contents p { margin-top: 0; margin-bottom: 28px; }

.contents h1 {
  text-align: center;
  position: relative;
  font-size: 1.6em;
  padding: 14px 10px;
  color: var(--sky-darkest);
  line-height: 1.4;
  letter-spacing: .05em;
  border-bottom: 3px solid var(--sky);
  margin: 0 0 24px 0;
}

.contents h2 {
  position: relative;
  font-size: 1.35em;
  padding: 8px 10px 8px 16px;
  margin: 2.2em 0 1em;
  color: var(--sky-darkest);
  border-left: 6px solid var(--sky);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--sky-pale), #fff 70%);
  letter-spacing: .05em;
}

.contents h3 {
  font-size: 1.2em;
  margin-top: 2.2em;
  margin-bottom: 1.2em;
  padding: 6px 14px;
  color: var(--sky-darkest);
  border-left: 4px solid var(--sky-mid);
  background: var(--sky-faint);
}
.contents h3 a { display: block; }

.contents h4 { font-size: 1.1em; margin: 1.6em 0 .5em; color: var(--sky-deep); }
.contents h5 { font-size: 1.02em; margin: 1.4em 0 .4em; }

/* 引用・注意書き風 */
.contents blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  background: var(--sky-pale);
  border-left: 5px solid var(--sky);
  border-radius: 0 var(--radius) var(--radius) 0;
}

@media (max-width: 599px) {
  .contents { font-size: 94%; }
  .contents h1 { font-size: 1.3em; }
  .contents h2 { font-size: 1.2em; }
  .contents h3 { font-size: 1.1em; }
  .contents h4 { font-size: 1.05em; }
}

/* ============================================================
   top page（トップページ）
   ============================================================ */
.top-infomation { display: grid; grid-template-columns: 1fr; gap: 16px; }
.top-infomation div {
  text-align: center;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  letter-spacing: 0;
  transition: all .4s ease;
}
.top-infomation div:nth-child(1) { background: linear-gradient(51deg, #7ecdec, #6fa8ef); }
.top-infomation div:nth-child(2) { background: linear-gradient(51deg, #e9b9c9, #f09ac0); }
.top-infomation div:nth-child(3) { background: linear-gradient(51deg, #9fdccf, #a8dd7f); }
.top-infomation div:hover { letter-spacing: .1em; box-shadow: 0 6px 18px rgba(11, 92, 140, .25); }

.top-infomation div p {
  font-size: 1.3em;
  background: rgba(255, 255, 255, .6);
  font-weight: 700;
  margin: 0;
  padding: 18px 10px;
  border-bottom: 6px solid rgba(255, 255, 255, .5);
  border-radius: 0 0 var(--radius) var(--radius);
}

@media (min-width: 768px) {
  .top-infomation { grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 20px 20px; }
}

/* もっと見るボタン */
p.show-more {
  background: linear-gradient(48deg, var(--sky-mid), var(--sky-deep));
  margin: 36px auto 50px auto;
  text-align: center !important;
  color: #fff !important;
  font-weight: 700;
  line-height: 44px;
  border-radius: 999px;
  max-width: 420px;
  transition-duration: .25s;
}
p.show-more a { display: block; color: #fff; text-decoration: none; }
p.show-more:hover {
  box-shadow: 0 4px 14px rgba(11, 92, 140, .4);
  letter-spacing: .08em;
  text-decoration: none;
}

/* ============================================================
   prev / next（前後の記事）
   ============================================================ */
.prev-next-box {
  margin: 30px 0 10px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 1px;
  background: var(--line);
}
.prevbox, .nextbox { background: #fff; }
.prev-next-box a { text-decoration: none; display: grid; align-items: center; min-height: 70px; }
.prev-next-box a:hover { opacity: .7; }
.prev-next-box p { margin: auto 16px; font-weight: 700; color: var(--ink); }
.prev-next-box .prevbox a { grid-template-columns: 4em 1fr; }
.prev-next-box .nextbox a { grid-template-columns: 1fr 4em; }
.prev-next-box .prevbox p { text-align: left; }
.prev-next-box .nextbox p { text-align: right; }
.prev-next-box i { font-size: 3em; padding: 12px; color: var(--sky-mid); }

@media (max-width: 768px) {
  .prev-next-box { grid-template-columns: 1fr; }
}

/* ============================================================
   related posts（関連記事）
   ============================================================ */
.related-post-wrap { margin: 2em 0; }
.related-post-wrap .title { font-size: 1.25em; margin-bottom: 1em; font-weight: 700; color: var(--sky-darkest); }
.related-post-wrap ul {
  display: grid;
  list-style: none;
  gap: .875em;
  grid-template-columns: repeat(4, 1fr);
  padding: 0;
}
.related-post a { display: block; text-decoration: none; color: var(--ink); }
.related-post a:hover { opacity: .7; text-decoration: none; }
.related-post img {
  display: block; width: 100%; aspect-ratio: 3/2;
  margin-bottom: .5em; object-fit: cover; border-radius: 6px;
}
.related-post .text-wrap { font-size: .875em; font-weight: 700; }

@media (max-width: 900px) { .related-post-wrap ul { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .related-post-wrap ul { grid-template-columns: 1fr; } }

/* ============================================================
   construction list（工事・現場一覧）
   ============================================================ */
.kouzi-container { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .kouzi-container { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.kouzi-list {
  width: 100%;
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  transition-duration: .25s;
}
.kouzi-list:hover { box-shadow: 0 6px 18px rgba(7, 63, 97, .22); }

.kouzi-list a {
  font-weight: normal;
  text-decoration: none;
  color: var(--ink);
  height: 100%;
  display: grid;
  grid-template-columns: 2fr 3fr;
  column-gap: 5px;
}
.kouzi-list a:hover { text-decoration: none; }

.kouzi-list .photo_wrap { width: 100%; height: 100%; overflow: hidden; grid-row: 1 / 4; max-height: 250px; }
.kouzi-list img {
  width: 100%; height: 100%;
  transform: scale(1.01);
  transition-duration: .5s;
  display: block; object-fit: cover;
}
.kouzi-list a:hover img { transform: scale(1.12); transition-duration: 1s; }

.kouzi-list a h3 {
  position: relative; font-weight: 700; font-size: 1em;
  padding: .4em 10px; margin: 0; overflow: hidden; line-height: 1.3;
}
.kouzi-list a .cat {
  font-size: .65em; padding: 5px 10px; line-height: 1; margin: 0;
  color: #fff; background: var(--sky-mid);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.kouzi-list a time {
  font-size: .75em; padding: 6px 12px; line-height: 1; text-align: right; margin: 0;
  background: var(--sky-faint); color: var(--ink-soft); border-top: 1px solid var(--line);
}
.kouzi-list a .explain p { margin: 0; padding: 8px 10px; background: #fff; font-size: .85em; }
.kouzi-list a .go {
  margin: 0; padding: 6px 12px; text-align: right; color: var(--sky-darkest);
  background: linear-gradient(45deg, #d9eefb, #a8dcf3); font-weight: 700;
}

.const-date { font-size: .8em; margin-bottom: 8px; color: var(--ink-soft); }

/* ============================================================
   forms（お問い合わせ・採用フォーム）
   ============================================================ */
.form-recruit p.title { font-size: 1.6em; font-weight: 700; margin: 40px auto; text-align: center; color: var(--sky-darkest); }
.form-recruit p.pp {
  font-size: 1em; font-weight: 700; margin: 25px auto;
  background: var(--sky-pale); border-left: 5px solid var(--sky);
  padding: 15px; border-radius: 0 var(--radius) var(--radius) 0;
}
.form-recruit p.pp a { color: var(--ink); }

.form-recruit p { max-width: 600px; margin: 0 auto; text-align: center; }
.form-recruit input, .form-recruit textarea {
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line);
  width: 100%;
  font-size: 1em;
  margin: auto;
  padding: .6em 1em;
}
.form-recruit input:focus, .form-recruit textarea:focus {
  outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(63, 182, 232, .25);
}
.form-recruit label { display: grid; grid-template-columns: 2em 1fr; align-items: center; }

.form-recruit input[type="submit"] {
  background: linear-gradient(0deg, var(--sky-mid), var(--sky-deep));
  font-weight: 700; color: #fff;
  box-shadow: 0 3px 8px rgba(11, 92, 140, .3);
  width: 15em; max-width: 90%;
  border: none; margin: 30px auto; border-radius: 999px;
  cursor: pointer; padding: .8em 1em;
}
.form-recruit input[type="submit"]:hover { background: var(--sky-darkest); }

.form_box input {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.form_box input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(63, 182, 232, .25); }
.form_box p { margin: 0; }
.form_box div { padding: 10px 20px; }
.form_box div:nth-child(2n+1) { font-weight: 700; background: var(--sky-faint); }
.form_box div:nth-child(2n) { margin-bottom: 20px; }
.form_box .req {
  background: var(--danger); margin-left: 12px; color: #fff;
  padding: 4px 10px; font-size: .75em; line-height: 1em; border-radius: 4px;
}
.form_box .wpcf7-list-item { display: block; }

@media screen and (min-width: 769px) {
  .form_box { display: grid; grid-template-columns: 17em 1fr; gap: 8px 0; align-items: center; }
  .form_box div:nth-child(2n+1) { background: #fff; }
  .form_box div:nth-child(2n) { margin-bottom: 12px; }
}

.form_submit input {
  padding: 10px 44px; display: block; font-size: 1.3em; margin: 20px auto;
  background: var(--sky-mid); color: #fff;
  border: none; border-radius: 999px; cursor: pointer; font-weight: 700;
}
.form_submit input:hover { background: var(--sky-deep); }

/* ============================================================
   top scroll（トップへ戻る）
   ============================================================ */
.top-scroll {
  position: fixed;
  right: 24px;
  bottom: 24px;
  cursor: pointer;
  font-size: 3.2em;
  color: var(--sky-mid);
  opacity: .85;
  z-index: 10;
  transition-duration: .3s;
}
.top-scroll:hover { opacity: 1; transform: translateY(-4px); }

/* ============================================================
   tel / fax（電話番号表示）
   ============================================================ */
.tel-fax { display: grid; grid-template-columns: 4em 1fr; column-gap: 10px; line-height: 2em; margin-top: 8px; }
.tel-fax span {
  border: 1px solid var(--sky-mid); color: var(--sky-deep);
  text-align: center; margin: 1px; border-radius: 4px; font-size: .85em; line-height: 2.1;
}
.tel-fax strong { padding: 2px; }

/* ============================================================
   404ページ
   ============================================================ */
#main404 { text-align: center; font-weight: 700; padding: 40px 20px; }
#main404 h2 { font-size: 3.5em; color: var(--sky-mid); margin: .5em 0; }
#main404 .message { font-size: 1.4em; }
#main404 .top-link {
  display: block; font-size: 1.6em;
  background: var(--sky-deep); max-width: 12em;
  margin: 60px auto 40px auto;
  border-radius: 999px; color: #fff; line-height: 2.2em; text-decoration: none;
}
#main404 .top-link:hover { background: var(--sky-mid); color: #fff; }

/* ============================================================
   現場看板向けユーティリティ（進捗・規制・注意喚起）
   ============================================================ */
.genba-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: .85em; font-weight: 700; color: #fff; margin-right: 6px;
}
.genba-badge.progress { background: var(--sky-mid); }
.genba-badge.regulation { background: var(--accent); }
.genba-badge.danger { background: var(--danger); }
.genba-badge.done { background: var(--ok); }

.genba-notice {
  border-radius: var(--radius); padding: 16px 20px; margin: 1.5em 0;
  border-left: 6px solid var(--accent); background: #fff7ec;
}
.genba-notice.alert { border-left-color: var(--danger); background: #fdeeed; }
.genba-notice.info { border-left-color: var(--sky); background: var(--sky-pale); }

/* ============================================================
   ハブ（メインサイト）トップページ
   現場サイトの一覧カード ＋ 全サイトを横断した最新情報
   ============================================================ */

/* 案内文（固定ページ「トップページ」の内容） */
.hub-intro { margin-bottom: 24px; }
.hub-howto { margin: 0 0 26px; font-size: .95em; line-height: 1.8; }
.hub-howto strong { color: var(--sky-darkest); }

.hub-section { margin-bottom: 56px; }
.hub-section h2 { scroll-margin-top: 90px; }
.hub-lead { margin: .5em 0 .9em; color: var(--ink-soft); font-size: .95em; line-height: 1.7; }
.hub-count { margin: 0 0 18px; color: var(--ink-soft); font-size: .95em; }
.hub-count strong { color: var(--sky-deep); font-size: 1.3em; margin: 0 4px; }

/* ---- 現場カード（モバイルは1列、768px以上で2列） ---- */
.genba-cards {
  display: grid; grid-template-columns: 1fr; gap: 18px;
  margin-bottom: 10px;
}
@media (min-width: 768px) {
  .genba-cards { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

.genba-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-top: 4px solid var(--sky);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 16px 18px;
}
.genba-card.is-done  { border-top-color: var(--ok); }
.genba-card.is-plan  { border-top-color: #9fb3c0; }
.genba-card.is-pause { border-top-color: var(--accent); }

/* カード上部：状況バッジ＋年度 */
.genba-card-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.genba-card-status {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: .78em; font-weight: 700; color: #fff; background: #8aa0ad;
}
.genba-card-status.is-active { background: var(--sky-mid); }
.genba-card-status.is-done   { background: var(--ok); }
.genba-card-status.is-plan   { background: #6f8593; }
.genba-card-status.is-pause  { background: var(--accent); color: #4b3200; }
.genba-card-fy {
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--sky-pale);
  color: var(--sky-darkest); font-size: .78em; font-weight: 700;
}

/* サムネイル */
.genba-card-thumb {
  display: block; overflow: hidden; border-radius: 6px;
  aspect-ratio: 16 / 10; background: var(--sky-faint);
}
.genba-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.genba-card-thumb:hover img { transform: scale(1.04); transition-duration: .6s; }

/* 工事名（.contents h3 の装飾は打ち消す） */
.genba-card-title {
  margin: 14px 0 4px; padding: 0; border: 0; background: none;
  font-size: 1.12em; line-height: 1.55; color: var(--sky-darkest);
}
.genba-card-title a { color: var(--sky-darkest); }
.genba-card-title a:hover { color: var(--sky-mid); }
.genba-card-official { margin: 0 0 12px; color: var(--ink-soft); font-size: .84em; line-height: 1.6; }
/* 正式名称（箇所名）＝工事名の続きとして2行目に。情報行（施工地・工期）には並べず、ひと小さく添える */
.genba-card-official .off-place { display: block; margin-top: 1px; font-size: .94em; color: #6c7d89; }

/* 所在地・工期 */
.genba-card-meta { margin: 0 0 14px; border-top: 1px solid var(--line); }
.genba-card-meta-row {
  display: grid; grid-template-columns: 5.2em 1fr; gap: 8px;
  padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .9em;
}
.genba-card-meta dt { color: var(--ink-soft); font-weight: 700; }
.genba-card-meta dd { margin: 0; word-break: break-word; }

/* 最近の報告 */
.genba-card-latest { border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 16px; }
.genba-card-latest-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  margin: 0 0 6px; color: var(--sky-deep); font-size: .85em; font-weight: 700;
}
.genba-card-latest ul { margin: 0; padding: 0; list-style: none; }
.genba-card-latest li { padding: 6px 0; border-bottom: 1px dotted var(--line); font-size: .9em; line-height: 1.6; }
.genba-card-latest li .d { margin-right: 8px; color: var(--ink-soft); font-weight: 700; }
.genba-card-latest li a { color: var(--ink); }
.genba-card-latest li a:hover { color: var(--sky-mid); }
.genba-card-empty { margin: .3em 0; color: var(--ink-soft); font-size: .9em; }

/* 現場サイトへ行くボタン（カード下端に常に固定） */
.genba-card-btn {
  display: block; margin-top: auto; padding: 11px 14px;
  border-radius: 999px; background: var(--sky-deep); color: #fff;
  text-align: center; font-size: .92em; font-weight: 700;
}
.genba-card-btn:hover { background: var(--sky-mid); color: #fff; text-decoration: none; }
.genba-card-btn i { margin-left: 6px; }

/* ---- 各現場の最新情報（横断一覧）：現場名は水色のピルで示す ---- */
.hub-news .list { padding: 12px 8px; }
.hub-news .list .cat.is-site { background: var(--sky-pale); color: var(--sky-darkest); border: 1px solid var(--line); }
.hub-news .list .cat.is-site a { color: var(--sky-darkest); font-weight: 700; }
.hub-news .list .cat.is-site a:hover { color: var(--sky-mid); }
.hub-empty { padding: 18px 0; }

@media (max-width: 599px) {
  .genba-card { padding: 14px; }
  .genba-card-title { font-size: 1.05em; }
  .genba-card-meta-row { grid-template-columns: 4.6em 1fr; font-size: .86em; }
  .hub-section { margin-bottom: 44px; }
}

/* ============================================================
   現場サイトのトップページ（front-page.php）
   ・この工事の情報＝ネットワーク管理で入力している現場属性をそのまま表示
   ・ページのご案内＝そのサイトの固定ページから自動生成したボタン
   ============================================================ */

.home-section { margin: 0 0 40px; }

/* 工事状況のバッジ（色はハブの一覧カードと同じ考え方） */
.home-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.home-status {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: .8em; font-weight: 700; color: #fff; background: #8aa0ad;
}
.home-status.is-active { background: var(--sky-mid); }
.home-status.is-done   { background: var(--ok); }
.home-status.is-plan   { background: #6f8593; }
.home-status.is-pause  { background: var(--accent); color: #4b3200; }
.home-fy { color: var(--ink-soft); font-size: .88em; font-weight: 700; }

/* 工事名・所在地・工期（空の項目は行ごと出さない） */
.home-info { margin: 0; border-top: 1px solid var(--line); }
.home-info-row {
  display: grid; grid-template-columns: 6em 1fr; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92em;
}
.home-info-row dt { margin: 0; color: var(--ink-soft); font-weight: 700; }
.home-info-row dd { margin: 0; word-break: break-word; }

/* ページへのボタン（PCは2列・モバイルは1列） */
.home-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.home-links li { display: flex; }
.home-links a {
  flex: 1; display: block; padding: 14px 16px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow);
  color: var(--sky-darkest); font-weight: 700; font-size: .95em;
}
.home-links a:hover { background: var(--sky-deep); border-color: var(--sky-deep); color: #fff; text-decoration: none; }
.home-links a i { margin-left: 6px; }

@media (max-width: 599px) {
  .home-section { margin-bottom: 32px; }
  .home-links { grid-template-columns: 1fr; }
  .home-info-row { grid-template-columns: 5.2em 1fr; font-size: .88em; }
}

