/* ==========================================
   ニュース詳細ページ専用スタイル
   ========================================== */

/* ヘッダーのスタイル */
body header {
    width: 100%;
    height: 18vh;
}

/* ヘッダーの背景画像 */
.header_img {
    display: flex;
    height: 100%;
    width: 100%;
    background-image: url("../images/image7.jpeg");
    background-size: cover;
    background-position: center;
}

/* ニュース詳細ページ スタイル */
.news-detail-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.news-detail-article {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.news-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.news-detail-date {
    display: inline-block;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding: 0.3rem 0.8rem;
    background: #f5f5f5;
    border-radius: 4px;
}

.news-detail-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.news-detail-image {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.news-detail-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #444;
}

/* ニュースナビゲーション（前後の記事） */
.news-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.news-nav-link {
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.news-nav-link:hover {
    border-color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15);
    transform: translateY(-2px);
}

.news-nav-disabled {
    background: transparent;
    border: none;
}

.news-nav-label {
    font-size: 0.85rem;
    color: #1976d2;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.news-nav-title {
    font-size: 16px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-nav-previous {
    text-align: left;
}

.news-nav-next {
    text-align: right;
}

/* 一覧へ戻るボタン */
.back-to-list {
    text-align: center;
    margin-top: 3rem;
}

.back-button {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    background: #005ab3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
    font-weight: bold;
}

.back-button:hover {
    background: #004080;
}

/* フッターのスタイル */
footer {
    background-image: url("../images/image7.jpeg");
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    position: relative;
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
    .news-detail-page {
        padding: 1rem;
    }

    .news-detail-article {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .news-detail-title {
        font-size: 1.4rem;
    }

    .news-detail-content {
        font-size: 1rem;
        line-height: 1.7;
    }

    .news-navigation {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-nav-link {
        padding: 1rem;
    }

    .news-nav-title {
        font-size: 0.9rem;
    }

    .back-button {
        padding: 0.7rem 2rem;
        font-size: 0.9rem;
    }
}
