/* ヘッダーのカスタムスタイル */

/* ヘッダー全体の高さを調整 */
header {
  height: auto;
}

/* 1段目：ロゴと言語切り替え */
.header-top {
  background-color: #fff;
}

.header-top-inner {
  max-width: calc(100% - 40px);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  position: relative;
}

@media screen and (min-width: 1344px) {
  .header-top-inner {
    max-width: 1344px;
  }
}

/* ロゴコンテナ */
.logo-container {
  display: flex;
  align-items: center;
}

.logo-container a.logo {
  max-width: 420px;
}

@media screen and (max-width: 768px) {
  .logo-container a.logo {
    max-width: 200px;
  }
}

/* 言語切り替え */
.lang-switcher {
  background-color: #f5f5f5;
  padding: 8px 20px;
  font-size: 1.6rem;
  font-weight: 700;
  position: absolute;
  right: 5%;
  top: 0;
}

.lang-switcher a {
  text-decoration: none;
  transition: 0.3s;
}

.lang-switcher a.lang-jp,
.lang-switcher a.lang-en {
  color: #555;
}



.lang-switcher a.active {
  text-decoration: underline;
  font-weight: 700;
  color: #145FA9;
}

/* 2段目：ナビゲーション */
.nav-wrapper {
  max-width: calc(100% - 40px);
  display: flex;
  margin: auto;
  justify-content: center;
  align-items: center;
  height: 50px;
}

@media screen and (min-width: 1344px) {
  .nav-wrapper {
    max-width: 1344px;
  }
}

/* スマホ表示の調整 */
@media screen and (max-width: 768px) {
  header {
    position: fixed;
    width: 100%;
    background: #fff;
    z-index: 1000;
  }

  .header-top-inner {
    padding: 10px 0;
  }

  .lang-switcher {
    padding: 5px 10px;
    font-size: 1.4rem;
  }

  .nav-wrapper {
    height: 60px;
  }

  /* スマホ表示時のヘッダー調整 */
  header {
    height: 60px; /* スマホ表示時の全体の高さ */
  }

  /* スマホ表示時はヘッダートップを非表示 */
  .header-top {
    display: none;
  }

  /* スマホ表示時のヘッダーレイアウト */
  .sp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    height: 60px;
  }

  /* スマホ表示時のロゴ */
  .sp-logo {
    display: flex;
    align-items: center;
  }

  .sp-logo a.logo {
    max-width: 256px;
  }

  /* スマホ表示時のハンバーガーメニュー */
  .hamburger {
    position: relative;
    top: auto;
    right: auto;
  }

  /* スマホ表示時のハンバーガーメニュー内の言語切り替え */
  .sp-lang-switcher {
    background-color: #f5f5f5;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 10px auto;
    text-align: center;
    width: 80%;
    max-width: 200px;
  }

  /* スマホ表示時のナビゲーションメニュー調整 */
  .sp-nav .nav {
    margin-top: 0;
    padding-top: 0;
  }

  /* スマホ表示時のメニュー間の隙間調整 */
  .sp-nav {
    padding-top: 0;
    padding-bottom: 0;
  }

  /* スマホ表示時のナビゲーションコンテンツのスタイル */
  .sp-nav-content {
    display: flex;
    flex-direction: column;
    padding-top: 0;
    padding-bottom: 0;
  }

  .sp-nav ul.nav {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
  }

  .sp-nav ul.nav li:first-child {
    margin-top: 0;
    padding-top: 0;
  }

  /* スマホ表示時のメニュー項目の調整 */
  .sp-nav ul.nav li.has-child > a {
    margin-top: 0;
    padding-top: 10px;
  }

  .sp-lang-switcher a {
    text-decoration: none;
    transition: 0.3s;
  }

  .sp-lang-switcher a.lang-jp,
  .sp-lang-switcher a.lang-en {
    color: #555;
  }

  

  .sp-lang-switcher a.active {
    text-decoration: underline;
    font-weight: 700;
    color: #145FA9;
  }
}
