/* 基本的なリセットと設定 */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh; /* 画面全体の高さを使用 */
    background-color: #f8f9fa;
    color: #333;
    -webkit-tap-highlight-color: transparent; /* タップ時のハイライトを無効化 */
}

header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky; /* ヘッダーを上部に固定 */
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 1.2em;
}


main {
    flex-grow: 1; /* 利用可能なスペースを埋める */
    overflow-y: auto; /* コンテンツが多すぎる場合はスクロール */
    padding: 20px;
    padding-bottom: 80px; /* 下部ナビゲーションに隠れないように */
}

/* ページセクションの基本スタイル */
.page {
    display: none; /* デフォルトで非表示 */
    animation: fadeIn 0.3s ease-in-out;
}

.page.active {
    display: block; /* アクティブなページのみ表示 */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ナビゲーションバー */
nav {
    display: flex;
    justify-content: space-around;
    align-items: center; /* アイコンとテキストを中央揃え */
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
    padding: 5px 0; /* 上下のpaddingを少し減らす */
    position: fixed; /* 画面下部に固定 */
    bottom: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 100;
    height: 60px; /* ナビゲーションの高さを指定 */
}

nav a.nav-link {
    flex-grow: 1;
    display: flex;
    flex-direction: column; /* アイコンとテキストを縦に並べる */
    align-items: center;
    justify-content: center;
    padding: 5px 0;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.75em; /* テキストサイズを調整 */
    transition: color 0.2s;
}

nav a.nav-link img {
    width: 24px; /* アイコンサイズ */
    height: 24px;
    margin-bottom: 2px; /* アイコンとテキストの間隔 */
    filter: grayscale(80%); /* 非アクティブ時は少しグレーに */
}

nav a.nav-link:hover {
    color: #0056b3;
}

nav a.nav-link.active {
    color: #007bff;
    font-weight: bold;
}
nav a.nav-link.active img {
    filter: grayscale(0%); /* アクティブ時はフルカラー */
}

/* フォーム要素のスタイル（オプション） */
form {
    display: flex;
    flex-direction: column;
}
form label {
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
}
form input[type="text"],
form input[type="email"],
form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}
form button[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.2s;
}
form button[type="submit"]:hover {
    background-color: #0056b3;
}


.section-header {
  background-color: #007bff; /* 鮮やかな青 */
  color: white;
  padding: 10px 20px;
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  border-radius: 5px 5px 0 0;
}
