/* =========================
   ルート変数（カラー設定）
========================= */
:root {
  --main-color: #003366;
  --main-hover: #001f4d;
  --accent-color: #f4f6f8;
  --text-color: #333333;
  --brand-color: #BE4D32;
}

/* =========================
   ヘッダー・ナビゲーション
========================= */
header {
  background-color: var(--main-color);
  color: #fff;
  padding: 15px 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: visible; /* ←重要！ hidden だと中のメニューが切れるかも */
}

.logo {
  font-size: 24px;
  margin: 0;
}

.logo a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 20px;
  text-decoration: none;
  color: #fff;
  font-family: 'Noto Sans JP', sans-serif;
}

.logo-mark {
  font-size: 26px;
  font-weight: 900;
  color: var(--brand-color);
  font-family: 'Segoe UI', sans-serif;
}

.company-name {
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.menu li {
  position: relative;
}

.menu a {
  color: #fff;
  text-decoration: none;
  padding: 10px 0;
  display: block;
  font-weight: bold;
  transition: color 0.3s;
}

.menu a:hover {
  color: #ffcc00;
}

.menu-icon {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

.hero,
.section:first-of-type {
  margin-top: 80px;
}

/* サブメニュー共通 */
.submenu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background-color: transparent; /* ← ここが重要！ */
}

.submenu-header a {
  flex-grow: 1;
  font-size: 16px;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.submenu-toggle-icon {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 16px;
  margin-left: 4px;
  color: white;
}

.has-submenu {
  position: relative; /* サブメニューの位置指定に必要 */
}

.has-submenu:hover .submenu {
  display: block; /* ホバーで表示させる場合（PC用） */
}
.has-submenu:hover .submenu-toggle-icon {
  transform: rotate(90deg); /* アイコンを右向きから下向きへ回転 */
}
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background-color: var(--main-color);
  border-radius: 4px;
  min-width: 240px; /* ← 拡張済みでOK！ */
  padding: 10px 0;
}

.submenu.open {
  display: block;
}
.submenu li a {
  white-space: nowrap;      /* 改行を防ぐ */
  overflow: hidden;         /* はみ出し対策（必要なら） */
  text-overflow: ellipsis; /* はみ出したら「…」表示（任意） */
}
.submenu li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffcc00;
}

/* =========================
   ヒーロースライダー（index.html）
========================= */
.hero-slider {
  position: relative;
  height: 50vh;
  overflow: hidden;
}

.hero-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slider .slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.hero-text {
  position: absolute;
  bottom: 15%;
  width: 100%;
  text-align: center;
  color: white;
  font-size: 1.8rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}



/* =========================
   セクション共通
========================= */
.section {
  padding: 60px 20px;
  background-color: #fff;
  text-align: center;
}

.section h2 {
  font-size: 28px;
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  color: var(--main-color);
}

.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60%;
  height: 3px;
  background-color: var(--main-color);
  border-radius: 2px;
}

.section h3 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--main-color);
  border-left: 6px solid var(--main-color);
  padding-left: 12px;
  text-align: left;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   実績カード画像
========================= */
.card-img {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: 4px;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.card-img:hover {
  transform: scale(1.02);
}

.card {
  max-width: 800px;
  margin: 40px auto;
  text-align: left; /* ここが重要 */
}

.card h3,
.card p {
  text-align: left;
}

/* =========================
   モーダル画像表示
========================= */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.85);
}

.modal-content {
  display: block;
  margin: 5% auto;
  max-width: 60%;
  max-height: 50vh;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
}

/* =========================
   実績・補助制度関連
========================= */

/* 実績リスト（works-list） */
.works-list {
  padding-left: 24px;
  line-height: 1.8;
  color: #333;
}

.works-list.ordered {
  list-style-type: decimal;
}

/* 年度ごとの実績ブロック */
.year-block,
.info-block {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: left;
}

/* 補助制度紹介ボックス */
.subsidy-box {
  background-color: #f4f6f8;
  border-left: 6px solid var(--main-color);
  border: 3px solid #003366; /* ← 枠線追加！ */
  padding: 32px;
  margin: 40px auto;
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: left;
  box-sizing: border-box;
}


/* ボックス内の余白設定 */
.subsidy-box > * {
  margin-bottom: 1.5em;
}

/* 補助制度内の見出し */
.subsidy-box h3 {
  margin-top: 2em;
  font-size: 20px;
  color: var(--main-color);
}

/* 補助制度内のリスト */
.subsidy-box ul {
  padding-left: 24px;
}

/* ステップ表示（縦並び） */
.flow-steps-vertical {
  margin: 20px auto;
  padding-left: 0;
}

.step {
  padding: 8px 12px;
  margin-bottom: 8px;
  background-color: #fff;
  border-left: 4px solid var(--main-color);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* 補助制度内の works-list 専用調整 */
.subsidy-box .works-list li {
  margin-bottom: 8px;
}
/* =========================
   FAQセクション
========================= */
.faq-box {
  background-color: #fdfdfd;
  border-left: 6px solid var(--main-color);
  border: 1px solid #003366; /* ← 枠線追加！ */
  padding: 32px;
  margin: 40px auto;
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: left;
  box-sizing: border-box;
}

.faq-box dl {
  margin: 0;
  padding: 0;
}

.faq-list dt {
  font-weight: bold;
  margin-top: 1em;
  color: var(--main-color);
}

.faq-list dd {
  margin-bottom: 1.5em;
  line-height: 1.6;
  color: #333;
}

.faq-q {
  color: var(--brand-color);
  margin-right: 4px;
}

.faq-a {
  color: var(--main-hover);
  margin-right: 4px;
}

/* =========================
   縦型ステップ表示（補助制度など）
========================= */
.flow-steps-vertical {
  margin: 30px auto;
  padding: 0;
  max-width: 800px;
}

.step {
  padding: 10px 16px;
  margin-bottom: 12px;
  background-color: #fff;
  border-left: 4px solid var(--main-color);
  border: 2px solid #003366; /* ← 枠線追加！ */
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  font-weight: bold;
  color: #333;
}


/* =========================
   テーブル（会社概要）
========================= */
.table-wrapper {
  overflow-x: auto;
  margin: 0 auto 40px;
  max-width: 800px;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border: 2px solid #999;
  font-size: 16px;
}

.company-table th,
.company-table td {
  border: 1px solid #ccc;
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.company-table th {
  background-color: var(--accent-color);
  font-weight: bold;
  width: 40%;
}

/* =========================
   フォーム関連
========================= */
form {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

form label {
  display: block;
  margin-bottom: 10px;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* =========================
   Googleマップ
========================= */
.map {
  max-width: 600px;
  margin: 0 auto;
}

.map iframe {
  width: 100%;
  height: 300px;
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* =========================
   フッター
========================= */
footer {
  background-color: var(--main-color);
  color: #fff;
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
}


/* =========================
   補助表示＆汎用ユーティリティ
========================= */
.centered-note {
  text-align: center;
  margin-top: 20px;
}
.small-note {
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-top: 10px;
}
.centered-button {
  text-align: center;
  margin-top: 20px;
}
.centered-button.large-margin {
  margin-top: 40px;
}

/* =========================
   画像行（補助制度：不発弾紹介画像）
========================= */
.image-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.image-row figure {
  max-width: 400px;
  width: 100%;
  text-align: center;
  margin: 0;
}
.image-row img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  -webkit-user-drag: none;
  user-select: none;
}
.image-row figcaption {
  font-size: 14px;
  color: #555;
  margin-top: 8px;
  line-height: 1.4;
}
@media screen and (max-width: 600px) {
  .image-row {
    flex-direction: column;
    align-items: center;
  }
  .image-row figure {
    max-width: 90%;
  }
}
.btn.big-btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: bold;
  background-color: var(--brand-color); /* 目立つ色で強調 */
  color: #fff;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: background-color 0.3s, transform 0.2s;
}

.btn.big-btn:hover {
  background-color: #a43c22; /* 少し濃い色に変化 */
  transform: scale(1.03); /* クリック前に浮き上がる動き */
}
.btn.contact-highlight {
  display: inline-block;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: bold;
  background-color: #003366; /* イメージカラーにしたよ */
  color: #fff;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: background-color 0.3s, transform 0.2s;
}

.btn.contact-highlight:hover {
  background-color: #003366;
  transform: scale(1.03);
}

.btn.magnetic-highlight {
  display: inline-block;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: bold;
  background-color: #BE4D32; /* ブランドカラーで目立たせる */
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: background-color 0.3s, transform 0.2s;
}

.btn.magnetic-highlight:hover {
  background-color: #a43c22;
  transform: scale(1.03);
}
/* =========================
   共通テキスト整形
========================= */
.paragraph-wide-left {
  text-align: left;
  max-width: 800px;
  margin: 0 auto 1em;
}

.paragraph-link-note {
  text-align: left;
  max-width: 800px;
  margin: 20px auto 0;
  font-size: 16px;
  line-height: 1.6;
}

.list-wide-left {
  text-align: left;
  max-width: 800px;
  margin: 0 auto 1em;
  padding-left: 24px;
}
.form-box {
  background-color: #fdfdfd;
  border: 2px solid var(--main-color);
  border-left: 2px solid var(--main-color);
  border-radius: 8px;
  padding: 32px;
  margin: 40px auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  max-width: 700px;
  box-sizing: border-box;
}
/* =========================
   フォームエリア（contact-form）
========================= */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label {
  font-weight: bold;
  margin-bottom: 6px;
  display: block;
  color: var(--main-color);
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}

.contact-form textarea {
  resize: vertical;
}

/* =========================
   必須項目マーカー
========================= */
.required-marker {
  color: red;
  font-size: 14px;
  margin-left: 4px;
}
.error-message {
  color: red;
  background-color: #fff5f5;
  padding: 12px;
  margin: 16px auto;
  max-width: 600px;
  border-left: 4px solid #cc0000;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  display: none;
}
.error-message:empty {
  display: none;
}
/* =========================
   実績紹介：年度見出しの強調
========================= */
.section h3 {
  font-size: 20px;
  margin-top: 40px;
  border-left: 6px solid var(--main-color);
  padding-left: 12px;
  color: #333;
}

/* =========================
   実績紹介：テキスト行表示リスト
========================= */
.result-list {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
  margin-bottom: 32px;
}

.result-list li {
  position: relative;
  padding: 8px 16px 8px 16px;
  border-bottom: 1px dashed #ccc;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}

/* =========================
   実績紹介：問い合わせリンク（左揃え）
========================= */
.left-button {
  text-align: left;
  margin-top: 40px;
}

.left-button .btn {
  display: inline-block;
  font-size: 16px;
  padding: 12px 20px;
  background-color: var(--main-color);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.left-button .btn:hover {
  background-color: #003366;
}

/* =========================
   レスポンシブ対応（スマホ用）
========================= */
@media (max-width: 768px) {
  .hero-text {
    font-size: 1.4rem;
    padding: 0 16px;
  }

  .company-name {
    font-size: 18px;
  }

.submenu {
  position: relative;
  background-color: #002244;
  padding-left: 10px;
}

.submenu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
}

.submenu-header a {
  display: block;
  width: 100%;
  font-size: 16px;
  text-decoration: none;
  color: #333;
}

.submenu-toggle-icon {
  font-size: 14px;
  color: #666;
  margin-left: 8px;
  flex-shrink: 0;
}

  .card-img {
    max-width: 300px;
  }

  .works-list,
  .info-block,
  .year-block {
    padding: 0 16px;
  }
}

/* =========================
   スマホ対応
========================= */
@media screen and (max-width: 768px) {
  .section h3 {
    font-size: 18px;
  }

  .result-list li {
    font-size: 15px;
    padding: 6px 12px;
  }

  .left-button {
    margin-top: 24px;
  }
}
/* 左揃えが基本だけど、この場合だけ中央寄せしたい */
  .left-button {
    text-align: center;
    margin-top: 40px;
}

/* スマホ表示時： */
@media screen and (max-width: 768px) {
  .menu {
    display: flex;
    flex-direction: row;       /* 横並びにする */
    justify-content: flex-start;   
    gap: 2px;                   /* メニュー間の余白 */
    padding: 12px 0;
    background-color: var(--main-color);
    font-size: 14px;           /* ← 文字サイズを小さく */
    flex-wrap: wrap;
  }

  .menu li {
    list-style: none;
  }

  .menu a {
    padding: 6px 10px;
    color: #fff;
    display: block;
    text-align: left;
  }

  .menu a:hover {
    color: #ffcc00;
  }

  .menu-icon,
  #menu-toggle {
    display: none;
  }

   .has-submenu {
  position: relative;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
}

.has-submenu:hover .submenu,
.submenu:hover {
  display: block;
}

}

/* PC表示時は hover で開く */
@media screen and (min-width: 769px) {
  .has-submenu:hover .submenu {
    max-height: 500px;
  }

  .submenu-toggle-icon {
    transition: transform 0.3s ease;
  }

  .has-submenu:hover .submenu-toggle-icon {
    transform: rotate(90deg);
  }
}
