/* グローバルスタイル */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #000;
    background-color: #f9f9f9;
    line-height: 1.6;
}

/* ヘッダーのスタイル */
header {
    background: linear-gradient(135deg, #02364E, #0D638A);
    color: #fff;
    padding: 10px 20px;
}

header .title {
    text-align: center;
    margin: 20px 0;
}

header .title h1 {
    font-size: 2.5rem;
    margin: 0;
}

header .title h2 {
    font-size: 1.2rem;
    margin: 5px 0 0;
}

/* ナビゲーションメニュー */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.2);
}

nav ul li {
    position: relative;
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    padding: 10px;
    display: block;
}

nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0D638A;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 5px;
}

nav ul li:hover ul {
    display: block;
}

nav ul li ul li {
    width: 150px;
}

nav ul li ul li a {
    padding: 10px;
    font-size: 0.9rem;
}

/* メインコンテンツ */
main {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

main section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

main section h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid #0D638A;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* フッター */
footer {
    text-align: center;
    padding: 10px;
    background: #02364E;
    color: #fff;
    font-size: 0.9rem;
}

.title h1 {
    margin: 0; /* 上下のマージンをリセット */
    margin-bottom: 1px; /* 適度な余白を追加 */
}

.title h4 {
    margin: 0; /* 上下のマージンをリセット */
    margin-top: 5px; /* 上に少し余白を追加 */
    line-height: 1.5; /* 行間を調整 */
}

#education span {
    display: inline-block;
    width: 9em;
}


/* ヘッダー全体 */
header {
    display: flex;
    flex-direction: column; /* 縦並びにする */
    align-items: center;
    padding: 10px 20px;
    background-color: #02364E;
    color: white;
}

/* タイトルのスタイル */
.title {
    text-align: center;
    margin-bottom: 10px;
}

.title h1 {
    margin: 0;
    font-size: 2rem;
}

.title h4 {
    margin: 5px 0;
    font-size: 1rem;
}

/* ナビゲーションメニュー */
nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    padding: 0;
    margin: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

/* サブメニュー */
nav ul li ul {
    display: none;
    position: absolute;
    background-color: #02364E;
    padding: 10px;
    border-radius: 5px;
}

nav ul li:hover ul {
    display: block;
}

/* ハンバーガーメニュー */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    margin-bottom: 10px;
    z-index: 1000;
}

/* ハンバーガーメニュー用ナビゲーション */
@media screen and (max-width: 768px) {
    nav ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        padding: 20px 0;
        background-color: rgba(0, 0, 0, 0.9); /* 背景色を濃くする */
        position: fixed; /* 固定配置 */
        top: 0;
        left: 0;
        height: 100%; /* 全画面を覆う */
        overflow-y: auto; /* 縦スクロール可能にする */
        z-index: 999; /* 他の要素よりも前面に表示 */
        transform: translateY(-100%); /* 初期状態で非表示 */
        transition: transform 0.3s ease; /* スライドアニメーション */
    }

    nav ul.active {
        transform: translateY(0); /* メニューを表示 */
    }

    .menu-toggle {
        display: block;
        font-size: 24px;
        color: white;
        cursor: pointer;
        z-index: 1000; /* メニューより前面に表示 */
        position: relative; /* 固定ではなくヘッダー内に表示 */
    }

    header {
        position: relative; /* ヘッダー全体を基準にアイコンを配置 */
        z-index: 1000; /* メニューよりも前面 */
    }

    .title {
        position: relative; /* タイトルは移動させない */
        z-index: 1; /* メニューよりも後ろに表示 */
    }
}
