header {
  margin-top: 10px;
}

header img {
    width: 10%;
    height: auto;
}

header {
    padding: 2px;
    border-bottom: 3px solid black;
}

/*参加ボタン*/
/* ナビゲーション */
@media(min-width: 769px) {
header img {
    margin-top: 65px;
}
.nav{
  z-index: 1;
  position: fixed;
  top: 5px;
    width: 100%;
    background-color: #333;
}
.nav_btn{
    max-width: 980px;
    margin: auto;
    display: flex;
}
.nav_btn li{
    border-left: #888 1px solid;
    text-align: center;
    width: calc(100%/6);
    transition: all  0.3s ease;
}
.nav_btn li:last-child{
    border-right: #888 1px solid;
}
.nav_btn li:hover{
    background-color: #888;
}
.nav_btn li a{
    display: block;
    padding: 1.3em 0;
    color: #fff;
    text-decoration: none;
}
.nav ul {
    list-style: none;
}
}


@media(max-width: 768px) {
.menu-wrapper {
  position: relative;
}

.menu-icon {
  width: 40px;
  height: 30px;
  position: fixed; /* ← fixedにして常に左上固定 */
  top: 20px;
  right: 20px;
  cursor: pointer;
  z-index: 3;
  display: inline-block;
}

.menu-icon span {
  display: block;
  height: 4px;
  margin: 6px 0;
  background: #333;
  border-radius: 2px;
  transition: 0.4s;
}

/* ハンバーガーがXに変形 */
#menu-toggle:checked + .menu-icon span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
#menu-toggle:checked + .menu-icon span:nth-child(2) {
  opacity: 0;
}
#menu-toggle:checked + .menu-icon span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* オーバーレイ背景 */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: 0.4s;
  z-index: 1;
}

#menu-toggle:checked ~ .overlay {
  opacity: 1;
  pointer-events: auto;
}

/* メニュー本体（左から出す） */
.nav {
  position: fixed;
  top: 0;
  right: -250px; /* ← 初期位置を左へ */
  width: 250px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
  transition: left 0.4s ease;
  z-index: 2;
}

#menu-toggle:checked ~ .nav {
  right: 0; /* ← 開いたときは左0へ */
}

.nav ul {
  list-style: none;
  padding: 60px 20px;
}

.nav li {
  margin: 20px 0;
}

.nav a {
  text-decoration: none;
  color: #333;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.nav a:hover {
  color: #007bff;
}

}