@charset "utf-8";

/* ベーススタイル */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px; /* 読みやすい幅に設定 */
    margin: 40px auto;
    padding: 0 20px;
}

/* ヘッダーエリア */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
}

/* 投稿ボタンのデザイン */
.btn-post {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-post:hover {
    background-color: #2980b9;
}

/* ニュースリストスタイル */
.news-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden; /* 角丸を効かせるため */
}

.news-item {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background-color: #fcfcfc;
}

.news-link {
    display: block;
    padding: 20px 25px;
    text-decoration: none;
    color: inherit;
    position: relative; /* 矢印配置用 */
}

/* 日付などのメタ情報 */
.news-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ニュースタイトル */
.news-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin: 0;
    line-height: 1.5;
    transition: color 0.2s;
    padding-right: 20px; /* 矢印と被らないように */
}

.news-link:hover .news-title {
    color: #3498db;
}

/* 右側の矢印アイコン */
.arrow-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #ddd;
    font-size: 1rem;
    transition: all 0.2s;
}

.news-link:hover .arrow-icon {
    color: #3498db;
    right: 15px; /* 少し右に動くアニメーション */
}

/* ニュースがない場合 */
.no-news {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* ページネーション */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 6px;
    background-color: white;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.page-link:hover {
    border-color: #3498db;
    color: #3498db;
}

.page-link.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    pointer-events: none;
}

.page-link.prev, .page-link.next {
    padding: 0 15px;
}

/* スマホ対応（メディアクエリ） */
@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .btn-post {
        align-self: flex-start; /* 左寄せ */
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .news-link {
        padding: 15px;
    }

    .news-title {
        font-size: 1rem;
    }
    
    .arrow-icon {
        display: none; /* スマホでは狭いので矢印を消す */
    }
}