@charset "UTF-8";

/* 図書館ページ専用ヘッダーのスタイル */
.library-custom-header {
    /* 共通ヘッダーのスタイルをベースに調整が必要な場合はここに記述 */
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    width: 100%;
    height: 90px;
}

.header-r {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    flex-direction: row !important;
}

.header-library-nav {
    display: flex;
    height: 90px;
    align-items: center;
    justify-content: flex-end;
}

.header-library-nav-item,
.header-library-nav-item:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 35px;
    color: #0B318F;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-left: 1px solid #0B318F;
    transition: all 0.3s ease;
}

/* 最初のアイテムの左ボーダーは不要（必要なら追加） */
.header-library-nav-item:first-child {
    border-left: none;
}

.header-library-nav-item:hover {
    background: #f4f6fa;
}

.header-library-nav-item.is-univ-top,
.header-library-nav-item.is-univ-top:visited {
    background: #0B318F;
    color: #fff;
    border-left: 1.2px solid #0B318F;
    padding: 0 32px;
}

.header-library-nav-item.is-univ-top:hover {
    background: #092670;
    color: #fff;
}

.home-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.home-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

@media screen and (max-width: 1400px) {
    .header-tb {
        display: flex !important;
    }
}

/* レスポンシブ対応 */
@media screen and (max-width: 1200px) {
    .header-library-nav-item {
        padding: 0 25px;
    }
}

@media screen and (max-width: 1024px) {
    .header-library-nav-item {
        padding: 0 15px;
        font-size: 14px;
    }

    .header-library-nav-item.is-univ-top {
        padding: 0 20px;
    }

    .home-icon {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }
}

@media screen and (max-width: 948px) {
    .header-library-nav {
        height: 64px;
    }

    .header-library-nav-item {
        padding: 0 12px;
        font-size: 12px;
    }

    .header-library-nav-item.is-univ-top {
        padding: 0 15px;
    }
}

/* ハンバーガーメニューボタン (1024px以上は強制非表示) */
.library-custom-header .menu-toggle {
    display: none !important;
}

@media screen and (max-width: 1400px) {
    header.library-custom-header {
        height: 64px;
    }

    .library-custom-header .header-tb {
        display: none !important;
    }

    .library-custom-header .header-sp {
        display: flex !important;
    }

    .header-library-nav.header-tb {
        display: none !important;
    }

    .library-custom-header .menu-toggle {
        display: flex !important;
        width: 64px;
        height: 64px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        background-color: #0B318F;
        z-index: 1000;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
        margin-left: auto;
        /* 親要素内の一番右に配置 */
    }

    .menu-toggle .header-menu {
        font-size: 10px;
        color: #fff;
        margin-top: 4px;
        line-height: 1;
    }
}

/* モバイルナビゲーション（開閉メニュー） */
.library-global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #0B318F;
    z-index: 999;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    padding-top: 100px;
    /* ボタンとの重なり回避 */
    box-sizing: border-box;
}

.library-global-nav.active {
    transform: translateY(0);
}

.library-nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.library-nav-mobile-item,
.library-nav-mobile-item:visited {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    transition: opacity 0.3s;
}

.library-nav-mobile-item:hover {
    opacity: 0.7;
}

.library-nav-mobile-item .home-icon {
    width: 20px;
    height: 20px;
    margin-right: 15px;
}

.menu-toggle .menu-icon-close {
    display: none;
}

/* メニューが開いている時のボタン（白背景に×ボタン） */
.menu-toggle.active {
    background-color: #fff;
}

.menu-toggle.active .header-menu {
    display: none;
}

.menu-toggle.active .menu-icon {
    display: none;
}

.menu-toggle.active .menu-icon-close {
    display: block;
}