/* ----------------------------------------
  Header
---------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  padding: 27px 40px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;

}

.logo {
  width: 237px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #111;
  min-width: 0;
}

.logo-img {
  width: 237px;
  height: auto;
  display: block;
}

.header-logo {
  width: 237px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #111;
  min-width: 0;
}

.header-logo-img {
  width: 100%;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 30px;
}

.header-mypage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 30px;
  padding: 0;
  border-radius: 5px;
  border: 1px solid #0B5BCE;
  color: #0B5BCE;
  background: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: opacity 0.3s ease;
}

.header-mypage:hover {
  opacity: 0.8;
}

.header-menu {
  width: 40px;
  height: 26px;
  margin: 5px 0;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.header-menu-line {
  display: block;
  height: 2px;
  width: 100%;
  background: #F72E52;
}

/* ----------------------------------------
  Menu
---------------------------------------- */
body.is-menu-open {
  overflow: hidden;
}

.header-nav {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.header-nav__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 300px;
  background: #F72E52;
  color: #fff;
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-nav.is-open {
  opacity: 1;
  pointer-events: auto;
}

.header-nav.is-open .header-nav__panel {
  transform: translateX(0);
}

.header-nav__close {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.header-nav__close:hover {
  opacity: 0.8;
}


.header-nav__close > span {
  height: 100%;
  position: relative;
  display: block;
}

.header-nav__close > span::before,
.header-nav__close > span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 40px;
  height: 6px;
  background: #fff;
  transform-origin: center;
}

.header-nav__close > span::before {
  transform: translate(0, -50%) rotate(45deg);
}

.header-nav__close > span::after {
  transform: translate(0, -50%) rotate(-45deg);
}
.header-nav__nav {
  width: 200px;
  margin: 0 auto;
}
.header-nav__list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.header-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: opacity 0.3s ease;
}

.header-nav__link:hover {
  opacity: 0.8;
}

.header-nav__list + .header-nav__list {
  margin-top: 100px;
  padding-top: 31px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.header-nav__link--contact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
}

/* 遷移先に応じてアイコンを付与（PDF / 別窓） */
.header-nav__link[href$=".pdf" i]::after,
.header-nav__link[target="_blank"]::after {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* PDF（優先） */
.header-nav__link[href$=".pdf" i]::after {
  background-image: url("/assets/img/common/shared/icon-pdf-white.svg");
}

/* 別窓（PDF以外） */
.header-nav__link[target="_blank"]:not([href$=".pdf" i])::after {
  background-image: url("/assets/img/common/shared/icon-blank-white.svg");
}

@media (prefers-reduced-motion: reduce) {
  .header-nav,
  .header-nav__panel {
    transition: none;
  }
}

@media (max-width: 767px) {
  /* SPヘッダー */
  .header {
    padding: 19px 15px 19px 20px;
  }

  .logo {
    width: 125px;
  }

  .logo-img {
    width: 125px;
  }
  
  .header-actions {
    gap: 17px;
  }

  .header-mypage {
    width: auto;
    height: auto;
    padding: 5px 8px;
    font-size: 10px;
    border-radius: 4px;
  }

  .header-menu {
    width: 30px;
    height: 18px;
    gap: 6px;
  }

  /* 右からスライドインするメニューはSPでは少し広めに */
  .header-nav__panel {
    width: 100%;
    height: 100%;
    padding: 0;
  }

  .header-nav__close {
    position: absolute;
    top: 17px;
    right: 34px;
    width: 20px;
    height: 20px;
  }
  
  .header-nav__close > span {
    position: relative;
    width: 24px;
    height: 26px;
    display: block;
  }
  
  .header-nav__close > span::before,
  .header-nav__close > span::after {
    width: 24px;
    height: 4px;
  }
  
  .header-nav__nav {
    width: 255px;
  }

  .header-nav__list {
    gap: 25px;
  }
  .header-nav__link {
    gap: 2px;
    font-weight: bold;
    font-size: 16px;
    line-height: 1.5;
  }
  .header-nav__list + .header-nav__list {
    margin-top: 92px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
  }
  .header-nav__link--contact {
    font-size: 12px;
  }
}


