@charset "utf-8";

.header {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 95vw;
  background: var(--color-white);
  border-radius: 10px;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1);
}

.header__inner {
  padding-inline: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
}

.header__logo {
  aspect-ratio: 66/66;
  width: 45px;
  height: auto;
}

@media screen and (min-width: 600px) {
  .header__logo {
    width: 65px;
  }
}

.header__logo img {
  aspect-ratio: 66/66;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.header__contents {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

@media screen and (min-width: 970px) {
  .header__contents {
    display: flex;
  }
}

@media screen and (min-width: 1200px) {
  .header__contents {
    gap: 42px;
  }
}

.header__list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

@media screen and (min-width: 1200px) {
  .header__list {
    gap: 40px;
  }
}

.header__link:hover .header__link-text,
.header__link:hover .header__link-text{
  opacity: 0.7;
}

/* サブメニューボタンのpositionを修正 */
.header__item {
  position: relative; /* 追加：サブメニューの基準点として必要 */
}

.header__link-text,
.header__item-button-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: calc(80 / 1000 * 1em);
  line-height: calc(20 / 14);
}

/* 修正：セレクターエラーを修正 */
.header__link-text:hover,
.header__item-button-text:hover {
  opacity: 0.7;
}

.header__item-button {
  position: relative;
  cursor: pointer;
}

.header__item-button-text {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header__item-button-text::after {
  content: "";
  margin-top: 3px;
  width: 15px;
  height: 9px;
  white-space: nowrap;
  background: url(../images/header-item-icon.svg) no-repeat center center /
    contain;
}

.header__item-button-text:hover {
  cursor: pointer;
  opacity: 0.7;
}

.header__item-button:hover .header__item-box {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.header__item-button::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 174px;
  height: 35px;
  background: transparent;
  z-index: 98;
}

.header__item-box {
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
  display: none;
  transition: opacity 0.3s ease;
  width: 174px;
  padding: 30px 18px 30px 24px;
  background: #ffffff;
  border-radius: 10px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 35px;
  transform: translateX(-50%);
  min-height: 160px;
  z-index: 99;
}

/* サブメニューホバー継続のための修正 */
.header__item-button:hover .header__item-box,
.header__item-box:hover {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.header__item-box-link {
  display: block;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.header__item-box-link:hover {
  opacity: 0.7;
}

.header__item-box-text {
  font-size: 14px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__item-box-text::after {
  content: "";
  background: url(../images/header-item-box-text-icon.svg) no-repeat center
    center / contain;
  width: 6px;
  height: 12px;
}

.header__button-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.header__button-tel-link {
  display: block;
  position: relative;
  padding-left: 32px;
}

.header__button-tel-link::before {
  content: "";
  position: absolute;
  width: 24px;
  aspect-ratio: 24/24;
  height: auto;
  white-space: nowrap;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background: url(../images/tel-icon.svg) no-repeat center center / contain;
}

.header__button-tel-text1 {
  font-family: var(--ff-en);
  font-size: 22px;
  font-weight: 700;
}

.header__button-tel-text2 {
  text-align: left;
  font-size: 12px;
  margin-top: 3px;
}

/* ドロワー */

.header__open-button {
  width: 30px;
  height: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}

@media screen and (min-width: 970px) {
  .header__open-button {
    display: none;
  }
}

.header__open-button.is-open .header__open-bar:nth-of-type(1) {
  transform: rotate(45deg) translate(0, 11px);
}

.header__open-button.is-open .header__open-bar:nth-of-type(2) {
  opacity: 0;
  transform: scaleX(0);
}

.header__open-button.is-open .header__open-bar:nth-of-type(3) {
  transform: rotate(-45deg) translate(0, -11px);
}

.header__open-bar {
  width: 100%;
  height: 2px;
  background-color: #007989;
  transition: all 0.3s ease;
  transform-origin: center;
  border-radius: 3px;
  position: relative;
}

.header__open-bar:nth-of-type(2) {
  width: 80%;
}

.header__drawer {
  position: fixed;
  overflow-y: scroll;
  z-index: 99;
  top: 0;
  left: 0;
  padding: 34% 15px;
  width: 100vw;
  height: 100%;
  background: var(--color-white);
  text-align: center;
  transform: translateX(100vw);
  opacity: 0;
  transition: all 0.3s ease;
}

@media screen and (min-width: 768px) {
  .header__drawer {
    padding: 24% 15px;
  }
}

@media screen and (min-width: 970px) {
  .header__drawer {
    display: none;
  }
}



.header__drawer.is-open {
  transform: translateX(0);
  opacity: 1;
}

.header__drawer-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 30px;
}

.header__drawer-link-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: calc(80 / 1000 * 1em);
  line-height: calc(20 / 14);
}

.header__drawer-box {
  margin-top: 5px;
  margin-left: 43px;
  display: inline-flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 15px;
}

.header__drawer-box-text {
  font-size: 14px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header__drawer-box-text::before {
  content: "";
  width: 6px;
  height: 2px;
  background: #007989;
  flex-shrink: 0;
}
