:root {
  --primary: #7b1e24;       /* ヘッダー・アクセント */
  --primary-light: #a54c52; /* ボタンやリンク */
  --bg: #ffffff;            /* ページ全体の背景 */
  --card-bg: rgba(255,255,255,0.9); /* セクション背景（半透明で写真対応） */
  --text-dark: #333;
  --text-light: #fff;
  --muted: #777;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
  padding: 100px 24px 0 24px /* ヘッダー固定分の余白 */
}

/* ヘッダー */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

header .logo {
  width: 200px;      /* ロゴ枠の幅 */
  height: 75px;     /* ロゴ枠の高さ */
  border-radius: 8px;
  overflow: hidden; /* はみ出した部分を隠す */
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;  /* cover だと枠いっぱいに拡大され切れる */
}



header .title {
  font-weight: bold;
  font-size: 1.5em;
}

header nav{
  display: flex;
  gap: 15px;
  margin-right: 50px;
}

header nav a {
  margin-left: 15px;
  text-decoration: none;
  color: var(--text-light);
  font-weight: bold;
}

header nav a:hover {
  color: #f4cccc;
}

/* メインビジュアル */
.hero {
  position: relative;
  background: url('hero-bg.jpg') center/cover no-repeat;
  color: var(--text-light);
  text-align: center;
  padding: 80px 24px;
  border-radius: 12px;
  margin: 24px auto;
  max-width: 900px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.2); /* 白オーバーレイで文字読みやすく */
  backdrop-filter: blur(5px);
  border-radius: 12px;
  z-index: 0;
}

.hero h1 {
  position: relative;
  z-index: 1;
  font-size: 32px;
  margin: 0;
}

.hero p {
  position: relative;
  z-index: 1;
  margin-top: 12px;
}

/* セクション共通 */
.card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(5px);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 24px auto;
  max-width: 900px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 24px;
  padding-top: 10px;
  scroll-margin-top: 100px; 
}

/* スケジュール表 */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.schedule-table th, .schedule-table td {
  border: 1px solid #ccc;
  padding: 10px;
}

.schedule-table th {
  background-color: var(--primary);
  color: var(--text-light);
}

.schedule-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* 次の試合 */
.courts {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.court {
  flex: 1;
  min-width: 200px;
  padding: 16px;
  border-radius: 12px;
  background-color: var(--card-bg);
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0, 0, 1);
}

/* 会場マップ */
.venue-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}

.venue-container iframe,
.venue-container .campus-map {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* スポンサー */
.sponsor-logos {
  display: flex;
  justify-content: center;  /* 中央揃え */
  gap: 20px;                /* ロゴ間の隙間 */
  flex-wrap: wrap;           /* 狭い画面では下に折り返す */
  align-items: center;
  margin-top: 20px;
}

.sponsor-logos img {
  max-width: 150px;       /* 横幅制限 */
  max-height: 80px;       /* 高さ制限 */
  object-fit: contain;    /* アスペクト比保持 */
  border-radius: 8px;
  background-color: #fff; /* 透過ロゴの背景 */
  padding: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.sponsor-logos img:hover {
  transform: scale(1.05); /* ホバーで少し拡大 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
  .sponsor-logos img {
    max-width: 120px;
    max-height: 60px;
  }
}


/* フッター */
footer {
  background-color: var(--primary);
  color: var(--text-light);
  text-align: center;
  padding: 16px 24px;
  border-radius: 0 0 12px 12px;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  nav a { margin-left: 8px; font-size: 0.9em; }
  .courts { flex-direction: column; }
}

.card2 {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(5px);
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 24px auto;
  max-width: 900px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 24px;
  padding-top: 5px;
  border: red 5px solid;
  background-color: rgba(255, 200, 200, 0.3);
  scroll-margin-top: 100px; 
}

.nmsize {
  font-size: 1.5em;
}

.team-red {
  color: #e53935;
  font-weight: bold;
}

.team-blue {
  color: #1e88e5;
  font-weight: bold;
}

.label-red {
  background-color: #e53935;
  color: white;
  border-radius: 4px;
  padding: 2px 6px;
  margin-right: 4px;
  font-size: 0.9em;
}

.label-blue {
  background-color: #1e88e5;
  color: white;
  border-radius: 4px;
  padding: 2px 6px;
  margin-right: 4px;
  font-size: 0.9em;
}

.vs {
  margin: 0 8px;
  font-weight: bold;
}

.last {
  text-align: center;
}

/* ハンバーガーボタン */
.menu-toggle {
  display: none; /* PCでは非表示 */
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
}

/* ---------- スマホ用 ---------- */
@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
  }

  header nav {
    display: none; /* 初期状態では非表示 */
    flex-direction: column;
    width: 100%;
    background-color: var(--primary);
    text-align: center;
    padding: 10px 0;
    margin-right: 0; /* スマホ時はリセット */
  }

  header nav a {
    display: block;
    margin: 10px 0;
  }

  .menu-toggle {
    display: block;
    margin-right: 25px;
  }

  /* メニュー展開時 */
  header.nav-open nav {
    display: flex;
  }
}
