/* ================================================
   ヘッダー
   ================================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 8%,
    rgba(255, 255, 255, 0.6) 32%,
    rgba(255, 255, 255, 0.85) 56%,
    #fff 100%
  );
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px 0 72px 0;
}

.header--scrolled {
  padding: 15px 0;
}

.header__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* ================================================
   中央部分（ロゴ + ナビ）
   ================================================ */

.header__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
}

.header__logo {
  margin-bottom: 16px;
}

.header__logo-link {
  display: inline-block;
  transition: transform 0.2s ease;
}

/* .header__logo-link:hover {
  transform: translateY(-1px);
} */

.header__logo-image {
  height: 52px;
  width: auto;
  display: block;
}

/* ================================================
   PC用ナビゲーション
   ================================================ */

.header__nav {
  display: block;
  transition: all 0.3s ease;
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav-item {
  position: relative;
}

.header__nav-link {
  display: block;
  color: var(--color-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 18px; /* 16pxから18pxに変更 */
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.header__nav-link:hover {
  color: var(--color-accent);
}

.header__nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 6px;
  right: 6px;
  height: 0.5px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.header__nav-link:hover::after {
  transform: scaleX(1);
}

/* ================================================
   ハンバーガーメニュー
   ================================================ */

.header__hamburger {
  display: none;
  position: relative;
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.hamburger:hover {
  background: rgba(0, 0, 0, 0.05);
}

.hamburger__line {
  width: 24px;
  height: 1px;
  background: var(--color-main);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.hamburger--active .hamburger__line:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

.hamburger--active .hamburger__line:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.hamburger--active .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ================================================
   ホバーメニュー（PCスクロール時）
   ================================================ */

.header__hover-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 100;
}

.header__hover-menu--visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.header__hover-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header__hover-item {
  border-radius: 8px;
  overflow: hidden;
}

.header__hover-link {
  display: block;
  color: #333;
  text-decoration: none;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.header__hover-link:hover {
  color: var(--color-accent);
  background: rgb(201, 127, 95, 0.1);
}

/* ================================================
   エントリーボタン
   ================================================ */

.header__entry {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.header__entry-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: var(--color-white);
  text-decoration: none;
  padding: 18px 0;
  border-radius: 40px;
  box-shadow: inset 0 0 0 4px var(--color-accent);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-24);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  width: 140px;
}

.header__entry-text {
  position: relative;
  padding-left: 24px;
}

.header__entry-text::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0px;
  width: 10px;
  height: 10px;
  background: var(--color-white);
  border-radius: 40px;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 0;
  display: inline-block;
  transform: translateY(-50%);
}

.header__entry-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.header__entry-button:hover::before {
  left: 100%;
}

.header__entry-button:hover {
  transform: translateY(2px);
}

.header__entry-text {
  position: relative;
  z-index: 1;
}

/* ================================================
   モバイルメニュー
   ================================================ */

.header__mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header__mobile-overlay--active {
  opacity: 1;
  visibility: visible;
}

.header__mobile-menu {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: white;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 80px 24px 24px;
  overflow-y: auto;
}

.header__mobile-overlay--active .header__mobile-menu {
  transform: translateX(0);
}

.header__mobile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header__mobile-item {
  border-radius: 12px;
  overflow: hidden;
}

.header__mobile-link {
  display: block;
  color: var(--color-main);
  text-decoration: none;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 12px;
}

.header__mobile-link:hover {
  background: rgba(0, 122, 204, 0.1);
}

.header__mobile-item--entry {
  margin-top: 24px;
  padding-top: 24px;
}

.header__mobile-entry {
  display: block;
  background: var(--color-accent);
  color: var(--color-white);
  border: 2px solid var(--color-accent);
  text-decoration: none;
  padding: 16px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.header__mobile-entry:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 122, 204, 0.3);
}

/* ================================================
   レスポンシブ
   ================================================ */

@media (max-width: 768px) {
  .header__container {
    padding: 0 16px;
  }

  .header__nav {
    display: none !important;
  }

  .header__hamburger {
    display: block;
  }

  .header__entry {
    display: none;
  }

  .header__center {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .header__logo {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    height: 100%;
  }

  .header__logo-image {
    height: 32px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 16px 0;
  }

  .header--scrolled {
    padding: 10px 0;
  }

  .header__container {
    padding: 0 16px;
  }

  .header__mobile-menu {
    padding: 70px 20px 20px;
  }
}

/* ================================================
   アクセシビリティ
   ================================================ */

@media (prefers-reduced-motion: reduce) {
  .header,
  .header__nav,
  .header__hover-menu,
  .header__mobile-overlay,
  .header__mobile-menu,
  .hamburger__line,
  .header__entry-button {
    transition: none;
  }
}

/* フォーカス表示 */
.header__nav-link:focus,
.header__hover-link:focus,
.header__mobile-link:focus,
.header__entry-button:focus,
.hamburger:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
