/* ▼ 追加: ページの初期余白を削除（白い余白対策） */
body {
    margin: 0;
    padding: 0;
}

/* ヘッダーコンテナ */
.header-container {
    /* ▼ 変更: fixedからstickyに変更 */
    position: -webkit-sticky; /* Safari用 */
    position: sticky;
    top: 0;
    
    /* 横幅と位置の確保 */
    width: 100%;
    left: 0;
    right: 0;
    
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* 1行目：小さい行 */
.header-top {
    background: linear-gradient(135deg, #C10033 0%, #8B0024 100%);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 8px 0;
    transition: opacity 0.3s ease, height 0.3s ease;
    overflow: visible;
    position: relative;
    z-index: 1002;
}

.header-top.hidden {
    height: 0;
    opacity: 0;
    padding: 0;
}

.header-top-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.header-top-left, .header-top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: white;
    position: relative;
    z-index: 10003;
    user-select: none;
}

.language-current {
    display: flex;
    align-items: center;
    gap: 5px;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    min-width: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    padding: 8px 0;
    z-index: 10003;
}

.language-dropdown.active {
    display: block;
}

.language-option {
    display: block;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}

.language-option:hover {
    background: #f3f4f6;
    color: #C10033;
}

.language-option.active {
    background: #f3f4f6;
    color: #C10033;
    font-weight: 600;
}

.header-top-link {
    color: white;
    text-decoration: none;
    transition: color 0.2s;
}

.header-top-link:hover {
    color: rgba(255,255,255,0.8);
}

/* 2行目：メインナビゲーション */
.header-main {
    background: linear-gradient(135deg, #C10033 0%, #8B0024 100%);
    padding: 16px 0;
    position: relative;
    z-index: 1001;
}

.header-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ▼ 修正: ロゴの余白をカットして拡大表示する設定 */
.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    
    /* ロゴの表示枠を設定（ここからはみ出た余白をカット） */
    width: 140px;  /* 実際のロゴ文字が見える幅に合わせて調整してください */
    height: 50px;  /* ヘッダー内での表示高さ */
    overflow: hidden; /* 拡大した画像の余分な部分を隠す */
}

.logo-img {
    height: 100%;
    width: auto;
    display: block;
    
    /* ▼ 画像を強制的に拡大して余白を飛ばす設定 */
    transform: scale(2.5); 
    transform-origin: center; /* 中心から拡大 */
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    cursor: pointer;
}

.nav-link:hover {
    color: rgba(255,255,255,0.8);
}

/* ドロップダウンメニュー */
.nav-item {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 10px;
    padding: 8px 0;
    z-index: 100;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #C10033;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-demo {
    background: #8b1538;
    color: white;
    border: 2px solid white;
}

.btn-demo:hover {
    background: #6d1028;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 21, 56, 0.4);
}

.btn-start {
    background: white;
    color: #C10033;
    border: 2px solid white;
}

.btn-start:hover {
    background: rgba(255,255,255,0.9);
    color: #8b1538;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    border: 2px solid white;
    border-radius: 5px;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* モバイルメニュー */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding-top: 60px;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-content {
    padding: 40px 30px;
}

.mobile-nav-item {
    margin-bottom: 30px;
}

.mobile-nav-link {
    display: block;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 20px;
    background: #f9fafb;
}

.mobile-dropdown-content.active {
    max-height: 500px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.mobile-dropdown-item {
    display: block;
    color: #4b5563;
    font-size: 16px;
    padding: 12px 0;
    text-decoration: none;
}

.mobile-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
}

.mobile-cta-buttons .btn {
    width: 100%;
    text-align: center;
    padding: 15px 20px;
    font-size: 16px;
}

.btn-demo-mobile {
    background: white;
    color: #C10033;
    border: 2px solid #C10033;
}

.btn-demo-mobile:hover {
    background: #f9fafb;
}

.btn-start-mobile {
    background: linear-gradient(135deg, #C10033 0%, #8B0024 100%);
    color: white;
    border: 2px solid transparent;
}

.btn-start-mobile:hover {
    opacity: 0.9;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .header-top {
        display: none;
    }

    .header-main {
        padding: 12px 0;
    }

    .header-main-content {
        padding: 0 15px;
    }

    .logo-link {
        height: 35px; /* モバイルでの高さ調整 */
        width: 100px; /* モバイルでの幅調整 */
    }

    /* scaleはPCと同じ比率で良ければそのままでOK、調整が必要なら再定義 */
    /* .logo-img { transform: scale(2.5); } */

    .nav-links {
        display: none;
    }

    .nav-right {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .header-container {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}