/* ============================================
   新闻动态页样式表 - xinwen.css
   独立样式，不影响其他页面
   ============================================ */

/* === 全局重置与基础 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === 板块1：页面标题 === */
.page-header {
    background: linear-gradient(135deg, rgba(26,42,74,0.85) 0%, rgba(15,26,48,0.88) 50%, rgba(26,42,74,0.85) 100%), url('../images/xwbanner.jpg') center/cover no-repeat;
    position: relative;
    padding-top: 100px;
    min-height: 350px;
    padding-bottom: 60px;
    text-align: center;
    color: #fff;
}

.page-header h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.page-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 24px;
}

.breadcrumb {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

.breadcrumb a {
    color: rgba(255,255,255,0.8);
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #f5a623;
}

/* === 板块2：分类导航 === */
.category-section {
    background: #f8f9fc;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.category-btn {
    padding: 10px 28px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover {
    border-color: #f5a623;
    color: #f5a623;
}

.category-btn.active {
    background: #f5a623;
    border-color: #f5a623;
    color: #fff;
}

/* === 板块3：新闻列表 === */
.news-section {
    padding: 60px 0;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-item {
    display: flex;
    gap: 24px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
    border: 1px solid #eee;
}

.news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    border-color: #f5a623;
}

.news-image {
    position: relative;
    width: 320px;
    flex-shrink: 0;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.news-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #999;
}

.news-date {
    position: relative;
    padding-left: 16px;
}

.news-date::before {
    content: '📅';
    position: absolute;
    left: 0;
}

.news-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a2a4a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-content h2 a {
    color: inherit;
    transition: color 0.3s;
}

.news-content h2 a:hover {
    color: #f5a623;
}

.news-excerpt {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 16px;
    flex: 1;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px dashed #eee;
}

.read-more {
    font-size: 14px;
    font-weight: 600;
    color: #f5a623;
    transition: color 0.3s;
}

.read-more:hover {
    color: #e8941a;
}

.news-views {
    font-size: 13px;
    color: #999;
}

/* === 分页 === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
}

.page-btn,
.page-num {
    padding: 10px 18px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover,
.page-num:hover {
    border-color: #f5a623;
    color: #f5a623;
}

.page-num.active {
    background: #f5a623;
    border-color: #f5a623;
    color: #fff;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    color: #999;
    font-size: 14px;
}

/* === 订阅区域 === */
.subscribe-section {
    background: linear-gradient(135deg, #1a2a4a 0%, #0f1a30 100%);
    padding: 80px 0;
    color: #fff;
    text-align: center;
}

.subscribe-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.subscribe-content p {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 30px;
}

.subscribe-form {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form input[type="email"] {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    font-size: 14px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    outline: none;
    transition: border-color 0.3s;
}

.subscribe-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.5);
}

.subscribe-form input[type="email"]:focus {
    border-color: #f5a623;
}

.btn-subscribe {
    padding: 14px 36px;
    background: #f5a623;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-subscribe:hover {
    background: #e8941a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245,166,35,0.3);
}

/* 注：导航栏、页脚样式已在common.css中统一管理
   以下仅保留桌面端下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 600px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu.two-columns {
    display: flex;
    gap: 0;
}

.dropdown-column {
    flex: 1;
    padding: 16px 20px;
    background: #fff;
}

.dropdown-column:first-child {
    border-right: 1px solid #eee;
    border-radius: 8px 0 0 8px;
}

.dropdown-column:last-child {
    border-radius: 0 8px 8px 0;
}

.column-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a2a4a;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f5a623;
}

.column-list {
    list-style: none;
}

.column-list a {
    display: block;
    padding: 8px 12px;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    transition: all 0.2s;
    border-radius: 4px;
}

.column-list a:hover {
    background: #f8f9fc;
    color: #f5a623;
}

.dropdown-menu:not(.two-columns) a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s;
}

.dropdown-menu:not(.two-columns) a:hover {
    background: #f8f9fc;
    color: #f5a623;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > a::after {
    content: '›';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888;
}

.dropdown-submenu > a {
    padding-right: 35px !important;
}

.dropdown-submenu .dropdown-submenu {
    top: 0;
    left: 100%;
    margin-left: 4px;
}

.dropdown-submenu:hover > .dropdown-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.dropdown-submenu .dropdown-submenu {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.25s ease;
}

/* 注：页脚样式已在common.css中统一管理，不再重复定义

/* === 响应式设计 === */
@media (max-width: 992px) {
    .news-item {
        flex-direction: column;
    }
    
    .news-image {
        width: 100%;
        aspect-ratio: 16/9;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 100px 0 60px;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .category-tabs {
        gap: 8px;
    }
    
    .category-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .news-section {
        padding: 40px 0;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-content h2 {
        font-size: 20px;
    }
    
    .news-excerpt {
        font-size: 14px;
    }
    
    .subscribe-section {
        padding: 60px 0;
    }
    
    .subscribe-content h2 {
        font-size: 26px;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
    
    .btn-subscribe {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .category-btn {
        flex-shrink: 0;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 6px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .page-btn,
    .page-num {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* === 新闻详情页 === */
.news-detail-section {
    padding: 100px 0 60px;
    background: #fff;
}

.news-detail-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.news-detail-wrap .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}

.news-detail-wrap .breadcrumb a {
    color: #666;
    transition: color 0.3s;
}

.news-detail-wrap .breadcrumb a:hover {
    color: #f5a623;
}

.news-detail-wrap .breadcrumb span {
    color: #ccc;
}

.news-detail-article {
    background: #fff;
}

.news-detail-article h1 {
    font-size: 32px;
    font-weight: 800;
    color: #1a2a4a;
    line-height: 1.4;
    margin-bottom: 16px;
    text-align: center;
}

.news-detail-meta {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-date {
    font-size: 14px;
    color: #999;
}

.news-detail-image {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
}

.news-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.news-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-top: 30px;
}

.news-detail-content p {
    margin-bottom: 16px;
}

/* 支持Ueditor编辑器居中图片 */
.news-detail-content p[style*="text-align: center"] {
    text-align: center !important;
}

.news-detail-content p:not([style*="text-align: left"]):not([style*="text-align: right"]) img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.news-detail-content figure {
    margin: 20px 0;
    text-align: center;
}

.news-detail-content figure img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.news-detail-content figcaption {
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}

.news-detail-back {
    margin-top: 40px;
    text-align: center;
}

.news-detail-back .btn-primary {
    display: inline-block;
    padding: 12px 40px;
    background: linear-gradient(135deg, #f5a623, #e8941a);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.news-detail-back .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245,166,35,0.35);
}

/* 响应式 */
@media (max-width: 992px) {
    .news-detail-article h1 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .news-detail-section {
        padding: 80px 0 40px;
    }
    
    .news-detail-article h1 {
        font-size: 24px;
    }
    
    .news-detail-content {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .news-detail-article h1 {
        font-size: 20px;
    }
    
    .news-detail-content {
        font-size: 14px;
    }
}