/* --- 色の定義（沖縄の花笠カラー） --- */
:root {
  --hanagasa-red: #d7003a; /* 赤 */
  --hanagasa-blue: #005bbb; /* 青 */
  --hanagasa-gold: #ffc400; /* ゴールド */
  --hanagasa-white: #ffffff; /* 白 */
  --text-dark: #333333; /* 基本の文字色 */
  --font-rounded: "Zen Maru Gothic", "Hiragino Maru Gothic ProN",
    "Hiragino Kaku Gothic ProN", "HG丸ｺﾞｼｯｸM-PRO", "Nikumaru",
    sans-serif;
}

/* --- 基本設定 --- */
body {
  margin: 0;
  font-family: var(--font-rounded); /* 基本フォントを指定 */
  font-weight: 400;
  color: var(--text-dark);
  background-color: #f8f9fa; /* 少しだけ色をつけた背景 */
}

h1,
h2,
h3,
h4,
h5,
h6,
strong {
  font-weight: 700;
}

p {
  font-weight: 400;
}

/* ヘッダーのレイアウト */
header {
  position: fixed; /* 画面上部に固定 */
  top: 0;
  left: 0;
  width: 100%;
  display: flex; /* 子要素を横並びにする */
  justify-content: space-between; /* 両端に寄せる */
  align-items: center; /* 上下中央揃え */
  padding: 10px 20px; /* 内側の余白（上下10px, 左右20px） */
  color: var(--hanagasa-white); /* 文字色を白に */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.06) 45%,
    rgba(255, 255, 255, 0.03) 72%,
    rgba(255, 255, 255, 0) 100%
  );
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 100;
  transition: background-color 0.4s, color 0.4s, box-shadow 0.4s;
  box-sizing: border-box;
}

/* スクロール後のヘッダー */
header.scrolled {
  background-color: var(--hanagasa-white);
  color: var(--text-dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
header.scrolled .hamburger-inner,
header.scrolled .hamburger-inner::before,
header.scrolled .hamburger-inner::after {
  background-color: var(--text-dark);
}

header h1 {
  margin: 0;
  font-size: 24px;
  z-index: 10; /* ナビゲーションより手前に表示 */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); /* 明るい背景でも見えるように影を追加 */
}

/* --- ハンバーガーボタン --- */
/* ボタン全体のコンテナ */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: inherit; /* 親要素(header)の色を継承する */
  position: relative;
  width: 60px;
  height: 60px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); /* 明るい背景でも見えるように影を追加 */
  z-index: 95; /* ナビゲーション(z-index: 90)より手前に表示 */
}

/* 3本線のアイコン部分のコンテナ */
.hamburger-box {
  width: 30px;
  height: 24px;
  display: inline-block;
  position: absolute;
  top: 15px;
  left: 15px;
}

/* 3本線の真ん中の線 */
.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: -1.5px;
  width: 100%;
  height: 3px;
  background-color: var(--hanagasa-white);
  position: absolute;
  transition: transform 0.3s ease-in-out, background-color 0.4s;
}

/* 3本線の上と下の線 */
.hamburger-inner::before,
.hamburger-inner::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--hanagasa-white);
  position: absolute;
  transition: transform 0.3s ease-in-out, background-color 0.4s;
}
.hamburger-inner::before {
  top: -10px;
}
.hamburger-inner::after {
  bottom: -10px;
}

/* MENU/CLOSEのテキスト */
.hamburger-label {
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: var(--font-rounded);
  font-size: 12px;
  font-weight: 700;
  color: inherit;
}

/* --- PC向けナビゲーション (900px以上の画面幅で適用) --- */
@media (min-width: 900px) {
  .hamburger {
    display: none; /* PCではハンバーガーボタンを非表示 */
  }

  header nav {
    all: unset; /* ハンバーガーメニュー用のスタイルを全てリセット */
  }

  header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  header nav li {
    position: relative; /* サブメニューの位置の基準 */
    margin-left: 20px;
  }

  header nav a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: inherit; /* 親要素(header)の色を継承 */
    transition: color 0.3s;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }

  /* ▼ のアイコンを追加 */
  header nav .has-submenu > a::after {
    content: "▼";
    font-size: 11px;
    margin-left: 5px;
  }

  header nav li:hover > a {
    color: var(--hanagasa-gold);
  }

  /* サブメニューのスタイル */
  .submenu {
    display: none; /* 通常は非表示 */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--hanagasa-white);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 200px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  }

  .submenu li {
    margin: 0;
  }

  .submenu a {
    color: var(--text-dark);
    padding: 10px 20px;
    white-space: nowrap; /* 折り返しを防ぐ */
  }

  .submenu a:hover {
    background-color: #f0f0f0;
  }

  /* 親メニューにホバーした時にサブメニューを表示 */
  header nav li:hover > .submenu {
    display: block;
  }
}

/* --- モバイル向けナビゲーション (899px以下の画面幅で適用) --- */
@media (max-width: 899px) {
  header nav {
    position: fixed;
    top: 0;
    right: -305px; /* パネルが画面外に隠れるように */
    width: 300px;
    height: 100vh;
    padding-top: 80px; /* ヘッダーと重ならないように上部に余白 */
    background-color: var(--hanagasa-blue);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    transition: right 0.5s, z-index 0s 0.5s; /* 閉じる時に即座にz-indexを下げる */
    z-index: 90; /* ヘッダー(100)よりは低く、他の要素よりは高く */
  }

  header nav.active {
    right: 0;
  }

  header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto; /* メニュー項目が多い場合にスクロール可能に */
    height: 100%;
  }

  header nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  }

  /* ▼ のアイコンを追加 */
  header nav .has-submenu > a {
    position: relative;
  }
  header nav .has-submenu > a::after {
    content: "▼";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s;
  }
  header nav .has-submenu.open > a::after {
    transform: translateY(-50%) rotate(180deg); /* 開いたときにアイコンを回転 */
  }

  header nav a {
    display: block;
    padding: 15px 20px; /* パディングを少し小さく */
    text-align: left; /* 左揃えに */
    text-decoration: none;
    color: var(--hanagasa-white);
    font-size: 16px; /* フォントサイズを少し小さく */
    font-weight: bold;
  }

  /* サブメニューのスタイル */
  .submenu {
    display: none; /* JSで制御するため、通常は非表示 */
    list-style: none;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.2); /* 背景色を少し変える */
  }
  .submenu a {
    font-size: 14px;
    padding-left: 40px; /* インデントをつける */
  }
}

/* --- コンテンツセクション共通スタイル --- */
.content-section {
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-rounded);
  font-size: 40px;
  text-align: center;
  margin-bottom: 60px;
  color: var(--hanagasa-blue);
}

/* --- 共通ボタン スタイル --- */
.section-button-container {
  text-align: center;
  margin-top: 60px;
}

.btn {
  display: inline-block;
  padding: 12px 50px;
  font-family: var(--font-rounded);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: var(--hanagasa-white);
  background-color: var(--hanagasa-blue);
  border: 2px solid var(--hanagasa-blue);
  border-radius: 50px; /* 角を丸くしてカプセル型に */
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: var(--hanagasa-white);
  color: var(--hanagasa-blue);
  transform: translateY(-3px);
}

@media (max-width: 576px) {
  .content-section {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 32px;
  }
}

/* --- フッター --- */
footer {
  background-color: var(--hanagasa-blue);
  color: var(--hanagasa-white);
  padding: 60px 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr; /* 左1:右2の比率で分割 */
  gap: 40px;
}

.footer-sitemap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

.footer-sitemap ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-sitemap a {
  text-decoration: none;
  color: var(--hanagasa-white);
  transition: opacity 0.3s;
  display: inline-block;
  padding: 5px 0;
}

.footer-sitemap a:hover {
  opacity: 0.8;
}

.sitemap-child a {
  font-size: 14px;
  padding-left: 15px; /* 子メニューをインデント */
}

.footer-sitemap .sitemap-link-gap-top {
  margin-top: 10px;
}

/* --- 応援パートナー (キングスロゴ) --- */
.sitemap-right-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 230px;
}

.sitemap-right-links {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: space-between;
  column-gap: 24px;
}

.footer-partner-block {
  width: 100%;
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

.partner-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: opacity 0.3s ease;
}

.partner-link:hover,
.partner-link:focus-visible {
  opacity: 0.8;
}

.partner-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.partner-logo {
  width: 200px;
  height: auto;
  max-height: 100px;
  object-fit: contain;
}

.partner-text {
  margin-top: 10px;
  color: var(--hanagasa-white);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.5;
  letter-spacing: 0.5px;
}

.footer-info h3 {
  font-family: var(--font-rounded);
  font-size: 40px;
  margin: 0 0 20px 0;
}

.footer-info p {
  margin: 0;
  line-height: 1.8;
}

/* --- 浮遠ロゴ --- */
.company-floating-logo {
  position: fixed;
  right: 24px;
  bottom: -140px;
  z-index: -1;
  pointer-events: none;
}

.company-floating-logo-image {
  width: 700px;
  height: auto;
  display: block;
  opacity: 0.16;
  filter: grayscale(1) sepia(0.28) saturate(0.7) brightness(1.08);
}

@media (max-width: 576px) {
  .company-floating-logo {
    right: -100px;
    bottom: -36px;
    z-index: -1;
  }

  .company-floating-logo-image {
    width: 600px;
    opacity: 0.1;
  }
}

.footer-address-container {
  display: flex;
  gap: 20px;
}

.footer-address {
  flex: 1; /* 均等な幅を確保 */
}

.footer-address h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: bold;
}
.footer-address p {
  font-size: 14px;
}

.footer-copyright {
  max-width: 1200px;
  margin: 60px auto 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 13px;
}

/* --- フッターのレスポンシブ対応 --- */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr; /* モバイルでは縦並びにする */
  }
  .footer-sitemap {
    display: none; /* スマホではサイトマップを非表示 */
  }
  .footer-address-container {
    flex-direction: column; /* 住所を縦並びにする */
  }
}

/* --- 社内確認用: 一時ハイライト（本番前に削除） --- */
.todo-edit {
  position: relative;
}

.todo-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-115%);
  z-index: 20;
  white-space: nowrap;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #7a4f00;
  background: #fff4b8;
  border: 1px solid #f2c84b;
  border-radius: 8px;
  padding: 4px 10px;
  box-shadow: 0 4px 10px rgba(96, 62, 0, 0.18);
  pointer-events: none;
}

.todo-edit > .todo-label:only-child {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin: 0 0 12px;
}
