@charset "UTF-8";

/* =====================================
   ヘッダー: モダンデザイン
   ===================================== */
.header {
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 1000;
  color: #000;
  background-color: #fff;
  transition: background-color 0.3s ease, position 0.3s ease, box-shadow 0.3s ease;
  height: 74px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.header .btn_contact_info,
.header .btn_contact_header {
  height: 75px; /* ヘッダーの高さ全体に合わせる */
  padding: 0 12px; /* 高さが全体になるので上下のパディングをなくす */
  display: flex;
  align-items: center; /* テキストを中央揃えにする */
  justify-content: center; /* テキストを中央揃えにする */
  color: #fff;
  text-align: center;
  margin-right: 0;
}

.header .btn_contact_info {
  background-color: #333; /* 無料相談ボタンの背景色 */
  text-decoration: none;
}

.header .btn_contact_header {
  background-color: #cf0d37; /* お問い合わせボタンの背景色 */
  color: #fff;
  text-decoration: none;
}

.header-page {
  position: fixed !important;
  bottom: auto;
  top: 0 !important;
}

.area_contact_buttons {
  display: flex;
  align-items: center;
  list-style: none;
}

.area_contact_buttons a {
  margin: 0;
}

.header .container {
  max-width: 1920px;
  padding: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  gap: 20px;
  font-family: YakuHanJP, "Noto Sans Japanese", "Noto Sans",
    "Noto Sans CJK JP", sans-serif;
}

.header .area_logo_header {
  display: flex;
  align-items: center;
  margin-left: 20px; /* ロゴを左から20pxの位置に配置 */
  flex-shrink: 0; /* ロゴの部分が縮まないようにする */
}

.header .area_logo_header .logo {
  display: block;
  text-decoration: none;
  color: #000;
  cursor: pointer;
}

.list_nav_header {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.list_nav_header li {
  list-style: none;
  margin-left: 28px;
}

.header_title {
  font-family: Merriweather, "Yu Mincho", serif;
  font-size: 24px;
  font-weight: 700;
}

.list_nav_header a {
  font-family: YakuHanJP, "Noto Sans Japanese", "Noto Sans",
    "Noto Sans CJK JP", sans-serif;
  text-decoration: none;
  color: #000;
}

.list_nav_contact {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* =====================================
   ハンバーガーメニュー: モダンデザイン
   ===================================== */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 50px;
  height: 20px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0; /* padding削除 */
  margin: 0;
  position: relative;
  z-index: 2000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-menu:hover {
  transform: scale(1.05);
}

/* フォーカス時のアウトライン（キーボード操作時のみ表示） */
.hamburger-menu:focus {
  outline: none; /* デフォルトのアウトラインを消す */
}

.hamburger-menu:focus-visible {
  outline: 2px solid #cf0d37;
  outline-offset: 4px;
}

/* 古いブラウザ用のフォールバック */
@supports not selector(:focus-visible) {
  .hamburger-menu:focus {
    outline: 2px solid #cf0d37;
    outline-offset: 4px;
  }
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  will-change: transform, opacity;
}

/* アクティブ時のアニメーション（×印） */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

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

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

/* =====================================
   モバイルメニューオーバーレイ
   ===================================== */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgb(22 22 26 / 80%);
  backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1500;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =====================================
   モバイルナビゲーション
   ===================================== */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 60%;
  max-width: 350px;
  height: 100vh;
  background: linear-gradient(135deg, #cf0d37 0%, #a00a2c 100%);
  box-shadow: -8px 0 32px rgb(0 0 0 / 30%);
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1600;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav-list {
  list-style: none;
  padding: 60px 40px;
  margin: 0;
  width: 100%;
}

.mobile-nav-item {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: calc(0.1s * var(--item-index));
  margin-bottom: 8px;
}

.mobile-nav.active .mobile-nav-item {
  opacity: 1;
  transform: translateX(0);
}

.mobile-nav-link {
  display: block;
  padding: 20px 24px;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  font-family: YakuHanJP, "Noto Sans Japanese", "Noto Sans", "Noto Sans CJK JP", sans-serif;
  letter-spacing: 0.05em;
  border-radius: 12px;
  background: rgb(255 255 255 / 5%);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.mobile-nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgb(255 255 255 / 10%);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-link:hover::before,
.mobile-nav-link:focus::before {
  left: 0;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
  background: rgb(255 255 255 / 15%);
  transform: translateX(8px);
  box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
}

.mobile-nav-link:focus {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* デスクトップナビゲーションのラッパー */
.desktop-nav {
  display: contents;
}

/* =====================================
   レスポンシブ: モバイル対応
   ===================================== */
@media (width <= 700px) {
  /* デスクトップナビゲーションを非表示 */
  .desktop-nav,
  .list_nav_header {
    display: none;
  }

  .header .container {
    justify-content: space-between;
    align-items: center;
  }

  .header-hamburger-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 75px;
    width: 60px; /* SP版: ハンバーガーメニューエリアの幅を60pxに設定 */
    background-color: #000;
  }

  .hamburger-menu {
    display: flex;
    width: 28px; /* SP版: 3本線の幅を28pxに調整 */
    height: 20px;
    padding: 0;
    margin: 0 auto; /* SP版: 中央配置 */
    position: relative;
  }

  .header_title {
    font-weight: 500;
    font-size: 18px;
  }

  /* モバイルメニューがアクティブなときにスクロールを無効化 */
  body.nav-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}

/* タブレット・中サイズ画面 */
@media (width <= 900px) and (width >= 701px) {
  .mobile-nav {
    width: 50%;
    max-width: 400px;
  }
}

/* 大画面ではモバイルメニューを完全に非表示 */
@media (width >= 701px) {
  .mobile-menu-overlay,
  .mobile-nav {
    display: none !important;
  }
}

/* アニメーション最適化: prefers-reduced-motion対応 */
@media (prefers-reduced-motion: reduce) {
  .hamburger-menu span,
  .mobile-menu-overlay,
  .mobile-nav,
  .mobile-nav-item,
  .mobile-nav-link {
    transition: none !important;
    animation: none !important;
  }
}
