
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

header {
    background-color: #ffcc00;
    color: white;
    text-align: center;
    padding: 1rem;
}

header h1 {
    margin: 0;
    font-size: clamp(24px, 6vw, 48px); /* 24px〜48pxの範囲で文字サイズを調整 */
    white-space: nowrap; /* 改行を防ぐ */
    overflow: hidden; /* はみ出したテキストを隠す */
    text-overflow: ellipsis; /* 必要に応じて省略記号を表示 */
}


nav {
    background-color: #ff9900;
    padding: 0.5rem;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

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

main {
    padding: 20px;
    text-align: center;
}

main h2 {
    color: #ff9900;
}

main p {
    font-size: 1.2rem;
    color: #333;
}

footer {
    background-color: #ffcc00;
    text-align: center;
    padding: 1rem;
    color: white;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }
    nav ul li {
        margin: 10px 0;
    }
    main p {
        font-size: 1rem;
    }
}


/* 全体のスタイル */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

/* ヘッダーのスタイル */
header {
    background-color: #ffcc00;
    color: white;
    text-align: center;
    padding: 1rem;
    position: relative;
}

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

/* ヘッダーのスタイル */
header {
    background-color: #ffcc00;
    color: white;
    text-align: center;
    padding: 1rem;
    position: relative; /* relative にすることで子要素の位置を調整しやすくする */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* タイトルのスタイル */
header h1 {
    margin: 0;
    font-size: 2rem;
    flex-grow: 1; /* タイトルが中央にくるように配置 */
}

/* 全体のスタイル */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

/* ヘッダーのスタイル */
header {
    background-color: #ffcc00;
    color: white;
    text-align: center;
    padding: 1rem;
    position: relative;
}

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

/* ハンバーガーメニューのスタイル */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 25px;
    justify-content: space-between;
    z-index: 11; /* z-indexを上げて他の要素の上に表示 */
    position: relative; /* 位置を固定するために relative を指定 */
}

.hamburger span {
    width: 100%;
    height: 3px; /* 線の太さ */
    background-color: #333; /* 線の色を濃いグレーに変更 */
    border-radius: 2px;
    transition: all 0.3s ease; /* アニメーションの追加 */
}

/* メニューが開いたときにハンバーガーメニューの線を変化 */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* 上の線を斜めに変形 */
}

.hamburger.active span:nth-child(2) {
    opacity: 0; /* 真ん中の線を非表示に */
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); /* 下の線を斜めに変形 */
}

/* ナビゲーションメニュー */
.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/* スマホ向けのスタイル */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        position: absolute; /* 絶対位置で固定 */
        top: 15px; /* ヘッダーの下に少しスペースを空ける */
        right: 15px; /* 右端に固定 */
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background-color: #ff9900;
        width: 100%;
        text-align: center;
        z-index: 10; /* メニューはハンバーガーの下に表示 */
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
    }
}