/* 新闻页面专用样式 - news.html */

/* 页面头部插图样式 */
.page-header-image {
    flex: 1;
    text-align: center;
    position: relative;
}

.page-header-image img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* AOS 动画完成后的新闻图片浮动效果 */
.page-header-image.aos-animate img {
    animation: newsFloat 6s ease-in-out infinite;
}

@keyframes newsFloat {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-20px); 
    }
}


/* 新闻分类标签 */
.news-categories {
    background: white;
    position: relative;
}

.categories-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    background: white;
    border-radius: 50px;
    padding: 8px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.category-tab {
    padding: 12px 35px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.category-tab.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 5px 15px rgba(24, 144, 255, 0.3);
}

/* 新闻列表样式 */
.news-list {
    background: linear-gradient(135deg, #f5f7fa 0%, #e6f7ff 100%);
    position: relative;
    overflow: hidden;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 1;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.news-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

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

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

.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.news-info {
    padding: 25px;
}

.news-date {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.news-date i {
    margin-right: 8px;
    color: var(--primary);
}

.news-info h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark);
    line-height: 1.4;
}

.news-info p {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.news-author {
    display: flex;
    align-items: center;
    color: var(--gray);
    font-size: 0.9rem;
}

.news-author img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.news-readmore {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.news-readmore:hover {
    color: var(--primary-dark);
}

.news-readmore i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.news-readmore:hover i {
    transform: translateX(5px);
}

/* 新闻详情模态框 */
.news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 50px auto;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 30px 30px 20px;
    position: relative;
}

.modal-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--dark);
    line-height: 1.4;
}

.modal-meta {
    display: flex;
    align-items: center;
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.modal-date {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.modal-date i, .modal-author i {
    margin-right: 8px;
    color: var(--primary);
}

.modal-author {
    display: flex;
    align-items: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--dark);
}

.modal-image {
    height: 350px;
    position: relative;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body {
    padding: 30px;
}

.modal-body p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.modal-body h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--dark);
}

.modal-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 25px 0;
    color: var(--gray);
    font-style: italic;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.news-tag {
    background: #f0f0f0;
    color: var(--gray);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 10px;
    margin-bottom: 10px;
}

.news-share {
    display: flex;
    align-items: center;
}

.share-text {
    margin-right: 10px;
    color: var(--gray);
    font-size: 0.9rem;
}

.share-icons {
    display: flex;
    gap: 10px;
}

.share-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: var(--gray);
    text-decoration: none;
}

.share-icons a:hover {
    background: var(--primary);
    color: white;
}

/* 新闻订阅 */
.news-subscribe {
    background: white;
}

.subscribe-content {
    display: flex;
    align-items: center;
    gap: 60px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 60px 50px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.subscribe-text {
    flex: 1;
}

.subscribe-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.subscribe-text p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

.subscribe-form {
    display: flex;
    gap: 15px;
    max-width: 500px;
}

.subscribe-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e6f7ff;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.subscribe-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.subscribe-image {
    flex: 1;
    text-align: center;
}

.subscribe-image img {
    max-width: 100%;
    border-radius: 12px;
}



.page-header-image {
    flex: 1;
    text-align: center;
    position: relative;
}

.help-illustration {
    width: 100%;
    height: 400px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AOS 动画完成后的帮助插图浮动效果 */
.page-header-image.aos-animate .help-illustration {
    animation: helpFloat 6s ease-in-out infinite;
}

@keyframes helpFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}
.help-illustration i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
}



/* 新闻摘要样式 - 限制显示3行 */
.news-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    height: 4.8em; /* 3行 × 1.6行高 = 4.8em */
    margin-bottom: 15px;
}

/* 确保新闻卡片高度一致 */
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    margin-top: auto;
    padding-top: 10px;
}

.guide-icon {
    height: 200px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
}
.guide-icon i {
    font-size: 4rem;
    color: var(--primary);
    transition: transform 0.5s ease;
}

.categories-tabs a {
    text-decoration: none;
}

.categories-tabs a:not(.active):hover {
    color: var(--primary);
}
/* 响应式设计 */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .subscribe-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .categories-tabs {
        flex-wrap: wrap;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .subscribe-form {
        flex-direction: column;
    }
}



.page-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
.page-header-text {
    flex: 1;
    padding-right: 50px;
}


