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

/* ヘッダーの基本設定：固定配置、2段構成、z-index設定 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    
    /* スクロール時のヘッダー変化：シャドウの追加 */
    &.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 0;
        text-align: center;
        
        /* ロゴのスタイル：フォント、色、グラデーション、ホバー効果 */
        .logo {
            font-family: 'Cinzel', serif;
            font-size: 1.8rem;
            font-weight: 600;
            color: #6B46C1;
            background: linear-gradient(135deg, #D4AF37, #9370DB);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            transition: all 0.3s ease;
            display: inline-block;
            
            /* ロゴのホバー効果：拡大 */
            &:hover {
                transform: scale(1.05);
            }
        }
    }
    
    /* ========================================
       Navigation Section - ナビゲーションセクション（下段）
       ======================================== */
    .navigationSection {
        position: relative;
        
        /* 背景画像の設定：疑似要素で実装、カスタマイズ可能 */
        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            /* 背景画像URL（こちらで変更可能） */
            background-image: url('../images/009.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            /* 画像の透明度（0.0-1.0で調整可能） */
            opacity: 1;
            pointer-events: none;
            z-index: -2;
        }
        
        /* 色オーバーレイの設定：疑似要素で実装、カスタマイズ可能 */
        &::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            /* オーバーレイ色（RGBA形式で指定、こちらで変更可能） */
            --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));
            
            /* 単色オーバーレイを使用する場合は以下のコメントアウトを外して上記をコメントアウト */
            /* background: rgba(255, 255, 255, 0.85); */
            
            pointer-events: none;
            z-index: -1;
        }
        
        /* ナビゲーション全体のコンテナ */
        .navigation {
            position: relative;
            z-index: 1;
            
            /* ナビゲーションの内部コンテナ：最大幅、中央配置、フレックスレイアウト */
            .navContainer {
                max-width: 1200px;
                margin: 0 auto;
                padding: 0 20px;
                display: flex;
                justify-content: center;
                align-items: center;
                height: 60px;
                
                /* ナビゲーションメニューのレイアウト */
                .navMenu {
                    display: flex;
                    gap: 2rem;
                    
                    /* ナビゲーションリンクのスタイル：下線アニメーション付き */
                    .navLink {
                        position: relative;
                        color: #333;
                        font-weight: 500;
                        padding: 0.5rem 0;
                        transition: all 0.3s ease;
                        
                        /* 下線アニメーション用の疑似要素 */
                        &::after {
                            content: '';
                            position: absolute;
                            bottom: 0;
                            left: 0;
                            width: 0;
                            height: 2px;
                            background: linear-gradient(90deg, #D4AF37, #9370DB);
                            transition: width 0.3s ease;
                        }
                        
                        /* ホバー時の色変更と下線表示 */
                        &:hover {
                            color: #6B46C1;
                            
                            &::after {
                                width: 100%;
                            }
                        }
                    }
                }
                
                /* ハンバーガーメニュー：モバイル用、3本線のアイコン */
                .hamburger {
                    display: none;
                    flex-direction: column;
                    cursor: pointer;
                    width: 30px;
                    height: 20px;
                    justify-content: space-between;
                    position: absolute;
                    right: 20px;
                    
                    /* ハンバーガーメニューの各線 */
                    span {
                        width: 100%;
                        height: 3px;
                        background: #333;
                        transition: all 0.3s ease;
                    }
                    
                    /* アクティブ時のアニメーション：×印に変形 */
                    &.active {
                        /* 1本目の線：右下に回転 */
                        span:nth-child(1) {
                            transform: rotate(45deg) translate(6px, 6px);
                        }
                        
                        /* 2本目の線：非表示 */
                        span:nth-child(2) {
                            opacity: 0;
                        }
                        
                        /* 3本目の線：右上に回転 */
                        span:nth-child(3) {
                            transform: rotate(-45deg) translate(6px, -6px);
                        }
                    }
                }
            }
        }
    }
}

/* ========================================
   Mobile Menu - モバイルメニュー
   ========================================
   768px以下の画面幅でのモバイル対応
======================================== */

@media (max-width: 768px) {
    .header {
        .navigationSection {
            .navigation {
                .navContainer {
                    /* モバイル時のナビゲーションメニュー：全画面オーバーレイ */
                    .navMenu {
                        position: fixed;
                        top: 140px; /* ロゴセクション + ナビゲーションセクションの高さ */
                        right: -100%;
                        width: 100%;
                        height: calc(100vh - 140px);
                        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;
                        
                        /* アクティブ時：画面右端から表示 */
                        &.active {
                            right: 0;
                            background-image: url('../images/138.png');
                            background-size: cover;
                            background-position: center;
                            background-repeat: no-repeat;
                        }
                        
                        /* モバイルメニュー内のリンクスタイル */
                        .navLink {
                            font-size: 1.2rem;
                            padding: 1rem 0;
                            width: 200px;
                            text-align: center;
                        }
                    }
                    
                    /* モバイル時のハンバーガーメニュー表示 */
                    .hamburger {
                        display: flex;
                    }
                }
            }
        }
    }
}

/* ========================================
   Tablet Adjustments - タブレット調整
   ========================================
   1024px以下でのナビゲーション調整
======================================== */

@media (max-width: 1024px) {
    .header {
        .navigationSection {
            .navigation {
                .navContainer {
                    .navMenu {
                        gap: 1.5rem;
                        
                        .navLink {
                            font-size: 0.9rem;
                        }
                    }
                }
            }
        }
    }
}

/* ========================================
   Small Mobile Adjustments - 小画面モバイル調整
   ========================================
   480px以下での追加調整
======================================== */

@media (max-width: 480px) {
    .header {
        .logoSection {
            padding: 0.8rem 0;
            
            .logo {
                font-size: 1.5rem;
            }
        }
        
        .navigationSection {
            .navigation {
                .navContainer {
                    height: 50px;
                }
            }
        }
    }
}