/* News page specific styles */

.hero-banner-background {
    height: 50px;
    background-size: cover;
    background-position: center center;
    width: 100%;
}

.news-content-area {
    display: flex;
    gap: 25px;
    background-color: #fff;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: var(--content-width);
    margin: 30px auto;
}

.main-news-column {
    flex: 2.5;
}

.hot-news-column {
    flex: 1;
}

.hot-news-list {
    min-height: 400px;
}

.main-news-column h2,
.hot-news-column h2 {
    font-size: 20px;
    color: #1c1c1c;
    margin-top: 0;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eaeaea;
    font-weight: 500;
    display: inline-block !important;
    width: auto !important;
}

.news-list-container {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 25px;
    min-height: 800px;
}

/* 🔥 统一 news-item 和 news-card 样式 */
.news-item,
.news-card {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.news-item:first-child,
.news-card:first-child {
    padding-top: 0;
}

.news-item:last-child,
.news-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-item:hover .news-title,
.news-card:hover .news-title {
    color: #c00;
}

/* Force uniform news image size - highest priority */
/* Support both old (.news-item) and new (.news-card) HTML structures */
.news-list-container .news-item .news-item-image-container,
.news-list-container .news-card .news-image {
    flex-shrink: 0 !important;
    width: 120px !important;
    height: 80px !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    background-color: #f0f0f0 !important;
    min-width: 120px !important;
    max-width: 120px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    flex-basis: 120px !important;
}

.news-list-container .news-item .news-item-image-container img,
.news-list-container .news-card .news-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 120px !important;
    max-height: 80px !important;
    min-width: 120px !important;
    min-height: 80px !important;
    object-fit: cover !important;
    object-position: center !important;
    background-color: #f8f8f8 !important;
    display: block !important;
    border-radius: 0 !important;
}

/* 🔥 统一 news-item-content 和 news-info 样式 */
.news-item-content,
.news-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
}

/* 🔥 新增：标题和时间行（弹性布局）*/
.news-title-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 8px;
}

/* 🔥 标题样式（在 title-row 中自动扩展）*/
.news-title {
    font-size: 16px;
    color: #333;
    text-decoration: none;
    line-height: 1.5;
    font-weight: 500;
    margin: 0;
    flex: 1;  /* 占据剩余空间 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.news-item,
.hot-news-item {
    opacity: 0;
    animation: fadeIn 0.3s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-item:nth-child(1) { animation-delay: 0.05s; }
.news-item:nth-child(2) { animation-delay: 0.1s; }
.news-item:nth-child(3) { animation-delay: 0.15s; }
.news-item:nth-child(4) { animation-delay: 0.2s; }
.news-item:nth-child(5) { animation-delay: 0.25s; }

.hot-news-item:nth-child(1) { animation-delay: 0.05s; }
.hot-news-item:nth-child(2) { animation-delay: 0.1s; }
.hot-news-item:nth-child(3) { animation-delay: 0.15s; }
.hot-news-item:nth-child(4) { animation-delay: 0.2s; }
.hot-news-item:nth-child(5) { animation-delay: 0.25s; }

.news-meta {
    display: flex;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* 🔥 时间样式（在 title-row 右侧，固定不缩小）*/
.news-date {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;  /* 不缩小 */
    padding-top: 2px;  /* 与标题顶部对齐 */
}

/* 🔥 作者样式（独立一行，左对齐）*/
.news-author {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 12px;
    color: #666;
    margin: 0;
    display: block;
}

.news-meta-separator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 12px;
    color: #666;
}

.news-date::before {
    content: '\f017';
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    margin-right: 6px;
    font-size: 11px;
    color: #888;
}

.hot-news-item {
    background-color: #1e1e1e;
    border-radius: 3px;
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
    position: relative;
    color: #fff;
    display: block;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hot-news-item:last-child {
    margin-bottom: 0;
}

.hot-news-item .hot-news-image-container {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background-color: #333;
}

.hot-news-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.hot-news-item:hover img {
    transform: scale(1.05);
}

.hot-news-item .hot-news-content {
    padding: 12px 15px;
}

.hot-news-item .hot-news-title {
    font-size: 15px;
    color: #fff;
    margin: 0 0 6px 0;
    line-height: 1.4;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(15px * 1.4 * 2);
}

.hot-news-item:hover .hot-news-title {
    color: #f0f0f0;
}

.hot-news-item .hot-news-meta {
    font-size: 12px;
    color: #aaa;
}

.hot-news-item .hot-news-rank {
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: bold;
    border-bottom-left-radius: 3px;
}

/* Category filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* 🔥 统一筛选按钮样式 (.category-filter 和 .filter-btn 共用) */
.category-filter,
.filter-btn {
    padding: 8px 20px;
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-filter:hover,
.filter-btn:hover {
    background-color: #fff;
    border-color: #c00;
    color: #c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(204, 0, 0, 0.15);
}

.category-filter.active,
.filter-btn.active {
    background: linear-gradient(135deg, #c00 0%, #a00 100%);
    color: white;
    border-color: #c00;
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.3);
    transform: translateY(-1px);
}
