/* --- Header Layout --- */
.main-header {
    /* ここを fixed に変更 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* fixedを使う場合は幅の指定が必須 */
    
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    padding: 10px 0;
    
    /* 念のため、ボックスサイズが崩れないように追加 */
    box-sizing: border-box; 
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
    height: 70px;
}

/* --- Logo Section (PC/Mobile Common) --- */
.logo-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important; /* 上下中央 */
    gap: 15px; /* アイコンと文字の間の隙間 */
}

.logo-area a {
    display: flex !important; /* 縦並びを強制的に解除 */
    flex-direction: row !important; /* 横並びを確定 */
    align-items: center; /* 垂直方向の中央揃え */
    gap: 12px;           /* アイコンと文字の間隔 */
    text-decoration: none;
    border: none;        /* 余計なボーダーを消去 */
}

.logo-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    transform: rotate(45deg); /* 外枠だけを傾ける */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    /* 菱形にした分、少し右に寄って見えるのを微調整 */
    margin-right: 4px; 
}

.line-inner {
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: relative;
    /* 親の45度を打ち消して、中身だけ0度（垂直）に戻す */
    transform: rotate(-45deg); 
    border-top-color: transparent; /* 電源ボタンの切れ目 */
}

.line-inner::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: var(--accent-color);
}

.logo-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #c5a059 0%, #f1dca7 50%, #c5a059 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.logo-sub { font-size: 0.9rem; -webkit-text-fill-color: #fff; }

.logo-tagline {
    font-size: 0.65rem;
    color: #94a3b8;
    margin: 4px 0 0 0;
}

/* Logo Hover */
.logo-area a:hover .logo-icon {
    transform: rotate(225deg);
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

.logo-text-group::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--accent-color);
    transition: width 0.4s ease;
}
.logo-area a:hover .logo-text-group::after { width: 100%; }

/* --- PC Navigation --- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.nav-link .en { font-size: 0.6rem; color: var(--accent-color); text-transform: uppercase; }
.nav-link .jp { font-size: 0.8rem; color: #fff; }

.nav-link::after {
    content: ""; position: absolute; bottom: -4px; left: 50%;
    width: 0; height: 1px; background: var(--accent-color);
    transform: translateX(-50%); transition: 0.3s;
}
.nav-link:hover::after { width: 100%; }

.nav-contact-btn {
    display: flex; align-items: center; gap: 8px;
    background: var(--accent-color); color: #000 !important;
    padding: 8px 16px; border-radius: 4px; font-weight: bold;
}

/* --- Mobile Toggle Button --- */
.menu-toggle {
    display: none; /* デフォルト非表示 */
    flex-direction: column;
    justify-content: space-between;
    width: 30px; height: 20px;
    background: transparent; border: none; cursor: pointer;
}
.menu-toggle span {
    width: 100%; height: 2px; background: #fff; transition: 0.3s;
}

/* --- Responsive (Mobile Menu) --- */
@media (max-width: 1024px) {
    /* ハンバーガーボタンの表示 */
    .menu-toggle { 
        display: flex; 
        z-index: 1200; /* ロゴより前面に */
        padding: 0;
        margin: 0;
    }

    /* メニュー本体：隙間を埋める */
    .pc-nav {
        position: fixed;
        top: 0; 
        right: -100%; /* 完全に画面外へ */
        width: 280px; /* 幅を固定すると安定します */
        height: 100vh;
        background: rgba(10, 15, 29, 0.98);
        backdrop-filter: blur(10px);
        padding: 100px 40px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1100;
        margin: 0; /* 余計なマージンを排除 */
        border-left: 1px solid var(--accent-color); /* 境界線を追加して高級感を */
    }

    /* アクティブ時：右端に吸い付かせる */
    .pc-nav.active { 
        right: 0 !important; 
    }

    /* 閉じるボタン（×）の傾きを修正 */
    .menu-toggle.active span:nth-child(1) { 
        transform: translateY(9px) rotate(45deg) !important; 
    }
    .menu-toggle.active span:nth-child(2) { 
        opacity: 0 !important; 
    }
    .menu-toggle.active span:nth-child(3) { 
        transform: translateY(-9px) rotate(-45deg) !important; 
    }

    /* 中身のレイアウト */
    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .nav-link .jp { font-size: 1.1rem; }
}