/* ==========================================
   1. ヘッダー全体の設定（動的サイズ対応）
========================================== */
header {
    background-color: #111111;
    height: clamp(70px, 6vw, 100px);

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-left: clamp(20px, 3vw, 50px);
    padding-right: clamp(20px, 3vw, 50px);

    /* ==========================================
       【変更】スマホのガラス面に直接貼り付ける魔法（絶対固定）
    ========================================== */
    position: fixed; 
    top: 0;
    left: 0;         /* 左端にピタッと合わせる */
    width: 100%;     /* 画面幅いっぱいに広げる */
    box-sizing: border-box; /* paddingを含めて100%に収める */
    
    z-index: 900;
}


/* ==========================================
   2. ロゴエリア
========================================== */
.header-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-logo a {
    display: flex;       
    align-items: center; 
    height: 100%;        
}

.header-logo img {
    height: 100%;
    transform: scale(1.5);
    transform-origin: left center;
    pointer-events: none;
    
    /* 4K対応：ロゴとメニューの間の余白も動的に */
    margin-right: clamp(30px, 5vw, 100px);

    transition: filter 0.3s ease;
}

.header-logo a:hover img {
    filter: brightness(0.5); 
}


/* ==========================================
   3. ナビゲーションメニュー（PC版）
========================================== */
.header-list {
    flex-shrink: 0;
}

/* リスト全体を横並びにする */
.header-list ul {
    display: flex;
    /* 4K対応：メニュー同士の隙間を動的に（20px〜50px） */
    gap: clamp(20px, 3vw, 50px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-list a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
}

/* 4K対応：英語・日本語の文字サイズも動的に */
.header-list .en {
    font-size: clamp(16px, 1.5vw, 24px); 
}

.header-list .ja {
    font-size: clamp(10px, 1vw, 16px);   
    margin-top: clamp(4px, 0.5vw, 8px); /* 文字の隙間も可変にする */
    color: #cccccc;
}

.header-list a:hover,
.header-list a:hover .ja {
    color: #1af7fb;
}


/* ==========================================
   4. スマホ版（ハンバーガー＆全画面メニュー）
========================================== */
/* PC画面ではハンバーガーアイコンを隠しておく */
.hamburger {
    display: none; 
}

@media screen and (max-width: 768px) {
    
    /* 1. ハンバーガーボタンを表示する */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
        z-index: 1000;
    }

    .hamburger span {
        width: 100%;
        height: 3px;
        background-color: #ffffff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* 2. メニューを「全画面」＆「中央配置」にする */
    .header-list {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(17, 17, 17, 0.95); 
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
        z-index: 950;
    }

    .header-list ul {
        flex-direction: column;
        gap: 50px;
    }

    /* 【追加】スマホの全画面メニュー時は、タップしやすいように文字を少し大きく固定する */
    .header-list .en {
        font-size: 24px; 
    }
    .header-list .ja {
        font-size: 14px; 
    }

    /* 3. JavaScriptで active がついた時の動き */
    .header-list.active {
        opacity: 1; 
        pointer-events: auto;
    }

    /* ハンバーガーアイコンを「バツ印(×)」に変形させる */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }
}

/* ==========================================
   現在のページ（カレント）のスタイル
========================================== */
.header-list a.current,
.header-list a.current .ja {
    /* ホバー時と同じテーマカラー（水色）を固定で表示する */
    color: #1af7fb; 
    
    /* 【プロの技】今いるページはもう押す必要がないため、クリックを無効化する */
    pointer-events: none; 
}

/* リサイズ中のアニメーション誤爆を防ぐ設定 */
.no-transition * {
    transition: none !important;
}
