@charset "utf-8";

.header {
  width: 100%;
  position: fixed;
  display: flex;
  align-items: center;
  height: 80px;
  z-index: 1000;
  top: 0;
  left: 0;
  background: rgba(228, 228, 240, 0.95);
  border-top: 4px solid var(--title-color);
  padding-block: 14px 15px;
}

.header__inner {
  width: 100%;
  padding-inline: 20px 30px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  width: 100%;
  max-width: 115px;
  aspect-ratio: 115/55;
}

.header__logo a {
  width: 100%;
  height: auto;
}

.header__logo a img {
  width: 100%;
  height: auto;
  aspect-ratio: 115/55;
  object-fit: contain;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  display: none;
}

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

.header__lists {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.header__list-d .header__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header__list-d .header__item::after {
  content: "";
  width: 7px;
  height: 9px;
  background: url(../images/header-arrow-icon.svg) no-repeat center
    center/contain;
  transition: transform 0.3s ease;
}

/* ドロップダウンが表示されている間も矢印を回転させる */
.header__list-d:hover .header__item::after,
.header__list-d:focus-within .header__item::after {
  transform: rotate(180deg);
}

/* ドロップダウンが表示されている間の親要素のスタイル (既にあるかもしれません) */
.header__list-d:hover .header__dropdown-lists,
.header__list-d:focus-within .header__dropdown-lists {
  visibility: visible;
  opacity: 1;
}

.header__list a p {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 2.3;
  transition: all 0.3s ease;
}

.header__list a p:hover {
  color: var(--title-color);
}

.header__list-d:hover > a p {
  color: var(--title-color);
}

/* dropdown */
.header__list-d {
  position: relative;
  cursor: pointer;
}

.header__dropdown-lists {
  position: absolute;
  min-width: 200px;
  visibility: hidden;
  opacity: 0;
  background-color: var(--back-color);
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  transition: all 0.3s ease;
}

.header__list-d:hover .header__dropdown-lists {
  visibility: visible;
  opacity: 1;
}

.header__dropdown-list a p {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 32px;
  padding: 5px 10px;
  display: block;
  transition: all 0.3s ease;
}

.header__dropdown-list a p:hover {
  color: var(--title-color);
}

.header__button-wraper {
  display: flex;
  align-items: center;
  gap: 11px;
}

.header__reservation-button a p {
  color: var(--white-color);
  background: var(--brown-color);
  border: 1px solid var(--brown-color);
  border-radius: 23px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 32px;
  width: 160px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.header__reservation-button a p::before {
  content: "";
  width: 18px;
  height: 18px;
  background: url(../images/ball-icon.svg) no-repeat center center / contain;
  transition: all 0.3s ease;
}

.header__reservation-button a p:hover {
  background: var(--white-color);
  color: var(--brown-color);
}

.header__reservation-button a p:hover::before {
  background: url(../images/ball-icon-b.svg) no-repeat center center / contain;
}

.header__contact-button a p {
  color: var(--white-color);
  background: var(--purple-color);
  border: 1px solid var(--purple-color);
  width: 160px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  border-radius: 23px;
}

.header__contact-button a p::before {
  content: "";
  width: 18px;
  height: 18px;
  background: url(../images/mail-icon.svg) no-repeat center center / contain;
  transition: all 0.3s ease;
}

.header__contact-button a p:hover {
  color: var(--purple-color);
  background: var(--white-color);
}

.header__contact-button a p:hover::before {
  background: url(../images/mail-icon-p.svg) no-repeat center center / contain;
}

/* -----------------
drawer-icon
------------------ */

.header__drawer-icon {
  width: 30px;
  height: 30px;
  cursor: pointer;
  position: fixed;
  top: 35px;
  right: 20px;
  z-index: 1000;
}

@media screen and (min-width: 1200px) {
  .header__drawer-icon {
    display: none;
    right: 30px;
  }
}

.header__drawer-bar {
  position: absolute;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--text-color);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.header__drawer-bar:first-child {
  top: 0;
}

.header__drawer-bar:nth-child(2) {
  top: 5px;
}

.header__drawer-bar:nth-child(3) {
  top: 10px;
}

.header__drawer-icon.is-open .header__drawer-bar:first-child {
  transform: translateY(5px) rotate(45deg);
  transition: transform 0.3s ease;
}

.header__drawer-icon.is-open .header__drawer-bar:nth-child(2) {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.header__drawer-icon.is-open .header__drawer-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  transition: transform 0.3s ease;
}

/* -----------------
drawer
------------------ */
.header__drawer {
  position: fixed;
  overflow-y: scroll;
  transform: translateX(-100%);
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  height: 100%;
  padding-block: 160px 40px;
  background: var(--back-color);
  transition: transform 0.3s ease; /* ドロワーの開閉アニメーション */
}

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

.header__drawer-inner {
  width: 100%;
  padding-bottom: 100px;
  padding-inline: 20px;
  margin-inline: auto;
}

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

.header__drawer-item {
  position: relative;
  text-align: center; /* テキストを中央揃え */
}

.header__drawer-link p {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 2.3;
  transition: all 0.3s ease;
}

.header__drawer-link p:hover,
.header__drawer-link:hover > p {
  color: var(--title-color);
}

/* ドロップダウンの基本スタイル */
.header__drawer-dropdown {
  background: var(--back-color);
  width: 100%;
  margin-top: 10px;
  min-width: 200px;
  max-height: 0; /* 初期状態では高さ0 */
  overflow: hidden;
  opacity: 0;
  z-index: 1;
  transition: all 0.3s ease; /* max-heightだけでなく全プロパティに遷移を適用 */
}

/* activeクラスが付いたときの表示 */
.header__drawer-item.active .header__drawer-dropdown {
  max-height: 500px; /* 十分な高さを確保 */
  opacity: 1;
  pointer-events: auto;
}

/* ドロップダウンアイテムのアニメーション */
.header__drawer-dropdown-litem {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

/* activeクラスが付いたときのドロップダウンアイテムの表示 */
.header__drawer-item.active .header__drawer-dropdown-litem {
  opacity: 1;
  transform: translateY(0);
}

/* 遅延を加えて順番に表示 */
.header__drawer-dropdown-litem:nth-child(1) {
  transition-delay: 0.05s;
}
.header__drawer-dropdown-litem:nth-child(2) {
  transition-delay: 0.1s;
}
.header__drawer-dropdown-litem:nth-child(3) {
  transition-delay: 0.15s;
}
.header__drawer-dropdown-litem:nth-child(4) {
  transition-delay: 0.2s;
}

/* ドロップダウンの矢印アイコン */
/* サービス一覧を持つドロワーアイテムにのみ矢印を表示 */
.header__drawer-item:has(.header__drawer-dropdown)::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid #333;
  border-bottom: 2px solid #333;
  transform: rotate(45deg);
  position: absolute;
  right: 15px;
  top: 6px;
  transition: transform 0.3s ease;
}

/* アクティブ状態の矢印回転 */
.header__drawer-item.active::after {
  transform: rotate(-135deg);
}

/* ドロップダウンリンクのスタイル */
.header__drawer-dropdown-link p {
  margin-top: 5px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 2.3;
  transition: all 0.3s ease;
}

/* PCサイズでのホバー対応 */
@media screen and (min-width: 1200px) {
  .header__drawer-item:hover .header__drawer-dropdown {
    max-height: 1000px;
    opacity: 1;
    pointer-events: auto;
  }
}
