/* ============================
   全体
============================ */
body {
    font-family: system-ui, sans-serif;
    padding: 20px;
    background: #fafafa;
    color: #222;
}

h1 {
    margin-bottom: 20px;
}

/* ============================
   ブログ一覧（index.php）
============================ */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 横長カード本体 */
.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: 0.2s;

    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 16px;
}

/* ホバー時の動き */
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* サムネイル枠（左側） */
.thumb-wrap {
    width: 200px;
    height: 140px;
    overflow: hidden;
    background: #eee;
    border-radius: 8px;
    flex-shrink: 0;
}

/* サムネイル画像 */
.thumb-wrap img.thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 旧thumbクラス（互換用） */
.thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #eee;
}

/* No Image のとき */
.noimg {
    width: 200px;
    height: 140px;
    background: #eee;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 8px;
}

/* 右側のテキストブロック */
.card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
}

/* ★ カテゴリ表示（追加） */
.card-category {
    display: inline-block;
    padding: 4px 8px;
    background: #0078d4;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 6px;
}

/* タイトル */
.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
    line-height: 1.4;
    color: #222;
}

/* 日付（今は使っていないが残しておく） */
.card-date {
    font-size: 12px;
    color: #666;
    margin-top: auto;
}

/* スマホ最適化 */
@media (max-width: 480px) {
    .card {
        flex-direction: column;
        align-items: flex-start;
    }

    .thumb-wrap,
    .noimg {
        width: 100%;
        height: 200px;
    }

    .card-title {
        font-size: 16px;
    }
}

/* ============================
   記事ページ（page/index.php）
============================ */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.eyecatch {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 6px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    text-decoration: none;
    color: #0078d4;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}