/* ========================================
   統一ナビゲーションシステム v1.0
   全ページ共通のナビゲーションデザイン
   ======================================== */

/* ========================================
   ヘッダー共通設定
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

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

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 40px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
    gap: clamp(16px, 2vw, 28px);
}

/* ========================================
   ロゴセクション
   ======================================== */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.logo:hover {
    opacity: 0.8;
}

.logo-image {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.logo picture {
    display: block;
    line-height: 0;
    width: 56px;
    height: 56px;
}

.logo picture img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-subtitle {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.75rem;
    color: #F6AD55;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.2;
}

.logo-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2C7A7B;
    letter-spacing: 0.05em;
    line-height: 1.3;
}

/* ========================================
   デスクトップナビゲーション
   ======================================== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.5vw, 18px);
    flex: 1;
    justify-content: flex-end;
    max-width: 100%;
    flex-wrap: nowrap;
    margin-right: -8px;
}

.nav-menu a {
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2D3748;
    padding: 10px 6px;
    letter-spacing: 0.03em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none;
    
    /* 白い背景を完全に削除 */
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* アンダーラインアニメーション */
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #F6AD55 0%, #ED8936 100%);
    border-radius: 2px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ホバー時 */
.nav-menu a:hover {
    color: #F6AD55;
    background: transparent !important;
    background-color: transparent !important;
    transform: translateY(-1px);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* アクティブ状態（現在のページ） */
.nav-menu a.active {
    color: #2C7A7B;
    font-weight: 600;
    background: transparent !important;
    background-color: transparent !important;
}

.nav-menu a.active::after {
    width: 100%;
    background: linear-gradient(90deg, #2C7A7B 0%, #4FD1C5 100%);
}

/* フォーカス時（キーボードナビゲーション） */
.nav-menu a:focus {
    outline: 2px solid #4FD1C5;
    outline-offset: 4px;
    background: transparent !important;
    border-radius: 4px;
}

/* クリック時のアニメーション */
.nav-menu a:active {
    transform: scale(0.97);
}

/* ========================================
   予約ボタン（デスクトップ）
   ======================================== */
.nav-menu .btn-reserve {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 11px 24px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #F6AD55 0%, #ED8936 100%) !important;
    border: none !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 16px rgba(246, 173, 85, 0.35) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    z-index: 1 !important;
    margin-left: 6px !important;
}

/* 予約ボタンのホバー効果 */
.nav-menu .btn-reserve::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.nav-menu .btn-reserve:hover::before {
    left: 100%;
}

.nav-menu .btn-reserve:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ED8936 0%, #DD6B20 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(246, 173, 85, 0.5) !important;
}

.nav-menu .btn-reserve:active {
    transform: translateY(0) scale(0.98) !important;
}

.nav-menu .btn-reserve:focus {
    color: #ffffff !important;
    outline: 2px solid #4FD1C5 !important;
    outline-offset: 4px !important;
}

/* 予約ボタンのアンダーライン削除 */
.nav-menu .btn-reserve::after {
    display: none !important;
}

/* ========================================
   ハンバーガーメニューボタン
   ======================================== */
.header-right {
    display: none; /* デスクトップでは非表示 */
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.hamburger {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    width: 28px !important;
    height: 22px !important;
    min-width: 28px !important;
    min-height: 22px !important;
    max-width: 28px !important;
    max-height: 22px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 1001 !important;
    transition: transform 0.3s ease !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger span {
    display: block !important;
    width: 100% !important;
    height: 3px !important;
    background: #2C7A7B !important;
    border-radius: 2px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

/* ハンバーガーメニューアクティブ時 */
.hamburger.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

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

/* ========================================
   モバイルメニュー
   ======================================== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: #ffffff;
    z-index: 999;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 100px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 4px;
}

.mobile-menu-nav a {
    display: block;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #2D3748;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.03em;
}

.mobile-menu-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background: linear-gradient(135deg, #F6AD55 0%, #ED8936 100%);
    border-radius: 0 4px 4px 0;
    transition: width 0.3s ease;
}

.mobile-menu-nav a:hover {
    background: rgba(246, 173, 85, 0.08);
    color: #F6AD55;
    padding-left: 28px;
}

.mobile-menu-nav a:hover::before {
    width: 4px;
}

.mobile-menu-nav a.active {
    background: linear-gradient(135deg, rgba(44, 122, 123, 0.12) 0%, rgba(79, 209, 197, 0.12) 100%);
    color: #2C7A7B;
    font-weight: 600;
    border-left: 4px solid #2C7A7B;
    padding-left: 24px;
}

.mobile-menu-nav a:active {
    transform: scale(0.98);
}

/* モバイル予約ボタン */
.btn-reserve-mobile {
    margin-top: 12px !important;
    background: linear-gradient(135deg, #F6AD55 0%, #ED8936 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-align: center;
    box-shadow: 0 4px 16px rgba(246, 173, 85, 0.35) !important;
    border: none !important;
}

.btn-reserve-mobile:hover {
    background: linear-gradient(135deg, #ED8936 0%, #DD6B20 100%) !important;
    color: #ffffff !important;
    padding-left: 20px !important;
    transform: translateX(0) !important;
}

.btn-reserve-mobile::before {
    display: none !important;
}

/* ========================================
   レスポンシブ対応
   ======================================== */

/* タブレット: 1024px以下 */
@media (max-width: 1024px) {
    .header-container {
        min-height: 75px;
        gap: 16px;
    }
    
    .nav-menu {
        gap: clamp(6px, 1.2vw, 12px);
    }
    
    .nav-menu a {
        font-size: 0.8rem;
        padding: 10px 4px;
    }
    
    .nav-menu .btn-reserve {
        padding: 10px 20px !important;
        font-size: 0.85rem !important;
    }
    
    .logo-image,
    .logo picture {
        width: 50px;
        height: 50px;
    }
    
    .logo-title {
        font-size: 1.15rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
}

/* モバイル: 768px以下 */
@media (max-width: 768px) {
    .header-container {
        min-height: 70px;
        padding: 0 20px;
    }
    
    /* デスクトップナビを非表示 */
    .nav-menu {
        display: none;
    }
    
    /* ハンバーガーメニューボタンを表示 */
    .header-right {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        width: auto !important;
        height: auto !important;
    }
    
    .logo-image,
    .logo picture {
        width: 45px;
        height: 45px;
    }
    
    .logo-title {
        font-size: 1.05rem;
    }
    
    .logo-subtitle {
        font-size: 0.65rem;
    }
}

/* スマートフォン: 480px以下 */
@media (max-width: 480px) {
    .header-container {
        min-height: 65px;
        padding: 0 16px;
    }
    
    .logo {
        gap: 8px;
    }
    
    .logo-image,
    .logo picture {
        width: 40px;
        height: 40px;
    }
    
    .logo-title {
        font-size: 0.95rem;
    }
    
    .logo-subtitle {
        font-size: 0.6rem;
    }
    
    .hamburger {
        width: 26px !important;
        height: 20px !important;
    }
    
    .hamburger span {
        height: 2.5px !important;
    }
    
    .mobile-menu {
        width: min(300px, 90vw);
    }
}

/* ========================================
   アクセシビリティ対応
   ======================================== */

/* キーボードフォーカス時の視覚的フィードバック */
.hamburger:focus {
    outline: 2px solid #4FD1C5;
    outline-offset: 4px;
    border-radius: 4px;
}

/* リンクフォーカス時の視覚的フィードバック */
.mobile-menu-nav a:focus {
    outline: 2px solid #4FD1C5;
    outline-offset: 2px;
    border-radius: 8px;
}

/* スクリーンリーダー用のテキスト */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   プリントスタイル
   ======================================== */
@media print {
    .header {
        position: static;
        box-shadow: none;
    }
    
    .mobile-menu,
    .mobile-menu-overlay,
    .hamburger {
        display: none !important;
    }
    
    .nav-menu {
        display: flex !important;
    }
}
