@charset "UTF-8";
/* header.css — サイトヘッダー（header.php）専用 ／ 全ページ読込 */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 32px;
    background: var(--c-white);
    z-index: 50;
    transition: box-shadow .3s;

    &.bg_white {
        box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    }

    h1 {
        font-size: 0;
        line-height: 1;

        a {
            display: inline-flex;
            align-items: center;
        }

        img {
            height: 44px;
            width: auto;
        }
    }

    nav#g-menu {
        ul {
            display: flex;
            align-items: center;
            gap: 28px;
        }

        li a {
            font-size: .9rem;
            font-weight: 700;
            white-space: nowrap;
            padding: 8px 0;
            position: relative;
            transition: color .2s;

            &:hover {
                color: var(--c-blue);
            }
        }
    }

    .sp-menu {
        display: none;
    }

    @media (max-width: 960px) {
        padding: 0 16px;

        h1 img {
            height: 36px;
        }

        .sp-menu {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 6px;
            width: 32px;
            height: 32px;

            span {
                display: block;
                width: 28px;
                height: 2px;
                background: var(--c-navy);
                border-radius: 2px;
                transition: transform .3s ease, opacity .3s ease;
            }

            /* .open（JSが付与）で線が交差してバツに */
            &.open {
                span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
                span:nth-child(2) { opacity: 0; }
                span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
            }
        }

        nav#g-menu {
            display: none;
            position: absolute;
            top: var(--header-h);
            left: 0;
            width: 100%;
            background: var(--c-white);
            box-shadow: 0 8px 16px rgba(0, 0, 0, .08);

            ul {
                flex-direction: column;
                align-items: stretch;
                gap: 0;
            }

            li a {
                display: block;
                padding: 16px 20px;
                border-bottom: 1px solid var(--c-lightgrey);
            }
        }
    }
}
