/*
 * ============================================================
 * fukuda-common.css
 * 福田式賃金管理事務所 — 共通ベーススタイル
 *
 * 修正対象レベル: A（数値整理）+ 一部 B（ファウンデーション統一）
 * Cレベル（全面リファクタリング）は含まない
 *
 * ⚠️ 読み込み順の重要な制約:
 *   WordPress の wp_enqueue_style() は <head> 内に出力されます。
 *   各ページの <style> ブロックは PHPテンプレート/<body> 内にあり、
 *   このファイルより後にブラウザが解析します。
 *
 *   つまり: ページ固有 CSS は常にこのファイルを上書きします。
 *   ここに書ける「修正」は以下に限られます:
 *     ① 新規 CSS 変数・ユーティリティクラスの追加（additive）
 *     ② ページ CSS が上書きしない範囲のデフォルト値
 *     ③ ページ固有クラス（.fk-* / .fukuda-main 等）への補完
 *   A レベルの「値の修正」（hero余白・line-height 等）は
 *   各ページの <style> ブロックを直接編集してください（実装手順参照）。
 *
 * 登録方法 — functions.php に追記:
 *   wp_enqueue_style(
 *     'fukuda-common',
 *     get_stylesheet_directory_uri() . '/css/fukuda-common.css',
 *     array('swell-style'),
 *     '1.0.0'
 *   );
 *
 * 配置先: /wp-content/themes/swell_child/css/fukuda-common.css
 * ============================================================
 */


/* ============================================================
   SECTION 1: CSS カスタムプロパティ（共通デザイントークン）
   
   - 変数名は --fukuda-* で統一（既存の --ink / --max 等と衝突しない）
   - 各ページの既存ローカル変数はそのまま残す
   - 将来の段階的リファクタリング時に既存変数をここの変数へ差し替える
   ============================================================ */

:root {

  /* カラー */
  --fukuda-ink:   #171717;   /* メイン見出し・濃いテキスト    */
  --fukuda-body:  #4a4a4a;   /* 本文テキスト                  */
  --fukuda-muted: #8a8a8a;   /* 日付・補足・ラベル            */
  --fukuda-line:  #d8d8d8;   /* 区切り線・ボーダー            */
  --fukuda-soft:  #f7f7f5;   /* グレー背景セクション          */
  --fukuda-dark:  #151515;   /* フッター等の暗いセクション    */

  /* レイアウト */
  --fukuda-max:    1120px;   /* 全ページ共通 最大横幅         */
  --fukuda-narrow:  920px;   /* ブログ・セミナー 狭いコンテナ */

  /* フォントスタック */
  --fukuda-serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --fukuda-sans:  "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;

  /* タイポグラフィ（基準値） */
  --fukuda-lh:       2.1;   /* 本文行間              */
  --fukuda-ls-serif: .14em; /* 明朝体 字間           */
  --fukuda-ls-sans:  .08em; /* ゴシック体 字間       */

  /* セクション余白（参照用。direct 指定は各ページ CSS が担う） */
  --fukuda-hero-pad:    160px; /* ヒーロー上パディング 基準値  */
  --fukuda-section-pad: 150px; /* 一般セクション縦パディング   */
}


/* ============================================================
   SECTION 2: 全幅ラッパー基礎スタイル（.fukuda-wrap）
   
   全8ページ共通の「構造的な基盤」のみ定義。
   以下はページ CSS で上書きされるため ここでは定義しない:
     - font-family（Serif系 / Sans系 でページ分かれる）
     - color（--body 変数が各ページで異なる）
     - letter-spacing（.08em〜.16em でページ分かれる）
     - line-height（1.9〜2.35 でページ分かれる）
   
   ▼ background: #fff はデフォルト値として定義。
     お問い合わせページ（#f8f8f8）はページ CSS で上書きされる。
   
   ▼ 全幅展開は calc(50% - 50vw) 方式に統一。
     position:relative; left:50% 方式を使う4ページ（TOP / 4th-phases
     / 福田について / 事務所概要）は、ページ <style> ブロックが
     position 関連プロパティを上書きするため、移行前は影響なし。
     各ページの移行時に position / left / right を削除すること。
   ============================================================ */

.fukuda-wrap {

  /* 全幅展開（calc 方式 — sticky 要素に安全） */
  width: 100vw;
  max-width: 100vw;
  margin-left:  calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  /* overflow-x: clip は hidden と異なり sticky を妨げない */
  overflow-x: clip;

  /* ベース */
  background: #fff;
  font-feature-settings: "palt";
  box-sizing: border-box;
}


/* ============================================================
   SECTION 3: box-sizing リセット
   全8ページに既に同一の定義あり。共通化で管理を一元化。
   ============================================================ */

.fukuda-wrap *,
.fukuda-wrap *::before,
.fukuda-wrap *::after {
  box-sizing: border-box;
}


/* ============================================================
   SECTION 4: リンクベーススタイル
   
   .fukuda-wrap a:         5ページに共通の定義あり
   .fukuda-wrap a:hover:   3ページのみ定義（front / 事務所概要 / 福田について）
                           → 残り5ページへの hover 付与は意図通りのため追加
   ============================================================ */

.fukuda-wrap a {
  color: inherit;
  text-decoration: none;
}

.fukuda-wrap a:hover {
  opacity: .75;
}


/* ============================================================
   SECTION 5: 画像リセット
   page-4th-phases.php のみ定義済み。他7ページへの補完。
   ============================================================ */

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


/* ============================================================
   SECTION 6: 内側コンテナ（.wrap）
   
   使用ページ（同一値）:
     page-blog-seminar.php / 事務所概要.txt / 支援パターン.txt
   非使用ページ（別クラス or インラインstyle）:
     front-page.php / page-4th-phases.php / page-contact.php
     page-member.php / 福田について.txt
   
   使用ページの既存定義と値が一致するため、共通化で重複を解消。
   非使用ページは .wrap クラスがないため影響なし。
   ============================================================ */

.fukuda-wrap .wrap {
  width: min(calc(100% - 48px), var(--fukuda-max));
  margin: 0 auto;
}


/* ============================================================
   SECTION 7: フォントユーティリティクラス
   
   既存ページの font-family 指定はそのまま維持。
   新規ページ追加・要素単位での切り替えに使う補助クラス。
   ============================================================ */

.fukuda-font-serif {
  font-family: var(--fukuda-serif);
}

.fukuda-font-sans {
  font-family: var(--fukuda-sans);
}


/* ============================================================
   SECTION 8: Aレベル修正 — 「4つの局面」ページ 補完
   
   .fukuda-main / .fukuda-serif は page-4th-phases.php 専用クラス。
   他ページに存在しないため影響なし。
   
   ▼ font-family の Noto Sans JP 追加はページ CSS で行う（以下）:
     page-4th-phases.php の .fukuda-wrap に
     font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", ... を追記
   ============================================================ */

/* 本文の字間を補完（現在 0 → 0.08em） */
.fukuda-main {
  letter-spacing: .08em;
}

/* serif 見出しクラスにも字間を追加（控えめに 0.04em） */
.fukuda-wrap .fukuda-serif {
  letter-spacing: .04em;
}

/* line-height の修正は page-4th-phases.php の <style> を直接編集:
   .fukuda-wrap { line-height: 1.95 } → 2.1 に変更
   .fukuda-main p { } に line-height: 2.1 を追記                      */


/* ============================================================
   SECTION 9: Aレベル修正 — TOPページ インラインstyle 補完
   
   .fk-* クラスは front-page.php 専用。他ページに影響なし。
   
   ▼ インライン固定幅は HTML を直接編集（このCSSでは対応不可）:
     style="width:487px"  → style="width:min(487px,100%)"
     style="width:560px"  → style="width:min(560px,100%)"
     style="width:587px"  → style="width:min(587px,100%)"
     style="width:541px"  → style="width:min(541px,100%)"
   
   ▼ line-height の絶対値も HTML を直接編集:
     style="line-height:34px"   → style="line-height:2.0"
     style="line-height:46.8px" → style="line-height:1.8"
     style="line-height:40px"   → style="line-height:2.0"
   ============================================================ */

/* .fk-value-grid — minmax最小値を可変にして 900px 付近の崩れを防ぐ */
@media (max-width: 980px) {
  .fk-value-grid {
    grid-template-columns: repeat(2, minmax(min(440px, 44vw), 500px)) !important;
    column-gap: 60px !important;
  }
}

@media (max-width: 900px) {
  .fk-value-grid {
    grid-template-columns: minmax(300px, 500px) !important;
    row-gap: 64px !important;
  }
}

/* .fk-bottom-cta__inner — SP でのはみ出し防止 */
@media (max-width: 640px) {
  .fk-bottom-cta__inner {
    width: calc(100% - 40px);
  }
}


/* ============================================================
   SECTION 10: Aレベル修正 — 支援パターン SP タグ区切り
   
   .tags クラスは 支援パターン（支援ハ_ターン.txt）専用。
   他ページに同名クラスがないため影響なし。
   ============================================================ */

@media (max-width: 560px) {
  .fukuda-wrap .tags {
    gap: 10px 0;
  }

  .fukuda-wrap .tags span {
    width: 100%;
  }

  .fukuda-wrap .tags span:not(:last-child)::after {
    content: "";
    margin: 0;
  }
}


/* ============================================================
   SECTION 11: SP 共通調整
   ============================================================ */

/* 内側コンテナ .wrap の SP 余白縮小（560px 以下） */
@media (max-width: 560px) {
  .fukuda-wrap .wrap {
    width: min(calc(100% - 32px), var(--fukuda-max));
  }
}


/* ============================================================
   SECTION 12: 共通ボタン基底クラス（新規・既存に影響なし）
   
   現在の各ページボタン（.wpforms-submit / .login-button 等）は変更しない。
   新規ページ・要素から段階的に .fukuda-btn へ移行する。
   ============================================================ */

.fukuda-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  border: 0;
  border-radius: 0;
  background: #eeeae7;
  color: #333;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s ease;
}

/* .fukuda-wrap a:hover の opacity を打ち消してボタン色変化を優先 */
.fukuda-btn:hover {
  background: #e5dfdb;
  opacity: 1;
}


/* ============================================================
   SECTION 13: グローバルナビゲーションバー（下層ページ用）
   - TOPページには表示しない（front-page.php はHTML未挿入のため除外）
   ============================================================ */

.fk-global-nav {
  background:
    linear-gradient(90deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.55) 100%),
    url("https://webservice.xbiz.jp/fukudasiki.com/wp-content/themes/swell_child/images/fv.png") center center / cover no-repeat,
    #141614;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  width: 100%;
}

.fk-global-nav__inner {
  display: flex;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
  width: min(calc(100% - 48px), 1120px);
  height: 80px;
  margin: 0 auto;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.fk-global-nav__inner::-webkit-scrollbar {
  display: none;
}

.fk-global-nav__inner a {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  height: 80px;
  padding: 0 20px;
  border-bottom: 0;
  color: rgba(255,255,255,.92) !important;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .14em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  opacity: 1;
  transition: color .2s ease;
}

.fk-global-nav__inner a:hover {
  color: rgba(255,255,255,1) !important;
  opacity: 1;
}

.fk-global-nav__inner a.is-current {
  color: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid rgba(255,255,255,.4);
}

/* タブレット: 8項目を横スクロールさせず、2段で自然に収める */
@media (min-width: 641px) and (max-width: 1024px) {
  .fk-global-nav__inner {
    justify-content: center;
    flex-wrap: wrap;
    width: min(calc(100% - 32px), 960px);
    height: auto;
    min-height: 72px;
    padding: 6px 0;
    overflow-x: visible;
  }

  .fk-global-nav__inner a {
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    letter-spacing: .1em;
  }
}

@media (min-width: 641px) and (max-width: 840px) {
  .fk-global-nav__inner a {
    padding: 0 10px;
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .fk-global-nav__inner {
    width: 100%;
    height: 64px;
    padding: 0 16px;
  }

  .fk-global-nav__inner a {
    height: 64px;
    padding: 0 14px;
    font-size: 13px;
  }
}


/* ============================================================
   SECTION 14: フッター共通スタイル（.fukuda-footer）
   footer_contents.php に対応するCSS
   ============================================================ */

.fukuda-footer {
  background: #151515;
  color: rgba(232,232,232,.72);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  padding-bottom: 0;
}

.fukuda-footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 80px;
  width: min(calc(100% - 80px), 1120px);
  margin: 0 auto;
  padding: 72px 0 56px;
}

.fukuda-footer__name {
  margin: 0 0 28px;
  color: #eee;
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .12em;
  line-height: 1.6;
}

.fukuda-footer__address {
  color: rgba(232,232,232,.72);
  font-style: normal;
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: .06em;
}

.fukuda-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 180px;
  padding-top: 4px;
}

.fukuda-footer__nav ul {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fukuda-footer__nav a,
.fukuda-footer__nav li {
  list-style: none;
  color: rgba(232,232,232,.72);
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .12em;
  line-height: 1.6;
  text-decoration: none;
}

.fukuda-footer__nav a:hover {
  color: rgba(232,232,232,.95);
  opacity: 1;
}

.fukuda-footer__copy {
  display: block;
  width: min(calc(100% - 80px), 1120px);
  margin: 0 auto;
  padding: 0 0 0;
  color: rgba(232,232,232,.4);
  font-size: 12px;
  letter-spacing: .08em;
}

.fukuda-footer__bottom-nav {
  border-top: 1px solid rgba(255,255,255,.08);
}

.fukuda-footer__bottom-nav__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  width: min(calc(100% - 48px), 1120px);
  height: 56px;
  margin: 0 auto;
}

.fukuda-footer__bottom-nav__inner a {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 20px;
  color: rgba(255,255,255,.68);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .1em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  opacity: 1;
  transition: color .2s ease;
}

.fukuda-footer__bottom-nav__inner a:hover {
  color: rgba(255,255,255,.9);
  opacity: 1;
}

/* タブレット: 左右カラムと下段ナビを少しコンパクトにする */
@media (min-width: 769px) and (max-width: 1024px) {
  .fukuda-footer__inner {
    gap: 48px;
    width: min(calc(100% - 64px), 960px);
    padding: 60px 0 44px;
  }

  .fukuda-footer__copy {
    width: min(calc(100% - 64px), 960px);
  }

  .fukuda-footer__bottom-nav__inner {
    justify-content: center;
    width: min(calc(100% - 32px), 960px);
    height: auto;
    padding: 8px 0;
  }

  .fukuda-footer__bottom-nav__inner a {
    height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .fukuda-footer__inner {
    flex-direction: column;
    gap: 40px;
    width: min(calc(100% - 48px), 1120px);
    padding: 56px 0 40px;
  }

  .fukuda-footer__copy {
    width: min(calc(100% - 48px), 1120px);
  }

  .fukuda-footer__bottom-nav__inner {
    height: auto;
    padding: 16px 0;
    flex-wrap: wrap;
  }

  .fukuda-footer__bottom-nav__inner a {
    height: 44px;
    padding: 0 12px;
    font-size: 12px;
  }
}
