/* ヘッダー（ロゴカード＋右上ピルナビ） */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 950; height: 120px; pointer-events: none; }
.logo-card { position: absolute; top: 0; left: 0; background: #fff; padding: 14px 24px 10px 14px; border-radius: 0 0 14px 0; box-shadow: none; pointer-events: auto; }
.logo-card a { display: inline-block; text-decoration: none; }
.logo-card img { height: 84px; display: block; }
.nav-pill { position: absolute; top: 14px; right: 16px; background: #fff; border: 2px solid #791218; border-radius: 999px; box-shadow: none; padding: 10px 3px; pointer-events: auto; }
/* ============================================
   PC版ナビゲーション（3段階メニュー）
   ============================================ */
.nav-pill .nav-list { list-style: none; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 0; padding: 0 10px 0px; }
.nav-pill .nav-item { position: relative; /* 右側の隙間もホバー領域に含める（デザインは変更しない） */ padding-right: 5px; margin-right: -5px; }
/* 全てのナビゲーションリンクに統一スタイルを適用 */
.nav-pill .nav-list li > a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 18px; border-radius: 999px; font-size: 13px; font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif; background: #fff; color: var(--base); text-decoration: none; white-space: nowrap; transition: background 0.2s ease; position: relative; /* 親要素のパディングを相殺して視覚的なサイズを維持 */ margin: -2.5px 0; }
.nav-pill .nav-list li > a:hover,
.nav-pill .nav-list li > a:focus { background: #f0f0f0; color: #791218; }

/* プルダウンアイコン（三角形） */
.nav-pill .nav-item.has-submenu > a::after { content: ''; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--base); margin-left: 2px; transition: transform 0.2s ease; flex-shrink: 0; }
.nav-pill .nav-item.has-submenu:hover > a::after,
.nav-pill .nav-item.has-submenu:focus-within > a::after { transform: rotate(180deg); }
.nav-pill .nav-item > a:hover,
.nav-pill .nav-item > a:focus { background: #f8f8f8; }

/* お問い合わせ：茶色背景 */
.nav-pill .nav-item.contact > a { background: #791218; color: #fff; }
.nav-pill .nav-item.contact > a::after { display: none; }
.nav-pill .nav-item.contact > a:hover,
.nav-pill .nav-item.contact > a:focus { background: #9d5a2b; }

/* 2段目サブメニュー */
.nav-pill .submenu { display: none; position: absolute; top: calc(100% + 8px); left: 0; margin-top: 0; background: #fff; border: 2px solid #791218; border-radius: 12px; box-shadow: none; min-width: 240px; padding: 10px 0 10px 0; z-index: 1000; list-style: none; margin: 0; }

/* 親メニューからサブメニューへの移動経路を確保（広めに設定してスムーズな移動を可能に） */
.nav-pill .submenu::before { content: ''; position: absolute; top: -15px; left: -10px; right: -10px; height: 15px; z-index: 999; }

/* hover/focusで表示 */
.nav-pill .nav-item:hover > .submenu,
.nav-pill .nav-item:focus-within > .submenu { display: block; }
.nav-pill .nav-item:hover > a[aria-expanded],
.nav-pill .nav-item:focus-within > a[aria-expanded] { background: #f0f0f0; color: #791218; }
.nav-pill .submenu li { border-bottom: 1px solid #f0f0f0; }
.nav-pill .submenu li:last-child { border-bottom: none; }
.nav-pill .submenu li a { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 0; font-size: 13px; font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif; background: transparent; color: var(--base); text-decoration: none; white-space: normal; transition: background 0.2s ease; }

/* 3段目がある場合のアイコン */
.nav-pill .submenu li.has-submenu > a::after { content: ''; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 5px solid var(--base); margin-left: 8px; flex-shrink: 0; transition: transform 0.2s ease; }
.nav-pill .submenu li.has-submenu:hover > a::after,
.nav-pill .submenu li.has-submenu:focus-within > a::after { transform: translateX(3px); }
.nav-pill .submenu li a:hover,
.nav-pill .submenu li a:focus { background: #f0f0f0; color: #791218; }

/* 3段目サブメニュー（横展開） — JSで表示制御 */
.nav-pill .submenu.level-3 { left: 100%; top: 0; margin-left: -2px; margin-top: 0; min-width: 260px; padding-top: 10px; display: block !important; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s ease, visibility 0.15s ease; }
.nav-pill .submenu.level-3.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.nav-pill .submenu.level-3 li a { font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif; font-weight: 500; }
.nav-pill .submenu.level-2 > .has-submenu { position: relative; }

/* 2段目から3段目への移動経路を確保 */
.nav-pill .submenu.level-2 > .has-submenu::before { content: ''; position: absolute; right: -2px; top: 0; bottom: 0; width: 2px; z-index: 1001; }
/* focus-within でキーボード操作に対応 */
.nav-pill .submenu.level-2 > .has-submenu:focus-within > .submenu.level-3 { opacity: 1; visibility: visible; pointer-events: auto; }

/* アクセシビリティ：キーボード操作時のaria-expanded更新はJSで対応 */
/* ハンバーガーメニュー */
.hamburger-menu { display: none; position: absolute; top: 14px; right: 16px; width: 48px; height: 48px; background: #fff; border: 2px solid #791218; border-radius: 12px; flex-direction: column; justify-content: center; align-items: center; gap: 0; cursor: pointer; z-index: 1001; pointer-events: auto; padding: 0; transition: all 0.3s ease; }
.hamburger-menu:hover { background: #f8f8f8; }
.hamburger-menu:active { transform: scale(0.95); }
.hamburger-menu span { display: block; width: 24px; height: 3px; background: #791218; border-radius: 2px; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); position: relative; margin: 2.5px 0; }
.hamburger-menu span:first-child { margin-top: 0; }
.hamburger-menu span:last-child { margin-bottom: 0; }
.hamburger-menu.active { background: #791218; }
.hamburger-menu.active span { background: #fff; height: 4px; }
.hamburger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* ============================================
   モバイルメニュー（アコーディオン形式）
   ============================================ */
.mobile-menu { display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #fcf9db; z-index: 1000; padding: 100px 0 40px; overflow-y: auto; pointer-events: none; transform: translateX(-100%); opacity: 0; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s; visibility: hidden; }
.mobile-menu.active { transform: translateX(0); opacity: 1; pointer-events: auto; visibility: visible; }
.mobile-menu .mobile-nav-list { list-style: none; padding: 0 20px; margin: 0; max-width: 600px; margin: 0 auto; }
.mobile-menu .mobile-nav-item { margin-bottom: 4px; }
.mobile-menu .mobile-nav-list > li:first-child { margin-bottom: 4px; }

/* TOPリンク */
.mobile-menu .mobile-nav-list > li:first-child > a { display: block; padding: 18px 24px; color: #791218; text-decoration: none; font-size: 16px; font-weight: 700; font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif; transition: all 0.3s ease; position: relative; background: #fff; border-radius: 12px; border-bottom: none; }
.mobile-menu .mobile-nav-list > li:first-child > a::before { display: none; }
.mobile-menu .mobile-nav-list > li:first-child > a:hover,
.mobile-menu .mobile-nav-list > li:first-child > a:focus { background: #fff8e0; }

/* 通常リンク */
.mobile-menu .mobile-nav-item > a { display: block; padding: 18px 24px; color: #791218; text-decoration: none; font-size: 16px; font-weight: 700; font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif; transition: all 0.3s ease; position: relative; background: #fff; border-radius: 12px; }
.mobile-menu .mobile-nav-item > a::before { display: none; }
.mobile-menu .mobile-nav-item > a:hover,
.mobile-menu .mobile-nav-item > a:focus { background: #fff8e0; }

/* アコーディオントグルボタン */
.mobile-submenu-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; background: #fff; border: none; border-radius: 12px; color: #791218; font-size: 16px; font-weight: 700; font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif; text-align: left; cursor: pointer; transition: all 0.3s ease; position: relative; }
.mobile-submenu-toggle::before { display: none; }
.mobile-submenu-toggle:hover,
.mobile-submenu-toggle:focus { background: #fff8e0; }
.mobile-submenu-toggle[aria-expanded="true"] { background: #fff; border-radius: 12px 12px 0 0; }

/* お問い合わせ：茶色背景・白文字ボタン（モバイル版） */
.mobile-menu .mobile-nav-item.contact { margin: 16px 0 0; padding: 0; border: none; }
.mobile-menu .mobile-nav-item.contact > a { background: #791218; color: #fff; margin: 0; padding: 18px 24px; border-radius: 12px; text-align: center; font-size: 16px; }
.mobile-menu .mobile-nav-item.contact > a:hover,
.mobile-menu .mobile-nav-item.contact > a:focus { background: #9d5a2b; }

/* トグルアイコン */
.mobile-submenu-toggle .toggle-icon { font-size: 20px; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); margin-left: 12px; color: #c4956a; flex-shrink: 0; }
.mobile-submenu-toggle[aria-expanded="true"] .toggle-icon { transform: rotate(90deg); color: #ed733d; }

/* サブメニュー（アコーディオン） */
.mobile-submenu { display: none; list-style: none; padding: 0 0 8px; margin: 0; background: #fff; border-radius: 0 0 12px 12px; animation: slideDown 0.3s ease-out; }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.mobile-submenu-toggle[aria-expanded="true"] + .mobile-submenu,
.mobile-nav-item.has-submenu.active > .mobile-submenu { display: block; }
.mobile-submenu li { border-bottom: none; }
.mobile-submenu li:last-child { border-bottom: none; }
.mobile-submenu li a { display: block; padding: 12px 24px 12px 44px; color: #791218; text-decoration: none; font-size: 15px; font-weight: 500; font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif; transition: all 0.2s ease; position: relative; border-radius: 8px; margin: 0 8px; }
.mobile-submenu li a::before { content: '─'; position: absolute; left: 28px; color: #c4956a; font-weight: normal; font-size: 12px; }
.mobile-submenu li a:hover,
.mobile-submenu li a:focus { background: #fcf9db; padding-left: 44px; }

/* 3段階メニュー（2段目のサブメニュー内） */
.mobile-submenu.level-2 { background: #f9f6ee; border-radius: 8px; margin: 4px 8px 0; padding: 4px 0; }
.mobile-submenu.level-2 li a { padding-left: 44px; font-size: 14px; font-weight: 400; }
.mobile-submenu.level-2 li a::before { left: 28px; content: '─'; color: #c4956a; font-weight: normal; font-size: 11px; }
.mobile-submenu.level-2 .mobile-submenu-toggle { padding: 12px 24px 12px 44px; font-size: 15px; font-weight: 500; background: transparent; border-radius: 8px; margin: 0 8px; }
.mobile-submenu.level-2 .mobile-submenu-toggle:hover { background: #fcf9db; }
.mobile-submenu.level-2 .mobile-submenu-toggle[aria-expanded="true"] { background: transparent; border-radius: 8px; }
.mobile-submenu.level-2 .mobile-submenu { background: #f0ede4; border-radius: 8px; margin: 4px 8px 0; }
.mobile-submenu.level-2 .mobile-submenu li a { padding-left: 44px; font-size: 14px; }
.mobile-submenu.level-2 .mobile-submenu li a::before { left: 28px; content: '─'; color: #c4956a; font-weight: normal; font-size: 11px; }

/* レスポンシブ：タブレット・スマホ（1023px以下） */
@media (max-width: 1023px) {
    .logo-card { background: transparent; padding: 8px 12px 6px 8px; box-shadow: none; border-radius: 0; }
    .logo-card img { height: 50px; }
    .nav-pill { display: none; }
    .hamburger-menu { display: flex; }
}
/* 右サイドの縦タブ =============*/
.side-tabs { position: fixed; top: 40%; right: 0; z-index: 999; display: flex; flex-direction: column; gap: 12px; }
.side-tab { writing-mode: vertical-rl; background: #d46a00; color: #fff; padding: 16px 12px; font-size: 14px; font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif; letter-spacing: 1px; border-radius: 8px 0 0 8px; transition: background-color 0.3s ease; white-space: nowrap; }
.side-tab:hover { background-color: #e67a00; }

/* レスポンシブ：タブレット（768px～1023px） */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .side-tabs { top: 35%; gap: 10px; }
    .side-tab { padding: 14px 10px; font-size: 13px; }
}

/* レスポンシブ：スマホ（～767px） */
@media (max-width: 767px) {
    .side-tabs { top: auto; bottom: 80px; right: 0; gap: 8px; }
    .side-tab { padding: 12px 8px; font-size: 12px; }
}
