@charset "utf-8";

body {
    font-family: 'Noto Sans JP', "Helvetica Neue", "Helvetica", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Arial", "Yu Gothic", "Meiryo", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #123;
}

header {
    background-color: #333;
    color: white;
    padding: 10px 0;
    text-align: center;
}

header h1 {
    margin: 0;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    margin: 10px 0 0 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

main {
    padding: 20px;
}

.blog-list {
    max-width: 70%;
    margin: 5px auto;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.blog-item {
    border-bottom: 1px solid #ccc;
    padding: 20px 0;
    display: flex;
    gap: 20px; /* 画像とテキストの間にスペースをつける */
}

.blog-item:last-child {
    border-bottom: none;
}

.blog-item img {
    width: 200px;
    height: 100px;
    object-fit: cover;
}

.blog-item h2 {
    margin: 0 0 10px;
}

.blog-item p {
    margin: 0 0 15px;
}

.blog-item a {
    color: #333; /* リンクの色を黒に変更 */
    text-decoration: none; /* リンク下の線を削除 */
}

.blog-item a:hover {
    color: #555; /* ホバー時の色を少し明るく */
    text-decoration: underline; /* ホバー時に下線を表示 */
    transition: box-shadow .25s;
    text-decoration: none;
}

.read-more {
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 20px 0;
    background-color: #333;
    color: white;
    margin-top: 20px;
}

@media screen and (max-width: 768px) {
    /* メインコンテンツ全体を少し内側に寄せる */
    .blog-list {
        max-width: 90%; /* 幅を狭める */
        padding: 10px;  /* 内側の余白を減らす */
    }

    /* ブログのアイテム表示を縦に並べる */
    .blog-item {
        flex-direction: column; /* フレックス要素を縦に並べる */
        gap: 10px; /* 画像とテキストの間隔を小さくする */
    }

    .blog-item img {
        width: 100%;  /* 画像を画面幅いっぱいに広げる */
        height: auto; /* 高さは自動調整 */
    }

    /* ナビゲーションを縦方向に変更 */
    nav ul {
        flex-direction: column;  /* 横並びから縦並びに変更 */
        align-items: center;     /* 中央揃え */
    }

    nav ul li {
        margin: 10px 0; /* 各リンクの間に余白を追加 */
    }

    /* ヘッダのパディングとフォントサイズの調整 */
    header {
        padding: 15px 0;
    }

    header h1 {
        font-size: 24px; /* ヘッダのフォントサイズを小さくする */
    }

    /* フッタのパディングを調整 */
    footer {
        padding: 10px 0;
    }
}

