/* ====== zhishiku.html 独享 CSS - 知识中心页面 ====== */

/* ====== Knowledge Hero Section ====== */
.knowledge-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08) 0%, rgba(0, 160, 233, 0.04) 100%);
    padding-top: 40px;
}

.knowledge-hero-content {
    max-width: 900px;
    position: relative;
    z-index: 2;
    text-align: center;
    margin: 0 auto;
}

.knowledge-hero h1 {
    font-size: 4.2rem;
    margin-bottom: 30px;
}

.knowledge-hero p {
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: var(--gray-color);
}

.knowledge-hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 50px;
}

/* ====== Knowledge Categories ====== */
.knowledge-categories {
    position: sticky;
    top: 124px;
    z-index: 1000;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    padding: 20px 0;
    transition: var(--transition);
}

.knowledge-categories.scrolled {
    top: 80px;
}

.knowledge-categories-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.knowledge-category {
    background: rgba(0, 102, 204, 0.05);
    color: var(--dark-color);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid rgba(0, 102, 204, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.knowledge-category:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0%;
    height: 100%;
    background: var(--gradient-primary);
    transition: all 0.5s ease;
    z-index: -1;
}

.knowledge-category:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.15);
}

.knowledge-category:hover:before {
    width: 100%;
}

.knowledge-category.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.2);
}

.knowledge-category.active:before {
    width: 100%;
}

.knowledge-category i {
    font-size: 1.2rem;
}

/* ====== Knowledge Articles Section ====== */
.knowledge-articles {
    position: relative;
    overflow: hidden;
    background: white;
}

.knowledge-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 60px;
}

.knowledge-header h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.knowledge-header p {
    font-size: 1.25rem;
    color: var(--gray-color);
}

/* ====== Articles Grid ====== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
    margin-bottom: 60px;
}

.article-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 102, 204, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 102, 204, 0.12);
    border-color: rgba(0, 102, 204, 0.2);
}

.article-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.article-image:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    mix-blend-mode: overlay;
}

.article-card:hover .article-image:before {
    opacity: 0.2;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-content {
    padding: 35px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    align-self: flex-start;
}

/* H3链接无下划线样式 */
.article-content h3 a {
    text-decoration: none;
    color: var(--dark-color);
    display: block;
    margin-bottom: 20px;
    transition: var(--transition);
}

.article-content h3 a:hover {
    color: var(--primary-color);
}

.article-content p {
    font-size: 1.05rem;
    margin-bottom: 25px;
    color: var(--gray-color);
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray-color);
    font-size: 0.95rem;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 102, 204, 0.05);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta i {
    font-size: 0.9rem;
}

/* ====== Pagination ====== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: 1px solid rgba(0, 102, 204, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.page-num:hover {
    background: rgba(0, 102, 204, 0.05);
    color: var(--primary-color);
    transform: translateY(-3px);
    border-color: rgba(0, 102, 204, 0.2);
}

.page-num-current {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.2);
}

.page-num-current:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

.page-num span {
    font-size: 1.5rem;
    line-height: 1;
}

/* ====== Newsletter Section ====== */
.newsletter {
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.newsletter h2 {
    color: white;
}

.newsletter h2:after {
    background: white;
}

.newsletter p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.3rem;
}

.newsletter-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-input {
    flex: 1;
    min-width: 250px;
    padding: 18px 25px;
    border-radius: 50px;
    border: none;
    font-size: 1.05rem;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.newsletter-input:focus {
    outline: none;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

.newsletter .btn {
    background: white;
    color: var(--primary-color);
}

.newsletter .btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* ====== Popular Articles ====== */
.popular-articles {
    position: relative;
    overflow: hidden;
    background: var(--light-bg);
}

.popular-articles-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 60px;
}

.popular-articles-header h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.popular-articles-header p {
    font-size: 1.25rem;
    color: var(--gray-color);
}

.popular-articles-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 800px;
    margin: 0 auto;
}

.popular-article-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 102, 204, 0.1);
    display: flex;
    align-items: center;
    gap: 25px;
}

.popular-article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.2);
}

.popular-article-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    flex-shrink: 0;
}

.popular-article-content {
    flex: 1;
}

.popular-article-content h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.popular-article-content h4 a {
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.popular-article-content h4 a:hover {
    color: var(--primary-color);
}

.popular-article-meta {
    display: flex;
    gap: 20px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.popular-article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* H3链接无下划线样式（全局） */
h3 a {
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

h3 a:hover {
    color: var(--primary-color);
}

/* ====== Responsive Design - zhishiku.html 独享部分 ====== */
@media (max-width: 1200px) {
    .knowledge-hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 992px) {
    .knowledge-categories {
        top: 114px;
    }
    
    .knowledge-categories.scrolled {
        top: 70px;
    }
    
    .knowledge-articles {
        padding: 70px 0;
    }
}

@media (max-width: 768px) {
    .knowledge-hero h1 {
        font-size: 2.8rem;
    }
    
    .knowledge-hero p {
        font-size: 1.2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .knowledge-categories-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .knowledge-category {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .popular-article-item {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .popular-article-meta {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-input {
        width: 100%;
    }
}