/*======hero这部分玩法=====*/
    .hero{
        height:208px;/*这个是沾满一屏的意思*/
        background:url("/static/img/homepage/hero02.jpg") center/cover no-repeat;
        background-attachment:fixed;/* 固定背景 */
        position:relative;
        overflow:hidden;
        color:white;
        }
    .hero::before{/* 遮罩层（提升质感） */
        content:"";
        position:absolute;
        inset:0;
        background:linear-gradient(
            to bottom,
            rgba(0,0,0,0.4),
            rgba(0,0,0,0.6)
        );
    }
/* Hero文字 */
    .hero-content{
        position:absolute;
        top:70%;
        left:50%;
        transform:translate(-50%,-50%);
        text-align:center;
        z-index:2;
    }
/* 标题动画 */
    .title{
        font-size:28px;
        opacity:0;
        transform:translateY(40px);
        animation:fadeUp 1s forwards;
        }
    .subtitle{
        margin:20px 0 40px;
        font-size:16px;
        opacity:0;
        animation:fadeUp 1s 0.4s forwards;
        }
    @keyframes fadeUp{
        to{
        opacity:1;
        transform:translateY(0);
        }
        }



/* 新闻列表容器 */
.news-grid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px; /* 卡片之间的间距 */
    padding: 20px 0;
}

/* 新闻卡片整体样式 */
.news_card {
    display: flex;
    align-items: center;
    background-color: #f8f8f8; /* 浅灰色背景 */
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 12px 16px;
    gap: 12px; /* 卡片之间的间距 */
    transition: all 0.2s ease;
    cursor: pointer;
}

/* 鼠标悬停效果：边框高亮 */
.news_card:hover {
    background-color: #fff;
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 新闻图片（如果需要，可在HTML中添加img标签） */
.news_card .news_img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 20px;
    flex-shrink: 0;
}

/* 新闻文字区域 */
.news_card .card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 新闻标题 */
.news_card .news_title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 新闻内容摘要（示例中复用了标题，可根据实际修改） */
.news_card .news_content {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 底部信息行 */
.news_card .news_others {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 13px;
    color: #999;
    margin: 0;
    gap: 15px; /* 日期和类型之间加间距，避免挤在一起 */
}

/* 新闻日期 */
.news_card .news_date {
    color: #999;
}

/* 新闻类型（如“新闻”标签） */
.news_card .news_type {
    color: #2e8b57; /* 原神官网的绿色标签 */
    font-weight: 500;
}

/* 链接样式重置 */
.news-grid a {
    text-decoration: none;
    color: inherit;
}

/* 响应式适配：小屏幕下调整布局 */
@media (max-width: 768px) {
    .news_card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    .news_card .news_img {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 12px;
    }
    .news_card .news_title {
        font-size: 16px;
    }
}