/* ページ全体の横スクロールを禁止 */
html,
body {
  overflow-x: hidden;
}

body:not(.home) .logo,
body:not(.home) .navbar nav,
body:not(.home) .hamburger {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

header h2,
header h3,
header p {
  margin: 0;
}

body:not(.home) header {
  position: fixed; /* 固定 */
  top: 0;          /* 画面上部に固定 */
  left: 0;
  width: 100%;     /* 横幅いっぱい */
  z-index: 999;    /* 他要素より前面に表示 */
  background-color: #fff; /* 背景色をつけると下のコンテンツが透けない */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 任意で影を付けて浮いてる感 */
}

header {
  display: flex;
  justify-content: space-between;
}

header h1 {
  font-size: 2.2vw;
}

header nav ul {
  display: flex;
  list-style: none;
  margin: 0.7em;
  margin-top: 1em;
  margin-bottom: 0;
  padding: 0.3em;
  font-size: 2em;
  font-size: 1.65vw;
}

header nav ul li {
  margin-left: 1.8em;
}

header nav ul li a {
  color: #363033;
  text-decoration: none;
  position: relative;
  font-weight: 500;
  transition: color 0.3s;
}

header nav ul li a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #363033;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

header nav ul li a:hover {
  color: #DA238B;
  /* ホバー時文字色 */
}

header nav ul li a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

header .navbar {
  display: flex;
}

header .navbar nav {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

header .navbar nav.show {
  opacity: 1;
  transform: translateY(0);
}

/* ハンバーガーアイコン */
header .hamburger {
  width: 3.4vw;
  height: 3vw;
  position: relative;
  cursor: pointer;
  margin-left: 20px;
  margin-right: 40px;
  margin-top: auto;
  margin-bottom: auto;
  z-index: 3;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.hamburger.show {
  opacity: 1;
  transform: translateY(0);
}

header .hamburger div {
  border-radius: 10px;
  position: absolute;
  width: 100%;
  height: 0.38vw;
  background-color: #333;
  left: 0;
  transition: 0.4s;
}

header .hamburger div:nth-child(1) {
  top: 0;
}

header .hamburger div:nth-child(2) {
  top: 1.2vw;
}

header .hamburger div:nth-child(3) {
  top: 2.4vw;
}

/* ハンバーガーが×になるアニメーション */
header .hamburger.active div:nth-child(1) {
  transform: rotate(45deg);
  top: 11px;
}

header .hamburger.active div:nth-child(2) {
  opacity: 0;
}

header .hamburger.active div:nth-child(3) {
  transform: rotate(-45deg);
  top: 11px;
}

header .menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  /* 非表示中はクリックできない */
  transition: opacity 0.3s ease;
  z-index: 2;
}

header .menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
  /* 表示中はクリックできる */
}

header .menu-overlay a {
  color: #363033;
  text-decoration: none;
  font-size: 2.4em;
  margin: 10px 0;
  padding: 0 0.7em;
}

header .header-line {
  height: 2px;
  background-color: gray;
  width: 15em;
  margin-bottom: 20px;
}

header .header-line2 {
  height: 2px;
  background-color: gray;
  width: 12em;
  margin-bottom: 20px;
}

header .logo {
  width: 30%;
  height: 6vw;
  display: flex;
  font-size: 1.3em;
  margin: 0.5em;
  margin-left: 3em;
  margin-bottom: 0;
  color: #DA238B;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

header .logo.show {
  opacity: 1;
  transform: translateY(0);
}

header .logo-image {
  width: 6vw;
  height: 100%;
  display: block;
  margin-left: 1em;
  padding-top: 0.3em;
  padding-top: 0;
}

header .logo a {
  text-decoration: none;
  color: #DA238B;
}

header .logo {
  transition-delay: 0.4s;
}

header .hamburger {
  transition-delay: 0.4s;
}

header .navbar nav {
  transition-delay: 0.4s;
}

body {
  margin: 0;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #363033;
}


.m-plus-rounded-1c-thin {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 100;
  font-style: normal;
}

.m-plus-rounded-1c-light {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.m-plus-rounded-1c-regular {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.m-plus-rounded-1c-medium {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.m-plus-rounded-1c-bold {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.m-plus-rounded-1c-extrabold {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 800;
  font-style: normal;
}

.m-plus-rounded-1c-black {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 900;
  font-style: normal;
}

header .sp-br {
  display: none;
}

header .sp-only {
  display: none !important;
}

header .info-sp,
header .info2-sp {
  display: none;
}


@media (max-width: 768px) {

  header .sp-br {
    display: inline;
  }

  header {
    align-items: center;
    font-size: 14px;
    height: 20vw;
  }

  header h1 {
    margin: 0 0;
    font-size: 6vw;
  }

  header .logo {
    width: 100%;
    height: auto;
    justify-content: center;
    align-items: center;
    margin: 1em 0;
    font-size: 1.2em;
  }

  header .logo-image {
    height: 4.5em !important;
    width: 4.5em !important;
    order: -1;
    width: 3.5em;
    margin: auto 0;
    margin-left: 0em;
    margin-right: 1em;
  }

  header .navbar {
    margin-right: 1em;
    margin-right: 4vw;
    margin-bottom: 1em;
    margin-right: 4vw;
    margin-top: 2em;
    margin-top: 4vw;
  }

  /* ナビゲーション（ハンバーガーのみ表示） */
  header nav ul {
    display: none;
  }

  header .hamburger {
    width: 8vw;
    height: 7vw;
    margin: auto auto;
  }

  header .hamburger div {
    height: 0.8vw;
  }

  header .hamburger div:nth-child(1) {
    top: 0;
  }

  header .hamburger div:nth-child(2) {
    top: 2.5vw;
  }

  header .hamburger div:nth-child(3) {
    top: 5vw;
  }

  /* メニュー表示をスマホ向けに広く中央寄せ */
  header .menu-overlay a {
    font-size: 1.8em;
  }

  header .header-line,
  header .header-line2 {
    width: 70%;
  }
}