@charset "utf-8";

/* Header */
.header {
    color: var(--primary-bg);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.3s ease-in-out, background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-shadow: 0 0 4px rgb(0 0 0 / 24%),0 0 16px rgb(0 0 0 / 12%);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: -1;
    transition: opacity 0.3s ease-in-out;
}

.header::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
}

.header_group {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex: 1;
}

/* ロゴのスタイル */
.header_logo a {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-bg);
}

/* PC用ナビゲーション */
.header_nav {
    display: none; /* デフォルトは非表示 */
}

.header_nav ul {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header_nav li a {
    color: var(--primary-bg);
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    padding: 4px 0;
}

/* ホバー時の下線アニメーション */
.header_nav li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary-bg);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.header_nav li a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* ハンバーガーメニュー */
.hamburger-menu {
    width: 30px;
    height: 21px;
    position: fixed;
    top: 25px;
    right: 40px;
    cursor: pointer;
    z-index: 1010;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-bg);
    position: absolute;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { bottom: 0; }

.hamburger-menu.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger-menu.is-active span:nth-child(2) { opacity: 0; }
.hamburger-menu.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }


/* Global Navigation (スマホ用) */
.global-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--accent-color);
    padding-top: 80px;
    transition: right 0.5s;
    z-index: 1009;
}

.global-nav.is-active {
    right: 0;
}

.global-nav li a {
    display: block;
    padding: 15px 25px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s;
    color: white;
}
.global-nav li:first-child a {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.global-nav li a:hover { 
    background-color: var(--hover-link-color); 
}

/* 1024px以上でPC用レイアウトを適用 */
@media screen and (min-width: 1024px) {
    .header_nav {
        display: block; /* PC用ナビゲーションを表示 */
    }
    .hamburger-menu {
        display: none; /* ハンバーガーメニューを非表示 */
    }
}

@media screen and (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }
    .header_logo a {
        font-size: 20px;
    }
    .hamburger-menu {
        right: 20px;
        top: 22px;
    }
}