/* 
 * 速维管家 - 行业资讯页面样式
 * 用于page-news.php模板
 */

/* 页面标题区域 */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: var(--padding-xl) 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* 资讯主体内容 */
.news-content {
    padding: var(--padding-xl) 0;
    background-color: #f8f9fa;
}

.news-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* 文章分类选项卡 */
.category-tabs {
    margin-bottom: var(--padding-lg);
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
}

.tab-nav li {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-text);
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.tab-nav li:hover {
    color: var(--primary-color);
}

.tab-nav li.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 文章列表 */
.article-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.article-item {
    background-color: white;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.article-item:hover {
    transform: translateY(-5px);
}

.article-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-item:hover .article-image img {
    transform: scale(1.05);
}

.category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
}

.tech {
    background-color: #4CAF50;
}

.operation {
    background-color: #2196F3;
}

.policy {
    background-color: #FF9800;
}

.trend {
    background-color: #9C27B0;
}

.article-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-content h2 {
    font-size: 1.3rem;
    margin: 0 0 15px;
    line-height: 1.4;
}

.article-content h2 a {
    color: var(--text-color);
    transition: color 0.3s;
}

.article-content h2 a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    gap: 15px;
    color: var(--gray-text);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.article-meta i {
    margin-right: 5px;
}

.article-excerpt {
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    margin-top: auto;
    transition: color 0.3s;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.read-more:hover {
    color: var(--primary-color-dark);
}

.read-more:hover i {
    transform: translateX(3px);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 5px;
}

.pagination a, 
.pagination .current-page {
    display: inline-block;
    padding: 8px 15px;
    border-radius: var(--border-radius-sm);
    background-color: white;
    color: var(--text-color);
    box-shadow: var(--box-shadow);
    transition: all 0.3s;
}

.pagination .current-page {
    background-color: var(--primary-color);
    color: white;
}

.pagination a:hover {
    background-color: var(--primary-color-light);
    color: var(--primary-color);
}

.pagination .next-page {
    display: flex;
    align-items: center;
}

.pagination .next-page i {
    margin-left: 5px;
}

/* 侧边栏样式 */
.sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background-color: white;
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.widget-title {
    font-size: 1.2rem;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 搜索框 */
.search-form {
    display: flex;
    position: relative;
}

.search-form input[type="text"],
.search-form input[type="search"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
}

.search-form button,
.search-form input[type="submit"] {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-form button:hover,
.search-form input[type="submit"]:hover {
    background-color: var(--primary-color-dark);
}

/* 热门文章 */
.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-thumb {
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-info {
    flex-grow: 1;
}

.post-info h4 {
    font-size: 1rem;
    margin: 0 0 5px;
    line-height: 1.4;
}

.post-info h4 a {
    color: var(--text-color);
    transition: color 0.3s;
}

.post-info h4 a:hover {
    color: var(--primary-color);
}

.post-date {
    font-size: 0.85rem;
    color: var(--gray-text);
}

/* 文章分类 */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 10px;
}

.category-list li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.category-list a {
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    transition: color 0.3s;
}

.category-list a:hover {
    color: var(--primary-color);
}

.category-list a span {
    color: var(--gray-text);
    font-size: 0.9rem;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud a {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f5f8fa;
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag-cloud a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 订阅表单 */
.subscribe p {
    margin-bottom: 15px;
    color: var(--gray-text);
}

.subscribe-form {
    display: flex;
}

.subscribe-form input[type="email"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    font-size: 0.95rem;
}

.subscribe-form button {
    padding: 0 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.subscribe-form button:hover {
    background-color: var(--primary-color-dark);
}

/* 联系我们小部件 */
.contact-widget {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.contact-widget .widget-title {
    color: #1e88e5;
    margin-bottom: 15px;
    font-weight: bold;
}

.contact-widget p {
    margin-bottom: 15px;
    color: #333333;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}

.contact-list {
    margin-bottom: 20px;
    padding: 0;
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: #333333;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}

.contact-list li a {
    color: #0066cc;
    transition: color 0.3s;
    text-decoration: none;
    font-weight: 600;
}

.contact-list li a:hover {
    color: #1e88e5;
    text-decoration: underline;
}

.contact-list i {
    width: 20px;
    margin-right: 10px;
    color: #ff7043;
    font-size: 18px;
    margin-top: 3px;
}

.contact-list .address-text {
    color: #333333; 
    display: inline-block;
    line-height: 1.6;
    font-weight: 500;
}

.qrcode-box {
    text-align: center;
    margin-top: 10px;
}

.qrcode-box img {
    width: 120px;
    height: 120px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    padding: 5px;
}

.qrcode-box p {
    font-size: 15px;
    margin-bottom: 0;
    color: #333333;
    font-weight: 500;
}

/* 专家专栏 */
.expert-section {
    padding: var(--padding-xl) 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.expert-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.expert-column {
    display: flex;
    background-color: #f8f9fa;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.expert-avatar {
    width: 150px;
    flex-shrink: 0;
}

.expert-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expert-info {
    padding: 20px;
    border-right: 1px solid var(--border-color);
}

.expert-info h3 {
    margin: 0 0 5px;
    font-size: 1.3rem;
}

.expert-title {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.expert-desc {
    color: var(--gray-text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.expert-articles {
    padding: 20px;
    flex-grow: 1;
}

.expert-articles h4 {
    margin: 0 0 15px;
    font-size: 1.1rem;
}

.expert-articles ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
}

.expert-articles li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
}

.expert-articles li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.expert-articles li a {
    color: var(--text-color);
    transition: color 0.3s;
}

.expert-articles li a:hover {
    color: var(--primary-color);
}

.view-all {
    color: var(--primary-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.view-all::after {
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 5px;
    transition: transform 0.3s;
}

.view-all:hover {
    color: var(--primary-color-dark);
}

.view-all:hover::after {
    transform: translateX(3px);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .news-container {
        grid-template-columns: 1fr;
    }
    
    .expert-columns {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .tab-nav {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .expert-column {
        flex-direction: column;
    }
    
    .expert-avatar {
        width: 100%;
        height: 200px;
    }
    
    .expert-info {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .article-image {
        height: 180px;
    }
    
    .article-content h2 {
        font-size: 1.2rem;
    }
}

/* 用于文章内容的特殊样式 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    margin: 15px 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 20px 0;
    background-color: #f8f9fa;
    font-style: italic;
    color: var(--gray-text);
}

.article-content pre,
.article-content code {
    background-color: #f1f3f5;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

.article-content pre {
    padding: 15px;
    overflow-x: auto;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-content th,
.article-content td {
    padding: 10px;
    border: 1px solid var(--border-color);
}

.article-content th {
    background-color: #f8f9fa;
}

.contact-list .address-text {
    color: #333333; /* 深色文本 */
    display: inline-block; /* 确保适当的显示 */
    line-height: 1.5; /* 行高 */
} 