/* ===== スマホ用レスポンシブデザイン ===== */

/* スマホ用固定ヘッダー（デフォルトは非表示） */
#sp-header {
  display: none;
}

/* スマホ用ドロップダウンナビ */
#mobile-nav {
  display: none;
  background-color: #2a72a8;
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#mobile-nav.open {
  display: block;
}

#mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#mobile-nav ul li a {
  display: block;
  padding: 14px 20px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  font-size: 16px;
  font-weight: bold;
}

#mobile-nav ul li a:hover,
#mobile-nav ul li a:active {
  background-color: #1a5a8a;
  color: #ffffff;
}

/* ハンバーガーボタン */
#hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

#hamburger-btn span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: #ffffff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ハンバーガー → × アニメーション */
#hamburger-btn.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}
#hamburger-btn.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== スマホ画面のみ適用 (768px以下) ===== */
@media (max-width: 768px) {

  /* スマホ用固定ヘッダーを表示 */
  #sp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2a72a8;
    padding: 0 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    height: 50px;
    box-sizing: border-box;
  }

  #sp-header .sp-logo {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
  }

  /* 固定ヘッダーの分の余白 */
  body {
    padding-top: 50px !important;
  }

  /* PC用の上部バーを非表示 */
  #ueline {
    display: none !important;
  }

  #sline {
    display: none !important;
  }

  /* デスクトップ用ナビボタンを非表示 */
  .desktop-nav-table {
    display: none !important;
  }

  /* テーブル幅を画面幅に合わせる */
  table {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 画像を画面幅に合わせる */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* centerタグのはみ出し防止 */
  center {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    overflow-x: hidden;
  }
}
