/* 学习交流页面专属样式 */

/* 用户菜单样式 */
.user-menu {
    display: flex;
    align-items: center;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid #e1e1e1;
}

#loginStatus {
    font-size: 14px;
    color: #666;
    margin-right: 10px;
}

.btn-logout {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background-color: #f5f5f5;
    border-color: #999;
    color: #333;
}

/* 页面标题区域 */
.page-header {
    background: linear-gradient(135deg, #0066cc 0%, #004a99 100%);
    color: #fff;
    padding: 100px 0 60px;
    text-align: center;
}

.page-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 15px;
}

.page-subtitle {
    font-size: 20px;
    opacity: 0.9;
}

/* 内容导航 */
.content-nav {
    background-color: #f5f7fa;
    padding: 20px 0;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.content-nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

.content-nav-list li {
    margin: 5px 15px;
}

.content-nav-link {
    display: block;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.content-nav-link:hover,
.content-nav-link.active {
    background-color: #0066cc;
    color: #fff;
}

/* 内容区块 */
.content-section {
    padding: 80px 0;
}

.content-section:nth-child(even) {
    background-color: #f5f7fa;
}

/* 文档分类筛选 */
.doc-categories {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.doc-category {
    padding: 12px 25px;
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.doc-category:hover,
.doc-category.active {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* 文档卡片 */
.documentation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.doc-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    gap: 20px;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.doc-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background-color: #e6f0ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-icon i {
    font-size: 24px;
    color: #0066cc;
}

.doc-content {
    flex-grow: 1;
}

.doc-content h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.doc-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.doc-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.doc-type,
.doc-date {
    font-size: 13px;
    color: #888;
}

.doc-type {
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
}

.doc-actions {
    display: flex;
    gap: 15px;
}

.doc-link {
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.doc-link:hover {
    color: #0052a3;
}

/* 产品资料卡片 */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.material-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.material-preview {
    height: 200px;
    overflow: hidden;
}

.material-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.material-card:hover .material-preview img {
    transform: scale(1.05);
}

.material-content {
    padding: 25px;
}

.material-content h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.material-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.material-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.material-type,
.material-size {
    font-size: 13px;
    color: #888;
}

.material-type {
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
}

.material-actions {
    display: flex;
    gap: 15px;
}

.material-link {
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.material-link:hover {
    color: #0052a3;
}

/* 资讯筛选 */
.news-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* 资讯列表 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.news-item {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.news-image {
    width: 250px;
    flex-shrink: 0;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.news-category {
    font-size: 13px;
    background-color: #e6f0ff;
    color: #0066cc;
    padding: 3px 8px;
    border-radius: 4px;
}

.news-date {
    font-size: 13px;
    color: #888;
}

.news-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.news-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.news-link {
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.news-link:hover {
    color: #0052a3;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.page-link:hover,
.page-link.active {
    background-color: #0066cc;
    color: #fff;
}

.page-link.next {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

/* FAQ分类筛选 */
.faq-categories {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.faq-category {
    padding: 12px 25px;
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.faq-category:hover,
.faq-category.active {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* FAQ列表 */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f5f7fa;
}

.faq-question h3 {
    font-size: 17px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.faq-question i {
    font-size: 14px;
    color: #888;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 25px 20px;
    font-size: 15px;
    line-height: 1.7;
    color: #666;
}

.faq-answer ol,
.faq-answer ul {
    padding: 0 25px 20px 40px;
    font-size: 15px;
    line-height: 1.7;
    color: #666;
}

/* 技术交流 */
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.community-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.community-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background-color: #e6f0ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-icon i {
    font-size: 30px;
    color: #0066cc;
}

.community-card h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.community-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}

.community-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0066cc;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    border-radius: 30px;
    transition: background-color 0.3s ease;
}

.community-link:hover {
    background-color: #0052a3;
}

/* 响应式设计 */
@media screen and (max-width: 992px) {
    .news-item {
        flex-direction: column;
    }
    
    .news-image {
        width: 100%;
        height: 200px;
    }
}

@media screen and (max-width: 768px) {
    .page-title {
        font-size: 32px;
    }
    
    .page-subtitle {
        font-size: 18px;
    }
    
    .content-nav-list {
        flex-direction: column;
        align-items: center;
    }
    
    .content-nav-list li {
        margin: 5px 0;
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .documentation-grid,
    .materials-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-card {
        flex-direction: column;
        text-align: center;
    }
    
    .doc-actions {
        justify-content: center;
    }
}

@media screen and (max-width: 576px) {
    .doc-categories,
    .news-filter,
    .faq-categories,
    .community-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-category,
    .filter-btn,
    .faq-category {
        width: 100%;
        max-width: 250px;
        margin: 0 auto 10px;
    }
}