/* 基本設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  font-family: Arial, sans-serif;
  background: black;
}

/* 見出しフォント */
h1, h2, h3 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
}
h1 { font-size: 5rem; margin: 15px; }
h2 { font-size: 2.5rem; margin: 8px; }
h3 { font-size: 1.5rem; margin: 4px; }

/* ナビゲーション */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center; /* 中央寄せ */
  align-items: center;
  height: 50px;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  padding: 0 20px;
}

.menu-items {
  display: flex;
  gap: 25px;
  align-items: center;
}

/* 通常メニューリンク */
.navbar .menu-items a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
  font-family: Arial, sans-serif; /* 他と揃える */
}

.navbar .menu-items a:hover {
  color: #00ff00;
}

/* スタッフログインボタン */
.staff-login {
  margin-left: auto;
  background-color: white;
  color: black;
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-family: Arial, sans-serif; /* メニューとフォント統一 */
  font-size: 1rem;
  border: 1px solid black;
  transition: background-color 0.3s, color 0.3s;
}

.staff-login:hover {
  background-color: #e0e0e0;
  color: black;
}

/* ハンバーガーメニュー */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  transition: all 0.3s ease;
}

/* セクション基本スタイル */
section {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: 50px;
}

/* ビデオ設定 */
video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
}

/* オーバーレイ */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* コンテンツ */
.content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
  width: 85%;
  margin: 0 auto;
  padding-bottom: 50px;
}

/* フッター */
.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  padding: 10px;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.7);
}

/* アニメーション設定 */
.line {
  opacity: 0;
  transform: translateY(20px);
}

/* ホームページのアニメーション */
#page1.active video {
  animation: fadeIn 3s ease 4s forwards;
}
#page1.active .line:nth-child(1) {
  animation: fadeIn 0.4s ease forwards;
}
#page1.active .line:nth-child(2),
#page1.active .line:nth-child(3) {
  animation: fadeInUp 3s ease-out 1s forwards;
}

/* 他のページのアニメーション */
section.active:not(#page1) video {
  animation: fadeIn 4s ease forwards;
}
section.active:not(#page1) .line {
  animation: fadeInUp 0.8s ease 2s forwards;
}

/* アニメーションキーフレーム */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* レイアウト */
.split-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 3rem;
}
.split-content .block {
  width: 45%;
}

/* テーブルデザイン（会社概要・採用情報共通） */
.table {
  border-collapse: collapse;
  width: auto;
  margin: 0 auto;
  max-width: 600px;
  opacity: 0; /* 初期状態は非表示 */
}

/* テーブルを横並びにする */
.table-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

/* テーブルのヘッダーとデータセル */
.table th, .table td {
  padding: 10px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.table th {
  background: rgba(255, 255, 255, 0.2);
  font-weight: bold;
  color: white;
}
.table td {
  color: white;
}

/* ボタン */
.apply-btn {
  display: inline-block;
  background-color: #007BFF;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.apply-btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

/* フェードインアニメーション（テーブル表示） */
section.active .table {
  animation: fadeInUp 0.8s ease 2s forwards;
}

/* 会社ロゴと社名を横並びにし、中央揃え */
.company-logo-container {
  display: flex;
  align-items: center;
  gap: 15px; /* ロゴとテキストの間隔 */
  height: 100%; /* 親要素の高さに対して中央配置 */
}

/* 会社ロゴのサイズ調整 */
.company-logo {
  max-width: 80px; /* ロゴの最大幅 */
  height: auto;
}

/* テーブルのセル内の要素を中央揃え */
.company-table td {
  display: flex;
  align-items: center;
}

/* 小さいロゴ */
.small-logo {
  max-width: 200px;
  height: auto;
  margin: 10px 0;
}

/* モバイル対応 */
@media (max-width: 800px) {
  /* テーブルを縦に並べる */
  .table-container {
    flex-direction: column;
    align-items: center;
  }
  
  /* 分割コンテンツを縦に並べる */
  .split-content {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  
  .split-content .block {
    width: 100%;
  }
}

/* タブレット・スマホ対応 */
@media (max-width: 768px) {
  /* フォントサイズの調整 */
  h1 { font-size: 3rem; margin: 10px; }
  h2 { font-size: 2rem; margin: 6px; }
  h3 { font-size: 1.2rem; margin: 3px; }
  
  /* ハンバーガーメニュー表示 */
  .menu-toggle {
    display: flex;
    position: absolute;
    left: 15px;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  /* メニュー表示切替 */
  .navbar {
    justify-content: flex-end;
  }
  
  .menu-items {
    position: fixed;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    transition: all 0.5s ease;
    z-index: 1000;
    gap: 30px;
  }
  
  .menu-items.active {
    left: 0;
  }
  
  .menu-items a {
    font-size: 1.2rem !important;
  }
  
  /* スタッフログインボタンの位置調整 */
  .staff-login {
    margin-left: 0;
    margin-right: 15px;
    font-size: 0.9rem;
    padding: 6px 12px;
  }
  
  /* コンテンツの余白調整 */
  .content {
    width: 90%;
    padding-bottom: 30px;
  }
}

/* 小型スマホ対応 */
@media (max-width: 600px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.1rem; }
  
  /* ロゴと会社名を縦並びに */
  .company-logo-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .company-logo {
    max-width: 60px;
  }
  
  /* テーブルの調整 */
  .table th, .table td {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
  
  /* ボタンの調整 */
  .apply-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  /* セル内の配置調整 */
  .company-table td {
    flex-direction: column;
    align-items: center;
  }
}

/* 最小スマホ対応 */
@media (max-width: 400px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1rem; }
  
  .navbar {
    height: 45px;
  }
  
  .staff-login {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
  
  .table th, .table td {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
}