/* ===================================
   ヘッダー - 企業版ふるさと納税LP
   最大幅: 1950px
   =================================== */

/* フォント設定 */
@font-face {
    font-family: 'BestTen';
    src: url('../font/best-ten/BestTen-DOT.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BestTen CRT';
    src: url('../font/best-ten/BestTen-CRT.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* グローバルフォント設定 */
* {
    font-family: "メイリオ", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "ヒラギノ角ゴ ProN", "Hiragino Sans", "ヒラギノ角ゴシック", "ヒラギノ角ゴ", "Hiragino Kaku Gothic Pro", "Osaka", "ＭＳ Ｐゴシック", "MS PGothic", "Arial", "sans-serif";
}

/* ヘッダー基本設定 */
.site-header {
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1950px;
    margin: 0 auto;
    padding: 0 80px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

/* ロゴエリア */
.header-logo {
    flex-shrink: 0;
}

.header-logo a {
    display: block;
    line-height: 0;
}

.header-logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

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

/* 外部リンクボタン（縦積み） */
.external-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

header .btn-external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(30, 32, 131, 0.3);
    white-space: nowrap;
    min-width: 180px;
    font-family: "メイリオ", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "ヒラギノ角ゴ ProN", "Hiragino Sans", "ヒラギノ角ゴシック", "ヒラギノ角ゴ", "Hiragino Kaku Gothic Pro", "Osaka", "ＭＳ Ｐゴシック", "MS PGothic", "Arial", "sans-serif";
    border: 2px solid #1E2083;
}

header .btn-external:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 32, 131, 0.4);
}

header .btn-external-1 {
    background: #1E2083;
    color: #ffffff;
}

header .btn-external-2 {
    background: #ffffff;
    color: #1E2083;
}

/* メインナビゲーション */
.main-navigation {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: flex-end;
}

.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.main-menu .menu-item {
    position: relative;
}

.main-menu .menu-item a {
    display: block;
    padding: 10px 16px;
    color: #333333;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    transition: color 0.3s ease;
    position: relative;
    font-family: "メイリオ", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "ヒラギノ角ゴ ProN", "Hiragino Sans", "ヒラギノ角ゴシック", "ヒラギノ角ゴ", "Hiragino Kaku Gothic Pro", "Osaka", "ＭＳ Ｐゴシック", "MS PGothic", "Arial", "sans-serif";
}

.main-menu .menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.main-menu .menu-item a:hover {
    color: #667eea;
}

.main-menu .menu-item a:hover::after {
    width: 80%;
}

/* ハンバーガーメニュー */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

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

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

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

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

/* モバイルメニュー */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    padding: 80px 0 30px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 5%;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #333333;
    cursor: pointer;
    line-height: 1;
}

.mobile-navigation {
    margin-bottom: 30px;
    margin-top: 30px;
    padding: 0 5%;
    overflow-y: auto;
}

.mobile-external-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 5%;
    background-color: #ffffff;
    position: relative;
    z-index: 1;
}

.mobile-external-buttons .btn-external {
    max-width: none;
}

.mobile-navigation .mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-navigation .menu-item {
    border-bottom: 1px solid #e0e0e0;
}

.mobile-navigation .menu-item a {
    display: block;
    padding: 15px 0;
    color: #333333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-navigation .menu-item a:hover {
    color: #667eea;
}

/* ===================================
   レスポンシブ対応
   =================================== */

/* タブレット（1024px以下） */
@media screen and (max-width: 1024px) {
    .header-container {
        padding: 0 40px;
    }

    .header-inner {
        padding: 15px 0;
    }

    .header-logo img {
        height: 120px;
    }

    .header-nav {
        gap: 5px;
    }

    .main-menu {
        gap: 20px;
    }

    .main-menu .menu-item a {
        font-size: 14px;
        padding: 8px 12px;
    }

    header .btn-external {
        padding: 10px 20px;
        font-size: 12px;
        min-width: 150px;
    }
}

/* スマホ（768px以下） */
@media screen and (max-width: 768px) {
    .header-container {
        padding: 0 5%;
    }

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

    .header-logo img {
        height: 60px;
    }

    .header-nav {
        gap: 15px;
    }

    .external-buttons,
    .main-navigation {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }
}

/* 小型スマホ（480px以下） */
@media screen and (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }

    .header-logo img {
        height: 35px;
    }

    .mobile-menu-content {
        width: 100%;
        padding: 70px 0px 20px;
    }
}

/* フォールバックメニューの非表示制御 */
.main-menu:not(.fallback-menu) ~ .fallback-menu,
.mobile-menu:not(.fallback-menu) ~ .fallback-menu {
    display: none;
}
