@charset "utf-8";

/* =================================================================
   1. 表示・非表示の切り替え
================================================================= */
@media (max-width: 767px) {
  .d-none-sp {
    display: none !important;
  }
}
@media (min-width: 768px) {
  .d-none-pc {
    display: none !important;
  }
}

/* =================================================================
   2. ヘッダー全体の構造（高さ50px固定）
================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 0;
  height: 50px; /* PC・スマホ共通で50px */
}

/* 垂直中央揃えのための設定 */
.site-header .row {
  height: 50px;
  display: flex;
  align-items: center; /* 縦の中央 */
  flex-wrap: nowrap;
}

.site-logo {
  display: flex;
  align-items: center;
  height: 50px;
}

.site-logo a {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #333;
  text-decoration: none;
}

/* =================================================================
   3. PC用メインメニュー（細め400 / 20px / ・消去 / 中央揃え）
================================================================= */
/* リストの・を確実に消す */
.main-navigation ul,
.main-navigation li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.main-navigation ul {
  display: flex;
  gap: 30px;
}

.main-navigation a {
  font-size: 16px;
  font-weight: 400; /* 細いフォント */
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 50px; /* ヘッダーの高さに合わせる */
  position: relative;
  transition: color 0.3s;
}

.main-navigation a:hover {
  color: #ff0000;
}

/* マウスオーバー時の赤い下線 6px */
.main-navigation a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background-color: #ff0000;
  transform: scaleX(0);
  transition: transform 0.3s;
}

.main-navigation a:hover::after {
  transform: scaleX(1);
}

/* =================================================================
   4. 重要ボタン（PC:180x50 / スマホ:70x32）
================================================================= */
.important-buttons {
  display: flex;
  height: 50px;
  align-items: center; /* ボタン自体をヘッダー中央に置く */
}

.btn-sport {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  font-weight: 400; /* ボタンも細めに */
  text-decoration: none;
  transition: opacity 0.3s;
}

.btn-bracket {
  background-color: #00a0ff;
}
.btn-entry {
  background-color: #ff0000;
}

.btn-sport:hover {
  opacity: 0.8;
}

/* PC版ボタンサイズ */
@media (min-width: 768px) {
  .btn-sport {
    width: 180px;
    height: 50px;
    font-size: 20px;
  }
  .biwakoperon-logo {
    width: auto;
    height: 42px;
  }
}

/* スマホ版ボタンサイズ（ご要望通り） */
@media (max-width: 767px) {
  .btn-sport {
    width: 120px;
    height: 32px;
    font-size: 12px;
  }
  .important-buttons {
    gap: 0; /* スマホでのボタン同士の隙間 */
  }
  .biwakoperon-logo {
    width: auto;
    height: 32px;
  }
}

/* =================================================================
   5. ハンバーガーボタン（50pxのヘッダー中央に完全に配置）
================================================================= */
.menu-toggle {
  background: none;
  border: none;
  width: 30px;
  /* ヘッダーと同じ50pxにして、align-items:centerの効果を受けるようにする */
  height: 50px;
  position: relative;
  cursor: pointer;
  padding: 0;
  margin-left: 10px;
  /* ボタン自体を垂直中央に配置するための予備設定（親要素で効いていれば不要ですが念のため） */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3本線を囲むインナー要素（ここを基準に線を中央に配置） */
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #333;
  position: absolute;
  left: 0;
  transition: 0.3s ease-in-out;
}

/* * 3本線の位置合わせ（50pxのちょうど真ん中に並ぶように計算）
 * 2pxの線3本 = 6px
 * 線と線の間を5px = 10px
 * 合計16pxが、50pxの中央に配置されます。
 */
.menu-toggle span:nth-child(1) {
  top: 17px; /* (50 - 16) / 2 = 17 */
}
.menu-toggle span:nth-child(2) {
  top: 24px; /* 17 + 2 + 5 = 24 */
}
.menu-toggle span:nth-child(3) {
  top: 31px; /* 24 + 2 + 5 = 31 */
}

/* ✕ アニメーション時の回転軸を中央に（計算値を微調整） */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =================================================================
   6. スマホ用ドロワーメニュー
================================================================= */
.mobile-drawer {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  height: calc(100vh - 50px);
  background: #fff;
  z-index: 999;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: 0.3s;
}

.mobile-drawer.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-drawer ul {
  list-style: none !important;
  padding: 20px !important;
  margin: 0 !important;
}

.mobile-drawer li {
  border-bottom: 1px solid #eee;
  list-style: none !important;
}

.mobile-drawer a {
  display: block;
  padding: 15px 0;
  color: #333;
  font-size: 18px;
  text-decoration: none;
}
