/* ハンバーガーメニュー（スマホ用） */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-hamburger.nav-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.nav-open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.nav-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  header {
    position: relative;
  }

  .nav-hamburger {
    display: flex;
  }

  nav > div:last-child {
    display: none !important;
    position: absolute;
    top: 52px;
    right: 0;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    width: 67% !important;
  }

  nav > div:last-child.nav-open {
    display: flex !important;
  }

  nav a {
    padding: 13px 20px !important;
    font-size: 0.95rem !important;
    white-space: normal !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  nav a:last-child {
    border-bottom: none;
  }

  nav a:hover,
  nav a.active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border-radius: 0 !important;
  }
}
