/* 共通設定 */
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #fafafa;
}

/* ヘッダー（全ページ共通） */
header {
  background: #888888bd; /* グレー */
  color: #fff;
  padding: 1rem;
  text-align: center;
}

header h1,
header a {
  color: #fff;
  text-decoration: none;
}

/* ナビゲーション */
nav ul {
  list-style: none;
  display: inline-flex;
  gap: 2.5rem;
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none;
  color: #333;
}
header a:hover {
  border-bottom: 1px solid #ffffff;
}

h1 a:hover {
  border-bottom: unset;
}

h3 a:hover {
  border-bottom: 1px solid #333;
}

/* トップページ2カラム（フォームページも共通で利用） */
.container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 1.5rem auto;
  gap: 1rem;
}

/* メインコンテンツ */
.main-content {
  flex: 1 1 650px;
  min-width: 300px;
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 記事カード */
article.post {
  background: #fff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

article.post h3 {
  margin-top: 0;
}

article.post img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.post .date {
  font-size: 0.9rem;
  color: #666;
}

/* サイドバー */
.sidebar {
  flex: 0 0 300px;
  min-width: 200px;
}

/* プロフィール */
.profile {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.profile img {
  width: 150px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 5%;
}

.profile h4 {
  margin: 0.5rem 0 0 0;
}

.profile h5 {
  margin: 0 0 0.2rem 0;
}

.profile p {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

/* 検索ボックス */
#searchBox {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1rem;
  display: block;
}

/* ページネーション */
#pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
  gap: 0.5rem;
}

#pagination button {
  padding: 0.5rem 0.8rem;
  border: none;
  border-radius: 4px;
  background: #004080;
  color: #fff;
  cursor: pointer;
}

#pagination button:disabled {
  background: #ccc;
  cursor: default;
}

/* 記事ページ */
.article-page {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.article-page h1 {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.article-page img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.article-page p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* フッター */
footer {
  background: #eee;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  margin-top: 2rem;
}

/* --- お問い合わせフォーム --- */
.contact-form {
  max-width: 100%;
}
.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1.05rem;
  box-sizing: border-box;
}
.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}
.contact-form button,
.btn-submit {
  padding: 10px 20px;
  border: none;
  background: #004080;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}
.contact-form button:hover,
.btn-submit:hover {
  background: #0066cc;
}
.contact-form .required {
  color: red;
  font-size: 0.9rem;
}

/* 確認画面用テーブル */
.confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.confirm-table th,
.confirm-table td {
  border: 1px solid #ccc;
  padding: 0.8rem;
  text-align: left;
}
.confirm-table th {
  width: 25%;
  background: #f5f5f5;
}

/* 確認画面のボタン */
.confirm-actions {
  margin-top: 1rem;
}
.confirm-actions button {
  margin-right: 10px;
}

/* 送信完了メッセージ */
.thanks-message {
  background: #f0f8ff;
  border: 1px solid #cce0ff;
  padding: 1.2rem;
  border-radius: 6px;
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
}

/* レスポンシブ */
@media (max-width: 1000px) {
  body {
    margin: 0 2px;
  }
  header h1 img {
    width: 45%;
  }
  .container {
    flex-direction: column;
  }
  .sidebar {
    flex: 1 1 100%;
    margin: 0 auto;
  }
  nav ul li a {
    border-bottom: 1px solid #333;
    font-size: 0.9em;
  }
  h3 a {
    font-size: 1.2rem;
  }
}

/* =========================================
   === ハンバーガーメニュー（追加） ===
   ・PCは既存ナビそのまま
   ・768px以下で三本線を右上に表示
   ・オーバーレイは#333系・白文字・中央配置
   ========================================= */

/* ハンバーガー初期状態（PCでは非表示） */
.hamburger {
  display: none;
  position: absolute;
  right: 12px;
  top: 14px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  margin: 5px 0;
  background: #fff; /* ヘッダーがグレーなので白で視認性UP */
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* フルスクリーンオーバーレイ */
.sp-menu {
  position: fixed;
  inset: 0;
  background: rgba(51, 51, 51, 0.96); /* #333系 */
  color: #fff;
  display: none;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sp-menu.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* × ボタン */
.sp-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  color: #fff;
  font-size: 40px;
  border: none;
  cursor: pointer;
  line-height: 1;
}

/* 中央ナビ */
.sp-menu-nav {
  height: 100%;
  display: grid;
  place-items: center;
}
.sp-menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}
.sp-menu-nav li {
  margin: 14px 0;
}
.sp-menu-nav a {
  color: #fff;
  font-size: 1rem; /* 通常サイズ指定 */
  text-decoration: none;
  padding: 8px 12px;
  display: inline-block;
}
.sp-menu-nav a:hover {
  text-decoration: underline;
}

/* オープン中のスクロールロック */
body.menu-open {
  overflow: hidden;
}

/* 768px以下で切り替え */
@media (max-width: 768px) {
  /* 既存のPCナビは非表示に */
  header .pc-nav ul {
    display: none;
  }
  header h1 img {
    width: 88%;
  }
  /* 三本線表示 */
  .hamburger {
    display: block;
  }

  /* ヘッダーの位置合わせ（中央タイトル＋右上ハンバーガー） */
  header {
    position: relative;
    padding-right: 54px; /* 右上のボタン分の余白 */
  }
  nav ul {
    display: flex;
    flex-direction: column;
  }

  header h1 {
    margin: unset;
  }

  header h1 img {
    margin: 25px 0 0 10px;
  }
}

/* 記事内テーブル（report-table専用） */
.article-page .report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  background: #fff;
  border-radius: 6px;
  overflow: hidden; /* 角丸を有効に */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.article-page .report-table th,
.article-page .report-table td {
  border: 1px solid #ddd;
  padding: 0.8rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.article-page .report-table th {
  background: #f5f7fa;
  font-weight: 600;
  color: #333;
}

.article-page .report-table tbody tr:nth-child(even) {
  background: #fafafa;
}

/* スマホ対応：横スクロール */
@media (max-width: 768px) {
  .article-page .report-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .article-page .report-table table {
    width: 100%;
  }
}
