/**
 * Common CSS - v1.90L60
 * 全ページ共通スタイル
 * 
 * PC表示: フラットメニュー（ドロップダウンなし）
 * スマホ表示: ハンバーガー → アコーディオンメニュー（黒背景）
 * 
 * 重要: このCSSは全ページで読み込まれ、ナビゲーションのPC/スマホ切り替えを制御します
 */

/* ========================================
   Google Fonts
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

/* ========================================
   ベーススタイル
   ======================================== */
html {
    font-size: 62.5%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 
                 "Hiragino Sans", "Hiragino Kaku Gothic ProN",
                 "Yu Gothic", "Meiryo",
                 "Noto Sans JP", sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ========================================
   PC表示（769px以上） - デフォルト
   ======================================== */

/* スマホ用要素を完全に非表示 */
.hamburger {
    display: none !important;
    visibility: hidden !important;
}

.menu-overlay {
    display: none !important;
    visibility: hidden !important;
}

.nav-mobile {
    display: none !important;
    visibility: hidden !important;
    position: fixed !important;
    right: -9999px !important;
    opacity: 0 !important;
}

/* PC用フラットメニュー */
.nav-pc {
    display: flex !important;
    visibility: visible !important;
    gap: 1.5rem;
    list-style: none !important;
    align-items: center;
    margin: 0;
    margin-left: auto;
    padding: 0;
}

.nav-pc li {
    list-style: none !important;
}

.nav-pc li a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 3px;
}

.nav-pc li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #8b6f47 0%, #d4af37 100%);
    transition: width 0.3s ease;
}

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

.nav-pc li a.active {
    color: #8b6f47;
    font-weight: bold;
}

.nav-pc li a.active::after {
    width: 100%;
}

/* PC用CTAボタン */
.nav-cta-pc {
    display: flex !important;
    visibility: visible !important;
    gap: 0.8rem;
    list-style: none !important;
    align-items: center;
    margin: 0;
    margin-left: 1.5rem;
    padding: 0;
}

.nav-cta-pc li {
    list-style: none !important;
}

.nav-cta-pc .nav-cta {
    background: linear-gradient(135deg, #8b6f47 0%, #d4af37 100%);
    color: white !important;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.6rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-cta-pc .nav-cta-secondary {
    background: transparent;
    color: #8b6f47 !important;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.6rem;
    text-decoration: none;
    border: 1px solid #8b6f47;
    transition: all 0.3s ease;
}

.nav-cta-pc .nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 111, 71, 0.3);
}

.nav-cta-pc .nav-cta-secondary:hover {
    background: #8b6f47;
    color: white !important;
}

/* 「上に戻る」ボタン */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8b6f47 0%, #d4af37 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(139, 111, 71, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 998;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(139, 111, 71, 0.4);
}

/* ========================================
   スマホ表示（768px以下）
   ======================================== */
@media (max-width: 768px) {
    /* PC用メニューを完全に非表示 */
    .nav-pc {
        display: none !important;
        visibility: hidden !important;
    }
    
    .nav-cta-pc {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* ハンバーガーボタンを表示 */
    .hamburger {
        display: flex !important;
        visibility: visible !important;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }
    
    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background: linear-gradient(135deg, #8b6f47 0%, #C9A961 100%);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
        background: #fff;
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
        background: #fff;
    }
    
    /* スマホ用メニューを表示（初期位置は画面外） */
    .nav-mobile {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 80vw !important;
        max-width: 320px !important;
        height: 100vh !important;
        background: #1a1a1a !important;
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3) !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    /* メニュー展開時 */
    .nav-mobile.active {
        right: 0 !important;
    }
    
    /* メニュー内リスト */
    .nav-mobile ul {
        list-style: none !important;
        padding: 60px 0 40px 0;
        margin: 0;
    }
    
    .nav-mobile > ul > li {
        border-bottom: 1px solid #333;
        list-style: none !important;
    }
    
    .nav-mobile > ul > li > a {
        display: block;
        padding: 15px 20px;
        font-weight: 400;
        font-size: 1.5rem;
        color: #fff;
        text-decoration: none;
    }
    
    .nav-mobile > ul > li > a:hover {
        background: #333;
        color: #C9A961;
    }
    
    .nav-mobile > ul > li > a.current {
        color: #C9A961;
        background: #333;
    }
    
    /* アコーディオン */
    .nav-accordion {
        border-bottom: 1px solid #333;
    }
    
    .nav-accordion-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 15px 20px;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        font-weight: 400;
        cursor: pointer;
        text-align: left;
    }
    
    .nav-accordion-toggle:hover {
        background: #333;
        color: #C9A961;
    }
    
    .nav-accordion-toggle .arrow {
        transition: transform 0.3s ease;
        font-size: 1.2rem;
    }
    
    .nav-accordion-toggle.active .arrow {
        transform: rotate(180deg);
    }
    
    .nav-accordion-content {
        display: none;
        background: #252525;
        padding-left: 20px;
    }
    
    .nav-accordion-content.open {
        display: block;
    }
    
    .nav-accordion-content a {
        display: block;
        padding: 12px 20px;
        color: #ccc;
        text-decoration: none;
        font-size: 1.4rem;
        border-bottom: 1px solid #333;
    }
    
    .nav-accordion-content a:last-child {
        border-bottom: none;
    }
    
    .nav-accordion-content a:hover {
        background: #333;
        color: #C9A961;
    }
    
    .nav-accordion-content a.current {
        color: #C9A961;
    }
    
    /* CTAボタン（スマホメニュー内） */
    .nav-cta-wrapper {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-cta-wrapper .nav-cta {
        display: block;
        text-align: center;
        padding: 12px 20px;
        background: linear-gradient(135deg, #8b6f47 0%, #d4af37 100%);
        color: #fff !important;
        text-decoration: none;
        border-radius: 25px;
        font-weight: 600;
        font-size: 1.4rem;
    }
    
    .nav-cta-wrapper .nav-cta-secondary {
        display: block;
        text-align: center;
        padding: 12px 20px;
        background: transparent;
        color: #C9A961 !important;
        text-decoration: none;
        border-radius: 25px;
        font-weight: 600;
        font-size: 1.4rem;
        border: 1px solid #C9A961;
    }
    
    /* オーバーレイ */
    .menu-overlay {
        display: block !important;
        visibility: visible !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 999;
    }
    
    .menu-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
    
    /* body固定（メニュー展開時） */
    body.menu-open {
        overflow: hidden;
    }
}

/* ========================================
   タグスタイル（共通）
   ======================================== */
.tag {
    display: inline-block;
    background: linear-gradient(135deg, #8b6f47 0%, #d4af37 100%);
    color: white !important;
    padding: 0.2rem 0.8rem;
    border-radius: 3px;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
}

.tag:hover {
    opacity: 0.9;
}

/* カテゴリータグ */
.category-tag {
    display: inline-block;
    background: #f5f3f0;
    color: #8b6f47;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e8e4df;
}

.category-tag:hover {
    background: #8b6f47;
    color: white;
}

/* ========================================
   フッター（共通）
   ======================================== */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 1.3rem;
}

.footer-links a:hover {
    color: #C9A961;
}

.footer-copyright {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}
