/* 共通ヘッダー・フッター用スタイル — 全ページで読み込む */
:root {
    --primary-color: #007aff;
    --text-color: #333;
    --background-color: #ffffff;
    --light-gray-color: #f8f9fa;
}

/* --- ヘッダー --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-image {
    height: 32px;
    width: auto;
    border-radius: 6px;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.header-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.header-nav a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    white-space: nowrap;
}

.header-nav a.button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
}

/* --- GitHubリンク --- */
.github-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.github-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.github-link:hover {
    transform: scale(1.1);
    opacity: 0.7;
}

/* --- ハンバーガーメニュー --- */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 101;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* --- モバイルメニュー --- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--background-color);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 99;
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    padding: 25px 30px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    font-size: 1.5rem;
    text-align: center;
    min-width: 200px;
}

.mobile-menu a:hover {
    background-color: var(--light-gray-color);
}

.mobile-menu a.button {
    background-color: var(--primary-color);
    color: white;
    margin: 20px 0;
    border-radius: 50px;
    text-align: center;
    padding: 15px 40px;
    font-size: 1.2rem;
}

/* --- モバイルメニュー内のSNSリンク --- */
.mobile-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
}

.mobile-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    padding: 0 !important;
    margin: 0 !important;
    min-width: auto !important;
    background-color: transparent !important;
    border-radius: 0 !important;
}

.mobile-social-link:hover {
    transform: scale(1.1);
    opacity: 0.7;
    background-color: transparent !important;
}

.mobile-social-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- メニューオーバーレイ --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 98;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- フッター --- */
footer {
    text-align: center;
    background-color: #333;
    color: #ccc;
    width: 100%;
    padding: 40px 20px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 0px;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
}

.copyright {
    margin-top: 0px;
    font-size: 0.9rem;
}

/* --- レスポンシブ --- */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    .logo-image {
        height: 28px;
    }

    .logo-text {
        font-size: 1.3rem;
    }

    .header-nav {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .footer-nav {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 24px;
    }

    .logo-text {
        font-size: 1.2rem;
    }
}
