.header {
  position: fixed;
  top: 24px;
  width: 100%;
  z-index: 999;
}

.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.header__background {
  width: 80%;
  display: flex;
  justify-content: space-between;
  padding: 16px 80px 16px 48px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  background: #fff;
  border-radius: 50px;
  align-items: center;
}

.header__logo {
  max-width: 30%;
}

.header__logo img {
  height: 30px;
}

.header__nav {
  max-width: 70%;
}

.header__nav .menu-list {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav .menu-list > li {
  position: relative;
}

.header__nav .menu-list > .menu-item-has-children::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 160px;
  height: 34px;
  transform: translateX(-50%);
}

.header__nav .menu-list li a {
  text-decoration: none;
  color: #333;
  font-weight: 700;
}

.header__nav .menu-list > .menu-item-has-children > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header__nav .menu-list > .menu-item-has-children > a::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid #333;
  border-bottom: 2px solid #333;
  transform: rotate(45deg) translateY(-2px);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.header__nav .menu-list > .menu-item-has-children:hover > a::after,
.header__nav .menu-list > .menu-item-has-children:focus-within > a::after {
  transform: rotate(-135deg) translateY(-2px);
}

.header__nav .sub-menu {
  position: absolute;
  top: calc(100% + 34px);
  left: 50%;
  z-index: 1000;
  min-width: 158px;
  overflow: hidden;
  padding: 0 16px;
  margin: 0;
  list-style: none;
  background: var(--color-pink);
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header__nav .sub-menu::before {
  display: none;
}

.header__nav .menu-list > .menu-item-has-children:hover > .sub-menu,
.header__nav .menu-list > .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.header__nav .sub-menu li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.9);
}

.header__nav .sub-menu a {
  display: block;
  padding: 18px 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.header__nav .menu-list .sub-menu li a {
  color: #fff;
}

.header__contact {
  margin-left: 16px;
  font-weight: 700;
}

.header__contact a {
  display: inline-block;
  background: var(--color-red);
  color: #fff;
  padding: 20px 40px;
  border-radius: 50px;
}

@media screen and (max-width: 1024px) {
  .header__background {
    padding: 16px 32px;
  }
  .header__contact a {
    padding: 20px 32px;
	}	
  .header__nav .menu-list {
    gap: 10px;
  }
  .header__nav .menu-list li a {
    font-size: 14px;
  }
  .header__contact a {
    font-size: 14px;
  }
}

@media screen and (max-width: 768px) {
  .header__contact {
    display: none;
  }
  .header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    z-index: 998;
  }
  .header__nav.active {
    display: flex;
  }
  .header__nav .menu-list {
    flex-direction: column;
    gap: 16px;
  }
  .header__nav .menu-list > .menu-item-has-children::after {
    display: none;
  }
  .header__nav .sub-menu {
    position: static;
    min-width: 0;
    padding: 0;
    margin-top: 12px;
    overflow: visible;
    background: transparent;
    border-radius: 0;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .header__nav .sub-menu::before {
    display: none;
  }
  .header__nav .sub-menu li + li {
    border-top: none;
  }
  .header__nav .sub-menu a {
    padding: 8px 0 8px 16px;
    color: #fff;
    font-size: 16px;
    text-align: left;
  }
  .header__nav .menu-list .sub-menu li a {
    padding-left: 16px;
   }
  .hamburger {
    display: flex;
    margin-left: auto;
  }
  .header__background {
    justify-content: flex-start;
    padding-right: 32px;
    position: relative;
    width: 100%;
  }
}

/* トップへ戻るボタン */

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 20px;
  z-index: 10;
  cursor: pointer;
  animation: floating-y 1.8s ease-in-out infinite alternate-reverse;
}

.back-to-top img {
  width: 74px;
  height: auto;
}

@keyframes floating-y {
  0% {
    transform: translateY(-10%);
  }
  100% {
    transform: translateY(10%);
  }
}

/* ハンバーガーボタン全体 */

.hamburger {
  display: none;
  /* PCでは非表示 */
  flex-direction: column;
  justify-content: center;
  width: 32px;
  height: 32px;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger__btn {
  display: block;
  width: 28px;
  height: 3px;
  background: #fff;
  /* メニューが青背景なら白が映える */
  transition: 0.3s ease;
}

.hamburger__btn--red {
  background: var(--color-red);
}

.hamburger__btn--blue {
  background: var(--color-blue);
}

.hamburger.active .hamburger__btn--red {
  transform: rotate(45deg) translate(7px, 2px);
}

.hamburger.active .hamburger__btn--blue {
  transform: rotate(-45deg) translate(4px, 0px);
}

.header__nav .c-btn {
  display: none;
}

@media screen and (max-width: 768px) {
  .hamburger {
    display: flex;
    margin-left: auto;
  }
  .header__logo {
    max-width: 50%;
  }
	  .header__nav {
	    display: none;
	    position: fixed;
	    top: 0;
	    left: 0;
	    bottom: 0;
	    width: 100%;
	    max-width: 100%;
	    height: 100vh;
	    height: 100dvh;
	    background: #0056b3;
	    flex-direction: column;
	    justify-content: flex-start;
	    align-items: center;
	    padding: 100px 20px calc(72px + env(safe-area-inset-bottom));
	    z-index: -1;
	    overflow-y: auto;
	  }
  .header__nav.active {
    display: flex;
  }
  .header__nav .menu-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin-top: 16px;
  }
  .header__nav .menu-list li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 0;
  }
  .header__nav .menu-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* テキスト左、矢印右 */
    min-height: 64px;
    padding: 18px 8px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
  }
	  .header__nav .menu-list > .menu-item-has-children > a {
	    gap: 12px;
      display: flex;
	  }
  .header__nav .menu-list > .menu-item-has-children::after {
    display: none;
  }
	  .header__nav .menu-list > .menu-item-has-children > a::after {
	    flex: 0 0 auto;
	    border-color: #fff;
	    transform: rotate(45deg) translateY(-2px);
	  }
	  .header__nav .sub-menu {
	font-family: "M PLUS Rounded 1c", sans-serif;
	    position: static;
	    width: 100%;
	    min-width: 0;
	    padding: 0;
	    max-height: 0;
	    margin-top: 0;
	    overflow: hidden;
	    background: transparent;
	    border-radius: 0;
	    opacity: 0;
	    pointer-events: none;
	    transform: none;
	    transition: none;
	  }
	  .header__nav .menu-list > .menu-item-has-children:hover > .sub-menu,
	  .header__nav .menu-list > .menu-item-has-children:focus-within > .sub-menu {
	    max-height: 0;
	    margin-top: 0;
	    opacity: 0;
	    pointer-events: none;
	    transform: none;
	  }
	  .header__nav .menu-list > .menu-item-has-children.is-open > .sub-menu {
	    max-height: 360px;
	    margin-top: -2px;
	    opacity: 1;
	    pointer-events: auto;
	  }
	  .header__nav .menu-list > .menu-item-has-children.is-open:hover > .sub-menu,
	  .header__nav .menu-list > .menu-item-has-children.is-open:focus-within > .sub-menu {
	    max-height: 360px;
	    margin-top: -2px;
	    opacity: 1;
	    pointer-events: auto;
	    transform: none;
	  }
	  .header__nav .menu-list > .menu-item-has-children.is-open > a::after {
	    transform: rotate(-135deg) translateY(-2px);
	  }
  .header__nav .sub-menu::before {
    display: none;
  }
  .header__nav .sub-menu li {
    border-bottom: none;
    padding-bottom: 0;
  }
  .header__nav .sub-menu li + li {
    border-top: none;
  }
	  .header__nav .sub-menu a {
	    min-height: 0;
	    width: 100%;
	    box-sizing: border-box;
	    justify-content: flex-start;
	    padding: 8px 0 16px 56px;
	    color: #fff;
	    font-size: 16px;
	    text-align: left;
	  }
	  .header__nav .sub-menu a::after {
	    display: none;
	    content: none;
	  }
	  .header__nav .menu-list li a:hover,
	  .header__nav .menu-list li a:focus {
	    color: #fff;
	    background: transparent;
	  }
	  .header__nav .menu-list > .menu-item-has-children:hover > a::after,
	  .header__nav .menu-list > .menu-item-has-children:focus-within > a::after {
	    border-color: #fff;
	    transform: rotate(45deg) translateY(-2px);
	  }
	  .header__nav .menu-list > .menu-item-has-children.is-open:hover > a::after,
	  .header__nav .menu-list > .menu-item-has-children.is-open:focus-within > a::after {
	    border-color: #fff;
	    transform: rotate(-135deg) translateY(-2px);
	  }
	  .header__nav .c-btn {
	    display: inline-flex;
	    gap: 80px;
	    padding: 16px 40px;
	    font-size: 18px;
	  }
	  .header__nav .c-btn:hover,
	  .header__nav .c-btn:focus {
	    color: var(--color-blue);
	    background: #fff;
	    transform: none;
	    box-shadow: none;
	  }
	  .header__nav .c-btn:hover::before,
	  .header__nav .c-btn:focus::before {
	    background: transparent;
	  }
	  .header__nav .c-btn:hover::after,
	  .header__nav .c-btn:focus::after {
	    transform: translateY(-50%) rotate(-45deg);
	  }
	}
