/* ============================
   Global Header
   上部ナビゲーション（グローバルヘッダー）
   LP/コーポレート両対応
   ============================ */

:root {
    --headerH: 72px;
}

.global-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(90deg, #071627 0%, #0A2C5A 55%, #0B3A8A 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    transition: all 0.3s ease;
    height: var(--headerH);
    overflow: hidden;
}

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

/* ヘッダーコンテナ */
.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--headerH);
}

/* ロゴエリア */
.header-logo {
    height: 100%;
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    position: static !important;
}

.header-logo:hover {
    opacity: 0.8;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    position: static !important;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F4FD8;
    letter-spacing: 0.02em;
}

.logo-image {
    max-height: calc(var(--headerH) * 0.70);
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    position: static !important;
    transform: none !important;
    top: auto !important;
    bottom: auto !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

/* ナビゲーションエリア */
.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    position: relative;
    padding: 8px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(180, 220, 255, 1);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(180, 220, 255, 1);
    font-weight: 600;
}

/* CTAボタンエリア */
.header-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

/* ゴーストCTAボタン（導入ガイド・コーポレートサイト） */
.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(180, 220, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* メインCTAボタン（お問い合わせ） */
.btn-primary {
    background: #2F66FF;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 4px 12px rgba(47, 102, 255, 0.25);
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(47, 102, 255, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ハンバーガーメニューボタン（モバイル） */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 40px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 0;
    position: relative;
    z-index: 10001;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: #1B2430;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

/* モバイルメニュー */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #071627 0%, #0A2C5A 100%);
    backdrop-filter: blur(10px);
    padding: 24px;
    overflow-y: auto;
    z-index: 9998;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-link {
    display: block;
    padding: 16px;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(180, 220, 255, 1);
}

.mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: auto;
}

.mobile-btn {
    width: 100%;
    padding: 14px 20px !important;
    font-size: 1rem !important;
    justify-content: center;
    text-align: center;
}

/* bodyのpadding調整（ヘッダー分の余白） */
body {
    padding-top: var(--headerH);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .header-nav {
        gap: 2px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
    
    .header-cta {
        gap: 8px;
    }
    
    .header-cta a {
        padding: 10px 14px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 900px) {
    /* コーポレートサイトボタンを非表示（スペース確保） */
    .header-cta .btn-ghost:last-child {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --headerH: 64px;
    }
    
    .header-container {
        height: var(--headerH);
        padding: 0 20px;
    }
    
    .global-header {
        height: var(--headerH);
    }
    
    body {
        padding-top: 64px;
    }
    
    .mobile-menu {
        top: 64px;
    }
    
    .logo-text {
        font-size: 1.125rem;
    }
    
    .header-nav,
    .header-cta {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 16px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
}

/* スクロール時のアニメーション */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.global-header {
    animation: fadeInDown 0.3s ease-out;
}
