/* =========================================================
   Header
========================================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  z-index: 1000; /* コンテンツより前面に表示 */
  background-color: #ffffff;
  transition: box-shadow 0.2s ease;
}

/* スクロール時にヘッダーに影を付ける */
header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 50px;
}

header .header-inner nav.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

header .header-inner nav.header-nav ul li.jp a{
  font-family: var(--font-family-noto-serif-jp);
}

/* Why Soft Skills? と Why Work with Me? だけMontserratフォントに */
header .header-inner nav.header-nav ul li.jp a[href*="why-soft-skills"],
header .header-inner nav.header-nav ul li.jp a[href*="why-work-with-me"],
.menu-nav ul li.jp a[href*="why-soft-skills"],
.menu-nav ul li.jp a[href*="why-work-with-me"] {
  font-family: var(--font-family-montserrat);
}

header .header-inner nav ul li a {
  font-family: var(--font-family-montserrat);
  font-weight: var(--font-weight-regular);
  color: var(--color-black);
  transition: font-weight 0.3s ease;
}

header .header-inner nav ul li a:hover {
  color: #959595;
}

header .header-inner nav ul a.header-contact {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

header .header-inner nav ul a.header-contact:hover {
  transform: translateY(-3px);
  opacity: 0.8;
}

/* 言語切り替えボタン */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family-montserrat);
  font-size: 14px;
}

.language-switcher .lang-btn {
  color: var(--color-black);
  text-decoration: none;
  font-weight: var(--font-weight-regular);
  transition: opacity 0.3s ease;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.language-switcher .lang-btn img {
  width: 24px;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

/* 日本の国旗に影を追加 */
.language-switcher .lang-btn img[alt="JP"] {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.language-switcher .lang-btn:hover img {
  opacity: 0.7;
}

.language-switcher .lang-btn.active {
  font-weight: var(--font-weight-bold);
  cursor: default;
  pointer-events: none;
}

.language-switcher .lang-btn.active img {
  opacity: 1;
}

.language-switcher .lang-separator {
  color: var(--color-black);
  opacity: 0.5;
}


.language-switcher.mobile .lang-btn {
  color: #ffffff;
}

.language-switcher.mobile .lang-btn:hover {
  opacity: 0.8;
}

.language-switcher.mobile .lang-btn:hover img {
  opacity: 0.8;
}

.language-switcher.mobile .lang-btn.active img {
  opacity: 1;
}

.language-switcher.mobile .lang-separator {
  color: #ffffff;
  opacity: 0.5;
}

.hamburger {
  display: none;
  width: 56px;
  height: 50px;
  padding: 10px;
  border: none;
  background: transparent;
  position: relative;
  z-index: 1001; /* メニューオーバーレイより上に表示 */
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-black);
  margin: 8px 0;
  transition: background 0.3s ease;
}

/* メニューが開いている時はハンバーガーボタンの色を白に */
.hamburger.menu-open span {
  background: var(--color-white);
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.hamburger span,
.hamburger.is-active span {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* 1100px 以下でハンバーガーメニュー表示＆PCナビ非表示 */
@media (max-width: 1100px) {
  header .header-logo {
    width: 100px;
  }

  header .header-inner {
    gap: 20px;
    padding: 0 25px;
  }

  header .header-inner nav {
    display: none;
  }

  header .header-inner nav.header-nav ul {
    display: none;
  }

  header .header-inner nav .language-switcher {
    display: none;
  }

  .hamburger {
    display: inline-block;
  }
}

@media (max-width: 767px) {
  header {
    height: 70px;
  }

  header .header-logo {
    width: 80px;
  }
}

/* =========================================================
   Existing styles
========================================================= */

.menu-overlay {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 999;
  transition: right 0.3s ease-in-out;
}

.menu-overlay.active {
  right: 0;
}

.menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background-color: var(--color-main);
  padding: 80px 30px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* メニューを縦方向の中央に */
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

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

.menu-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 56px;
  height: 50px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001; /* ハンバーガーより上にしてクリックを拾う */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #ffffff;
  line-height: 1;
  pointer-events: auto;
}

.menu-close::before {
  content: "×";
  display: block;
  pointer-events: none;
}

.menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
.menu-nav li {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.menu-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  display: block;
  padding: 15px 0;
  transition: text-shadow 0.3s ease;
}

/* SPメニューのjpクラスのリンクにNoto Serif JPフォントを適用 */
.menu-nav li.jp a {
  font-family: var(--font-family-noto-serif-jp);
}

.menu-nav a:hover {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 255, 255, 0.7);
}