/* =========================================================
   Header
========================================================= */
header {
  height: 100px;
  padding-bottom: 30px;
  position: relative;
  z-index: 1001;
}

header .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 70px;
  margin: 30px 60px 0px 60px;
  border-radius: 50px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.15);
}

/* TOPページ以外のスタイル */
body:not(.home) header .header-inner {
  margin: 0;
  border-radius: 0px;
}

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

header .header-inner nav ul li {
  color: var(--color-white);
}

header .header-inner nav ul li:not(:last-child) {
  border-right: 1px solid rgba(0, 0, 0, 1);
  padding-right: 16px;
}

header .header-inner nav ul li a {
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  color: var(--color-black);
  transition: box-shadow 0.3s ease;
}

header .header-inner nav ul li a:hover {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

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;
}

/* =========================================================
   ハンバーガーメニューボタン
========================================================= */
.hamburger {
  display: none;
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1002;
  pointer-events: auto;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 4px;
  background-color: #333333;
  margin: 4px 0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
}

/* ×の形（メニューが開いたとき） */
.hamburger.is-active span:nth-child(1) {
  transform: translateY(14px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

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

/* メニューが開いたとき：ハンバーガーアイコンを固定位置に */
body.menu-open .hamburger,
body.menu-open .hamburger.is-active,
body.menu-open .hamburger.scrolled,
body.menu-open .hamburger.is-active.scrolled {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1003;
  left: auto;
  bottom: auto;
  margin: 0;
}

@media (max-width: 1024px) {
  header .header-logo {
    width: 200px;
  }

  header .header-inner {
    gap: 20px;
  }

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

  /* メニューが開いたとき：固定位置 */
  body.menu-open .hamburger,
  body.menu-open .hamburger.is-active,
  body.menu-open .hamburger.scrolled,
  body.menu-open .hamburger.is-active.scrolled {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1003;
    left: auto;
    bottom: auto;
    margin: 0;
  }
}

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

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

  header .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 30px 44px;
    margin: 20px 16px 0px 16px;
    border-radius: 50px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.15);
  }
}

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

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

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

.menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background-color: #ffffff;
  padding: 100px 40px 40px;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
}

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

.menu-close {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 32px;
  cursor: pointer;
  color: #333333;
  background: transparent;
  border: none;
  z-index: 1003;
  pointer-events: auto;
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.menu-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.menu-close::before,
.menu-close::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 3px;
  background-color: #333333;
  border-radius: 2px;
}

.menu-close::before {
  transform: rotate(45deg);
}

.menu-close::after {
  transform: rotate(-45deg);
}

.menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
.menu-nav li {
  margin-bottom: 0;
  border-bottom: 1px solid #e0e0e0;
}
.menu-nav li:last-child {
  border-bottom: none;
}
.menu-nav a {
  color: #333333;
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
  display: block;
  padding: 20px 0;
  transition: color 0.3s ease, padding-left 0.3s ease;
  line-height: 1.5;
}
.menu-nav a:hover {
  color: #478fdd;
  padding-left: 10px;
}

/* =========================================================
   追従型アイコン
========================================================= */

.fixed-icons {
  position: fixed;
  right: 0px;
  top: 91%;
  transform: translateY(-50%);
  z-index: 998;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: #00b900;
  padding: 20px;
  border-radius: 24px 0 0 24px;
}

.fixed-icons .btn-fixed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 30px;
  background-color: var(--color-white);
  box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.25);
  padding: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fixed-icons .btn-fixed:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.35);
}

.fixed-icons .btn-fixed p {
  color: var(--color-main);
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}

.fixed-icons .btn-icon-line {
  width: 28px;
  height: 28px;
}

.fixed-icons .btn-icon-arrow {
  width: 31px;
  height: 31px;
}

.fixed-icons > p {
  color: white;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 1024px) {
  .fixed-icons {
    padding: 16px;
  }

  .fixed-icons .btn-fixed p {
    font-size: 14px;
  }

  .fixed-icons .btn-icon-line {
    width: 24px;
    height: 24px;
  }

  .fixed-icons > p {
    font-size: 11px;
  }
}

@media (max-width: 767px) {
  .fixed-icons {
    padding: 12px;
    opacity: 0;
    transform: translateX(100%) translateY(-50%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
  }

  .fixed-icons.is-visible {
    opacity: 1;
    transform: translateX(0) translateY(-50%);
    pointer-events: auto;
  }

  .fixed-icons .btn-fixed {
    gap: 8px;
  }

  .fixed-icons .btn-fixed p {
    font-size: 12px;
  }

  .fixed-icons .btn-icon-line {
    width: 20px;
    height: 20px;
  }

  .fixed-icons .btn-icon-arrow {
    width: 14px;
    height: 14px;
  }

  .fixed-icons > p {
    font-size: 10px;
  }
}
