/* お知らせ一覧・詳細ページ用CSS（新デザイン） */
/* 2025年10月7日更新 */

/* ========================================
   一覧表示用レイアウト（新デザイン）
   ======================================== */

/* お知らせヘッダー */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.news-header-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    letter-spacing: 0.05em;
}

.news-view-all {
    color: #4A8C5A;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.news-view-all:hover {
    color: #2c5530;
    border-bottom-color: #2c5530;
}

/* お知らせリスト */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
    text-decoration: none;
    color: inherit;
}

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

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

/* 画像 */
.news-image-wrapper {
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
}

.news-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* コンテンツ */
.news-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #666;
}

.news-date {
    font-weight: 500;
}

.news-category {
    color: #888;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 矢印アイコン */
.news-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.news-arrow::after {
    content: '→';
    font-size: 1.2rem;
    color: #666;
}

.news-item:hover .news-arrow {
    background-color: #4A8C5A;
    border-color: #4A8C5A;
}

.news-item:hover .news-arrow::after {
    color: white;
}

/* 固定ピン */
.pin {
    position: absolute;
    top: 20px;
    left: -30px;
    font-size: 1.2rem;
    z-index: 10;
}

/* ========================================
   ページネーション
   ======================================== */
.news-pagination {
    margin: 3rem 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn,
.pagination-page {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: #333;
}

.pagination-btn:hover:not(:disabled),
.pagination-page:hover:not(.pagination-page-active) {
    background: #f8f9fa;
    border-color: #2c5530;
    color: #2c5530;
}

.pagination-btn:disabled {
    background: #f8f9fa;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-page-active {
    background: #2c5530;
    color: white;
    border-color: #2c5530;
    font-weight: bold;
    cursor: default;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: #999;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* ========================================
   画像モーダル
   ======================================== */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.image-modal.active {
    display: flex;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* ========================================
   レスポンシブ対応
   ======================================== */
@media (max-width: 768px) {
    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .news-item {
        grid-template-columns: 80px 1fr auto;
        gap: 15px;
        padding: 15px 0;
    }

    .news-image-wrapper {
        width: 80px;
        height: 80px;
    }

    .news-title {
        font-size: 1rem;
    }

    .news-arrow {
        width: 36px;
        height: 36px;
    }

    .news-arrow::after {
        font-size: 1rem;
    }

    /* ページネーション */
    .pagination-wrapper {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-btn,
    .pagination-page {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .pagination-pages {
        gap: 0.15rem;
    }
}

@media (max-width: 480px) {
    .news-item {
        grid-template-columns: 70px 1fr auto;
        gap: 12px;
        padding: 12px 0;
    }

    .news-image-wrapper {
        width: 70px;
        height: 70px;
    }

    .news-title {
        font-size: 0.95rem;
    }

    .news-meta {
        font-size: 0.8rem;
        gap: 8px;
    }

    .news-arrow {
        width: 32px;
        height: 32px;
    }

    .news-arrow::after {
        font-size: 0.9rem;
    }

    .pagination-page {
        min-width: 36px;
        padding: 0.4rem 0.6rem;
    }
}
