/* ========================================================
   ヘッダー＆ナビゲーション・スマホ右上メニュー最適化スタイル
   株式会社秀和興業 Pattern D
   ======================================================== */

/* --------------------------------------------------------
   1. PC版ヘッダー（画面幅 1101px 以上）
   -------------------------------------------------------- */
.header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  height: 84px;
  padding: 0 0 0 36px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-sizing: border-box;
  transform: translateY(0);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* スクロール中に下にスクロールした時（スッと上に隠れる） */
.header.is-hidden {
  transform: translateY(-100%) !important;
}

/* スクロールして少し上に戻った時 / スクロール中の背景スタイル */
.header.is-scrolled {
  background: rgba(7, 13, 23, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28) !important;
}

/* 白基調の下層ページ（works.php, contact.php） */
.header.inner-header {
  color: #111111;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.header.inner-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.header .logo {
  margin-left: 0;
}

/* デスクトップナビゲーション */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
  margin-left: auto;
}

.desktop-nav a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover {
  opacity: 0.7;
  transform: translateY(-1px);
}

.desktop-nav a span {
  font-family: "Poppins", sans-serif;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  opacity: 0.75;
  color: #38bdf8; /* アクセントのシアン */
  line-height: 1;
}

.header.inner-header .desktop-nav a span {
  color: #008fd2;
}

/* アクションボタン群 */
.header-actions {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: 28px;
  flex-shrink: 0;
}

/* 採用情報ボタン */
.recruit-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 140px;
  height: 100%;
  background: #008fd2;
  color: #ffffff !important;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.25s ease;
}

.recruit-link:hover {
  background: #007bb8;
}

.recruit-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.15;
}

.recruit-txt strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.recruit-txt span {
  font-family: "Poppins", sans-serif;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  opacity: 0.85;
  color: #e0f2fe;
}

/* PC版 メニューボタン */
.menu-button {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 84px !important;
  height: 100% !important;
  padding: 0 !important;
  border: none !important;
  background: #ffffff !important;
  color: #111111 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: background 0.25s ease, color 0.25s ease;
}

.menu-button:hover {
  background: #f1f5f9 !important;
}

/* アイコン（2本バー） */
.menu-icon {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 24px !important;
  height: 12px !important;
  margin: 0 0 6px 0 !important; /* 文字との間に確実な余白 */
}

.menu-icon i {
  display: block !important;
  width: 22px !important;
  height: 2px !important;
  background: currentColor !important;
  border-radius: 2px !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transform-origin: center !important;
}

/* MENU ラベル */
.menu-label {
  display: block !important;
  font-family: "Poppins", sans-serif !important;
  font-size: 8px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  line-height: 1 !important;
  color: currentColor !important;
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 0.16em !important; /* 中央揃え補正 */
}

/* メニューボタン展開時（アクティブ） */
.menu-button.active {
  background: #08111e !important;
  color: #38bdf8 !important;
}

.menu-button.active .menu-icon i:first-child {
  transform: translateY(4px) rotate(45deg) !important;
}

.menu-button.active .menu-icon i:last-child {
  transform: translateY(-4px) rotate(-45deg) !important;
}

/* --------------------------------------------------------
   2. スマホ・タブレット版（画面幅 1100px 以下）
   -------------------------------------------------------- */
@media (max-width: 1100px) {
  .header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60px !important;
    padding: 0 !important;
    background: rgba(7, 13, 23, 0.88) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    z-index: 900 !important;
  }

  .header.inner-header {
    background: rgba(255, 255, 255, 0.94) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }

  /* ロゴ（左端配置） */
  .logo-link {
    margin-left: 16px !important;
    margin-right: auto !important;
  }

  .header .logo {
    min-width: 0 !important;
    gap: 8px !important;
    margin-left: 0 !important;
  }

  .header .logo b {
    font-size: 17px !important;
    letter-spacing: 0.08em !important;
  }

  .header .logo small {
    font-size: 5.5px !important;
    margin-top: 2px !important;
  }

  .header .logo-mark {
    width: 25px !important;
    height: 25px !important;
  }

  .header .logo-mark i:nth-child(1),
  .header .logo-mark i:nth-child(3) {
    height: 18px !important;
    width: 7px !important;
  }

  .header .logo-mark i:nth-child(2) {
    height: 25px !important;
    width: 7px !important;
  }

  /* スマホではナビや不要ボタンをすべて非表示ですっきりと */
  .desktop-nav,
  .recruit-link {
    display: none !important;
  }

  /* アクション群（最右上に吸着） */
  .header-actions {
    margin-left: auto !important;
    height: 100% !important;
  }

  /* スマホ版 メニューボタン（完全な最右上） */
  .menu-button {
    width: 60px !important;
    height: 60px !important;
    background: #008fd2 !important;
    color: #ffffff !important;
    border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  .menu-icon {
    gap: 5px !important;
    width: 20px !important;
    height: 10px !important;
    margin: 0 0 4px 0 !important;
  }

  .menu-icon i {
    width: 18px !important;
    height: 2px !important;
  }

  .menu-label {
    font-size: 7px !important;
    letter-spacing: 0.14em !important;
  }

  .menu-button.active {
    background: #08111e !important;
    color: #38bdf8 !important;
  }

  /* メニューパネルの余白 */
  .menu-panel {
    z-index: 890 !important;
    padding-top: 75px !important;
  }

  /* 下層ページのヒーローパディング調整 */
  .sub-hero {
    padding-top: 60px !important;
  }
}

/* --------------------------------------------------------
   3. 全画面オーバーレイメニュー（英語サブタイトル付き）
   -------------------------------------------------------- */
.menu-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1050px;
  margin: auto;
  gap: 0 40px;
}

.menu-inner a.menu-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu-inner a.menu-link:hover {
  opacity: 0.85;
  transform: translateX(4px);
}

.menu-num {
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #ffffff;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.menu-inner a.menu-link:hover .menu-num {
  opacity: 1;
}

.menu-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-txt strong {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.menu-txt small {
  font-family: "Poppins", sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #e0f2fe;
  opacity: 0.75;
}

.menu-inner a .arrow {
  margin-left: auto;
  font-size: 18px;
  opacity: 0.65;
}

@media (max-width: 768px) {
  .menu-inner {
    grid-template-columns: 1fr;
    padding: 0 20px 40px;
  }

  .menu-inner a.menu-link {
    padding: 18px 4px;
  }

  .menu-txt strong {
    font-size: 18px;
  }
}
