*, *::before, *::after {
  box-shadow: none; /* 既存の影に影響させない */
  box-sizing: border-box;
}

/* ① リンクをクリックした時に、ページ内を「スーッ」と滑らかに移動させる */
html {
  scroll-behavior: smooth;
}

/* ② 移動した時、固定ヘッダーに見出しが被って隠れてしまうのを防ぐ */
/* 以前のHTMLで id="services" や id="company" を指定した各セクションに一括適用します */
section {
  scroll-margin-top: 80px; /* 固定ヘッダーの縦幅（約70px〜80px）に合わせて数値を微調整してください */
}

.header-nav a.current {
  color: #70a1ff; /* 基調とする淡い青（お好みで濃い青 #2b5797 でも綺麗です） */
  font-weight: bold; /* 文字を太くして強調 */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
}

.header-logo {
  font-size: 1.2rem;       /* スマホ向けの適切な文字サイズ */
  font-weight: bold;
  color: #2b5797;          /* 基調となる少し濃いめの青 */
  white-space: nowrap;     /* 絶対に途中で改行させない指定 */
  overflow: hidden;
  text-overflow: ellipsis; /* 万が一溢れた場合は「...」にする */
}

/* 画面幅が375px以下の非常に小さなスマホ向けの微調整 */
@media (max-width: 375px) {
  .header-logo {
    font-size: 4.5vw;      /* 画面幅に合わせて文字サイズを自動縮小 */
  }
}

/* ==========================================
   PC用の基本スタイル（769px以上）
============================================ */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 4%;
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: fixed; /* 上部に固定する場合 */
  width: 100%;
  top: 0;
  left: 0;
  z-index: 100;
}

.header-nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.header-nav a {
  text-decoration: none;
  color: #334155; /* 濃いグレー */
  font-weight: 500;
}

.header-nav a:hover {
  color: #70a1ff; /* ホバー時に淡い青 */
}

/* PCではスマホ用ボタンを非表示にする */
.menu-trigger {
  display: none;
}

/* ==========================================
   スマホ用のスタイル（768px以下）
============================================ */
@media (max-width: 768px) {
  /* ハンバーガーボタンの設置 */
  .menu-trigger {
    display: block;
    position: relative;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 200; /* メニューより手前に表示 */
  }

  /* 三本線の共通スタイル */
  .menu-trigger span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #334155; /* 線の色 */
    transition: all 0.3s ease; /* アニメーションを滑らかに */
  }

  /* 三本線の位置設定 */
  .menu-trigger span:nth-child(1) { top: 0; }
  .menu-trigger span:nth-child(2) { top: 11px; }
  .menu-trigger span:nth-child(3) { top: 22px; }

  /* ✖マークへの変化（JSで'active'クラスが付与された時） */
  .menu-trigger.active span:nth-child(1) {
    transform: translateY(11px) rotate(-45deg);
  }
  .menu-trigger.active span:nth-child(2) {
    opacity: 0; /* 真ん中の線を消す */
  }
  .menu-trigger.active span:nth-child(3) {
    transform: translateY(-11px) rotate(45deg);
  }

  /* スマホ用メニュー画面の初期状態（右側に隠しておく） */
  .header-nav {
    position: fixed;
    top: 0;
    right: -100%; /* 画面の外に隠す */
    width: 80%;    /* メニューの幅（お好みで調整） */
    height: 100vh;
    background-color: #f0f5fa; /* 基調とする淡い青 */
    padding-top: 80px;
    transition: all 0.3s ease;
    z-index: 150;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  }

  /* メニューが開いた時（JSで'active'クラスが付与された時） */
  .header-nav.active {
    right: 0; /* 画面内にスライドイン */
  }

  .header-nav ul {
    flex-direction: column; /* 縦並びにする */
    align-items: center;
    gap: 30px;
  }

  .header-nav a {
    font-size: 1.2rem;
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
  }
}

/* ==========================================
   メインビジュアルの基本スタイル（PC・スマホ共通）
============================================ */
.main-visual {
  position: relative;
  width: 100%;
  height: 80vh; /* 画面の高さの80%（お好みで100vhにすれば全画面になります） */
  margin-top: 70px; /* 固定ヘッダーの高さ分、上部を空けて被りを防ぐ */
  background-image: url('../img/wire.jpg'); /* 画像パス */
  background-size: cover; /* 画像を隙間なく引き伸ばして表示 */
  background-position: center; /* 画像の中心を基準にする */
  display: flex;
  align-items: center; /* 文字コンテンツを上下中央に配置 */
  justify-content: center; /* 文字コンテンツを左右中央に配置 */
  text-align: center;
  overflow: hidden;
}

/* 淡い青の半透明マスク（これを入れることで、写真が明るくても文字がはっきり読めます） */
.mv-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(240, 245, 250, 0.75); /* 淡い青（#f0f5fa）の透明度75% */
  z-index: 1;
}

/* 文字コンテンツエリア */
.mv-content {
  position: relative;
  z-index: 2; /* マスク（z-index:1）より手前に出す */
  padding: 0 4%;
  max-width: 900px; /* 文字が横に広がりすぎないように制限 */
}

/* サブタイトル（英語の小さめの文字を入れると一気にモダンになります） */
.mv-sub-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.15em; /* 文字の間隔を広げてスタイリッシュに */
  color: #70a1ff; /* 基調とする淡い青 */
  margin-bottom: 15px;
}

/* メインキャッチコピー */
.mv-main-title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.5;
  color: #2b5797; /* 濃いめの青で引き締める */
  margin-bottom: 20px;
}

/* 補足の説明文 */
.mv-description {
  font-size: 1.05rem;
  color: #475569; /* 落ち着いたグレー */
  line-height: 1.7;
  margin-bottom: 35px;
}

/* お問い合わせボタン */
.mv-btn {
  display: inline-block;
  background-color: #2b5797; /* 濃いめの青 */
  color: #ffffff;
  padding: 16px 40px;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 50px; /* 丸みのあるモダンなボタン */
  box-shadow: 0 4px 15px rgba(43, 87, 151, 0.3); /* 柔らかい影 */
  transition: all 0.3s ease;
}

/* ボタンのホバー効果（PC用） */
.mv-btn:hover {
  background-color: #1e3d6b; /* ホバー時に少し暗く */
  transform: translateY(-2px); /* 少し上に浮き上がらせる */
  box-shadow: 0 6px 20px rgba(43, 87, 151, 0.4);
}

/* PC専用の改行コントロール */
.pc-only {
  display: block;
}

/* ==========================================
   スマートフォン用の微調整（768px以下）
============================================ */
@media (max-width: 768px) {
  .main-visual {
    height: 70vh; /* スマホでは少し高さを抑える */
  }
  
  .mv-main-title {
    font-size: 1.5rem; /* スマホに合わせて文字を小さく */
    letter-spacing: 0;
  }
  
  .mv-description {
    font-size: 0.95rem;
    text-align: left; /* スマホで長文がセンターラインだと読みにくいため左寄せ（お好みで） */
  }
  
  .pc-only {
    display: none; /* スマホ画面では強制改行（<br>）を無効化する */
  }
  
  .mv-btn {
    width: 100%; /* スマホではボタンを横いっぱいに広げてタップしやすく */
    box-sizing: border-box;
  }
}


/* セクション全体の背景（薄いグレーがかった青） */
.services-section {
  background-color: #f0f5fa; /* 淡い青 */
  padding: 100px 4%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-sub-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #70a1ff;
  text-align: center;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}

.section-title {
  font-size: 2rem;
  color: #2b5797;
  text-align: center;
  font-weight: 700;
  margin-bottom: 60px;
  position: relative;
}

/* タイトルの下にモダンな短いアンダーラインを引く */
.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background-color: #70a1ff;
}

/* --- グリッドレイアウトの肝 --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  /* ↓ 最後の7個目がポツンと左に余るのを防ぎ、中央に寄せる設定 */
  justify-content: center; 
}

/* セクション全体の背景（薄いグレーがかった青） */
.services-section {
  background-color: #f0f5fa; /* 淡い青 */
  padding: 100px 4%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-sub-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #70a1ff;
  text-align: center;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}

.section-title {
  font-size: 2rem;
  color: #2b5797;
  text-align: center;
  font-weight: 700;
  margin-bottom: 60px;
  position: relative;
}

/* タイトルの下にモダンな短いアンダーラインを引く */
.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background-color: #70a1ff;
}

/* --- グリッドレイアウトの肝 --- */
/* グリッドからフレックスボックスに変更 */
.services-grid {
  display: flex;
  flex-wrap: wrap; /* 折り返しを許可する */
  justify-content: center; /* ▽ これで余った最後の1個が【絶対に】中央に寄ります */
  gap: 30px;
}

/* カード側の横幅をコントロール */
.service-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 40px 30px;
  box-shadow: 0 10px 30px rgba(43, 87, 151, 0.03);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  /* ▽ ここを追加・変更 */
  width: calc(33.333% - 20px); /* PCでは3列並びにする計算（隙間分を引く） */
  min-width: 300px; /* スマホや画面が狭いときはこれ以上小さくならずに折り返す */
  flex-grow: 1; /* 画面幅に合わせて程よく伸縮させる */
  max-width: 360px; /* カードが大きくなりすぎないように制限 */
}


/* マウスを乗せたときにふわっと浮き上がる演出 */
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(43, 87, 151, 0.08);
}

/* アイコンエリア */
.service-icon {
  font-size: 2rem;          /* アイコン自体の大きさ（お好みで調整） */
  width: 70px;
  height: 70px;
  background-color: #e8f0fe; /* サークルの背景（さらに薄い青） */
  color: #2b5797;            /* アイコン自体の色（濃いめの青） */
  border-radius: 50%;
  
  /* ▽ これを入れることで、Font Awesomeが上下左右のど真ん中に配置されます */
  display: flex;
  align-items: center;
  justify-content: center;
  
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.25rem;
  color: #334155;
  font-weight: 700;
  margin-bottom: 15px;
}

.service-card p {
  font-size: 0.95rem;
  color: #64748b; /* 優しいグレー */
  line-height: 1.6;
  flex-grow: 1; /* テキストの量が変わってもボタンの位置を下に揃える */
  margin-bottom: 20px;
}

/* 各業務の詳細リンクボタン（ある場合のみ） */
.service-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: bold;
  color: #2b5797;
  text-decoration: none;
  padding: 8px 24px;
  border: 1px solid #2b5797;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.service-link:hover {
  background-color: #2b5797;
  color: #ffffff;
}

/* ==========================================
   スマホ用の調整（768px以下）
============================================ */
@media (max-width: 768px) {
  .services-section {
    padding: 60px 4%;
  }
  .section-title {
    font-size: 1.6rem;
    margin-bottom: 40px;
  }
  .service-card {
    padding: 30px 20px;
  }
}

.company-section {
  background-color: #ffffff; /* 業務内容が淡い青背景なので、ここは白でメリハリを */
  padding: 100px 4%;
}

.company-table {
  width: 100%;
  max-width: 800px; /* 表が横に広がりすぎないように制限 */
  margin: 0 auto;
  border-collapse: collapse; /* 線の重なりを防ぐ */
}

.company-table tr {
  border-bottom: 1px solid #e2e8f0; /* 下線のみでスッキリ見せる */
}

.company-table th {
  width: 30%;
  text-align: left;
  padding: 24px;
  color: #2b5797; /* 基調の濃い青 */
  font-weight: 700;
  vertical-align: top;
}

.company-table td {
  width: 70%;
  padding: 24px;
  color: #334155;
  line-height: 1.6;
}

/* ==========================================
   スマホ用のテーブル調整（768px以下）
============================================ */
@media (max-width: 768px) {
  .company-section {
    padding: 60px 4%;
  }
  
  .company-table, 
  .company-table tbody, 
  .company-table tr, 
  .company-table th, 
  .company-table td {
    display: block; /* すべての要素を縦並びにする */
    width: 100%;
    box-sizing: border-box;
  }
  
  .company-table tr {
    padding: 15px 0;
  }
  
  .company-table th {
    padding: 5px 0;
    font-size: 0.95rem;
  }
  
  .company-table td {
    padding: 5px 0 10px 0;
    font-size: 0.95rem;
  }
}
.contact-section {
  background-color: #f0f5fa; /* 再び淡い青の背景 */
  padding: 100px 4%;
}

.contact-lead {
  text-align: center;
  color: #475569;
  margin-bottom: 40px;
  font-size: 1rem;
}

.contact-form {
  max-width: 650px; /* フォームが広がりすぎないように制限 */
  margin: 0 auto;
  background-color: #ffffff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(43, 87, 151, 0.03);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* 必須項目の「必須」マークを赤・ピンク系にする場合 */
.form-group label.required::after {
  content: '必須';
  font-size: 0.75rem;
  background-color: #ff6b81; /* アクセントの淡い赤 */
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

/* 入力項目（テキスト・メッセージ共通）のモダン化 */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  color: #334155;
  background-color: #ffffff;
  transition: all 0.3s ease;
  outline: none; /* ブラウザ標準の黒枠を消す */
}

/* ★入力欄をタップ（フォーカス）した時に淡い青に光らせる設定 */
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #70a1ff; /* 線の色を淡い青に */
  box-shadow: 0 0 0 4px rgba(112, 161, 255, 0.15); /* 周りに薄い青の光を纏わせる */
}

/* 送信ボタンのエリア */
.form-submit {
  text-align: center;
  margin-top: 35px;
}

.submit-btn {
  background-color: #2b5797;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 16px 60px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(43, 87, 151, 0.3);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 300px;
}

.submit-btn:hover {
  background-color: #1e3d6b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 87, 151, 0.4);
}

/* ==========================================
   スマホ用のフォーム調整（768px以下）
============================================ */
@media (max-width: 768px) {
  .contact-section {
    padding: 60px 4%;
  }
  .contact-form {
    padding: 25px 20px; /* スマホでは内側の余白を狭くして入力幅を確保 */
  }
  .submit-btn {
    max-width: 100%; /* スマホではボタンを横いっぱいに */
  }
}

.site-footer {
  background-color: #1e293b; /* 画面の最後を引き締める濃い目のグレーネイビー */
  color: #f1f5f9; /* 文字は読みやすい薄いグレー */
  padding: 60px 4% 0 4%; /* コピーライトの上に余白を作る */
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 40px;
}

/* 左側：企業情報エリア */
.footer-info {
  max-width: 500px;
}

.footer-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 15px;
}

.footer-text {
  font-size: 0.85rem;
  color: #94a3b8; /* 少し落ち着かせたグレー */
  line-height: 1.6;
}

/* 右側：ナビゲーションエリア */
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column; /* 縦並び */
  gap: 12px;
}

.footer-nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

/* メニューをホバーしたときに淡い青に光らせる */
.footer-nav a:hover {
  color: #70a1ff;
}

/* ボタンを包むエリア：上下に広めのゆとり（マージン）を持たせます */
.thanks-btn-area {
  display: flex;
  justify-content: center; /* 左右の真ん中に寄せる */
  align-items: center;
  
  /* 
    ▽ 上下に適切なマージンを設定 
    上のメッセージから【60px】、下の要素（フッター等）まで【80px】の余白を空け、
    視線がボタンに自然と集まる「美しい余白（ホワイトスペース）」を作ります。
  */
  margin-top: 60px;
  margin-bottom: 80px;
  
  padding: 0 4%;
  width: 100%;
  box-sizing: border-box;
}

/* ボタン自体のスタイル（左右中央を保証） */
.btn-back-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #2b5797; /* サイトの基調色：濃いめの青 */
  color: #ffffff;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  padding: 16px 48px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(43, 87, 151, 0.2);
  transition: all 0.3s ease;
  position: relative;
  
  margin-left: auto;
  margin-right: auto;
  
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
}

/* ボタン内の矢印 */
.btn-back-home::before {
  content: '';
  width: 8px;
  height: 8px;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  transform: rotate(-45deg);
  position: absolute;
  left: 24px;
  transition: transform 0.3s ease;
}

/* 【PC用ホバー効果】 */
@media (hover: hover) {
  .btn-back-home:hover {
    background-color: #1e3d6b;
    box-shadow: 0 6px 20px rgba(43, 87, 151, 0.35);
    transform: translateY(-2px);
  }
  .btn-back-home:hover::before {
    transform: translateX(-3px) rotate(-45deg);
  }
}

/* ==========================================
   スマートフォン用の調整（768px以下）
============================================ */
@media (max-width: 768px) {
  /* スマホの小さな画面に合わせて、上下のマージンも程よくスマート（40px / 50px）に縮小します */
  .thanks-btn-area {
    margin-top: 40px;
    margin-bottom: 50px;
  }
  
  .btn-back-home {
    max-width: 100%;
    padding: 16px 32px;
    font-size: 0.95rem;
  }
}


/* 最下部：コピーライトエリア */
.footer-copyright {
  border-top: 1px solid #334155; /* 境界の細い線 */
  padding: 20px 0;
  text-align: center;
}

.footer-copyright p {
  font-size: 0.75rem;
  color: #64748b;
}

/* ==========================================
   スマホ用のフッター調整（768px以下）
============================================ */
@media (max-width: 768px) {
  .site-footer {
    padding-top: 40px;
  }
  
  .footer-container {
    flex-direction: column; /* 左右並びから縦並びに変更 */
    align-items: center;
    text-align: center;
    gap: 30px;
  }
  
  .footer-nav ul {
    align-items: center; /* メニューを中央揃えに */
    gap: 15px;
  }
}

