/* =============================================================
   ローバル工法サイト  共通スタイル (styles.css)
   - 元サイト: roval-cgr.com (WordPress / Lightning テーマ) の忠実復元
   - 方針: 見た目は元サイトに忠実 / コードは1から綺麗に再構築
   - 設計: CSS変数でテーマ色を一元管理。Lightning風の
           ヘッダー固定ナビ・ヒーロー・カード・フッターを再現。
   ============================================================= */

/* ---------- デザイントークン ---------- */
:root {
  --primary:        #428bca;   /* テーマ基調色（リンク・ボタン） */
  --primary-dark:   #2f6da3;
  --accent-green:   #99cc00;   /* 黄色枠の縁取り */
  --accent-bright:  #4cf769;   /* ヒーローキャプション */
  --callout-bg:     #ffffcc;   /* 黄色いお知らせ枠 */
  --danger:         #c7243a;   /* 強調赤 */
  --text:           #333333;
  --text-muted:     #666666;
  --border:         #dddddd;
  --bg:             #ffffff;
  --bg-soft:        #f5f7f9;
  --footer-bg:      #f5f5f5;
  --ph-bg:          #e9eef2;   /* 画像プレースホルダ背景 */
  --container:      1170px;
  --radius:         4px;
  --shadow:         0 1px 4px rgba(0,0,0,.12);
  --font: "Hiragino Kaku Gothic ProN","Hiragino Sans","BIZ UDPGothic",
          Meiryo,"Helvetica Neue",Arial,sans-serif;
}

/* ---------- ベース ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.75;
  background: var(--bg);
  font-size: 16px;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--primary-dark); }
h1,h2,h3,h4,h5 { line-height: 1.4; }
p { margin: 0 0 1.2em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}
.skip-link {  /* スクリーンリーダー用スキップリンク */
  position: absolute; left: -9999px;
}

/* ---------- ヘッダー / グローバルナビ ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 1000;
}
.site-header-container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px;
}
.site-header-logo { margin: 0; }
.site-header-logo img { height: 52px; width: auto; }

.global-nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.global-nav-list a {
  display: block; padding: 10px 12px;
  color: var(--text); font-weight: 700; font-size: 14px;
}
.global-nav-list a:hover { color: var(--primary); text-decoration: none; }
.global-nav-list .current-menu-item > a { color: var(--primary); }

/* モバイルナビ（MENUボタンで開閉） */
.nav-toggle {
  display: none; border: 0; background: var(--primary); color: #fff;
  font-weight: 700; padding: 10px 16px; border-radius: var(--radius);
  cursor: pointer; font-size: 14px;
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .global-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .global-nav.is-open { max-height: 80vh; overflow:auto; }
  .global-nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .global-nav-list a { padding: 14px 20px; border-top: 1px solid var(--border); }
}

/* ---------- ヒーロー（スライダー枠） ---------- */
.hero { position: relative; background: #1a1a1a; overflow: hidden; }
.hero-img { width: 100%; height: clamp(220px, 42vw, 560px); object-fit: cover; display:block; opacity:.92; }
.hero-caption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 16px;
}
.hero-title {
  color: var(--accent-bright); text-shadow: 0 0 2px #000;
  font-size: clamp(22px, 4vw, 40px); margin: 0 0 .4em; font-weight: 700;
}
.hero-caption .lead {
  color: var(--accent-bright); text-shadow: 0 0 2px #000;
  font-size: clamp(14px, 2vw, 20px); margin: 0;
}

/* ---------- 本文レイアウト ---------- */
.site-body { padding: 40px 0 56px; }
.entry-body > *:first-child { margin-top: 0; }

/* 見出し（VK heading plain 風: 中央寄せ＋下線アクセント） */
.vk-heading {
  text-align: center; font-size: clamp(20px, 3vw, 28px);
  margin: 1.6em 0 1em; padding-bottom: .5em; position: relative;
}
.vk-heading::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 60px; height: 3px; background: var(--primary); transform: translateX(-50%);
}
/* 通常の本文見出し */
.entry-body h2 {
  font-size: clamp(18px, 2.4vw, 24px);
  border-bottom: 2px solid var(--primary);
  padding: 0 0 .3em; margin: 1.8em 0 .8em;
}
.entry-body h3 {
  font-size: clamp(17px, 2.2vw, 21px);
  border-left: 5px solid var(--primary); padding-left: .6em; margin: 1.6em 0 .7em;
}

/* 黄色いお知らせ枠（◆ ... ◆） */
.callout {
  display: inline-block; background: var(--callout-bg);
  border: 2px solid var(--accent-green); border-radius: 10px;
  padding: 11px 16px; margin: 1.2em 0 .6em; font-weight: 700; word-break: break-all;
}

/* 強調マーカー色（元サイトの inline color を再現） */
.tx-blue   { color: #0000ff; }
.tx-red    { color: #ff0000; }
.tx-danger { color: var(--danger); }
.tx-link   { color: var(--primary); }

/* ボタン（VK button primary 風） */
.btn {
  display: inline-block; cursor: pointer; border: 0; border-radius: var(--radius);
  padding: 12px 28px; font-weight: 700; font-size: 15px; line-height: 1.4;
  text-align: center; transition: background .2s, opacity .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color:#fff; text-decoration: none; }
.btn-center { display: block; width: max-content; margin-inline: auto; }

/* 段組み / カード（is-layout-flex 再現） */
.columns { display: flex; flex-wrap: wrap; gap: 24px; margin: 1.4em 0; }
.columns > .col { flex: 1 1 0; min-width: 220px; }
.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin: 1.4em 0; }
.card { display: flex; flex-direction: column; gap: 12px; }
.card h2, .card h3 { border: 0; padding: 0; margin: .2em 0; text-align: center; }
.card p { text-align: center; flex: 1; }
@media (max-width: 768px) { .cards { grid-template-columns: 1fr; } }

/* 画像ギャラリー（横並び） */
.gallery { display: flex; flex-wrap: wrap; gap: 12px; margin: 1em 0; }
.gallery figure { margin: 0; flex: 1 1 240px; }
figure { margin: 1em 0; }
figure figcaption { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: .4em; }

/* 表（資料一覧・FAQ等で利用） */
table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
th, td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--bg-soft); }

/* 定義リスト風FAQ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin: 12px 0; padding: 16px 20px; }
.faq-q { font-weight: 700; color: var(--primary-dark); }
.faq-a { margin-top: .5em; }

/* フォーム（お問い合わせ） */
.form-row { margin: 0 0 18px; }
.form-row label { display: block; font-weight: 700; margin-bottom: 6px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-family: inherit; font-size: 15px;
}
.form-note { font-size: 13px; color: var(--text-muted); }

/* 画像プレースホルダ（(仮)画像）。実画像差し替え後は背景が隠れるだけで無害 */
.ph-img { background: var(--ph-bg); display: block; }

/* YouTube等の動画埋め込み（レスポンシブ16:9） */
.video-embed { width: 100%; max-width: 560px; aspect-ratio: 16 / 9; height: auto; border: 0; display: block; }

/* ---------- フッター ---------- */
.site-footer { background: var(--footer-bg); border-top: 1px solid var(--border); margin-top: 48px; }
.site-footer-content { padding: 40px 16px 24px; }
.footer-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; }
@media (max-width: 768px) { .footer-row { grid-template-columns: 1fr; } }
.site-footer-title {
  font-size: 16px; margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.site-footer .menu { list-style: none; margin: 0; padding: 0; }
.site-footer .menu a { display: inline-block; padding: 4px 0; color: var(--text); }
.site-footer .menu a:hover { color: var(--primary); }
.site-footer-copyright {
  text-align: center; padding: 14px 16px; border-top: 1px solid var(--border);
}
.site-footer-copyright p { margin: 0; font-size: 11px; color: #000; }

/* ページ上部に戻る */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 900;
  background: var(--primary); color:#fff; width: 44px; height: 44px;
  border-radius: 50%; display: none; align-items:center; justify-content:center;
  text-decoration:none; box-shadow: var(--shadow); font-size: 20px;
}
.to-top.is-visible { display: flex; }

/* 汎用ユーティリティ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.lead { font-size: 1.05em; }
