@charset "utf-8";
/* htmlのfont-sizeを基準に */
html {
    font-size: 100%;
}

/* bodyの設定 */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  font-size: 16px;  /* 文字サイズを16pxに設定 */
  margin: 0;
}

/* box-sizingを全体に適用 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ヘッダー */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 16px;
  background-color: #fff;
  border-bottom: 2px solid #ccc;
}

/* 左側（ロゴ＋サイトタイトル） */
.header-left {
  display: flex;
  align-items: center;
}

/* ロゴ */
.logo-img {
  width: 80px;
  height: auto;
}

/* サイトタイトル */
.site-title {
  font-size: large;
  font-weight: bold;
  color: #333;
  margin-left: 10px;
  font-family: 'Arial', sans-serif;
}

/* ナビバー（PC 基本） */
.navbar {
  background-color: #003366;
  padding: 10px 20px;
  display: flex;
  align-items: center;
}

/* ナビ内のリンク共通 */
.navbar a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  display: block;
}

/* .nav 系（別用途で使っているかもしれないので残す） */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav ul {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.nav ul li {
  margin: 0 15px;
}

.nav ul li a {
  color: #2a5d9c;
  text-decoration: none;
  font-size: 1.0em;
  padding: 10px 5px;
  font-weight: bold;
}

.nav ul li a:hover {
  color: orange;
  font-weight: bold;
}

/* メインメニュー（PC 基本） */
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.menu > li {
  position: relative;
}

/* PC では hover でサブメニュー表示 */
.menu > li:hover > .submenu {
  display: block;
}

/* サブメニュー（PC 基本） */
.submenu {
  display: none;
  position: absolute;
  background-color: #ffffff;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  top: 100%;
  left: 0;
  z-index: 100;
}

.submenu li {
  list-style: none;
  border-bottom: 1px solid #ddd;
}

.submenu a {
  color: black;
  padding: 10px;
  display: block;
}

.submenu a:hover {
  background-color: #f0f0f0;
}

/* ドロップダウンメニュー */
.dropdown__lists {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  min-width: 200px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ドロップダウンメニューの項目 */
.dropdown__list a {
  display: block;
  padding: 10px;
  color: #0055a4;
  text-align: left;
  white-space: nowrap;
}

.dropdown__list a:hover {
  background-color: #f0f0f0;
}

/* ul / li 共通リセット */
ul {
  list-style: none;
  padding: 0;
}

li {
  list-style: none;
  padding: 0;
}

/* dl全体の設定 */
dl {
  margin: 0 auto;
  padding: 10px;
  width: 100%;
  max-width: 100%;
  background-color: #ffffff;
  box-sizing: border-box;
  line-height: 1.6;
}

/* dt（日時）のスタイル */
dt {
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
  margin-top: 15px;
  margin-bottom: 5px;
}

/* dd（内容）のスタイル */
dd {
  margin-left: 10px;
  margin-bottom: 10px;
  font-size: 1em;
  color: #555;
  padding-left: 10px;
  border-left: 3px solid #007bff;
  background-color: #ffffff;
}

/* dd内のリンクのスタイル */
dd a {
  color: #007bff;
  text-decoration: none;
}

dd a:hover {
  text-decoration: underline;
  color: #0056b3;
}

/* 汎用リンク */
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* サブメニュー（ページ内の別の水平メニュー） */
.menu_f01 {
  margin-top: 0px;
  padding: 10px 0;
  text-align: left;
  background-color: #e3f2fd;
}

.menu_f01 ul {
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.menu_f01 li {
  list-style: none;
  display: inline-block;
  margin: 5px 5px;
  font-size: 1.0em;
}

.menu_f01 li a {
  color: #0d47a1;
  text-decoration: none;
  font-size: 1.0em;
  padding: 10px 10px;
}

.menu_f01 li a:hover {
  text-decoration: none;
  color: #ff8c42;
}

/* メインコンテンツ（PC用） */
#contents {
  flex-grow: 1;
  max-width: 980px;
  background-color: white;
  padding: 10px 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  margin: auto;
}

/* アンダーナビ */
#underNavi {
  clear: both;
  margin: 0px;
  border-top: 1px solid #999999;
  text-align: center;
}

/* フッター */
#footer {
  background-color: #004080;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

/* 注意表示 */
.notice {
  clear: both;
  padding: 3px 0px 3px 5px;
  margin: 0em 0px 1em;
  border-left: 10px solid #d64541;
  color: #b22222;
  font-size: 130%;
  font-weight: bold;
  background-color: #fceaea;
}

/* 見出し */
h1 {
  clear: both;
  padding: 5px 2px 5px 7px;
  margin: 2em 0px 1em;
  border-left: 10px solid #e0b31e;
  font-size: 120%;
  background-color: #f6f6f6;
  text-align: left;
}

h2 {
  clear: both;
  padding: 3px 0px 3px 5px;
  margin: 2em 0px 1em;
  border-left: 10px solid #89ab56;
  font-size: 110%;
  background-color: #f6f6f6;
  text-align: left;
}

h3 {
  clear: both;
  padding: 3px 0px 3px 5px;
  margin: 2em 0px 1em;
  border-left: 10px solid #6961d3;
  font-size: 100%;
  background-color: #f6f6f6;
  text-align: left;
}

/* 協賛企業のレイアウト */
.sponsors-container {
  display: grid;
  grid-template-columns: repeat(4, 22fr);
  gap: 10px;
  padding: 10px;
  max-width: 100%;
  margin: auto;
}

.sponsor-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.sponsor-card:hover {
  transform: scale(1.05);
}

.sponsor-card img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* スマートフォン向けのスタイル（協賛企業エリア） */
@media (max-width: 768px) {
  .sponsors-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* 画像ギャラリー */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  padding: 20px;
}

/* タイトル部分のデザイン */
.gallery-title {
  grid-column: 1 / -1;
  text-align: left;
  font-size: 1.2em;
  font-weight: bold;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 5px;
}

.gallery figure {
  display: inline-block;
  width: 90%;
  margin: 10px;
  vertical-align: top;
  text-align: left;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  cursor: pointer;
}

.gallery figcaption {
  font-size: 0.8em;
  color: #555;
  margin-top: 5px;
}

/* ギャラリー スマホ対応 */
@media (max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

.gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* モーダル（拡大画像用） */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 2px 2px 10px rgba(255, 255, 255, 0.5);
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: white;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 50%;
}

.close:hover {
  background: rgba(255, 255, 255, 0.5);
}

img {
  max-width: 100%;
  height: auto;
}

/* テーブルの横スクロールを可能にする */
.table-container {
  overflow-x: auto;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* 画像の最大幅を制限し、比率を保つ */
.table-container img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: auto;
}

.label_short {
  clear: both;
  padding: 3px 0px 3px 5px;
  margin: 2em 0px 1em;
  border-left: 10px solid #e0b31e;
  font-size: 110%;
  font-weight: bold;
  background-color: #f6f6f6;
  text-align: left;
}

/* スマホ向けのレスポンシブ対応（表） */
@media screen and (max-width: 768px) {

  table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
  }

  td, th {
    word-break: break-word;
  }

  .table-container table {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .table-container tr {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .table-container td {
    width: 45%; /* 2列レイアウト */
    text-align: center;
    display: block;
    margin: 5px 0;
  }

  .table-container img {
    width: 80%;
  }
}

/* スマホ（480px以下）では1列にする */
@media screen and (max-width: 480px) {
  .table-container td {
    width: 100%;
  }

  .table-container img {
    width: 70%;
  }
}

/* ========= スマホ用ナビゲーション（ここが今回の本命） ========= */
@media screen and (max-width: 768px) {

  /* ヘッダー縦並び */
  .header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-left {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .logo-img {
    width: 120px;
  }

  .site-title {
    font-size: large;
    margin-top: 5px;
    margin-bottom: 15px; /* ロゴとメニューの間 */
  }

  /* ナビバーを縦並びメニューに */
  .navbar {
    background-color: #003366;
    padding: 10px 0;
    display: flex;
    justify-content: center;
  }

  .navbar ul.menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .navbar ul.menu > li {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #ddd;
  }

  .navbar ul.menu > li > a {
    display: block;
    padding: 10px 15px;
    border-bottom: none;
    color: #fff;
  }

  /* サブメニューは「押された項目の直下」に出したいので static に */
  .submenu {
    position: static;
    display: none;            /* 初期状態は非表示 */
    box-shadow: none;
    background-color: #00264d;
    padding-left: 0;
  }

  .submenu li {
    border-bottom: 1px solid #001830;
  }

  .submenu a {
    color: #fff;
    padding: 8px 20px;
    font-size: 0.9em;
  }

  .submenu a:hover {
    background-color: #003f80;
  }

  /* PC用 hover 表示を無効化しておく（上書き） */
  .menu > li:hover > .submenu {
    display: none;
  }

  /* jQuery で付ける .open クラスがあるときだけ開く */
  .menu > li.open > .submenu {
    display: block;
  }
}
