/* --- ヘッダー --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background-color: var(--white);
  border-bottom: 4px solid var(--edamame-green);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 2000;
  box-shadow: 0 2px 10px rgba(47, 79, 47, 0.1);
}
.logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color);
  letter-spacing: 1px;
  z-index: 2100;
  font-family: "Oswald", sans-serif;
  display: flex; /* 横並びにする魔法 */
  align-items: center; /* 上下の真ん中に揃える */
  gap: 10px; /* 画像と文字の間隔を10px空ける */
}
.logo img {
  height: 30px; /* 文字サイズに合わせて高さを制限（お好みで調整可） */
  width: auto; /* 横幅は自動 */
  display: block;
}
/* --- ナビゲーション --- */
nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav ul li {
  position: relative;
  margin-left: 30px;
}
nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  font-size: 16px;
  transition: color 0.3s;
}
nav ul li a:hover {
  color: var(--edamame-green);
}

/* --- ハンバーガーメニュー & レスポンシブ --- */
.hamburger {
  display: none;
  cursor: pointer;
  z-index: 2100;
  width: 50px;
  height: 50px;
  position: relative;
}
.hamburger div {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}
.hamburger .line1 {
  top: 15px;
}
.hamburger .line2 {
  top: 23px;
}
.hamburger .line3 {
  top: 31px;
}

.hamburger.toggle .line1 {
  top: 23px;
  transform: translateX(-50%) rotate(-45deg);
}
.hamburger.toggle .line2 {
  opacity: 0;
}
.hamburger.toggle .line3 {
  top: 23px;
  transform: translateX(-50%) rotate(45deg);
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white);
  border: 2px solid var(--edamame-green);
  min-width: 140px;
  padding: 10px 0;
  box-shadow: 4px 4px 0px rgba(143, 195, 31, 0.3);
  z-index: 100;
}
.submenu li {
  margin: 0;
}
.submenu li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
}
nav ul li:hover .submenu {
  display: block;
}

/* --- Footer & BackToTop --- */
footer {
  background-color: var(--text-color);
  color: var(--white);
  text-align: center;
  padding: 30px;
  font-size: 0.9rem;
  letter-spacing: 1px;
}
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--edamame-green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 24px;
  box-shadow: 4px 4px 0px var(--text-color);
  z-index: 999;
  transition:
    opacity 0.3s,
    transform 0.3s;
  opacity: 0;
  pointer-events: none;
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
#back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 6px 6px 0px var(--text-color);
}

@media (max-width: 1024px) {
  header {
    padding: 15px 10px;
  }
  .hamburger {
    display: block;
    margin-left: auto;
  }
  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.4s ease-in-out;
    z-index: 1500;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  }
  nav ul.active {
    right: 0;
  }
  nav ul li {
    margin: 20px 0;
  }
  nav ul li a {
    font-size: 1.5rem;
  }
  .submenu {
    position: static;
    box-shadow: none;
    background-color: rgba(255, 255, 255, 0.5);
    text-align: center;
    border: none;
  }
  .hamburger.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  .hamburger.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  #back-to-top {
    width: 40px;
    height: 40px;
    font-size: 20px;
    bottom: 20px;
    right: 20px;
  }
}
