/* ハンバーガーメニュー */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4.5px;
  z-index: 100;
  cursor: pointer;
  width: 30px;
  height: 30px;
  position: fixed;
  top: 26px;
  right: 5%;
  transition: opacity 0.7s ease-out, transform 0.7s ease-out, visibility 0.7s ease-out;
}

body.sub-page .hamburger-menu {
  display: flex;
}

.hamburger-line {
  width: 30px;
  height: 10px;
  background-image: url("../image/hunb-sp-open.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
}

.hamburger-menu.open .hamburger-line:first-child {
  transform: translateY(7px);
  opacity: 0.85;
}

.hamburger-menu.open .hamburger-line:last-child {
  transform: translateY(-7px);
  opacity: 0.85;
}

/* ロゴのスタイル */
.logo {
  max-width: 258px;
  width: 90%;
  margin: 0;
  box-sizing: border-box;
  transition: width 0.3s ease;
}

.logo img {
  width: 100%;
  height: auto;
}

.logo-lower {
  width: auto;
}

.logo-lower .desktop-logo {
  width: 90px;
  height: 207px;
  object-fit: contain;
}

.logo-lower .sp-logo {
  width: 104px;
  height: 38px;
  object-fit: contain;
}

/* ナビゲーション基本スタイル */
.nav {
  margin-top: auto;
  width: auto;
  display: flex;
  flex-direction: column;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 29px;
  align-items: flex-start;
}

.nav-item {
  text-align: left;
  margin-bottom: 0;
}

.nav-item a {
  display: block;
  height: 30px;
  display: flex;
  align-items: center;
}

/* 外部リンクアイコン */
.outlink {
  display: flex;
  align-items: center;
}

.outlink-icon {
  width: 14px;
  height: auto;
  margin-left: 13px;
  margin-bottom: 1px;
  transition: transform 0.3s ease;
}

.nav-item:nth-child(7) a:hover .outlink-icon {
  transform: translateY(-1px);
}

/* SNSアイコン */
.sns-icons {
  display: none;
}

.sns-icon {
  display: block;
  transition: transform 0.3s ease;
}

.sns-icon:hover {
  transform: translateY(-2px);
}

.sns-icon img {
  display: block;
}

/* モバイルナビゲーション */
@media screen and (max-width: 834px) {
  .nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    z-index: 49;
    box-sizing: border-box;
    background: transparent;
  }

  .nav.active {
    display: block;
  }

  .nav.closing {
    display: block;
    pointer-events: none;
  }

  .nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../image/background.jpg");
    background-size: 70%;
    opacity: 0.95;
    z-index: -1;
  }

  .nav-content {
    position: relative;
    width: 100%;
    height: 98%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
  }

  .nav-list {
    width: 90%;
    max-width: 716px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
}

/* PCビューのメニュー表示 */
.hamburger-menu.visible+.nav,
.hamburger-menu.open+.nav.active {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  box-sizing: border-box;
  background: transparent;
  z-index: 49;
}

/* PCサイズのレスポンシブ調整 */
@media screen and (min-width: 835px) and (max-height: 800px) {
  .nav-list {
    gap: 10px;
  }
}

/* TOPページスクロール時の状態 */
body.top-page.is-scrolled .hamburger-menu {
  opacity: 1;
  visibility: visible;
  display: flex;
}

/* 下層ページのナビ初期状態 */
body.sub-page .nav:not(.active) {
  display: none !important;
  pointer-events: none !important;
}

/* 下層ページのハンバーガーメニュー */
body.sub-page .hamburger-menu {
  position: fixed;
  top: 24px !important;
  right: 24px !important;
  width: 44px;
  height: 30px;
  z-index: 100;
}

@media screen and (max-width: 834px) {
  body.sub-page .hamburger-menu {
    top: 25px !important;
    right: 5% !important;
    width: 34px !important;
  }
}

/* 下層ページのナビゲーション */
body.sub-page .nav.active .nav-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
}

body.sub-page .nav.active .nav-list {
  width: 100%;
  max-width: 716px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 30px;
  text-align: center;
}

body.sub-page .nav.active .sns-icons {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 43.5px;
}

/* 下層ページのPCメニュー表示 */
@media screen and (min-width: 835px) {
  body.sub-page .home-menu-item {
    display: none;
  }

  body.sub-page .hamburger-menu.open+.nav .home-menu-item,
  body.sub-page .hamburger-menu.visible+.nav.active .home-menu-item {
    display: block;
  }
}

/* 下層ページのタブレットメニュー */
@media screen and (max-width: 834px) {
  body.sub-page .nav.active::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-image: url("../image/background.jpg") !important;
    background-size: 70% !important;
    opacity: 0.95 !important;
    z-index: -1 !important;
  }

  body.sub-page .home-menu-item a::after {
    display: none !important;
  }

  body.sub-page .wrapper-716 {
    width: 90% !important;
    max-width: 716px !important;
    margin: 0 auto !important;
  }
}

/* 下層ページのファーストビュー */
body.sub-page .main-visual {
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  box-sizing: border-box;
}

body.sub-page .main-visual .main-visual-pc {
  position: relative;
  width: 100%;
  height: 100%;
}

/* 下層ページの画像表示設定 */
@media screen and (min-width: 835px) {
  body.sub-page .main-visual .image-container {
    position: absolute;
    top: 58px;
    right: 84px;
    bottom: 58px;
    left: 84px;
    width: auto;
    height: auto;
    overflow: hidden;
  }
}

@media screen and (max-width: 834px) {
  body.sub-page .main-visual .image-container {
    position: absolute !important;
    top: 0 !important;
    right: 5% !important;
    bottom: 200px !important;
    left: 5% !important;
    width: auto !important;
    height: auto !important;
    overflow: hidden !important;
    z-index: 5 !important;
  }

  body.sub-page .main-visual .main-visual-pc {
    padding-top: 82px;
    height: calc(100vh - 82px) !important;
    padding-bottom: 0 !important;
  }
}

body.sub-page .main-visual .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 下層ページのスクロールアイコン */
@media screen and (max-width: 834px) {
  body.sub-page .scroll-icon {
    display: block !important;
    position: absolute !important;
    bottom: 112px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    text-align: center !important;
    z-index: 50 !important;
  }

  body.sub-page .scroll-icon p {
    font-family: "Poppins", sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    margin-bottom: 2px !important;
    color: #474646 !important;
    display: block !important;
  }

  body.sub-page .scroll-icon img {
    width: 4px !important;
    display: block !important;
    margin: 0 auto !important;
    animation: wave-draw 3.5s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
  }
}

/* 波線アニメーション */
@keyframes wave-draw {
  0% {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

  20% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }

  75% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }

  95% {
    clip-path: inset(100% 0 0 0);
    opacity: 1;
  }

  100% {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
  }
}

/* 下層ページのナビゲーション配置 */
body.sub-page .nav-list,
body.sub-page .sns-icons {
  width: 100%;
  max-width: 716px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
}

body.sub-page .nav-list {
  flex-direction: column;
  gap: 20px;
  padding-bottom: 0;
  margin-bottom: 0;
}

body.sub-page .home-menu-item {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 0;
}

body.sub-page .home-menu-item a {
  display: flex;
  justify-content: center;
  align-items: center;
}

body.sub-page .sns-icons {
  justify-content: center;
  gap: 43.5px;
  margin-top: 40px;
  padding-top: 0;
}

body.sub-page .nav-item {
  display: flex;
  justify-content: center;
  width: 100%;
  text-align: center;
  margin: 0 auto;
}

body.sub-page .nav-item a {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ナビゲーション表示の強制設定 */
.nav.active {
  display: block !important;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

@media screen and (min-width: 835px) {
  .hamburger-menu.open+.nav {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }
}

@media screen and (max-width: 834px) {
  .hamburger-menu.open+.nav {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }
}

/* ナビゲーション背景画像 */
.nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../image/background.jpg");
  background-size: 70%;
  opacity: 0.95;
  z-index: -1;
}

.nav.active::before {
  opacity: 0.95;
}

.hamburger-menu.open+.nav::before,
.hamburger-menu.visible+.nav.active::before {
  opacity: 0.95;
}

.nav {
  background-size: 70%;
}

.hamburger-menu.open+.nav,
.nav.active {
  background-color: transparent;
  background-image: none;
  backdrop-filter: none;
}

/* 下層ページのPCビューでのナビホバー効果 */
@media screen and (min-width: 835px) {

  body.sub-page .hamburger-menu.open+.nav .nav-item a,
  body.sub-page .hamburger-menu.visible+.nav.active .nav-item a {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    height: auto;
    min-height: 30px;
  }

  body.sub-page .hamburger-menu.open+.nav .nav-item a::after,
  body.sub-page .hamburger-menu.visible+.nav.active .nav-item a::after {
    content: '';
    position: absolute;
    left: -0.5px;
    bottom: 5px;
    width: 100%;
    height: 5px;
    background-image: url('../image/navline.png');
    background-repeat: no-repeat;
    background-size: 0% 4.5px;
    background-position: 0% center;
    opacity: 0;
    transition: background-size 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }

  body.sub-page .hamburger-menu.open+.nav .nav-item a:hover::after,
  body.sub-page .hamburger-menu.visible+.nav.active .nav-item a:hover::after {
    background-size: 100% 4.5px;
    background-position: 0% center;
    opacity: 1;
  }

  body.sub-page .hamburger-menu.open+.nav .nav-item:nth-child(7) a.outlink::after,
  body.sub-page .hamburger-menu.visible+.nav.active .nav-item:nth-child(7) a.outlink::after {
    width: calc(91% + 18px);
    left: -2px;
    bottom: 3px;
  }

  body.sub-page .hamburger-menu.open+.nav .nav-item:nth-child(7) a.outlink:hover .outlink-icon,
  body.sub-page .hamburger-menu.visible+.nav.active .nav-item:nth-child(7) a.outlink:hover .outlink-icon {
    transform: translateY(-1px);
    transition: transform 0.3s ease;
  }
}

/* タブレット時の下層ページナビゲーション */
@media screen and (max-width: 834px) {

  body.sub-page .hamburger-menu.open+.nav,
  body.sub-page .nav.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  body.sub-page .nav.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../image/background.jpg");
    background-size: 70%;
    opacity: 0.95;
    z-index: -1;
    display: block;
  }

  body.sub-page .nav.active .nav-content {
    justify-content: center;
    padding-top: 0;
  }

  body.sub-page .nav.active .nav-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
  }

  body.sub-page .nav.active .home-menu-item {
    display: block;
  }

  body.sub-page .nav.active .nav-item {
    display: flex;
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  body.sub-page .nav.active .nav-item a {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  body.sub-page .nav.active .sns-icons {
    display: flex;
    justify-content: center;
    margin-top: 40px;
  }

  body.sub-page .nav.active .sns-icon {
    display: flex;
  }

  body.sub-page .home-menu-item a {
    padding-bottom: 0px;
  }
}

/* 下層ページのセクション共通スタイル */
body.sub-page section {
  margin-top: 100vh;
  padding: 80px 0;
  position: relative;
  z-index: 10;
  background-color: #fff;
}