.p-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  padding: 11px 28px 0 28px;
  background-color: #ffffff;
  border-bottom: 1px solid #f2f2f2;
  z-index: 10;
}

.p-header__inner {
  display: flex;
  align-items: center;
}

.p-header__logo {
  margin: 0;
  line-height: 1;
  border: none;
}

.p-header__logo-link {
  display: flex;
}

.p-header__logo-img {
  width: 150px;
  height: auto;
}

.p-header__nav {
  margin-left: 32px;
  margin-right: auto;
}

.p-header__nav-list {
  display: flex;
  gap: 40px;
  margin: 0;
  padding: 0;
}

.p-header__nav-link {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: bold;
  color: #1c1c1c;
  text-decoration: none;
  margin-top: 4px;
  border-bottom: 4px solid transparent;
}

.p-header__nav-link:hover {
  color: #03a9f4;
  border-bottom-color: #03a9f4;
}

.p-header__nav-link.is-current {
  color: #03a9f4;
}

.p-header__btns {
  display: flex;
  gap: 20px;
}

.p-header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 95px;
  height: 32px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
}

.p-header__btn--mypage {
  width: auto;
  gap: 8px;
  border: 1px solid #03a9f4;
  color: #03a9f4;
  background: #ffffff;
}

.p-header__btn-arrow {
  width: 16px;
  height: 16px;
}

.p-header__dropdown {
  position: relative;
}

.p-header__dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 164px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(34, 50, 68, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 20;
}

.p-header__dropdown:hover .p-header__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.p-header__dropdown-link {
  display: block;
  padding: 8px 14px;
  color: #223244;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  background: #ffffff;
}

.p-header__dropdown-link:hover {
  background: #f1f9ff;
}

.register {
  border: 1px solid #03a9f4;
  color: #03a9f4;
}

.login {
  background: #03a9f4;
  color: #ffffff;
}

.p-header__btn.logout {
  background: #ff3a1a;
}

.p-header__btn:hover {
  opacity: 0.8;
}

/* メニューボタン */
.p-header__menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.p-header__menu-icon {
  width: 24px;
  height: 24px;
  display: block;
}

/* モバイルメニュー */
.p-header__mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #f2f2f2;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-in-out;
}

.p-header__mobile-nav.is-open {
  max-height: 500px;
}

.p-header__mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 16px 28px;
  list-style: none;
}

.p-header__mobile-nav-link {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: bold;
  color: #1c1c1c;
  text-decoration: none;
  border-bottom: 1px solid #f2f2f2;
}

.p-header__mobile-nav-link:hover {
  color: #03a9f4;
}

.p-header__mobile-nav-link.is-current {
  color: #03a9f4;
}

.p-header__mobile-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 28px;
  border-top: 1px solid #f2f2f2;
}

.p-header__mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
}

.p-header__mobile-btn.register {
  border: 1px solid #03a9f4;
  color: #03a9f4;
  background: #ffffff;
}

.p-header__mobile-btn.login {
  background: #03a9f4;
  color: #ffffff;
}

.p-header__mobile-btn.logout {
  background: #ff3a1a;
}

.p-header__mobile-btn:hover {
  opacity: 0.8;
}

/* スマートフォンレイアウト */
@media (max-width: 768px) {
  .p-header {
    padding: 11px 16px 0 16px;
  }

  .p-header__logo-img {
    width: 120px;
  }

  .p-header__nav {
    display: none;
  }

  .p-header__btns {
    display: none;
  }

  .p-header__menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .p-header__mobile-nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #f2f2f2;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out;
    z-index: 20;
  }

  .p-header__mobile-nav.is-open {
    max-height: 500px;
  }
}
