/* ========================================
   Navbar Height Fix
   HOMEナビゲーションエリアが縦に伸びる問題の修正
   ======================================== */

/* 1. 伸びている要素からheightを外す */
header,
.navbar,
#navbar,
.nav-home,
#home-nav {
    height: auto !important;     /* 自動の高さにする */
    min-height: 0 !important;    /* 最小高さをリセット */
}

/* 2. HOME（スマート物流DX）のナビブロック用 */
.nav-brand,
.nav-home {
    height: auto !important;         /* 自動の高さにする */
    min-height: 0 !important;
    padding: 12px 0 !important;      /* 上下は余白だけで調整 */
    margin-top: 0 !important;        /* 上下のmarginをリセット */
    margin-bottom: 0 !important;
}

/* 3. アイコンとテキストを横並びにして中央寄せ */
.nav-brand,
.nav-home-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;             /* アイコンと文字の間隔 */
    padding: 8px 0 !important;
}

/* 4. テキストの行間を調整（縦書きの場合） */
.nav-home-text,
.nav-brand span {
    writing-mode: horizontal-tb !important;  /* 横書きに固定（縦書きを防止） */
    line-height: 1.4 !important;             /* 行間を詰める */
    letter-spacing: 0.05em !important;       /* 字間を調整 */
    display: inline-block !important;
}

/* 5. アイコンのサイズを正常化 */
.nav-home-icon,
.nav-brand i {
    font-size: 1.8rem !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
}

/* 6. Navbar containerの余白を正常化 */
.navbar .container {
    height: auto !important;
    min-height: 0 !important;
    padding: 20px 40px !important;
    margin: 0 !important;
}

/* 7. Nav-menuの高さを正常化 */
.nav-menu {
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    gap: 40px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 8. Nav-menu linksの余白を正常化 */
.nav-menu a {
    height: auto !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* 9. レスポンシブ対応 */
@media (max-width: 768px) {
    .navbar .container {
        padding: 16px 20px !important;
    }
    
    .nav-brand,
    .nav-home {
        font-size: 1.2rem !important;
        padding: 8px 0 !important;
    }
    
    .nav-brand i,
    .nav-home-icon {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 12px 16px !important;
    }
    
    .nav-brand,
    .nav-home {
        font-size: 1.1rem !important;
        gap: 6px !important;
        padding: 6px 0 !important;
    }
    
    .nav-brand i,
    .nav-home-icon {
        font-size: 1.3rem !important;
    }
}

/* 10. 念のため、すべての子要素の高さとmax-heightをリセット */
header *,
.navbar *,
.navbar .container *,
.nav-brand *,
.nav-home *,
.nav-menu * {
    height: auto !important;
    max-height: none !important;
}

/* 11. Navbarのposition fixedを確認 */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
}


