/* News Page Styles */

/* Banner */
.news-banner {
    height: 300px;
    background-image: url('https://via.placeholder.com/1920x400?text=News+Banner');
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 50px;
}

.banner-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(18, 12, 0, 0.6); /* Overlay main 60% */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.banner-overlay h2 {
    font-size: 36px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.banner-overlay p {
    font-size: 16px;
    opacity: 0.8;
}

/* Layout */
.news-container {
    display: flex;
    gap: 40px;
    padding-bottom: 60px;
}

.news-main {
    flex: 3;
}

.news-sidebar {
    flex: 1;
}

/* News List Items */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-item {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.news-link {
    display: flex;
    gap: 20px;
    text-decoration: none;
    color: inherit;
}

.news-link:hover .news-content h2 {
    color: var(--accent);
}

.news-image {
    width: 260px;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-link:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Pointer events strategy from spec */
.news-content h2,
.news-content p,
.news-date,
.read-more {
    pointer-events: none;
}

.news-content h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
    transition: color 0.3s;
}

.news-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
    /* Limit lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f5f5f5;
    padding-top: 15px;
}

.news-date {
    font-size: 12px;
    color: #999;
}

.read-more {
    font-size: 12px;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    background: transparent;
}

/* Pagination */
.pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination a, .pagination span.current {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    color: #666;
    border-radius: 4px;
}

.pagination a:hover, .pagination span.current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.jump-area {
    margin-left: 20px;
    font-size: 14px;
    color: #666;
}

.jump-input {
    width: 40px;
    padding: 5px;
    border: 1px solid #ddd;
    text-align: center;
    margin: 0 5px;
}

/* Sidebar */
.sidebar-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

.sidebar-title {
    font-size: 18px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #333;
}

.ranking-list li {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.rank-num {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #ccc;
    color: #fff;
    text-align: center;
    line-height: 20px;
    border-radius: 2px;
    font-size: 12px;
    flex-shrink: 0;
}

.rank-num.top {
    background: var(--accent);
}

.ranking-list a {
    color: #666;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-list a:hover {
    color: var(--accent);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .news-container {
        flex-direction: column;
    }
    
    .news-sidebar {
        order: 2; /* Put sidebar below on mobile? Or hidden? */
    }

    /* Spec specific mobile rules */
    .news-item {
        padding: 10px;
        background: #ffffff;
        border-bottom: none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .news-link {
        flex-direction: column;
        padding: 0;
        gap: 10px;
    }

    .news-image {
        width: 100%;
        height: 180px;
        margin: 0;
    }

    .news-image img {
        border-radius: 4px;
    }

    .news-content {
        width: 100%;
        padding: 0;
    }

    .news-content h2 {
        font-size: 16px;
        margin: 0;
        padding: 0 5px;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.4;
    }

    /* Hide p description on mobile */
    .news-content p {
        display: none;
    }

    .news-meta {
        position: static;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 5px;
        margin-top: 5px;
        border-top: none;
    }

    .news-date {
        font-size: 12px;
    }

    .read-more {
        position: static;
        padding: 2px 10px;
        font-size: 12px;
        color: var(--accent);
        border: 1px solid var(--accent);
        border-radius: 15px;
        display: inline-block;
    }

    /* Pagination Mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .jump-area {
        width: 100%;
        margin-top: 10px;
        text-align: center;
        margin-left: 0;
    }
}
