/* news.css - news.html / news-1~4.html 专属样式 */

/* 页面背景图 */
.hero-bg {
    background-image: url('../images/首页背景12.webp');
    background-size: cover;
    background-position: center;
    height: 35vh;
    position: relative;
}

/* 多行文本截断 */
.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 新闻列表卡片 ========== */
.news-card {
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(30, 64, 175, 0.25);
    border-color: #3b82f6;
}

.news-card-img {
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-img {
    transform: scale(1.06);
}

.news-card-title {
    transition: color 0.3s ease;
}

.news-card:hover .news-card-title {
    color: #3b82f6;
}

.news-more {
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.9rem;
}

.news-more .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.news-card:hover .news-more .arrow {
    transform: translateX(5px);
}

/* 日期块 */
.news-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
    letter-spacing: 0.02em;
}

.news-year {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* ========== 详情页 ========== */
/* 正文排版 */
.news-content p {
    color: #475569;
    line-height: 1.9;
    margin-bottom: 1.25rem;
    text-indent: 2em;
    text-align: justify;
}

/* 正文中小标题 */
.news-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 2rem 0 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid #3b82f6;
}

/* 正文配图 */
.news-content img {
    display: block;
    margin: 1.75rem auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 上一篇/下一篇 */
.news-pager a {
    transition: color 0.3s ease;
}

.news-pager a:hover {
    color: #3b82f6;
}

/* 侧栏最新信息 */
.news-sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
}

.sidebar-item {
    padding: 0.9rem 0;
    border-bottom: 1px dashed #e2e8f0;
}

.sidebar-item:last-child {
    border-bottom: none;
    padding-bottom: 0.25rem;
}

.sidebar-link {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.55;
    transition: color 0.3s ease;
}

.sidebar-link:hover {
    color: #3b82f6;
}

.sidebar-item.active .sidebar-link {
    color: #3b82f6;
    font-weight: 600;
}

.sidebar-date {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.35rem;
}

/* ========== 分享组件 ========== */
.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.share-item:hover {
    transform: translateY(-3px);
}

.share-item .share-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.05rem;
    transition: filter 0.3s ease;
}

.share-item:hover .share-icon {
    filter: brightness(1.12);
}

.share-item > span:last-child {
    font-size: 0.72rem;
    color: #64748b;
}

.share-wechat .share-icon {
    background: #22c55e;
}

.share-weibo .share-icon {
    background: #e6162d;
}

.share-qq .share-icon {
    background: #12b7f5;
}

.share-qzone .share-icon {
    background: #f59e0b;
}

.share-copy .share-icon {
    background: #3b82f6;
}

/* 微信二维码弹层 */
.wechat-qr-popup {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    width: 220px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    padding: 1rem;
    z-index: 30;
}

.copy-toast {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 0.6rem 1.3rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-bg {
        height: 40vh;
    }

    .hero-bg .text-xl {
        font-size: 1rem !important;
    }

    .news-content p {
        text-indent: 2em;
    }
}
