/**
 * News List Page Styles
 * ニュース一覧ページのスタイル
 */

/* ========================================
   ニュースリストヘッダー
   ======================================== */

.news-list-header {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 60px;
    position: relative;
}

.news-list-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: #f7f9fb;
    margin: 0;
}

.news-list-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(247, 249, 251, 0.8);
    margin: 0;
}

.news-back-to-section {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 12px 24px;
    background: rgba(247, 249, 251, 0.1);
    border: 1px solid rgba(247, 249, 251, 0.3);
    border-radius: 4px;
    color: #f7f9fb;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-back-to-section:hover {
    background: rgba(247, 249, 251, 0.2);
    border-color: rgba(247, 249, 251, 0.5);
    transform: translateX(-4px);
}

.news-back-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.news-back-to-section:hover .news-back-arrow {
    transform: translateX(-4px);
}

.news-back-text {
    white-space: nowrap;
}

@media (max-width: 767px) {
    .news-list-header {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 40px;
        padding: 0 20px; /* ヘッダーにはパディングを追加 */
    }
    
    .news-list-title {
        font-size: 2.5rem;
        letter-spacing: 0.2em;
    }
    
    .news-list-subtitle {
        font-size: 1.1rem;
    }
    
    .news-back-to-section {
        margin-left: auto;
        width: auto;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ========================================
   ニュースリスト
   ======================================== */

.news-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    margin-bottom: 60px;
}

.news-list-item {
    overflow: hidden;
    transition: background-color 0.3s ease, transform 0.2s ease;
    opacity: 0;
    transform: translateX(100px);
    animation: slideInFromRight 0.6s ease-in forwards;
}

/* 各アイテムに遅延を追加 */
.news-list-item:nth-child(1) { animation-delay: 0s; }
.news-list-item:nth-child(2) { animation-delay: 0.08s; }
.news-list-item:nth-child(3) { animation-delay: 0.16s; }
.news-list-item:nth-child(4) { animation-delay: 0.24s; }
.news-list-item:nth-child(5) { animation-delay: 0.32s; }
.news-list-item:nth-child(6) { animation-delay: 0.4s; }
.news-list-item:nth-child(7) { animation-delay: 0.48s; }
.news-list-item:nth-child(8) { animation-delay: 0.56s; }
.news-list-item:nth-child(9) { animation-delay: 0.64s; }
.news-list-item:nth-child(10) { animation-delay: 0.72s; }

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 奇数番目: 黒背景に白文字 */
.news-list-item:nth-child(odd) {
    background: rgba(32, 32, 35, 0.8);
}

.news-list-item:nth-child(odd):hover {
    background: rgba(32, 32, 35, 0.9);
    transform: translateY(-2px);
}

/* 偶数番目: 白背景に黒文字 */
.news-list-item:nth-child(even) {
    background: rgba(247, 249, 251, 0.8);
}

.news-list-item:nth-child(even):hover {
    background: rgba(247, 249, 251, 0.9);
    transform: translateY(-2px);
}

.news-list-item-link {
    display: flex;
    align-items: center;
    gap: 32px;
    text-decoration: none;
    padding: 32px;
    min-height: 200px;
}

@media (max-width: 767px) {
    .news-list {
        gap: 0; /* 記事間隔を0pxに */
        margin-bottom: 60px;
    }
    
    .news-list-item-link {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        min-height: auto;
    }
    
    /* サムネイルを非表示 */
    .news-list-item-thumbnail {
        display: none;
    }
}

/* ========================================
   ニュースアイテムのコンテンツ
   ======================================== */

.news-list-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-list-item-date {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 奇数番目: 白文字 */
.news-list-item:nth-child(odd) .news-list-item-date {
    color: rgba(247, 249, 251, 0.6);
}

/* 偶数番目: 黒文字 */
.news-list-item:nth-child(even) .news-list-item-date {
    color: rgba(32, 32, 35, 0.6);
}

.news-list-item-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

/* 奇数番目: 白文字 */
.news-list-item:nth-child(odd) .news-list-item-title {
    color: #f7f9fb;
}

/* 偶数番目: 黒文字 */
.news-list-item:nth-child(even) .news-list-item-title {
    color: #202023;
}

.news-list-item-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 奇数番目: 白文字 */
.news-list-item:nth-child(odd) .news-list-item-excerpt {
    color: rgba(247, 249, 251, 0.8);
}

/* 偶数番目: 黒文字 */
.news-list-item:nth-child(even) .news-list-item-excerpt {
    color: rgba(32, 32, 35, 0.8);
}

.news-list-item-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 8px;
    transition: gap 0.3s ease;
}

/* 奇数番目: 白文字 */
.news-list-item:nth-child(odd) .news-list-item-detail-link {
    color: #f7f9fb;
}

/* 偶数番目: 黒文字 */
.news-list-item:nth-child(even) .news-list-item-detail-link {
    color: #202023;
}

.news-list-item-detail-link::after {
    content: '→';
    font-size: 1.2rem;
}

.news-list-item:hover .news-list-item-detail-link {
    gap: 12px;
}

@media (max-width: 767px) {
    .news-list-item-title {
        font-size: 1.3rem;
    }
    
    .news-list-item-excerpt {
        font-size: 0.9rem;
    }
    
    .news-list-item-detail-link {
        font-size: 0.9rem;
    }
}

/* ========================================
   ニュースアイテムのサムネイル
   ======================================== */

.news-list-item-thumbnail {
    flex-shrink: 0;
    width: 320px;
    aspect-ratio: 1200 / 630;
    overflow: hidden;
    background: rgba(32, 32, 35, 0.5);
}

.news-list-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-list-item:hover .news-list-item-thumbnail img {
    transform: scale(1.05);
}

@media (max-width: 767px) {
    .news-list-item-thumbnail {
        width: 100%;
        height: 200px;
    }
}

/* ========================================
   空の状態
   ======================================== */

.news-list-empty {
    text-align: center;
    padding: 80px 40px;
    color: #f7f9fb;
    opacity: 0.6;
}

.news-list-empty p {
    font-size: 1.2rem;
}

/* ========================================
   ページネーション
   ======================================== */

.news-list-pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.news-list-pagination nav {
    display: flex;
    gap: 8px;
}

.news-list-pagination a,
.news-list-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #f7f9fb;
    background-color: rgba(247, 249, 251, 0.1);
    border: 1px solid rgba(247, 249, 251, 0.3);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.news-list-pagination a:hover {
    background-color: rgba(247, 249, 251, 0.2);
    border-color: rgba(247, 249, 251, 0.5);
}

.news-list-pagination .active span {
    background-color: rgba(247, 249, 251, 0.3);
    border-color: rgba(247, 249, 251, 0.5);
}

.news-list-pagination .disabled span {
    opacity: 0.3;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .news-list-pagination a,
    .news-list-pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* ========================================
   ニュースリストフッター
   ======================================== */

.news-list-footer {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    padding-bottom: 40px;
}

@media (max-width: 767px) {
    .news-list-footer {
        margin-top: 40px;
        padding: 0 20px 40px;
        justify-content: flex-end;
    }
}
