/* ========================================
   レスポンシブメニュー
   PC: 通常メニュー / スマホ: ハンバーガーメニュー
======================================== */

/* ----------------------------------------
   ヘッダー共通
---------------------------------------- */
.header {
  background: #77d9c9;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-logo a {
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 45px;
  width: auto;
}

/* ----------------------------------------
   PC: 通常メニュー（768px以上）
---------------------------------------- */
.header-nav {
  display: flex;
  gap: 2px;
  align-items: center;
}

.header-nav a {
  color: #000;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 6px;
  transition: opacity 0.3s;
}

.header-nav a:hover {
  opacity: 0.7;
}

/* ハンバーガーアイコン: PCでは非表示 */
.hamburger-icon {
  display: none;
}

/* オーバーレイ: PCでは非表示 */
.menu-overlay {
  display: none;
}

/* ----------------------------------------
   スマホ: ハンバーガーメニュー（767px以下）
---------------------------------------- */
@media (max-width: 767px) {
  .header {
    padding: 10px 15px;
  }

  .header-logo img {
    height: 40px;
  }

  /* ハンバーガーアイコン表示 */
  .hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
  }

  .hamburger-icon .bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #000;
    transition: all 0.3s ease;
    position: absolute;
  }

  .hamburger-icon .bar:nth-child(1) {
    top: 8px;
  }

  .hamburger-icon .bar:nth-child(2) {
    top: 15px;
  }

  .hamburger-icon .bar:nth-child(3) {
    top: 22px;
  }

  /* アイコン：開いた状態（×マーク） */
  .hamburger-icon.is-open .bar:nth-child(1) {
    top: 15px;
    transform: rotate(45deg);
  }

  .hamburger-icon.is-open .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger-icon.is-open .bar:nth-child(3) {
    top: 15px;
    transform: rotate(-45deg);
  }

  /* ナビゲーション: スライドメニュー */
  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 1);
    flex-direction: column;
    gap: 0;
    padding: 70px 0 40px;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.4s ease;
    z-index: 999;
    overflow-y: auto;
    align-items: stretch;
  }

  .header-nav.is-open {
    right: 0;
  }

  /* メニューリンク */
  .header-nav a {
    display: block;
    padding: 16px 25px;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
  }

  .header-nav a:hover {
    background: rgba(119, 217, 201, 0.1);
    color: #77d9c9;
    opacity: 1;
  }

  /* メニュー上部のヘッダーライン */
  .header-nav::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: #77d9c9;
  }

  /* オーバーレイ表示 */
  .menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 998;
  }

  .menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }

  /* メニューオープン時のbody制御 */
  body.menu-open {
    overflow: hidden;
  }
}