/* ========================================
   Header Styles - ヘッダーのスタイル
   ========================================
   2段構成の固定ヘッダー、ナビゲーション、モバイルメニューの設定
======================================== */

/* ヘッダーの基本設定：固定配置、z-index設定 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Logo Section - ロゴセクション（上段）
   ======================================== */
.logoSection {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding: 1rem 20px;
  position: relative;
  height: 82px;
  display: flex;
  justify-content: space-between; /* ロゴとハンバーガーを両端に */
  align-items: center;
}

.logoSection::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../images/0006.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.9;
  pointer-events: none;
  z-index: -2;
}

.logoSection::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  --overlay-color-1: rgba(255, 255, 255, 0.5);
  --overlay-color-2: rgba(255, 255, 255, 0.5);
  background: linear-gradient(
    135deg,
    var(--overlay-color-1),
    var(--overlay-color-2)
  );
  pointer-events: none;
  z-index: -1;
}

.logoSection img {
  display: block;
  position: relative;
  z-index: 1;
  /* ロゴを中央に配置するためのトリック */
  margin-left: auto;
  margin-right: auto;
  transform: translateX(-25%); /* ハンバーガーの幅の半分を考慮 */
}

/* ========================================
   Navigation Section (PC) - PC用ナビゲーション
   ======================================== */
.navigationSection {
  position: relative;
  height: 60px;
}

.navigationSection::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../images/009.png");
  background-size: cover;
  background-position: center;
  opacity: 1;
  pointer-events: none;
  z-index: -2;
}

.navigationSection::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  --overlay-color-1: rgba(255, 255, 255, 0.5);
  --overlay-color-2: rgba(255, 255, 255, 0.5);
  background: linear-gradient(
    135deg,
    var(--overlay-color-1),
    var(--overlay-color-2)
  );
  pointer-events: none;
  z-index: -1;
}

/* ========================================
   Hamburger Menu - ハンバーガーメニュー
   ======================================== */
.hamburger {
  display: none; /* スマホでのみ表示 */
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 20px;
  justify-content: space-between;
  z-index: 1001;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: #333;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ========================================
   Nav Menu - ナビゲーションメニュー
   ======================================== */

/* PC Styles */
.navMenu {
  position: absolute;
  top: 82px; /* ロゴセクションの高さ */
  left: 50%;
  transform: translateX(-50%);
  height: 60px; /* ナビゲーションセクションの高さ */
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 1; /* navigationSectionの背景より手前 */
}

.navLink {
  position: relative;
  color: #333;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
  white-space: nowrap; /* PCでメニューが改行しないように */
}

.navLink::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #d4af37, #9370db);
  transition: width 0.3s ease;
}

.navLink:hover {
  color: #6b46c1;
}

.navLink:hover::after {
  width: 100%;
}

/* ========================================
   Mobile & Tablet Styles - モバイル & タブレット
   ======================================== */
@media (max-width: 768px) {
  .logoSection img {
    transform: translateX(0); /* 中央揃えの調整をリセット */
  }

  .navigationSection {
    display: none; /* ナビゲーションバーを非表示 */
  }

  .hamburger {
    display: flex; /* ハンバーガーメニューを表示 */
  }

  /* navMenuのスタイルをスマホ用に上書き */
  .navMenu {
    position: fixed;
    top: 82px;
    left: auto; /* PC用のleftをリセット */
    right: -100%;
    transform: none; /* PC用のtransformをリセット */
    width: 100%;
    height: calc(100vh - 82px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    z-index: 999;
  }

  .navMenu.active {
    right: 0;
    background-image: url("../images/138.png");
    background-size: cover;
    background-position: center;
  }

  .navLink {
    font-size: 1.2rem;
    padding: 1rem 0;
    width: 200px;
    text-align: center;
  }
}

/* ========================================
   Tablet Adjustments - タブレット調整
   ======================================== */
@media (max-width: 1024px) and (min-width: 769px) {
  .navMenu {
    gap: 1.5rem;
  }
  .navLink {
    font-size: 0.9rem;
  }
}

/* ========================================
   Small Mobile Adjustments - 小画面モバイル調整
   ======================================== */
@media (max-width: 480px) {
  .logoSection {
    height: 70px;
  }
  .navMenu {
    top: 70px;
    height: calc(100vh - 70px);
  }
}
