/**
 * ヘッダー専用CSS (header.css)
 * Noto Sans JP フォント使用
 * メインカラー: #152147, アクセントカラー: #fcd804
 */

/* ==========================================================================
   ヘッダー基本設定
   ========================================================================== */

   .site-header {
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 9999;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(21, 33, 71, 0.1);
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic Medium', 'Yu Gothic', 'Meiryo', sans-serif;
}

.site-header.header-scrolled {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(21, 33, 71, 0.1);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

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

/* ==========================================================================
   ロゴ
   ========================================================================== */

.site-logo {
    text-decoration: none;
    display: block;
}

.logo-container {
    display: inline-block;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.logo-with {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1;
}

.logo-lab {
    color: #fcd804;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    margin-top: 2px;
}

/* ==========================================================================
   メインナビゲーション
   ========================================================================== */

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

.main-nav li {
    position: relative;
}

.main-nav a {
    color: #152147;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 10px 0;
    display: block;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.main-nav a:hover {
    color: #fcd804;
}

.main-nav a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #fcd804;
    animation: underlineSlide 0.3s ease forwards;
}

@keyframes underlineSlide {
    from {
        width: 0;
        left: 50%;
    }
    to {
        width: 100%;
        left: 0;
    }
}

/* ==========================================================================
   ドロップダウンメニュー
   ========================================================================== */

.menu-item-has-children {
    position: relative;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(21, 33, 71, 0.15);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    list-style: none;
    margin: 0;
    display: block;
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    position: relative;
    display: block;
    width: 100%;
}

.sub-menu a {
    color: #152147;
    padding: 12px 20px;
    font-size: 0.9rem;
    border-bottom: none;
    display: block;
    transition: all 0.3s ease;
}

.sub-menu a:hover {
    color: #fcd804;
    background: rgba(252, 216, 4, 0.1);
}

.sub-menu a:hover::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: #fcd804;
    animation: underlineSlide 0.3s ease forwards;
}

/* 2階層目のドロップダウン */
.sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 5px;
    display: block;
}

/* ==========================================================================
   モバイルメニューボタン
   ========================================================================== */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #152147;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

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

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

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

/* ==========================================================================
   モバイルメニュー
   ========================================================================== */
.mobile-menu{
    display: none;
}



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

.mobile-nav-menu li {
    border-bottom: 1px solid rgba(21, 33, 71, 0.1);
}

.mobile-nav-menu a {
    display: block;
    padding: 15px 30px;
    color: #152147;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-menu a:hover {
    background: rgba(252, 216, 4, 0.1);
    color: #fcd804;
}

/* モバイルメニュー展開時のbody制御 */
.mobile-menu-open {
    overflow: hidden;
}

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

@media (max-width: 1024px) {
    .main-nav .nav-menu {
        gap: 30px;
    }
    
    .main-nav a {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    /* モバイルメニューボタンを表示 */
    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: #fff;
        box-shadow: -5px 0 15px rgba(21, 33, 71, 0.2);
        z-index: 10000;
        padding: 80px 0;
        overflow-y: auto;
        display: none;           /* ← 通常時は非表示 */
    }

    .mobile-menu.active {
        display: block;          /* ← activeクラスで表示 */
    }

        /* ヘッダーコンテンツの調整 */
        .header-content {
            padding: 12px 0;
        }
        
        /* ロゴサイズ調整 */
        .logo-container {
            width: 50px;
            height: 50px;
            padding: 8px;
        }
        
        .logo-with {
            font-size: 0.8rem;
        }
        
        .logo-lab {
            font-size: 0.7rem;
        }
}




/* ==========================================================================
   アニメーション無効化（ユーザー設定）
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .main-nav a,
    .sub-menu,
    .mobile-menu-toggle span,
    .mobile-menu {
        transition: none !important;
        animation: none !important;
    }
}