@charset "UTF-8";

/* --- グリッドレイアウト --- */
.news-grid {
    display: grid;
    /* デスクトップは3列 (トップページ用) */
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px; /* 間隔を広げて大きく見せる */
    
    /* グリッド全体を中央に配置 */
    max-width: 1100px; /* 幅を制限 */
    margin: 40px auto; /* 上下40px、左右自動(中央寄せ) */
    width: 100%;
    box-sizing: border-box;
}

/* ニュース一覧ページなど、5列表示が必要な場合のクラス (必要に応じて使用) */
.page-news-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* --- カードデザイン --- */
.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    /* カード内のテキストは左揃えの方が見やすいため left にしていますが、
       カード自体の中身も中央揃えが良い場合は center にしてください */
    text-align: left; 
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.news-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: #f0f0f0;
}

.news-info {
    padding: 25px; /* 余白を広げてゆったりさせる */
}

.news-date {
    font-size: 0.95rem; /* 日付を少し大きく */
    color: #888;
    display: block;
    margin-bottom: 10px;
}

.news-title {
    font-size: 1.25rem; /* タイトルを大きく (約20px) */
    font-weight: bold;
    line-height: 1.5;
    margin: 0;
}

/* --- もっと見るボタン (中央寄せ修正) --- */
.view-more-container {
    width: 100%;
    text-align: center; /* これでボタンが確実に中央に来ます */
    margin-top: 50px;
    margin-bottom: 20px;
}

.view-more-btn {
    display: inline-block;
    padding: 15px 60px; /* ボタンのサイズを大きく */
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem; /* 文字サイズUP */
    letter-spacing: 0.05em;
    transition: background 0.3s, transform 0.2s;
}

.view-more-btn:hover {
    background-color: #555;
    transform: scale(1.05);
}

/* --- ポップアップ (変更なし・維持) --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center; align-items: center;
    padding: 20px;
}
.modal-content {
    background: #fff;
    width: 100%; max-width: 700px; /* モーダルも少し大きく */
    border-radius: 10px; position: relative;
    padding: 40px; /* 余白増 */
    max-height: 90vh; overflow-y: auto;
    animation: fadeIn 0.3s ease;
}
.modal-close {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none; font-size: 28px;
    cursor: pointer; color: #888;
}
.modal-header h2 {
    font-size: 1.8rem; /* モーダルタイトル拡大 */
    margin-bottom: 15px; border-bottom: 2px solid #eee; padding-bottom: 15px;
}
.modal-date {
    color: #888; font-size: 1rem; margin-bottom: 20px; display: block;
}
.modal-img {
    width: 100%; height: auto; border-radius: 8px; margin-bottom: 25px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- レスポンシブ (スマホ対応) --- */
@media screen and (max-width: 1024px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 768px) {
    .news-grid { 
        grid-template-columns: 1fr; /* スマホは1列 */
        max-width: 450px; /* 幅を制限して中央寄せ */
    }
    .news-info { padding: 20px; }
    .news-title { font-size: 1.1rem; }
}