/* ============================================================
   天雅官网 - 新闻栏目样式 (news.css)
   与 layout.css 的 1200px 固定宽度设计语言保持一致
   ============================================================ */

/* ---------- 首页新闻动态版块 ---------- */
.home-news {
    width: 1200px;
    margin: 0 auto 104px;
    padding: 60px 0 20px;
}

.home-news .sub-title {
    text-align: center;
    margin-bottom: 50px;
}

.home-news-list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.home-news-list > li {
    width: 578px;
    flex: 0 0 578px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 36px;
}

/* 新闻图片区域 */
.home-news-list .news-img {
    flex: 0 0 280px;
    width: 280px;
    height: 160px;
    overflow: hidden;
}

.home-news-list .news-img a {
    display: block;
    height: 100%;
    width: 100%;
    transform: none !important;
}

.home-news-list .news-img img {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* 仅图片 hover 放大（与客户案例效果一致） */
.home-news-list > li:hover .news-img img {
    transform: scale(1.1);
}

/* 新闻简介区域 */
.home-news-list .news-info {
    flex: 1;
    min-width: 0;
    margin-left: 20px;
    display: flex;
    flex-direction: column;
}

.home-news-list .news-info h4 {
    font-size: 16px;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.home-news-list .news-info h4 a {
    color: #333;
    transform: none !important;
}

.home-news-list .news-info h4 a:hover {
    color: var(--text-height-light-color);
}

.home-news-list .news-info p {
    font-size: 14px;
    line-height: 26px;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
    color: #666;
    flex: 1;
}

.home-news-list .news-date {
    font-size: 13px;
    color: #999;
    margin-bottom: 4px;
}

/* "查看更多" 链接，与客户案例样式一致 */
.home-news-list .news-more-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--text-height-light-color);
    font-size: 14px;
    transform: none !important;
}

.home-news-list .news-more-link:hover {
    opacity: 0.8;
}

/* ---------- 新闻列表页 ---------- */
.news-wrap {
    padding: 60px 0;
}

.news-wrap .sub-title {
    margin-bottom: 50px;
}

.news-list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.news-list>li {
    width: 578px;
    flex: 0 0 578px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 36px;
}

/* 新闻列表页：压制全局 hover 缩放，保持卡片静态 */
.news-list > li img,
.news-list > li a {
    transform: none !important;
}

.news-list > li img:hover,
.news-list > li a:hover {
    transform: none !important;
}

/* ---------- 新闻卡片公共样式 ---------- */
.news-img {
    flex: 0 0 280px;
    width: 280px;
    height: 160px;
    overflow: hidden;
}

.news-img a {
    display: block;
    height: 100%;
    width: 100%;
}

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

.news-info {
    flex: 1;
    min-width: 0;
    margin-left: 20px;
    display: flex;
    flex-direction: column;
}

.news-info h4 {
    font-size: 16px;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.news-info p {
    font-size: 14px;
    line-height: 26px;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
    color: #666;
    flex: 1;
}

.news-date {
    font-size: 13px;
    color: #999;
    margin-top: auto;
}

.news-meta {
    font-size: 13px;
    color: #999;
}

.news-more-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--text-height-light-color);
    font-size: 14px;
}

.news-empty {
    text-align: center;
    color: #999;
    font-size: 16px;
    padding: 80px 0;
}

/* 分页：功能性上一页/下一页链接（覆盖 .page-number a 的固定 20px 宽度） */
.page-number a.prev,
.page-number a.next {
    width: auto;
    margin: 0 20px;
    color: #666;
}

.news-wrap .page-number {
    margin-top: 30px;
}

/* ---------- 新闻详情页 ---------- */
.news-detail {
    padding: 60px 100px 80px;
    max-width: 860px;
    margin: 0 auto;
}

.news-detail-head {
    border-bottom: 1px solid #eee;
    padding-bottom: 24px;
    margin-bottom: 32px;
}

.news-title {
    font-size: 30px;
    font-weight: bold;
    color: #222;
    line-height: 1.5;
    margin: 0 0 16px;
    letter-spacing: 0.5px;
}

.news-meta {
    font-size: 13px;
    color: #999;
}

.news-summary {
    background: #f8f9fb;
    border-left: 4px solid var(--text-height-light-color);
    padding: 20px 24px;
    color: #555;
    font-size: 15px;
    line-height: 28px;
    margin-bottom: 36px;
    border-radius: 0 4px 4px 0;
}

.news-content {
    font-size: 16px;
    line-height: 32px;
    color: #333;
}

.news-content img,
.news-content img:hover {
    transform: none !important;
}

.news-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 16px 0;
}

.news-content p {
    margin-bottom: 18px;
}

.news-content h2,
.news-content h3,
.news-content h4 {
    margin: 28px 0 14px;
    font-weight: bold;
    color: #222;
}

.news-content ul,
.news-content ol {
    padding-left: 24px;
    margin-bottom: 18px;
}

.news-content blockquote {
    border-left: 4px solid var(--text-height-light-color);
    padding: 12px 20px;
    color: #666;
    margin: 20px 0;
    background: #f8f9fb;
    border-radius: 0 4px 4px 0;
}

.news-nav {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.news-back {
    display: inline-block;
    color: var(--text-height-light-color);
    font-size: 14px;
    transition: opacity 0.2s;
}

.news-back:hover {
    opacity: 0.7;
}

/* ---------- 首页"查看更多新闻" ---------- */
.news-more {
    text-align: center;
    padding: 10px 0 30px;
}

.news-more a {
    display: inline-block;
    padding: 10px 40px;
    border: 1px solid var(--text-height-light-color);
    color: var(--text-height-light-color);
    font-size: 14px;
    border-radius: 3px;
}

.news-more a:hover {
    color: #fff;
    background: var(--text-height-light-color);
}

/* 首页新闻版块在有文章前保持隐藏（由 js/news.js 加载后显示） */
.home-news[hidden] {
    display: none;
}
